d29128f95bdff77dae1b71fa70fc6af7ca32879f
[gnulib.git] / ChangeLog
1 2006-10-18  Bruno Haible  <bruno@clisp.org>
2
3         * lib/lock.h [C++]: Wrap definitions in extern "C".
4
5 2006-10-18  Bruno Haible  <bruno@clisp.org>
6
7         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
8         gl_LIBOBJS list.
9
10 2006-10-18  Bruno Haible  <bruno@clisp.org>
11
12         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
13
14 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
15
16         * lib/xstrtol.h: Include gettext.h.
17         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
18         Problem reported by Eric Blake.
19         * modules/xstrtol (Depends-on): Add gettext-h.
20
21 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
22
23         * lib/strftime.c (advance): New macro.
24         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
25         incomplete type, so you can't add 0 to it.  Problem and patch
26         reported by Eelco Dolstra for dietlibc.
27
28 2006-10-18  Jim Meyering  <jim@meyering.net>
29
30         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
31         type for a local, and rename it: s/up/user_proc/.
32
33 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
34
35         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
36         READ_UTMP_USER_PROCESS.
37         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
38
39 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
40
41         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
42         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
43
44 2006-10-17  Eric Blake  <ebb9@byu.net>
45
46         * lib/sigprocmask.c (sigprocmask): Fix typo.
47
48         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
49
50         * modules/clean-temp (Makefile.am): Don't add to make output...
51         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
52         config.h.
53
54 2006-10-17  Bruno Haible  <bruno@clisp.org>
55
56         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
57         differently if DEFAULT_TEXT_DOMAIN is set.
58
59 2006-10-16  Bruno Haible  <bruno@clisp.org>
60
61         * lib/clean-temp.c: Include fwriteerror.h.
62
63 2006-10-16  Bruno Haible  <bruno@clisp.org>
64
65         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
66
67 2006-10-16  Bruno Haible  <bruno@clisp.org>
68
69         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
70         * lib/sigprocmask.h: Include <sys/types.h>.
71         (sigset_t): Use the system's definition if present.
72
73 2006-10-17  Eric Blake  <ebb9@byu.net>
74
75         * lib/xvasprintf.c (includes): Assume config.h.
76         * lib/xasprintf.c (includes): Likewise.
77
78 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
79
80         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
81         at least as wide as intmax_t.
82
83 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
84
85         (Imported from Automake.)
86         * build-aux/gnupload: Update to version 1.1 of directive file.
87
88 2006-10-16  Eric Blake  <ebb9@byu.net>
89
90         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
91         match Automake 1.10a.
92
93 2006-10-14  Bruno Haible  <bruno@clisp.org>
94
95         * modules/sigprocmask: New file.
96         * lib/sigprocmask.h: New file.
97         * lib/sigprocmask.c: New file.
98         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
99         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
100         request sigprocmask.o.
101         (gl_PREREQ_SIGPROCMASK): New macro.
102         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
103         (Depends-on): Add sigprocmask.
104         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
105         gt_SIGNALBLOCKING. Test for 'raise' only once.
106         * lib/fatal-signal.c: Include sigprocmask.h.
107         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
108         unblock_fatal_signals): Define always.
109         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
110         sigprocmask.
111
112 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
113
114         Sync from Automake.
115         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
116         which incorrectly sets the mode of an existing destination
117         directory.  In some cases the unpatched install-sh could do the
118         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
119         system.  We hope this is rare in practice, but it's clearly worth
120         fixing.  Problem reported by Alex Unleashed in
121         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
122         Also, don't bother to check for -m bugs unless we're using -m;
123         suggested by Stepan Kasal.
124
125 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
126
127         Sync from Automake.
128         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
129         `-c' flag, so they appear at the same position as in %FASTDEP%
130         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
131         which ignores unknown options only after the first non-option.
132         Bug report against M4 by Nelson H. F. Beebe.
133
134 2006-10-13  Jim Meyering  <jim@meyering.net>
135
136         Fix a bug in yesterday's change.
137         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
138         p->fts_statp->st_dev would be used uninitialized.
139         Ensures that we always call fts_stat on the very first entry.
140         Miklos Szeredi reported that find -xdev stopped working.
141
142 2006-10-12  Bruno Haible  <bruno@clisp.org>
143
144         * gnulib-tool (func_get_automake_snippet): Append an automatically
145         computed EXTRA_DIST augmentation.
146         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
147         * modules/alloca-opt (Makefile.am): Likewise.
148         * modules/allocsa (Makefile.am): Likewise.
149         * modules/arcfour (Makefile.am): Likewise.
150         * modules/arctwo (Makefile.am): Likewise.
151         * modules/argmatch (Makefile.am): Likewise.
152         * modules/argz (Makefile.am): Likewise.
153         * modules/atexit (Makefile.am): Likewise.
154         * modules/backupfile (Makefile.am): Likewise.
155         * modules/byteswap (Makefile.am): Likewise.
156         * modules/c-strtod (Makefile.am): Likewise.
157         * modules/c-strtold (Makefile.am): Likewise.
158         * modules/calloc (Makefile.am): Likewise.
159         * modules/canon-host (Makefile.am): Likewise.
160         * modules/canonicalize (Makefile.am): Likewise.
161         * modules/chdir-long (Makefile.am): Likewise.
162         * modules/chdir-safer (Makefile.am): Likewise.
163         * modules/check-version (Makefile.am): Likewise.
164         * modules/chown (Makefile.am): Likewise.
165         * modules/cloexec (Makefile.am): Likewise.
166         * modules/close-stream (Makefile.am): Likewise.
167         * modules/closeout (Makefile.am): Likewise.
168         * modules/crc (Makefile.am): Likewise.
169         * modules/csharpexec (Makefile.am): Likewise.
170         * modules/cycle-check (Makefile.am): Likewise.
171         * modules/des (Makefile.am): Likewise.
172         * modules/dev-ino (Makefile.am): Likewise.
173         * modules/dirfd (Makefile.am): Likewise.
174         * modules/dirname (Makefile.am): Likewise.
175         * modules/dup2 (Makefile.am): Likewise.
176         * modules/eealloc (Makefile.am): Likewise.
177         * modules/error (Makefile.am): Likewise.
178         * modules/euidaccess (Makefile.am): Likewise.
179         * modules/exclude (Makefile.am): Likewise.
180         * modules/exitfail (Makefile.am): Likewise.
181         * modules/fcntl-safer (Makefile.am): Likewise.
182         * modules/fcntl (Makefile.am): Likewise.
183         * modules/file-type (Makefile.am): Likewise.
184         * modules/fileblocks (Makefile.am): Likewise.
185         * modules/filemode (Makefile.am): Likewise.
186         * modules/filenamecat (Makefile.am): Likewise.
187         * modules/fnmatch (Makefile.am): Likewise.
188         * modules/fopen-safer (Makefile.am): Likewise.
189         * modules/fpending (Makefile.am): Likewise.
190         * modules/fprintftime (Makefile.am): Likewise.
191         * modules/free (Makefile.am): Likewise.
192         * modules/fsusage (Makefile.am): Likewise.
193         * modules/ftruncate (Makefile.am): Likewise.
194         * modules/fts (Makefile.am): Likewise.
195         * modules/gc-arcfour (Makefile.am): Likewise.
196         * modules/gc-des (Makefile.am): Likewise.
197         * modules/gc-hmac-md5 (Makefile.am): Likewise.
198         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
199         * modules/gc-md4 (Makefile.am): Likewise.
200         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
201         * modules/gc-sha1 (Makefile.am): Likewise.
202         * modules/gc (Makefile.am): Likewise.
203         * modules/getaddrinfo (Makefile.am): Likewise.
204         * modules/getcwd (Makefile.am): Likewise.
205         * modules/getdelim (Makefile.am): Likewise.
206         * modules/getdomainname (Makefile.am): Likewise.
207         * modules/getgroups (Makefile.am): Likewise.
208         * modules/gethostname (Makefile.am): Likewise.
209         * modules/gethrxtime (Makefile.am): Likewise.
210         * modules/getline (Makefile.am): Likewise.
211         * modules/getloadavg (Makefile.am): Likewise.
212         * modules/getlogin_r (Makefile.am): Likewise.
213         * modules/getndelim2 (Makefile.am): Likewise.
214         * modules/getopt (Makefile.am): Likewise.
215         * modules/getpagesize (Makefile.am): Likewise.
216         * modules/getpass-gnu (Makefile.am): Likewise.
217         * modules/getpass (Makefile.am): Likewise.
218         * modules/getsubopt (Makefile.am): Likewise.
219         * modules/gettime (Makefile.am): Likewise.
220         * modules/gettimeofday (Makefile.am): Likewise.
221         * modules/getugroups (Makefile.am): Likewise.
222         * modules/getusershell (Makefile.am): Likewise.
223         * modules/glob (Makefile.am): Likewise.
224         * modules/group-member (Makefile.am): Likewise.
225         * modules/hard-locale (Makefile.am): Likewise.
226         * modules/hash (Makefile.am): Likewise.
227         * modules/hmac-md5 (Makefile.am): Likewise.
228         * modules/hmac-sha1 (Makefile.am): Likewise.
229         * modules/human (Makefile.am): Likewise.
230         * modules/idcache (Makefile.am): Likewise.
231         * modules/imaxabs (Makefile.am): Likewise.
232         * modules/imaxdiv (Makefile.am): Likewise.
233         * modules/inet_ntop (Makefile.am): Likewise.
234         * modules/inet_pton (Makefile.am): Likewise.
235         * modules/intprops (Makefile.am): Likewise.
236         * modules/inttostr (Makefile.am): Likewise.
237         * modules/inttypes (Makefile.am): Likewise.
238         * modules/isapipe (Makefile.am): Likewise.
239         * modules/javaversion (Makefile.am): Likewise.
240         * modules/lchmod (Makefile.am): Likewise.
241         * modules/lchown (Makefile.am): Likewise.
242         * modules/localcharset (Makefile.am): Likewise.
243         * modules/long-options (Makefile.am): Likewise.
244         * modules/lstat (Makefile.am): Likewise.
245         * modules/malloc (Makefile.am): Likewise.
246         * modules/mathl (Makefile.am): Likewise.
247         * modules/mbchar (Makefile.am): Likewise.
248         * modules/md2 (Makefile.am): Likewise.
249         * modules/md4 (Makefile.am): Likewise.
250         * modules/md5 (Makefile.am): Likewise.
251         * modules/memcasecmp (Makefile.am): Likewise.
252         * modules/memchr (Makefile.am): Likewise.
253         * modules/memcmp (Makefile.am): Likewise.
254         * modules/memcoll (Makefile.am): Likewise.
255         * modules/memcpy (Makefile.am): Likewise.
256         * modules/memmem (Makefile.am): Likewise.
257         * modules/memmove (Makefile.am): Likewise.
258         * modules/mempcpy (Makefile.am): Likewise.
259         * modules/memrchr (Makefile.am): Likewise.
260         * modules/memset (Makefile.am): Likewise.
261         * modules/memxor (Makefile.am): Likewise.
262         * modules/mkancesdirs (Makefile.am): Likewise.
263         * modules/mkdir-p (Makefile.am): Likewise.
264         * modules/mkdir (Makefile.am): Likewise.
265         * modules/mkdtemp (Makefile.am): Likewise.
266         * modules/mkstemp (Makefile.am): Likewise.
267         * modules/mktime (Makefile.am): Likewise.
268         * modules/modechange (Makefile.am): Likewise.
269         * modules/mountlist (Makefile.am): Likewise.
270         * modules/nanosleep (Makefile.am): Likewise.
271         * modules/obstack (Makefile.am): Likewise.
272         * modules/openat (Makefile.am): Likewise.
273         * modules/pagealign_alloc (Makefile.am): Likewise.
274         * modules/pathmax (Makefile.am): Likewise.
275         * modules/physmem (Makefile.am): Likewise.
276         * modules/poll (Makefile.am): Likewise.
277         * modules/posixtm (Makefile.am): Likewise.
278         * modules/posixver (Makefile.am): Likewise.
279         * modules/putenv (Makefile.am): Likewise.
280         * modules/quote (Makefile.am): Likewise.
281         * modules/quotearg (Makefile.am): Likewise.
282         * modules/raise (Makefile.am): Likewise.
283         * modules/read-file (Makefile.am): Likewise.
284         * modules/readline (Makefile.am): Likewise.
285         * modules/readlink (Makefile.am): Likewise.
286         * modules/readtokens (Makefile.am): Likewise.
287         * modules/readutmp (Makefile.am): Likewise.
288         * modules/realloc (Makefile.am): Likewise.
289         * modules/regex (Makefile.am): Likewise.
290         * modules/rename-dest-slash (Makefile.am): Likewise.
291         * modules/rename (Makefile.am): Likewise.
292         * modules/rijndael (Makefile.am): Likewise.
293         * modules/rmdir (Makefile.am): Likewise.
294         * modules/rpmatch (Makefile.am): Likewise.
295         * modules/safe-read (Makefile.am): Likewise.
296         * modules/safe-write (Makefile.am): Likewise.
297         * modules/same-inode (Makefile.am): Likewise.
298         * modules/same (Makefile.am): Likewise.
299         * modules/save-cwd (Makefile.am): Likewise.
300         * modules/savedir (Makefile.am): Likewise.
301         * modules/setenv (Makefile.am): Likewise.
302         * modules/settime (Makefile.am): Likewise.
303         * modules/sha1 (Makefile.am): Likewise.
304         * modules/sig2str (Makefile.am): Likewise.
305         * modules/snprintf (Makefile.am): Likewise.
306         * modules/stat-macros (Makefile.am): Likewise.
307         * modules/stat-time (Makefile.am): Likewise.
308         * modules/stdbool (Makefile.am): Likewise.
309         * modules/stdint (Makefile.am): Likewise.
310         * modules/stdlib-safer (Makefile.am): Likewise.
311         * modules/stpcpy (Makefile.am): Likewise.
312         * modules/stpncpy (Makefile.am): Likewise.
313         * modules/strcase (Makefile.am): Likewise.
314         * modules/strcasestr (Makefile.am): Likewise.
315         * modules/strchrnul (Makefile.am): Likewise.
316         * modules/strcspn (Makefile.am): Likewise.
317         * modules/strdup (Makefile.am): Likewise.
318         * modules/strerror (Makefile.am): Likewise.
319         * modules/strftime (Makefile.am): Likewise.
320         * modules/strndup (Makefile.am): Likewise.
321         * modules/strnlen (Makefile.am): Likewise.
322         * modules/strpbrk (Makefile.am): Likewise.
323         * modules/strsep (Makefile.am): Likewise.
324         * modules/strstr (Makefile.am): Likewise.
325         * modules/strtod (Makefile.am): Likewise.
326         * modules/strtoimax (Makefile.am): Likewise.
327         * modules/strtok_r (Makefile.am): Likewise.
328         * modules/strtol (Makefile.am): Likewise.
329         * modules/strtoll (Makefile.am): Likewise.
330         * modules/strtoul (Makefile.am): Likewise.
331         * modules/strtoull (Makefile.am): Likewise.
332         * modules/strtoumax (Makefile.am): Likewise.
333         * modules/strverscmp (Makefile.am): Likewise.
334         * modules/sys_socket (Makefile.am): Likewise.
335         * modules/sys_stat (Makefile.am): Likewise.
336         * modules/sysexits (Makefile.am): Likewise.
337         * modules/time_r (Makefile.am): Likewise.
338         * modules/timegm (Makefile.am): Likewise.
339         * modules/timespec (Makefile.am): Likewise.
340         * modules/tmpfile-safer (Makefile.am): Likewise.
341         * modules/trim (Makefile.am): Likewise.
342         * modules/unistd-safer (Makefile.am): Likewise.
343         * modules/unlinkdir (Makefile.am): Likewise.
344         * modules/unlocked-io (Makefile.am): Likewise.
345         * modules/userspec (Makefile.am): Likewise.
346         * modules/utime (Makefile.am): Likewise.
347         * modules/utimecmp (Makefile.am): Likewise.
348         * modules/utimens (Makefile.am): Likewise.
349         * modules/vasnprintf (Makefile.am): Likewise.
350         * modules/vasprintf (Makefile.am): Likewise.
351         * modules/vsnprintf (Makefile.am): Likewise.
352         * modules/xalloc (Makefile.am): Likewise.
353         * modules/xgetcwd (Makefile.am): Likewise.
354         * modules/xnanosleep (Makefile.am): Likewise.
355         * modules/xreadlink (Makefile.am): Likewise.
356         * modules/xstrtod (Makefile.am): Likewise.
357         * modules/xstrtol (Makefile.am): Likewise.
358         * modules/xstrtold (Makefile.am): Likewise.
359         * modules/yesno (Makefile.am): Likewise.
360         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
361
362 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
363
364         * modules/error (Makefile.am): Distribute files through
365         EXTRA_DIST, not lib_SOURCES.
366
367 2006-10-12  Eric Blake  <ebb9@byu.net>
368
369         * modules/error (Makefile.am): Distribute files in /lib.
370         * modules/obstack (Makefile.am): Likewise.
371
372 2006-10-12  Bruno Haible  <bruno@clisp.org>
373
374         * modules/acl (Makefile.am): Distribute all files in lib/ through
375         EXTRA_DIST.
376         * modules/arcfour (Makefile.am): Likewise.
377         * modules/arctwo (Makefile.am): Likewise.
378         * modules/argmatch (Makefile.am): Likewise.
379         * modules/argz (Makefile.am): Likewise.
380         * modules/atexit (Makefile.am): Likewise.
381         * modules/backupfile (Makefile.am): Likewise.
382         * modules/c-strtod (Makefile.am): Likewise.
383         * modules/c-strtold (Makefile.am): Likewise.
384         * modules/calloc (Makefile.am): Likewise.
385         * modules/canon-host (Makefile.am): Likewise.
386         * modules/canonicalize (Makefile.am): Likewise.
387         * modules/chdir-long (Makefile.am): Likewise.
388         * modules/chdir-safer (Makefile.am): Likewise.
389         * modules/check-version (Makefile.am): Likewise.
390         * modules/chown (Makefile.am): Likewise.
391         * modules/cloexec (Makefile.am): Likewise.
392         * modules/close-stream (Makefile.am): Likewise.
393         * modules/closeout (Makefile.am): Likewise.
394         * modules/crc (Makefile.am): Likewise.
395         * modules/cycle-check (Makefile.am): Likewise.
396         * modules/des (Makefile.am): Likewise.
397         * modules/dirfd (Makefile.am): Likewise.
398         * modules/dirname (Makefile.am): Likewise.
399         * modules/dup2 (Makefile.am): Likewise.
400         * modules/euidaccess (Makefile.am): Likewise.
401         * modules/exclude (Makefile.am): Likewise.
402         * modules/exitfail (Makefile.am): Likewise.
403         * modules/fcntl-safer (Makefile.am): Likewise.
404         * modules/file-type (Makefile.am): Likewise.
405         * modules/fileblocks (Makefile.am): Likewise.
406         * modules/filemode (Makefile.am): Likewise.
407         * modules/filenamecat (Makefile.am): Likewise.
408         * modules/fnmatch (Makefile.am): Likewise.
409         * modules/fopen-safer (Makefile.am): Likewise.
410         * modules/fpending (Makefile.am): Likewise.
411         * modules/fprintftime (Makefile.am): Likewise.
412         * modules/free (Makefile.am): Likewise.
413         * modules/fsusage (Makefile.am): Likewise.
414         * modules/ftruncate (Makefile.am): Likewise.
415         * modules/fts (Makefile.am): Likewise.
416         * modules/gc (Makefile.am): Likewise.
417         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
418         * modules/getaddrinfo (Makefile.am): Likewise.
419         * modules/getcwd (Makefile.am): Likewise.
420         * modules/getdelim (Makefile.am): Likewise.
421         * modules/getdomainname (Makefile.am): Likewise.
422         * modules/getgroups (Makefile.am): Likewise.
423         * modules/gethostname (Makefile.am): Likewise.
424         * modules/gethrxtime (Makefile.am): Likewise.
425         * modules/getline (Makefile.am): Likewise.
426         * modules/getloadavg (Makefile.am): Likewise.
427         * modules/getlogin_r (Makefile.am): Likewise.
428         * modules/getopt (Makefile.am): Likewise.
429         * modules/getpass (Makefile.am): Likewise.
430         * modules/getpass-gnu (Makefile.am): Likewise.
431         * modules/getsubopt (Makefile.am): Likewise.
432         * modules/gettime (Makefile.am): Likewise.
433         * modules/gettimeofday (Makefile.am): Likewise.
434         * modules/getugroups (Makefile.am): Likewise.
435         * modules/getusershell (Makefile.am): Likewise.
436         * modules/glob (Makefile.am): Likewise.
437         * modules/group-member (Makefile.am): Likewise.
438         * modules/hard-locale (Makefile.am): Likewise.
439         * modules/hash (Makefile.am): Likewise.
440         * modules/hmac-md5 (Makefile.am): Likewise.
441         * modules/hmac-sha1 (Makefile.am): Likewise.
442         * modules/human (Makefile.am): Likewise.
443         * modules/idcache (Makefile.am): Likewise.
444         * modules/imaxabs (Makefile.am): Likewise.
445         * modules/imaxdiv (Makefile.am): Likewise.
446         * modules/inet_ntop (Makefile.am): Likewise.
447         * modules/inet_pton (Makefile.am): Likewise.
448         * modules/inttostr (Makefile.am): Likewise.
449         * modules/isapipe (Makefile.am): Likewise.
450         * modules/lchown (Makefile.am): Likewise.
451         * modules/long-options (Makefile.am): Likewise.
452         * modules/lstat (Makefile.am): Likewise.
453         * modules/malloc (Makefile.am): Likewise.
454         * modules/mathl (Makefile.am): Likewise.
455         * modules/mbchar (Makefile.am): Likewise.
456         * modules/md2 (Makefile.am): Likewise.
457         * modules/md4 (Makefile.am): Likewise.
458         * modules/md5 (Makefile.am): Likewise.
459         * modules/memcasecmp (Makefile.am): Likewise.
460         * modules/memchr (Makefile.am): Likewise.
461         * modules/memcmp (Makefile.am): Likewise.
462         * modules/memcoll (Makefile.am): Likewise.
463         * modules/memcpy (Makefile.am): Likewise.
464         * modules/memmem (Makefile.am): Likewise.
465         * modules/memmove (Makefile.am): Likewise.
466         * modules/mempcpy (Makefile.am): Likewise.
467         * modules/memrchr (Makefile.am): Likewise.
468         * modules/memset (Makefile.am): Likewise.
469         * modules/memxor (Makefile.am): Likewise.
470         * modules/mkancesdirs (Makefile.am): Likewise.
471         * modules/mkdir (Makefile.am): Likewise.
472         * modules/mkdir-p (Makefile.am): Likewise.
473         * modules/mkdtemp (Makefile.am): Likewise.
474         * modules/mkstemp (Makefile.am): Likewise.
475         * modules/mktime (Makefile.am): Likewise.
476         * modules/modechange (Makefile.am): Likewise.
477         * modules/mountlist (Makefile.am): Likewise.
478         * modules/nanosleep (Makefile.am): Likewise.
479         * modules/openat (Makefile.am): Likewise.
480         * modules/pagealign_alloc (Makefile.am): Likewise.
481         * modules/physmem (Makefile.am): Likewise.
482         * modules/poll (Makefile.am): Likewise.
483         * modules/posixtm (Makefile.am): Likewise.
484         * modules/posixver (Makefile.am): Likewise.
485         * modules/putenv (Makefile.am): Likewise.
486         * modules/quote (Makefile.am): Likewise.
487         * modules/quotearg (Makefile.am): Likewise.
488         * modules/raise (Makefile.am): Likewise.
489         * modules/read-file (Makefile.am): Likewise.
490         * modules/readline (Makefile.am): Likewise.
491         * modules/readlink (Makefile.am): Likewise.
492         * modules/readtokens (Makefile.am): Likewise.
493         * modules/readutmp (Makefile.am): Likewise.
494         * modules/realloc (Makefile.am): Likewise.
495         * modules/regex (Makefile.am): Likewise.
496         * modules/rename (Makefile.am): Likewise.
497         * modules/rename-dest-slash (Makefile.am): Likewise.
498         * modules/rijndael (Makefile.am): Likewise.
499         * modules/rmdir (Makefile.am): Likewise.
500         * modules/rpmatch (Makefile.am): Likewise.
501         * modules/safe-read (Makefile.am): Likewise.
502         * modules/safe-write (Makefile.am): Likewise.
503         * modules/same (Makefile.am): Likewise.
504         * modules/save-cwd (Makefile.am): Likewise.
505         * modules/savedir (Makefile.am): Likewise.
506         * modules/setenv (Makefile.am): Likewise.
507         * modules/settime (Makefile.am): Likewise.
508         * modules/sha1 (Makefile.am): Likewise.
509         * modules/sig2str (Makefile.am): Likewise.
510         * modules/snprintf (Makefile.am): Likewise.
511         * modules/stdlib-safer (Makefile.am): Likewise.
512         * modules/stpcpy (Makefile.am): Likewise.
513         * modules/stpncpy (Makefile.am): Likewise.
514         * modules/strcase (Makefile.am): Likewise.
515         * modules/strcasestr (Makefile.am): Likewise.
516         * modules/strchrnul (Makefile.am): Likewise.
517         * modules/strcspn (Makefile.am): Likewise.
518         * modules/strdup (Makefile.am): Likewise.
519         * modules/strerror (Makefile.am): Likewise.
520         * modules/strftime (Makefile.am): Likewise.
521         * modules/strndup (Makefile.am): Likewise.
522         * modules/strnlen (Makefile.am): Likewise.
523         * modules/strpbrk (Makefile.am): Likewise.
524         * modules/strsep (Makefile.am): Likewise.
525         * modules/strstr (Makefile.am): Likewise.
526         * modules/strtod (Makefile.am): Likewise.
527         * modules/strtoimax (Makefile.am): Likewise.
528         * modules/strtok_r (Makefile.am): Likewise.
529         * modules/strtol (Makefile.am): Likewise.
530         * modules/strtoll (Makefile.am): Likewise.
531         * modules/strtoul (Makefile.am): Likewise.
532         * modules/strtoull (Makefile.am): Likewise.
533         * modules/strtoumax (Makefile.am): Likewise.
534         * modules/strverscmp (Makefile.am): Likewise.
535         * modules/time_r (Makefile.am): Likewise.
536         * modules/timegm (Makefile.am): Likewise.
537         * modules/tmpfile-safer (Makefile.am): Likewise.
538         * modules/unistd-safer (Makefile.am): Likewise.
539         * modules/unlinkdir (Makefile.am): Likewise.
540         * modules/userspec (Makefile.am): Likewise.
541         * modules/utime (Makefile.am): Likewise.
542         * modules/utimecmp (Makefile.am): Likewise.
543         * modules/utimens (Makefile.am): Likewise.
544         * modules/vasnprintf (Makefile.am): Likewise.
545         * modules/vasprintf (Makefile.am): Likewise.
546         * modules/vsnprintf (Makefile.am): Likewise.
547         * modules/xalloc (Makefile.am): Likewise.
548         * modules/xgetcwd (Makefile.am): Likewise.
549         * modules/xnanosleep (Makefile.am): Likewise.
550         * modules/xreadlink (Makefile.am): Likewise.
551         * modules/xstrtod (Makefile.am): Likewise.
552         * modules/xstrtol (Makefile.am): Likewise.
553         * modules/xstrtold (Makefile.am): Likewise.
554         * modules/yesno (Makefile.am): Likewise.
555
556 2006-10-12  Jim Meyering  <jim@meyering.net>
557
558         * m4/getloadavg.m4: Revert the change below.
559
560         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
561         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
562         fail with a symlink, which is what coreutils' ./bootstrap now
563         creates by default.
564
565 2006-10-12  Bruno Haible  <bruno@clisp.org>
566
567         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
568         mingw.
569         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
570         MSVC and mingw explicitly.
571
572 2006-10-11  Simon Josefsson  <jas@extundo.com>
573             Bruno Haible  <bruno@clisp.org>
574
575         Add support for multiple gnulib-tool invocations in the scope of a
576         single configure.ac file.
577         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
578         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
579         with the same contents as the _LIBADD variable.
580         (func_emit_initmacro_start, func_emit_initmacro_end,
581         func_emit_initmacro_done): New functions.
582         (func_import, func_create_testdir): Invoke them. Allow the identifiers
583         gl_LIBOBJS and gl_LTLIBOBJS.
584
585 2006-10-11  Bruno Haible  <bruno@clisp.org>
586
587         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
588         (func_create_testdir): Don't create po/Makefile.am, don't invoke
589         autoreconf. Instead, invoke autopoint explicitly but move back the
590         *.m4 files from gnulib.
591
592 2006-10-11  Bruno Haible  <bruno@clisp.org>
593
594         * gnulib-tool (func_usage): Make module names after --create-testdir
595         optional.
596         (func_create_testdir): If no module was specified, use nearly all
597         modules.
598
599 2006-10-12  Jim Meyering  <jim@meyering.net>
600
601         Big performance improvement for fts-based tools that use FTS_NOSTAT.
602         Avoid spurious inode-mismatch problems on non-POSIX file systems.
603         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
604         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
605         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
606         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
607         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
608         (fts_set_stat_required): New function.
609         (fts_open): Defer the calls to fts_stat, if possible or requested.
610         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
611         into fts_stat itself.
612         (fts_read): Perform any required (deferred) fts_stat call.
613         (fts_build): Likewise, for the directory we're about to open and read.
614         In the readdir loop, carefully decide whether each entry will require
615         an eventual call to fts_stat, using dirent.d_type info if available.
616         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
617         a command line argument into this function.  Update all callers.
618         Map a return value of FTS_DOT to FTS_D for a command line argument.
619         * modules/fts (Depends-on): Add d-type.  Alphabetize.
620         Thanks to Miklos Szeredi for his tenacity and for the initial
621         bug report about "find" failing on a FUSE-based file system.
622
623         * lib/fts.c (fts_open): Use consistent indentation.
624
625 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
626
627         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
628         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
629         reported by Jim Meyering.  All uses of cache variables renamed
630         to match Autoconf's.
631         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
632         the other one.
633
634         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
635         Fix misspelling in diagnostic.
636
637 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
638
639         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
640         defined.  Problem reported by Matthew Woehlke.
641
642         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
643         Add support for Tandem NonStop R series.
644         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
645         Use new macro.
646
647         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
648         (has_trailing_slash): Omit size arg; all callers changed.
649         Omit 'inline', since it doesn't help performance and we'd
650         need to configure it.
651         Don't count //, ///, etc. as having a trailing slash.
652         As a side effect, this removes a C99ism reported by Matthew Woehlke.
653         (rpl_rename_dest_slash): On failure, use rename's errno rather
654         than (in some cases) an incorrect or junk errno.
655         Simplify code by removing need to compute length; this does
656         cause it to make two passes instead of one over the file name,
657         but it's worth it.
658
659         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
660         change, since Autoconf's version may no longer be appropriate now
661         that we are using CVS Autoconf's version.  Add support for Tandem.
662
663 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
664             Bruno Haible  <bruno@clisp.org>
665
666         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
667         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
668         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
669         gl_AC_TYPE_LONG_LONG.
670
671         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
672         instead of HAVE_LONG_LONG.
673         * lib/printf-args.c (printf_fetchargs): Likewise.
674         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
675         * lib/vasnprintf.c (VASNPRINTF): Likewise.
676         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
677         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
678         gl_AC_TYPE_LONG_LONG.
679
680 2006-10-11  Bruno Haible  <bruno@clisp.org>
681
682         * m4/longlong.m4: Add comments.
683         * m4/ulonglong.m4: Likewise.
684
685 2006-10-10  Bruno Haible  <bruno@clisp.org>
686
687         Make it possible to #define stpcpy, strdup to aliases.
688         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
689         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
690
691 2006-10-10  Bruno Haible  <bruno@clisp.org>
692
693         Make it possible to #define gcd to an alias.
694         * lib/gcd.c: Include config.h.
695
696 2006-10-10  Bruno Haible  <bruno@clisp.org>
697
698         Make it possible to #define c_isascii to an alias.
699         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
700         defined. Undefine the macros before defining them, to avoid gcc
701         warnings.
702         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
703         define NO_C_CTYPE_MACROS early.
704
705 2006-10-10  Bruno Haible  <bruno@clisp.org>
706
707         Make it possible to #define set_program_name to an alias.
708         * lib/progname.c: Don't undefine set_program_name; instead, undefine
709         ENABLE_RELOCATABLE early.
710
711 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
712
713         Port to Tandem NSK OSS, which has 64-bit signed int but at most
714         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
715         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
716         More generally, don't assume that 64-bit signed int is available
717         if unsigned int is, and vice versa.
718         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
719         unsigned symbols, not on their signed counterparts.
720         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
721         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
722         (UINT64_C, UINTMAX_C):
723         Likewise.
724         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
725         unsigned counterparts.
726         (Have_long_long, Unsigned): New macros.
727         (Int): Renamed from INT.
728         (strtoimax): Use the new macros.
729         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
730         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
731         * modules/inttypes (inttypes.h): Substitute
732         HAVE_UNSIGNED_LONG_LONG_INT.
733         * modules/stdint (stdint.h): Likewise.
734         (Files): Add m4/ulonglong.m4.
735
736 2006-10-10  Bruno Haible  <bruno@clisp.org>
737
738         Fix a gcc -Wshadow warning.
739         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
740         to 'bucket'.
741         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
742         gl_linked_indexof_from_to): Likewise.
743         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
744         Likewise.
745         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
746         Likewise.
747         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
748         Reported by Eric Blake.
749
750 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
751
752         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
753         for NetBSD.  Problem reported by Bruno Haible.
754
755 2006-10-09  Jim Meyering  <jim@meyering.net>
756
757         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
758         Patch from Bruno Haible.
759
760 2006-10-09  Jim Meyering  <jim@meyering.net>
761
762         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
763         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
764         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
765
766 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
767
768         Don't include <config.h> twice; this doesn't work in some cases,
769         e.g., when config.h has "#define intmax_t long long int" and
770         we include <config.h>, <inttypes.h>, <config.h> in that order.
771         Problem reported by Matthew Woehlke in:
772         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
773         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
774         * lib/fts-cycle.c: Don't include config.h.
775         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
776         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
777         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
778         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
779         inttypes.h.
780         * lib/xstrtoumax.c: Likewise.
781         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
782         __strtol and the like, so that this module is more like its siblings.
783         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
784         Remove; no longer needed now that we assume gnulib inttypes.h.
785
786 2006-10-08  Bruno Haible  <bruno@clisp.org>
787
788         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
789         option.
790
791 2006-10-07  Jim Meyering  <jim@meyering.net>
792
793         * modules/inttypes (inttypes.h): Revert what seems to have been
794         an inadvertent part of today's change: use "|", not "/" in the
795         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
796
797 2006-10-07  Bruno Haible  <bruno@clisp.org>
798
799         * modules/sublist: New file.
800
801 2006-10-07  Bruno Haible  <bruno@clisp.org>
802
803         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
804         * modules/argz (argz.h): Likewise.
805         * modules/arpa_inet (arpa/inet.h): Likewise.
806         * modules/byteswap (byteswap.h): Likewise.
807         * modules/configmake (configmake.h): Likewise.
808         * modules/fcntl (fcntl.h): Likewise.
809         * modules/fnmatch (fnmatch.h): Likewise.
810         * modules/getopt (getopt.h): Likewise.
811         * modules/glob (glob.h): Likewise.
812         * modules/inttypes (inttypes.h): Likewise.
813         * modules/netinet_in (netinet/in.h): Likewise.
814         * modules/poll (poll.h): Likewise.
815         * modules/stdbool (stdbool.h): Likewise.
816         * modules/stdint (stdint.h): Likewise.
817         * modules/sys_select (sys/select.h): Likewise.
818         * modules/sys_socket (sys/socket.h): Likewise.
819         * modules/sys_stat (sys/stat.h): Likewise.
820         * modules/sysexits (sysexits.h): Likewise.
821         * modules/unistd (unistd.h): Likewise.
822         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
823         Add a "DO NOT EDIT" comment to the generated file.
824         (func_import): Likewise for gnulib-comp.m4.
825
826 2006-10-07  Bruno Haible  <bruno@clisp.org>
827
828         * lib/gl_sublist.h: New file.
829         * lib/gl_sublist.c: New file.
830
831 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
832
833         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
834         name (relative to the original working directory) and the file
835         name component (relative to the temporary working directory).  All
836         callers changed.
837         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
838         * lib/mkdir-p.c (make_dir_parents): Likewise.
839         * lib/mkdir-p.h (make_dir_parents): Likewise.
840
841 2006-10-06  Eric Blake  <ebb9@byu.net>
842
843         Define several macros for use by the clean-temp module.
844         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
845         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
846         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
847
848         * lib/clean-temp.h (close_stream_temp): New declaration.
849         * lib/clean-temp.c (includes): Pull in headers according to what
850         other modules are in use.
851         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
852
853 2006-10-06  Bruno Haible  <bruno@clisp.org>
854
855         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
856         instead of fopen, fwriteerror.
857
858 2006-10-06  Bruno Haible  <bruno@clisp.org>
859
860         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
861         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
862         int.
863         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
864         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
865         Return an error indicator.
866         Suggested by Eric Blake.
867
868 2006-10-06  Bruno Haible  <bruno@clisp.org>
869
870         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
871         Reported by Eric Blake.
872
873 2006-10-06  Bruno Haible  <bruno@clisp.org>
874
875         * modules/closeout (Description): Mention stderr too.
876
877 2006-10-06  Bruno Haible  <bruno@clisp.org>
878         and Paul Eggert  <eggert@cs.ucla.edu>
879
880         * lib/closeout.c (close_stdout): Also close stderr.
881         * lib/closeout.h: Update comment.
882
883 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
884
885         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
886         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
887         * lib/dirchownmod.c: Include lchown.h.
888         * lib/lchown.c: Don't include files that lchown.h now includes.
889         Don't declare chown, since lchown.h now does that.
890         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
891         (lchown): Define to rpl_chown if lchown is declared but
892         does not exist.  Declare using a prototype if lchown is not
893         declared.  Add a copyright notice.
894         * lib/mkstemp.h: Include <unistd.h>.
895         * lib/openat.c: Include lchown.h.
896
897         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
898         we now test for that separately.
899         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
900         rather than O_NOFOLLOW, when testing whether it's possible to
901         avoid a race condition reliably.
902         * lib/savewd.c (savewd_chdir): Likewise.
903
904         Remove macros that are no longer needed now that stdint.h is
905         reliable.
906         * lib/fsusage.c (UINTMAX_MAX): Remove.
907         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
908         * lib/utimecmp.c (SIZE_MAX): Remove.
909
910         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
911
912         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
913         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
914         O_NOATIME works.
915
916 2006-10-05  Bruno Haible  <bruno@clisp.org>
917
918         * lib/gl_list.h (gl_sortedlist_search_from_to,
919         gl_sortedlist_indexof_from_to): New declarations.
920         (gl_list_implementation): New fields sortedlist_search_from_to,
921         sortedlist_indexof_from_to.
922         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
923         inline functions.
924         * lib/gl_list.c (gl_sortedlist_search_from_to,
925         gl_sortedlist_indexof_from_to): New functions.
926         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
927         function.
928         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
929         (gl_array_sortedlist_search_from_to): New function.
930         (gl_array_list_implementation): Update.
931         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
932         function.
933         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
934         (gl_carray_sortedlist_search_from_to): New function.
935         (gl_carray_list_implementation): Update.
936         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
937         gl_linked_sortedlist_indexof_from_to): New functions.
938         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
939         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
940         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
941         gl_tree_sortedlist_indexof_from_to): New functions.
942         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
943         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
944         Update.
945         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
946         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
947         Update.
948
949 2006-10-05  Bruno Haible  <bruno@clisp.org>
950
951         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
952         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
953         (struct gl_list_implementation): Add fields search_from_to,
954         indexof_from_to. Remove fields search, indexof.
955         (gl_list_search): Use the search_from_to method.
956         (gl_list_search_from, gl_list_search_from_to): New functions.
957         (gl_list_indexof): Use the indexof_from_to method.
958         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
959         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
960         (gl_list_search_from, gl_list_search_from_to): New functions.
961         (gl_list_indexof): Use the indexof_from_to method.
962         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
963         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
964         gl_array_indexof. Add start_index, end_index arguments.
965         (gl_array_search_from_to): Renamed from gl_array_search. Add
966         start_index, end_index arguments.
967         (gl_array_remove, gl_array_list_implementation): Update.
968         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
969         gl_carray_indexof. Add start_index, end_index arguments.
970         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
971         start_index, end_index arguments.
972         (gl_carray_remove, gl_carray_list_implementation): Update.
973         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
974         gl_linked_search. Add start_index, end_index arguments.
975         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
976         start_index, end_index arguments.
977         (gl_linked_remove): Update.
978         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
979         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
980         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
981         field to 'size_t'.
982         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
983         gl_tree_search. Add start_index, end_index arguments.
984         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
985         start_index, end_index arguments.
986         (gl_tree_remove): Update.
987         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
988         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
989         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
990         function.
991         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
992         gl_tree_search. Add start_index, end_index arguments.
993         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
994         start_index, end_index arguments.
995         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
996         Update.
997         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
998
999 2006-10-05  Bruno Haible  <bruno@clisp.org>
1000
1001         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
1002
1003         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
1004         fwriteerror_temp): New declarations.
1005         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
1006         (descriptors): New variable.
1007         (cleanup): First, close the descriptors.
1008         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
1009         fclose_temp, fwriteerror_temp): New functions.
1010
1011 2006-10-04  Jim Meyering  <jim@meyering.net>
1012
1013         * lib/fts.c (fts_open): Tiny comment change.
1014
1015 2006-10-04  Bruno Haible  <bruno@clisp.org>
1016
1017         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
1018         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
1019         gl_LOCK_BODY.
1020         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
1021         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
1022         gl_LOCK_EARLY_BODY.
1023         (gl_LOCK): Require gl_LOCK_BODY.
1024
1025 2006-10-04  Bruno Haible  <bruno@clisp.org>
1026
1027         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
1028         (gl_oset_search_atleast): New declaration.
1029         (struct gl_oset_implementation): Add field 'search_atleast'.
1030         (gl_oset_search_atleast): New inline function.
1031         * lib/gl_oset.c (gl_oset_search_atleast): New function.
1032         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
1033         (gl_array_oset_implementation): Update.
1034         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
1035         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
1036         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
1037
1038 2006-10-04  Bruno Haible  <bruno@clisp.org>
1039
1040         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
1041
1042 2006-10-03  Bruno Haible  <bruno@clisp.org>
1043
1044         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
1045         from gl_avltreehash_list_implementation.
1046
1047 2006-10-03  Bruno Haible  <bruno@clisp.org>
1048
1049         * lib/gl_oset.c (gl_oset_add): Fix return type.
1050
1051 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
1052
1053         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
1054
1055 2006-10-02  Eric Blake  <ebb9@byu.net>
1056
1057         * modules/strnlen (Depends-on): Add extensions.
1058
1059 2006-10-02  Eric Blake  <ebb9@byu.net>
1060
1061         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
1062         definition in 2.60+.
1063
1064 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
1065
1066         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
1067         checks.
1068
1069 2006-10-02  Bruno Haible  <bruno@clisp.org>
1070
1071         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
1072         to the AUTOMAKE_OPTIONS.
1073         Reported by Jim Meyering.
1074
1075 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
1076
1077         Work around bug in Solaris 10 /proc file system:
1078         /proc/self/fd/NNN/.. isn't the parent directory of
1079         the directory whose file descriptor is NNN.  This needs to
1080         be worked around at run time, not compile time, since a
1081         program might be built on Solaris 8, where things work, and
1082         run on Solaris 10.
1083         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
1084         to use the following interface instead:
1085         (OPENAT_BUFFER_SIZE): New macro.
1086         (openat_proc_name): New function.
1087         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
1088         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
1089         Likewise.
1090         * lib/openat-proc.c: New file.
1091         * modules/openat (Files): Add lib/openat-proc.c.
1092         (Depends-on): Add same-inode, stdbool.
1093         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
1094
1095 2006-09-29  Bruno Haible  <bruno@clisp.org>
1096
1097         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
1098         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
1099         argument. Set stdout_closed before testing for ferror, not after.
1100         (fwriteerror, fwriteerror_no_ebadf): New functions.
1101
1102 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1103
1104         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
1105
1106 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
1107
1108         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
1109         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
1110
1111 2006-09-28  Jim Meyering  <jim@meyering.net>
1112
1113         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
1114         Include <unistd.h>.
1115
1116 2006-09-28  Bruno Haible  <bruno@clisp.org>
1117
1118         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
1119         * modules/linkedhash-list (Depends-on): Likewise.
1120         * modules/rbtreehash-list (Depends-on): Likewise.
1121
1122 2006-09-28  Bruno Haible  <bruno@clisp.org>
1123
1124         * lib/strndup.h: Simplify the redefinition of strndup.
1125         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
1126         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
1127
1128 2006-09-28  Bruno Haible  <bruno@clisp.org>
1129
1130         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
1131         * lib/gl_linkedhash_list.c: Likewise.
1132         * lib/gl_rbtreehash_list.c: Likewise.
1133
1134 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
1135
1136         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
1137         getaddrinfo.
1138
1139         * lib/__fpending.h: Don't include <stdio_ext.h> unless
1140         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
1141         it causes <stdio_ext.h> to cause a compile-time error.
1142         Problem reported by Nelson H. F. Beebe.
1143         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
1144         of HAVE_DECL___PENDING.
1145
1146         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
1147         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
1148         declaration.
1149
1150 2006-09-27  Jim Meyering  <jim@meyering.net>
1151
1152         This file could end up with a definition for a function
1153         named __strndup, rather than rpl_strndup on a system with
1154         incomplete weak_alias support.
1155         * lib/strndup.c (strndup): Rename from __strndup.
1156         Remove #defines that used to map __strndup to strndup.
1157         Don't use K&R prototypes.
1158         Remove LIBC-related code, since this file is not sync'd with glibc.
1159         * lib/strndup.h: Revamp, accordingly.
1160         * m4/strndup.m4: Modernize.
1161
1162 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
1163
1164         * modules/savewd (Depends-on): Add 'raise'.
1165         * lib/savewd.c: Include <signal.h>, for 'raise'.
1166
1167 2006-09-26  Jim Meyering  <jim@meyering.net>
1168
1169         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
1170         when we detect Darwin 8.7.0's acl_get_file bug.
1171         Rearrange to perform the new (below) run-test while $LIBS
1172         contains any acl-related library.  Set USE_ACL at the end.
1173         (gl_ACL_GET_FILE): New function.
1174
1175 2006-09-26  Eric Blake  <ebb9@byu.net>
1176
1177         * lib/verror.c: Include <config.h> unconditionally.
1178
1179 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
1180
1181         * modules/clock-time (Maintainer): Add self.
1182         * modules/getlogin_r (Depends-on): Add extensions.
1183
1184 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1185
1186         * modules/clock-time: New module.
1187         * modules/nanosleep (Depends-on): Add clock-time.
1188         * modules/gethrxtime (Depends-on): Likewise.
1189         * modules/gettime (Depends-on): Likewise.
1190         * modules/settime (Depends-on): Likewise.
1191
1192         * modules/fts-lgpl: Depend on openat.
1193         * modules/mkancesdirs: Depend on savewd.
1194         * modules/mkdir-p: Likewise.
1195
1196 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1197
1198         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
1199
1200         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
1201         `gl_have_arbitrary_file_name_length_limit' to
1202         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
1203         actually works between configure runs.
1204
1205 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1206             Bruno Haible  <bruno@clisp.org>
1207
1208         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
1209
1210 2006-09-25  Jim Meyering  <jim@meyering.net>
1211
1212         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
1213         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
1214
1215 2006-09-25  Eric Blake  <ebb9@byu.net>
1216
1217         * gnulib-tool (func_import, func_create_testdir): Fix typos in
1218         exec's in 2006-09-18 patch when shuffling fds.
1219
1220 2006-09-25  Bruno Haible  <bruno@clisp.org>
1221
1222         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
1223         Reported by Jim Meyering.
1224
1225 2006-09-24  Jim Meyering  <jim@meyering.net>
1226
1227         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
1228         compare a pointer against a literal "0".  That caused failures with
1229         at least HP-UX's hpcc.
1230
1231 2006-09-22  Simon Josefsson  <jas@extundo.com>
1232
1233         * modules/gc-sha1:
1234         * modules/gc-md4:
1235         * modules/gc-hmac-sha1:
1236         * modules/gc-hmac-md5:
1237         * modules/gc-des:
1238         * modules/gc-arcfour: Distribute more files.
1239
1240 2006-09-22  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1241
1242         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
1243         (gl_linked_iterator_from_to): Initialize struct completely.
1244         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
1245         (gl_tree_iterator_from_to): Likewise
1246         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
1247         * lib/gl_array_list.c [lint] (gl_array_iterator)
1248         (gl_array_iterator_from_to): Likewise.
1249         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
1250         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
1251         (gl_carray_iterator_from_to): Likewise.
1252
1253         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
1254         * lib/md4.c (md4_process_block): Remove unused variable.
1255         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
1256         parentheses for clarity.
1257
1258 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1259
1260         * modules/bison-i18n (Depends-on): Add gettext.
1261
1262 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1263
1264         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
1265         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
1266         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
1267         also add missing comma that caused broken test.
1268         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
1269         stdlib.h, for `abort'.
1270         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
1271         variables.
1272         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
1273         include unistd.h if present, for `rmdir'.
1274         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
1275         variables.
1276         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
1277         in the process include standard headers for prototypes.
1278         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
1279         gets declared on GNU/Linux.
1280         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
1281         unistd.h, for `rmdir'.
1282         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
1283
1284         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
1285         always true.
1286         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
1287
1288         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
1289
1290 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1291
1292         * gnulib-tool (func_version): Create output all at once.  This
1293         may help avoid triggering unnecessary SIGPIPEs, and at any
1294         rate it doesn't hurt.
1295
1296 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1297             Bruno Haible  <bruno@clisp.org>
1298
1299         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
1300         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1301         * m4/signed.m4 (bh_C_SIGNED): Likewise.
1302
1303         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
1304         (gl_FUNC_VASPRINTF): Invoke it.
1305
1306 2006-09-22  Bruno Haible  <bruno@clisp.org>
1307
1308         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
1309         getloadavg.c as first argument.
1310
1311 2006-09-22  Bruno Haible  <bruno@clisp.org>
1312
1313         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
1314         at the beginning of the gl_INIT macro.
1315         * modules/getloadavg (configure.ac): Pass $gl_source_base to
1316         gl_GETLOADAVG.
1317
1318 2006-09-22  Bruno Haible  <bruno@clisp.org>
1319
1320         * gnulib-tool (func_create_megatestdir): Don't include the config-h
1321         module.
1322         Suggested by Ralf Wildenhues.
1323
1324 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
1325
1326         Import this patch from libc:
1327
1328         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
1329
1330         * lib/regex_internal.c (re_string_reconstruct): Handle
1331         offset < pstr->valid_raw_len && pstr->offsets_needed case.
1332         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
1333         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
1334         re_string_context_at.
1335
1336         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
1337         now requires it.
1338         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
1339         gl_REGEX now does it for us.
1340         (gl_REGEX): Add test taken from
1341         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
1342
1343         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
1344         Check that large offsets work.  Modernize Autoconf usages.
1345         Prefer "yes" to mean a good thing rather than a bad.
1346         Don't put "#define mkstemp" in config.h, as this might interfere
1347         with standard system headers that "#define mkstemp mkstemp64".
1348
1349         * modules/mkstemp (Depends-on): Add extensions, so that
1350         mkstemp is visible on some platforms.
1351         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
1352         (Include): Change to "mkstemp.h" from <stdlib.h>.
1353         (Files): Add mkstemp.h.
1354
1355         * lib/mkstemp.h: New file, since some standard headers
1356         #define mkstemp.
1357         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
1358         Include "mkstemp.h".
1359         Make the _LIBC code resemble glibc original more,
1360         e.g., use K&R style.
1361         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
1362         (mkstemp): Remove, since mkstemp.h does this for us.
1363         * lib/stdlib--.h: Include mkstemp.h.
1364
1365         Import this patch from libc:
1366
1367         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
1368
1369         * lib/tempname.c (__gen_tempname): Change attempts_min
1370         into a macro.  Use preprocessor to decide how to initialize
1371         attempts [Coverity CID 67].
1372
1373 2006-09-20  Bruno Haible  <bruno@clisp.org>
1374
1375         * lib/mkdtemp.c: Import from libc.
1376         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
1377                 * sysdeps/posix/tempname.c (__gen_tempname): Change
1378                 attempts_min into a macro.  Use preprocessor to decide how to
1379                 initialize attempts [Coverity CID 67].
1380         2001-11-27  Paul Eggert  <eggert@twinsun.com>
1381                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
1382                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
1383
1384 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1385
1386         * gnulib-tool (func_exit): New function, to allow to pass the
1387         exit status portably through the trap.  Use everywhere.
1388         (--help, --version): Signal a write error.
1389         (trap): catch SIGPIPE, for write errors.
1390         Exit at the end of the trap, with the correct exit status.
1391
1392 2006-09-19  Karl Berry  <karl@gnu.org>
1393
1394         * doc/gnulib.texi: note about the license texinfo files.
1395
1396 2006-09-19  Eric Blake  <ebb9@byu.net>
1397
1398         * gnulib-tool: Avoid space-tab.
1399
1400 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
1401
1402         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
1403         that prevented coreutils 6.1 from building.  Problem reported
1404         by Petter Reinholdtsen.
1405
1406 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
1407
1408         * gnulib-tool (avoidlist): Fix typo that broke options like
1409         --avoid=lock that are used by coreutils bootstrap.
1410
1411 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
1412
1413         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
1414         more systematically.
1415
1416 2006-09-18  Jim Meyering  <jim@meyering.net>
1417
1418         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
1419
1420 2006-09-18  Bruno Haible  <bruno@clisp.org>
1421
1422         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
1423
1424 2006-09-18  Bruno Haible  <bruno@clisp.org>
1425
1426         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
1427         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
1428         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
1429         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
1430         * m4/gettext.m4: Require autoconf >= 2.52.
1431         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
1432         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
1433         of gl_cv_header_inttypes_h.
1434
1435 2006-09-18  Bruno Haible  <bruno@clisp.org>
1436
1437         * lib/javaversion.c: Include configmake.h.
1438
1439 2006-09-18  Bruno Haible  <bruno@clisp.org>
1440
1441         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
1442         avoid that the while loops be executed in a subshell.
1443
1444 2006-09-18  Bruno Haible  <bruno@clisp.org>
1445
1446         * MODULES.html.sh (func_module): Break long lines.
1447         Suggested by Bruce Korb <bkorb@gnu.org>.
1448
1449 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1450
1451         Speed up by a factor of 1.12.
1452         * gnulib-tool (nl): New variable.
1453         (func_import): Rewrite include directive extraction to only read each
1454         directive once.
1455
1456 2006-09-17  Bruno Haible  <bruno@clisp.org>
1457
1458         * modules/javaversion (Makefile.am): Remove DEFS setting.
1459         (Depends-on): Add configmake, for PKGDATADIR definition.
1460
1461 2006-09-17  Bruno Haible  <bruno@clisp.org>
1462
1463         * gnulib-tool (func_create_testdir): Rewrite all files at once.
1464
1465 2006-09-17  Bruno Haible  <bruno@clisp.org>
1466
1467         * gnulib-tool (func_append): New function, stolen from libtool.m4.
1468         (func_modules_transitive_closure, func_modules_add_dummy,
1469         func_modules_to_filelist, func_import, func_create_testdir,
1470         func_create_megatestdir, ...): Use it wherever possible.
1471         Suggested by Ralf Wildenhues.
1472
1473 2006-09-16  Karl Berry  <karl@gnu.org>
1474
1475         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
1476         to avoid sectioning errors.
1477         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
1478         [ifinfo]: blank line after @center-ed titles.
1479         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
1480         Spell FSF address consistently with others.
1481         (These changes approved by rms.)
1482
1483 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1484
1485         Speed up by a factor of 1.61.
1486         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
1487         already checked module names again.
1488
1489 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1490
1491         Speed up by a factor of 1.13.
1492         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
1493         for new_files, and the input to func_add_or_update.
1494
1495 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1496
1497         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
1498         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
1499
1500 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
1501
1502         * modules/mkancesdirs (Depends-on): Add fcntl.
1503         * modules/savewd: New file.
1504         * MODULES.html.sh (File system functions): Add savewd.
1505
1506         * modules/configmake (Makefile.am): Add support for the
1507         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
1508
1509 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
1510
1511         * m4/savewd.m4: New file.
1512
1513 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
1514
1515         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
1516         (dirchownmod): New arg FD.  All callers changed.
1517         Use FD rather than opening the directory ourself, as opening is
1518         now the caller's responsibility.
1519         * lib/dirchownmod.h: Likewise.
1520         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
1521         hosts that require <sys/types.h> before <sys/stat.h>.  Include
1522         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
1523         (test_dir): Remove.
1524         (mkancesdirs): Return length of prefix of FILE that has already
1525         been made, or -2 if there is a child doing the work.  Redo
1526         algorithm so that it is O(N) rather than O(N**2).  Optimize away
1527         ".", and treat ".." specially since it might stray back into
1528         already-created areas.  Use a subprocess if necessary.  New arg
1529         WD; all users changed.  MAKE_DIR function should now return 1
1530         if it creates a directory that is not readable.  Return -2 if
1531         a child process is spun off.
1532         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
1533         Adjust signature to match code.
1534         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
1535         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
1536         all users changed.
1537         * lib/savewd.c, savewd.h: New files.
1538
1539 2006-09-15  Jim Meyering  <jim@meyering.net>
1540
1541         * modules/rename-dest-slash: New module.
1542         * MODULES.html.sh (posix_compat): Add it here.
1543
1544         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
1545
1546 2006-09-15  Jim Meyering  <jim@meyering.net>
1547
1548         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
1549         file.
1550
1551         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
1552
1553 2006-09-15  Jim Meyering  <jim@meyering.net>
1554
1555         * lib/rename-dest-slash.c (has_trailing_slash): Use
1556         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
1557         (rpl_rename_dest_slash): Perform the cheaper trailing slash
1558         test before testing whether SRC is a directory.
1559         Suggestions from Bruno Haible.
1560
1561         Avoid a warning about an unused variable.
1562         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
1563         into the #ifdef block where it's used.
1564
1565         * lib/rename-dest-slash.c: New file.
1566
1567 2006-09-14  Bruno Haible  <bruno@clisp.org>
1568
1569         * lib/allocsa.c: Include <config.h> unconditionally.
1570         * lib/asnprintf.c: Likewise.
1571         * lib/asprintf.c: Likewise.
1572         * lib/c-strcasecmp.c: Likewise.
1573         * lib/c-strcasestr.c: Likewise.
1574         * lib/c-strncasecmp.c: Likewise.
1575         * lib/c-strstr.c: Likewise.
1576         * lib/classpath.c: Likewise.
1577         * lib/clean-temp.c: Likewise.
1578         * lib/concatpath.c: Likewise.
1579         * lib/copy-file.c: Likewise.
1580         * lib/csharpcomp.c: Likewise.
1581         * lib/csharpexec.c: Likewise.
1582         * lib/execute.c: Likewise.
1583         * lib/fatal-signal.c: Likewise.
1584         * lib/findprog.c: Likewise.
1585         * lib/fwriteerror.c: Likewise.
1586         * lib/gl_array_list.c: Likewise.
1587         * lib/gl_array_oset.c: Likewise.
1588         * lib/gl_avltree_list.c: Likewise.
1589         * lib/gl_avltree_oset.c: Likewise.
1590         * lib/gl_avltreehash_list.c: Likewise.
1591         * lib/gl_carray_list.c: Likewise.
1592         * lib/gl_linked_list.c: Likewise.
1593         * lib/gl_linkedhash_list.c: Likewise.
1594         * lib/gl_list.c: Likewise.
1595         * lib/gl_oset.c: Likewise.
1596         * lib/gl_rbtree_list.c: Likewise.
1597         * lib/gl_rbtree_oset.c: Likewise.
1598         * lib/gl_rbtreehash_list.c: Likewise.
1599         * lib/imaxabs.c: Likewise.
1600         * lib/imaxdiv.c: Likewise.
1601         * lib/javacomp.c: Likewise.
1602         * lib/javaexec.c: Likewise.
1603         * lib/javaversion.c: Likewise.
1604         * lib/linebreak.c: Likewise.
1605         * lib/localcharset.c: Likewise.
1606         * lib/lock.c: Likewise.
1607         * lib/mbchar.c: Likewise.
1608         * lib/mbswidth.c: Likewise.
1609         * lib/mkdtemp.c: Likewise.
1610         * lib/pipe.c: Likewise.
1611         * lib/printf-args.c: Likewise.
1612         * lib/printf-parse.c: Likewise.
1613         * lib/progname.c: Likewise.
1614         * lib/progreloc.c: Likewise.
1615         * lib/readlink.c: Likewise.
1616         * lib/sh-quote.c: Likewise.
1617         * lib/stpcpy.c: Likewise.
1618         * lib/stpncpy.c: Likewise.
1619         * lib/strcasecmp.c: Likewise.
1620         * lib/strcasestr.c: Likewise.
1621         * lib/strcspn.c: Likewise.
1622         * lib/striconv.c: Likewise.
1623         * lib/strncasecmp.c: Likewise.
1624         * lib/strnlen1.c: Likewise.
1625         * lib/strstr.c: Likewise.
1626         * lib/strtok_r.c: Likewise.
1627         * lib/tls.c: Likewise.
1628         * lib/tmpdir.c: Likewise.
1629         * lib/unicodeio.c: Likewise.
1630         * lib/unsetenv.c: Likewise.
1631         * lib/vasnprintf.c: Likewise.
1632         * lib/vasprintf.c: Likewise.
1633         * lib/wait-process.c: Likewise.
1634         * lib/xallocsa.c: Likewise.
1635         * lib/xsetenv.c: Likewise.
1636         * lib/xstriconv.c: Likewise.
1637
1638 2006-09-13  Simon Josefsson  <jas@extundo.com>
1639
1640         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
1641         that internally, suggested by Ralf Wildenhues
1642         <Ralf.Wildenhues@gmx.de>.
1643
1644 2006-09-13  Simon Josefsson  <jas@extundo.com>
1645
1646         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
1647         @LIBOBJS@.
1648         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1649
1650 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
1651
1652         * lib/_fpending.c: Include <config.h> unconditionally, since we no
1653         longer worry about uses that don't define HAVE_CONFIG_H.
1654         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
1655         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
1656         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
1657         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
1658         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
1659         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
1660         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
1661         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
1662         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
1663         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
1664         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
1665         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
1666         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
1667         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
1668         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
1669         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
1670         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
1671         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
1672         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
1673         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
1674         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
1675         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
1676         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
1677         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
1678         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
1679         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
1680         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
1681         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
1682         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
1683         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
1684         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
1685         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
1686         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
1687         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
1688         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
1689         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
1690         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
1691         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
1692         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
1693         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
1694         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
1695         Likewise.
1696
1697 2006-09-13  Eric Blake  <ebb9@byu.net>
1698
1699         * lib/getopt.c: Fix typo in last commit.
1700
1701 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
1702
1703         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
1704         dgettext.
1705
1706 2006-09-12  Jim Meyering  <jim@meyering.net>
1707
1708         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
1709         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
1710         Reported by Nelson H. F. Beebe.
1711
1712 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
1713
1714         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
1715         program_invocation_name and program_invocation_short_name are
1716         initialized.
1717         * lib/argp-namefrob.h: Move declarations of program_invocation_name
1718         and program_invocation_short_name to argp.h, so they are visible
1719         to user programs.
1720         * lib/argp.h: Likewise
1721
1722 2006-09-10  Bruno Haible  <bruno@clisp.org>
1723
1724         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
1725         m4/inttypes_h.m4, m4/uintmax_t.m4.
1726
1727 2006-09-10  Bruno Haible  <bruno@clisp.org>
1728
1729         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
1730         gl_AC_TYPE_UINTMAX_T.
1731
1732 2006-09-10  Bruno Haible  <bruno@clisp.org>
1733
1734         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
1735
1736 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
1737
1738         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
1739         convention.  Text proposed by Bruno Haible.
1740         (struct argp_option): Document the use of N_() wrappers.
1741
1742         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
1743         '\v', and translate the two parts separately, instead of feeding
1744         the whole string to gettext.  This allows to exclude
1745         '\v' from the strings visible to the translator by writing doc
1746         strings as N_("..") "\v" N_("..").
1747
1748 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
1749
1750         * config/srclist.txt: Undo latest change; the bug was fixed.
1751
1752 2006-09-09  Bruno Haible  <bruno@clisp.org>
1753
1754         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
1755         assignments if building a library without libtool.
1756         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
1757         in func_emit_lib_Makefile_am.
1758         (func_import): When building a static library libfoo.a, arrange to
1759         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
1760         (func_create_testdir): Likewise.
1761         * modules/gc (configure.ac, Makefile.am): If building statically,
1762         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
1763         * modules/iconvme (configure.ac, Makefile.am): Likewise.
1764         * modules/striconv (configure.ac, Makefile.am): Likewise.
1765         Based on a suggestion by Ralf Wildenhues.
1766
1767 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
1768
1769         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1770         Check for unistd.h too, since Autoconf doesn't assume POSIX.
1771         Also:
1772
1773         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
1774         Add year_2050_test to catch glibc bug 2821
1775         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
1776
1777         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
1778         Prefer #ifdef to #if.
1779
1780         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
1781         Return from 'main' instead of calling 'exit'.
1782
1783 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
1784
1785         * lib/mktime.c (guess_time_tm): Fix bug where mktime
1786         returned the maximum time_t value rather than (time_t) -1.
1787         Problem originally reported by William Bardwell
1788         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
1789
1790         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
1791         Moved to here ...
1792         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
1793         ... from here.
1794
1795 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
1796
1797         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
1798         2821 is fixed.
1799
1800 2006-09-08  Jim Meyering  <jim@meyering.net>
1801
1802         Don't make generated files read-only.  That would bother too many
1803         people.  However, do retain the ability to work when targets are
1804         read-only: remove the destination and temporary files before writing
1805         them (when generated via sed or echo), or by using the -f option for
1806         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
1807         * modules/alloca-opt, modules/argz, modules/arpa_inet:
1808         * modules/byteswap, modules/configmake, modules/fcntl:
1809         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
1810         * modules/localcharset, modules/netinet_in, modules/poll:
1811         * modules/stdbool, modules/stdint, modules/sys_select:
1812         * modules/sys_socket, modules/sys_stat, modules/sysexits:
1813
1814 2006-09-08  Jim Meyering  <jim@meyering.net>
1815
1816         Avoid new build failure on FreeBSD 6.0.
1817         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
1818         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
1819         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
1820
1821 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1822
1823         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
1824
1825 2006-09-07  Jim Meyering  <jim@meyering.net>
1826
1827         Fix global typo in last change: use chmod u-w, not chmod u-x.
1828         Spotted by Paul Eggert and Bruce Korb.
1829         * modules/alloca-opt, modules/argz, modules/arpa_inet:
1830         * modules/byteswap, modules/configmake, modules/fcntl:
1831         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
1832         * modules/localcharset, modules/netinet_in, modules/poll:
1833         * modules/stdbool, modules/stdint, modules/sys_select:
1834         * modules/sys_socket, modules/sys_stat, modules/sysexits:
1835
1836 2006-09-06  Jim Meyering  <jim@meyering.net>
1837
1838         Make generated files be read-only.
1839         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
1840         Ensure that each generated file is now read-only.
1841         * modules/argz: Likewise.
1842         * modules/arpa_inet: Likewise.
1843         * modules/byteswap: Likewise.
1844         * modules/configmake: Likewise.
1845         * modules/fcntl: Likewise.
1846         * modules/fnmatch: Likewise.
1847         * modules/getopt: Likewise.
1848         * modules/glob: Likewise.
1849         * modules/inttypes: Likewise.
1850         * modules/netinet_in: Likewise.
1851         * modules/poll: Likewise.
1852         * modules/stdbool: Likewise.
1853         * modules/stdint: Likewise.
1854         * modules/sys_select: Likewise.
1855         * modules/sys_socket: Likewise.
1856         * modules/sys_stat: Likewise.
1857         * modules/sysexits: Likewise.
1858         * modules/localcharset: Same as above, but continue using temporary
1859         file named "t-$@" (why different?) rather than the "$@-t" used
1860         everywhere else.
1861
1862         * modules/sysexits (Makefile.am): Replace literal occurrences
1863         of "sysexit.h" more readable, and more consistent, "$@".
1864
1865 2006-09-06  Bruno Haible  <bruno@clisp.org>
1866
1867         * modules/striconv: New file.
1868         * modules/xstriconv: New file.
1869         * MODULES.html.sh (Internationalization functions): Add striconv,
1870         xstriconv.
1871
1872 2006-09-06  Bruno Haible  <bruno@clisp.org>
1873
1874         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
1875         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
1876         not using libtool correctly.
1877
1878 2006-09-06  Bruno Haible  <bruno@clisp.org>
1879
1880         * lib/striconv.h: New file.
1881         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
1882         iconvstring.c.
1883         * lib/xstriconv.h: New file.
1884         * lib/xstriconv.c: New file.
1885
1886 2006-09-06  Bruno Haible  <bruno@clisp.org>
1887
1888         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1889         lib_..._LDFLAGS.
1890
1891 2006-09-05  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1892
1893         * lib/argz_.h: Sync from Libtool.
1894
1895         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
1896                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1897
1898         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
1899
1900 2006-09-05  Davide Angelocola <davide.angelocola@tiscali.it>
1901
1902         * modules/trim: New file.
1903
1904 2006-09-05  Davide Angelocola <davide.angelocola@tiscali.it>
1905
1906         * lib/trim.h: New file.
1907         * lib/trim.c: New file.
1908
1909 2006-09-05  Bruno Haible  <bruno@clisp.org>
1910
1911         * MODULES.html.sh (String handling): Add trim.
1912
1913 2006-09-04  Karl Berry  <karl@gnu.org>
1914
1915         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
1916         until next release.
1917
1918 2006-09-03  Bruno Haible  <bruno@clisp.org>
1919
1920         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
1921         correctly.
1922
1923 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
1924
1925         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
1926         not gl_GETLOADAVG.  Omit unneeded semicolons.
1927         Problems reported by Ralf Wildenhues in
1928         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
1929         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
1930         at the end, which is the usual gnulib style.
1931
1932         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
1933         of doing all the work ourselves.
1934         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
1935         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
1936
1937 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
1938
1939         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
1940         Problem reported by Ralf Wildenhues in
1941         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
1942
1943         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
1944         HAVE_STRUCT_STATFS_F_FSTYPENAME.
1945
1946 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
1947
1948         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
1949         yesterday's patch by changing test -n to test -z.
1950
1951 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
1952
1953         * modules/getloadavg (Files): Add m4/getloadavg.m4.
1954         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
1955         the former is now obsolescent.
1956
1957         * modules/chdir-long (Depends-on): Add fcntl.
1958
1959 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
1960
1961         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
1962         obsolescent, and programs should use gnulib instead.
1963         * m4/getloadavg.m4: New file, with contents taken from Autoconf
1964         but with prefixes changed.
1965
1966 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
1967
1968         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
1969         or stdbool.h, because they might not exist while configuring.
1970
1971         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
1972         Don't include unistd.h or limits.h; not needed, since chdir-long.h
1973         does that for us.
1974         (O_DIRECTORY): Remove.
1975
1976 2006-08-31  Eric Blake  <ebb9@byu.net>
1977
1978         * gnulib-tool: Don't let emacs change spaces to TAB.
1979
1980 2006-08-31  Bruno Haible  <bruno@clisp.org>
1981
1982         * gnulib-tool: When calling func_import more than once, do it in a
1983         subshell.
1984         Reported by Eric Blake <ebb9@byu.net>.
1985
1986 2006-08-31  Bruno Haible  <bruno@clisp.org>
1987
1988         * gnulib-tool (nl): Remove variable.
1989         (sed_transform_lib_file): Use more robust test for config-h module.
1990         (func_import): Fix typo in 2006-08-25 patch.
1991
1992 2006-08-31  Bruno Haible  <bruno@clisp.org>
1993
1994         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
1995         specified, augment Makefile.am variables instead of assigning them.
1996
1997 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
1998
1999         Work around a bug in both the Linux and SunOS 64-bit kernels:
2000         nanosleep mishandles sleeps for longer than 2**31 seconds.
2001         Problem reported by Frank v Waveren in
2002         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
2003         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
2004         Check for nanosleep bug.
2005         (LIB_NANOSLEEP): Append clock_gettime library if needed.
2006
2007 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2008
2009         Work around a bug in both the Linux and SunOS 64-bit kernels:
2010         nanosleep mishandles sleeps for longer than 2**31 seconds.
2011         Problem reported by Frank v Waveren in
2012         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
2013         * lib/nanosleep.c (BILLION): New constant.
2014         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
2015         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
2016         implementation.
2017
2018 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2019
2020         * modules/nanosleep (Depends-on): Add gettime.
2021
2022 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2023         and Simon Josefsson  <jas@extundo.com>
2024         and Oskar Liljeblad  <oskar@osk.mine.nu>
2025
2026         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
2027         * gnulib-tool (func_import): New license type 'unmodifiable license
2028         text'.
2029         * modules/fdl: Use it.  Longer description.
2030         * module/gpl, module/lgpl: New files.
2031
2032 2006-08-30  Jim Meyering  <jim@meyering.net>
2033
2034         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
2035         shadowing the parameter.
2036
2037 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2038
2039         Sync from Libtool:
2040
2041         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2042
2043         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
2044         sharing with gnulib.  Report by Eric Blake.
2045
2046 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2047
2048         * modules/isapipe: New file.
2049         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
2050
2051 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2052
2053         * modules/configmake (Makefile.am): Add a comment, and omit
2054         the CONFIGMAKE_ prefix from generated macro names.  Suggested
2055         by Bruno Haible.
2056
2057 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2058
2059         * m4/isapipe.m4: New file.
2060
2061 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2062
2063         * lib/isapipe.c, isapipe.h: New files.
2064
2065 2006-08-29  Jim Meyering  <jim@meyering.net>
2066
2067         * modules/configmake (Makefile.am): Make configmake.h depend on
2068         Makefile.  Otherwise, a stale configmake.h could hang around.
2069
2070 2006-08-29  Eric Blake  <ebb9@byu.net>
2071
2072         * lib/error.c (error_at_line, print_errno_message): Match libc, after
2073         resolution of upstream bug 3044.
2074
2075 2006-08-29  Bruno Haible  <bruno@clisp.org>
2076
2077         * modules/localcharset (Depends-on): Add configmake.
2078         (Makefile.am): Remove setting of LIBDIR through DEFS.
2079
2080 2006-08-29  Bruno Haible  <bruno@clisp.org>
2081
2082         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
2083         defined.
2084
2085 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2086
2087         * modules/fcntl: New file.
2088         * modules/chdir-safer (Depends-on): Add fcntl.
2089         * modules/fts: Likewise.
2090         * modules/mkdir-p: Likewise.
2091
2092         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
2093         This undoes the most recent change, since we're now addressing the
2094         problem in a different way.
2095
2096         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
2097         into output, since the output might be called Makefile.am even
2098         if $makefile_name is something different.
2099         (func_import): Use $makefile_am rather than
2100         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
2101         empty.
2102
2103         * modules/inttypes (Files): Add m4/inttypes-h.m4.
2104
2105 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2106
2107         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
2108         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
2109         recent change to stdint.m4, since we're now addressing the problem in a
2110         different way.
2111
2112 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2113
2114         * m4/fcntl_h.m4: New file.
2115
2116 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2117
2118         * lib/fcntl_.h: New file.
2119         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
2120         the fcntl module.
2121         * lib/dirchownmod.c: Likewise.
2122         * lib/fts.c: Likewise.
2123
2124         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
2125         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
2126         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
2127         just before including <inttypes.h>, to avoid circular inclusion.
2128
2129 2006-08-28  Jim Meyering  <jim@meyering.net>
2130
2131         * doc/visibility.texi: Actually read and correct the grammar of the
2132         sentence affected by yesterday's change.
2133
2134 2006-08-28  Eric Blake  <ebb9@byu.net>
2135
2136         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
2137         needs wrapper.
2138
2139 2006-08-28  Eric Blake  <ebb9@byu.net>
2140
2141         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
2142
2143 2006-08-28  Eric Blake  <ebb9@byu.net>
2144
2145         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
2146
2147 2006-08-28  Bruno Haible  <bruno@clisp.org>
2148
2149         * modules/c-strstr: New file, from GNU gettext.
2150         * MODULES.html.sh (String handling): Add c-strstr.
2151
2152 2006-08-28  Bruno Haible  <bruno@clisp.org>
2153
2154         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
2155         macros.
2156         Reported by Eric Blake.
2157
2158 2006-08-28  Bruno Haible  <bruno@clisp.org>
2159
2160         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
2161         (VASNPRINTF): Return a string of length > INT_MAX without failing.
2162         * lib/vasprintf.c: Include errno.h, limits.h.
2163         (EOVERFLOW): New fallback definition.
2164         (vasprintf): Test here whether the string length is > INT_MAX.
2165         * lib/vsnprintf.c: Include errno.h, limits.h.
2166         (EOVERFLOW): New fallback definition.
2167         (vsnprintf): Fix bug when generated string was too long for the buffer.
2168         Test here whether the string length is > INT_MAX.
2169
2170 2006-08-28  Bruno Haible  <bruno@clisp.org>
2171
2172         * lib/inttypes_.h (SCNX*): Remove definitions.
2173         Reported by Eric Blake.
2174
2175 2006-08-28  Bruno Haible  <bruno@clisp.org>
2176
2177         * lib/c-strstr.h: New file, from GNU gettext.
2178         * lib/c-strstr.c: New file, from GNU gettext.
2179
2180 2006-08-28  Bruno Haible  <bruno@clisp.org>
2181
2182         * gnulib-tool: Reorder some statements.
2183
2184 2006-08-28  Bruno Haible  <bruno@clisp.org>
2185
2186         * gnulib-tool: New option --makefile-name.
2187         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
2188         $makefile_name.
2189         (func_import): Write $makefile_name to the cache file, and read it from
2190         there unless explicitly specified. Use $makefile_name as file name
2191         instead of Makefile.am. Adjust the recommendations accordingly.
2192
2193 2006-08-28  Bruno Haible  <bruno@clisp.org>
2194
2195         * gnulib-tool (func_verify_module): Check against misapplying patch.
2196
2197 2006-08-28  Bruno Haible  <bruno@clisp.org>
2198
2199         * gnulib-tool (func_relativize, func_relconcat): New functions.
2200         Give an error if --local-dir is given with --update.
2201         Remove trailing slashes from $local_gnulib_dir.
2202         (func_import): Store the relativized $local_gnulib_dir in
2203         gnulib-cache.m4, and read it from there if not specified explicitly.
2204
2205 2006-08-28  Bruno Haible  <bruno@clisp.org>
2206
2207         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
2208         is the current directory. Respect also $local_gnulib_dir.
2209
2210 2006-08-28  Bruno Haible  <bruno@clisp.org>
2211             Simon Josefsson  <jas@extundo.com>
2212
2213         BeOS portability.
2214         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
2215
2216 2006-08-27  Jim Meyering  <jim@meyering.net>
2217
2218         * doc/visibility.texi: Remove duplicate word: "pointer".
2219
2220 2006-08-26  Bruno Haible  <bruno@clisp.org>
2221
2222         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
2223         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
2224         (Makefile.am): Create inttypes.h from inttypes_.h.
2225         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
2226
2227         * modules/imaxabs: New file.
2228
2229         * modules/imaxdiv: New file.
2230
2231 2006-08-26  Bruno Haible  <bruno@clisp.org>
2232
2233         * m4/inttypes.m4: New file.
2234         * m4/_inttypes_h.m4: Remove file.
2235         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
2236         PRI_MACROS_BROKEN.
2237         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
2238
2239         * m4/imaxabs.m4: New file.
2240
2241         * m4/imaxdiv.m4: New file.
2242
2243 2006-08-26  Bruno Haible  <bruno@clisp.org>
2244
2245         * lib/inttypes_.h: New file.
2246         * lib/inttypes.h: Remove file.
2247         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
2248
2249         * lib/imaxabs.c: New file.
2250
2251         * lib/imaxdiv.c: New file.
2252
2253 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
2254
2255         New config-h module, so that "make" output needn't be cluttered
2256         by -DHAVE_CONFIG_H.
2257         * MODULES.html.sh (Support for building libraries and executables):
2258         Add config-h.
2259         * modules/config-h: New file.
2260         * gnulib-tool (nl, sed_transform_lib_file): New vars.
2261         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
2262         the config-h module is used.
2263
2264         New configmake module, so that "make" output needn't be cluttered
2265         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
2266         * MODULES.html.sh (Support for building libraries and executables):
2267         Add configmake.
2268         * modules/configmake: New file.
2269
2270 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
2271
2272         * m4/config-h.m4: New file.
2273
2274 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
2275
2276         * config/srclist.txt: Add elisp-comp.
2277
2278 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
2279
2280         * MODULES.html.sh (Support for building libraries and executables):
2281         Add elisp-comp.
2282         * build-aux/elisp-comp: New file.
2283         * modules/elisp-comp: New file.
2284
2285 2006-08-24  Bruno Haible <bruno@clisp.org>
2286
2287         * gnulib-tool (func_create_testdir): Use non-default values of
2288         sourcebase and m4base.
2289
2290 2006-08-24  Bruno Haible <bruno@clisp.org>
2291
2292         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
2293         HTML structure.
2294
2295 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
2296
2297         * modules/openat (Depends-on): Add lchown.
2298
2299 2006-08-23  Bruno Haible <bruno@clisp.org>
2300
2301         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
2302         of gl_LOCK_EARLY instead of gl_LOCK.
2303
2304 2006-08-23  Bruno Haible  <bruno@clisp.org>
2305
2306         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
2307         on OSF/1 to no.
2308         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
2309
2310 2006-08-23  Bruno Haible  <bruno@clisp.org>
2311
2312         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
2313         as unusable.
2314
2315         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
2316         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
2317         (gl_LOCK): New macro.
2318
2319 2006-08-22  Simon Josefsson  <jas@extundo.com>
2320
2321         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
2322         to md5 module.
2323
2324 2006-08-22  Simon Josefsson  <jas@extundo.com>
2325
2326         * MODULES.html.sh: Add "Support for maintaining and release
2327         projects".
2328
2329         * build-aux/gnupload: New file, from coreutils.
2330
2331 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
2332
2333         Avoid the need for AC_LIBSOURCES in m4 macros.
2334         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
2335         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
2336         * modules/check-version (EXTRA_DIST): Add check-version.h.
2337         * modules/crc (EXTRA_DIST): Add crc.h.
2338         * modules/des (EXTRA_DIST): Add des.h.
2339         * modules/gc (EXTRA_DIST): Add gc.h.
2340         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
2341         * modules/getline (EXTRA_DIST): Add getline.h.
2342         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
2343         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
2344         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
2345         * modules/md2 (EXTRA_DIST): Add md2.h.
2346         * modules/md4 (EXTRA_DIST): Add md4.h.
2347         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
2348         * modules/read-file (EXTRA_DIST): Add read-file.h.
2349         * modules/readline (EXTRA_DIST): Add readline.h.
2350         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
2351         rijndael-api-fst.h.
2352
2353 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
2354
2355         * m4/rijndael.m4 (gl_ARCFOUR):
2356         * m4/arctwo.m4 (gl_ARCTWO):
2357         * m4/check-version.m4 (gl_CHECK_VERSION):
2358         * m4/crc.m4 (gl_CRC):
2359         * m4/des.m4 (gl_DES):
2360         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
2361         * m4/gc.m4 (gl_GC):
2362         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
2363         * m4/getline.m4 (gl_FUNC_GETLINE):
2364         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
2365         * m4/hmac-md5.m4 (gl_HMAC_MD5):
2366         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
2367         * m4/md2.m4 (gl_MD2):
2368         * m4/md4.m4 (gl_MD4):
2369         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
2370         * m4/read-file.m4 (gl_FUNC_READ_FILE):
2371         * m4/readline.m4 (gl_FUNC_READLINE):
2372         * m4/rijndael.m4 (gl_RIJNDAEL):
2373         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
2374         to get the necessary .h files and whatnot.
2375
2376 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
2377
2378         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
2379         gnulib rather than the other way around.
2380         * config/srclistvars.sh (COREUTILS): Remove.
2381
2382 2006-08-22  Jim Meyering  <jim@meyering.net>
2383
2384         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
2385
2386         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
2387
2388 2006-08-22  Eric Blake  <ebb9@byu.net>
2389
2390         * modules/regexprops-generic: New file.
2391         * MODULES.html.sh (Support for building documentation): List it.
2392
2393 2006-08-22  Eric Blake  <ebb9@byu.net>
2394
2395         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
2396         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
2397         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
2398         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
2399
2400 2006-08-22  Bruno Haible <bruno@clisp.org>
2401
2402         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
2403         and lib_LTLIBRARIES like the other lib_* variables.
2404
2405 2006-08-22  Bruno Haible <bruno@clisp.org>
2406
2407         * build-aux/x-to-1.in: New file, from GNU gettext.
2408
2409 2006-08-22  Bruno Haible  <bruno@clisp.org>
2410
2411         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
2412         <utmpx.h> exists.
2413
2414 2006-08-22  Bruno Haible  <bruno@clisp.org>
2415
2416         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
2417         <utmpx.h> exists.
2418
2419 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
2420
2421         BeOS portability.
2422         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
2423         exist.
2424         Problem reported by Bruno Haible.
2425
2426 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
2427
2428         Avoid the need for AC_LIBSOURCES in m4 macros.
2429         * modules/acl (EXTRA_DIST): Add acl.h.
2430         * modules/argmatch (Files): Add m4/argmatch.m4.
2431         (configure.ac): Add gl_ARGMATCH.
2432         (EXTRA_DIST): Renamed from lib_SOURCES, for
2433         consistency with the other modules.  Remove argmatch.c.
2434         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
2435         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
2436         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
2437         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
2438         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
2439         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
2440         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
2441         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
2442         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
2443         * modules/closeout (EXTRA_DIST): Add closeout.h.
2444         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
2445         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
2446         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
2447         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
2448         dirname.h; remove basename.c and stripslash.c.
2449         * modules/exclude (EXTRA_DIST): Add exclude.h.
2450         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
2451         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
2452         * modules/file-type (EXTRA_DIST): Add file-type.h.
2453         * modules/filemode (EXTRA_DIST): Add filemode.h.
2454         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
2455         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
2456         * modules/fpending (EXTRA_DIST): Add __fpending.h.
2457         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
2458         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
2459         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
2460         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
2461         * modules/getdate (EXTRA_DIST): Add getdate.c.
2462         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
2463         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
2464         * modules/getpass (EXTRA_DIST): Add getpass.h.
2465         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
2466         * modules/group-member (EXTRA_DIST): Add group-member.h.
2467         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
2468         * modules/hash (EXTRA_DIST): Add hash.h.
2469         * modules/human (EXTRA_DIST): Add human.h.
2470         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
2471         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
2472         * modules/lchown (EXTRA_DIST): Add lchown.h.
2473         * modules/long-options (EXTRA_DIST): Add long-options.h.
2474         * modules/lstat (EXTRA_DIST): Add lstat.h.
2475         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
2476         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
2477         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
2478         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
2479         * modules/memxor (EXTRA_DIST): Add memxor.h.
2480         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
2481         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
2482         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
2483         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
2484         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
2485         * modules/physmem (EXTRA_DIST): Add physmem.h.
2486         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
2487         * modules/posixver (EXTRA_DIST): Add posixver.h.
2488         * modules/quote (EXTRA_DIST): Add quote.h.
2489         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
2490         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
2491         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
2492         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
2493         regex_internal.h regexec.c.
2494         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
2495         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
2496         * modules/same (EXTRA_DIST): Add same.h.
2497         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
2498         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
2499         * modules/savedir (EXTRA_DIST): Add savedir.h.
2500         * modules/sha1 (EXTRA_DIST): Add sha1.h.
2501         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
2502         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
2503         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
2504         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
2505         * modules/strdup (EXTRA_DIST): Add strdup.h.
2506         * modules/strftime (EXTRA_DIST): Add strftime.h.
2507         * modules/strndup (EXTRA_DIST): Add strndup.h.
2508         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
2509         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
2510         * modules/time_r (EXTRA_DIST): Add time_r.h.
2511         * modules/timespec (EXTRA_DIST): Add timespec.h.
2512         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
2513         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
2514         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
2515         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
2516         * modules/userspec (EXTRA_DIST): Add userspec.h.
2517         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
2518         * modules/utimens (EXTRA_DIST): Add utimens.h.
2519         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
2520         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
2521         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
2522         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
2523         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
2524         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
2525         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
2526         * modules/yesno (EXTRA_DIST): Add yesno.h.
2527
2528 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
2529
2530         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
2531
2532         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
2533         * m4/dev-ino.m4, same-inode.m4: Remove.
2534
2535         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
2536         * m4/acl.m4 (AC_FUNC_ACL):
2537         * m4/backupfile.m4 (gl_BACKUPFILE):
2538         * m4/c-strtod.m4 (gl_C99_STRTOLD):
2539         * m4/canon-host.m4 (gl_CANON_HOST):
2540         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2541         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
2542         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
2543         * m4/cloexec.m4 (gl_CLOEXEC):
2544         * m4/close-stream.m4 (gl_CLOSE_STREAM):
2545         * m4/closeout.m4 (gl_CLOSEOUT):
2546         * m4/dirfd.m4 (gl_FUNC_DIRFD):
2547         * m4/dirname.m4 (gl_DIRNAME):
2548         * m4/exclude.m4 (gl_EXCLUDE):
2549         * m4/exitfail.m4 (gl_EXITFAIL):
2550         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
2551         * m4/file-type.m4 (gl_FILE_TYPE):
2552         * m4/filemode.m4 (gl_FILEMODE):
2553         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
2554         * m4/fpending.m4 (gl_FUNC_FPENDING):
2555         * m4/fprintftime.m4 (gl_FPRINTFTIME):
2556         * m4/fts.m4 (gl_FUNC_FTS):
2557         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
2558         * m4/getdate.m4 (gl_GETDATE):
2559         * m4/gethrxtime.m4 (gl_GETHRXTIME):
2560         * m4/getpagesize.m4 (gl_GETPAGESIZE):
2561         * m4/getpass.m4 (gl_FUNC_GETPASS):
2562         * m4/gettime.m4 (gl_GETTIME):
2563         * m4/getugroups.m4 (gl_GETUGROUPS):
2564         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
2565         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
2566         * m4/hard-locale.m4 (gl_HARD_LOCALE):
2567         * m4/hash.m4 (gl_HASH):
2568         * m4/idcache.m4 (gl_IDCACHE):
2569         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
2570         * m4/lchown.m4 (gl_FUNC_LCHOWN):
2571         * m4/long-options.m4 (gl_LONG_OPTIONS):
2572         * m4/lstat.m4 (gl_FUNC_LSTAT):
2573         * m4/md5.m4 (gl_MD5):
2574         * m4/memcasecmp.m4 (gl_MEMCASECMP):
2575         * m4/memcoll.m4 (gl_MEMCOLL):
2576         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
2577         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
2578         * m4/memxor.m4 (gl_MEMXOR):
2579         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
2580         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
2581         * m4/modechange.m4 (gl_MODECHANGE):
2582         * m4/mountlist.m4 (gl_MOUNTLIST):
2583         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2584         * m4/openat.m4 (gl_FUNC_OPENAT):
2585         * m4/pathmax.m4 (gl_PATHMAX):
2586         * m4/physmem.m4 (gl_PHYSMEM):
2587         * m4/posixtm.m4 (gl_POSIXTM):
2588         * m4/posixver.m4 (gl_POSIXVER):
2589         * m4/quote.m4 (gl_QUOTE):
2590         * m4/quotearg.m4 (gl_QUOTEARG):
2591         * m4/readtokens.m4 (gl_READTOKENS):
2592         * m4/readutmp.m4 (gl_READUTMP):
2593         * m4/regex.m4 (gl_REGEX):
2594         * m4/safe-read.m4 (gl_SAFE_READ):
2595         * m4/safe-write.m4 (gl_SAFE_WRITE):
2596         * m4/same.m4 (gl_SAME):
2597         * m4/save-cwd.m4 (gl_SAVE_CWD):
2598         * m4/savedir.m4 (gl_SAVEDIR):
2599         * m4/settime.m4 (gl_SETTIME):
2600         * m4/sha1.m4 (gl_SHA1):
2601         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
2602         * m4/stat-macros.m4 (gl_STAT_MACROS):
2603         * m4/stat-time.m4 (gl_STAT_TIME):
2604         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
2605         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
2606         * m4/strdup.m4 (gl_FUNC_STRDUP):
2607         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
2608         * m4/strndup.m4 (gl_FUNC_STRNDUP):
2609         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
2610         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
2611         * m4/time_r.m4 (gl_TIME_R):
2612         * m4/timespec.m4 (gl_TIMESPEC):
2613         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
2614         * m4/unlinkdir.m4 (gl_UNLINKDIR):
2615         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
2616         * m4/userspec.m4 (gl_USERSPEC):
2617         * m4/utimecmp.m4 (gl_UTIMECMP):
2618         * m4/utimens.m4 (gl_UTIMENS):
2619         * m4/xalloc.m4 (gl_XALLOC):
2620         * m4/xgetcwd.m4 (gl_XGETCWD):
2621         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
2622         * m4/xreadlink.m4 (gl_XREADLINK):
2623         * m4/xstrtod.m4 (gl_XSTRTOD):
2624         * m4/yesno.m4 (gl_YESNO):
2625         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
2626         to get the necessary .h files and whatnot.
2627
2628 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
2629             Bruno Haible <bruno@clisp.org>
2630
2631         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
2632         /bin/sh understanding of '!' conditional negation.
2633
2634 2006-08-21  Jim Meyering  <jim@meyering.net>
2635
2636         * modules/openat (Depends-on): Really alphabetize.
2637
2638         * modules/acl (Depends-on): Add error and quote.
2639
2640         * check-module (find_included_lib_files): Add at-func.c to the
2641         ok-to-include-more-than-once white list.
2642
2643         * modules/openat (Depends-on): Add lstat.  Alphabetize.
2644
2645 2006-08-21  Bruno Haible <bruno@clisp.org>
2646
2647         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2648         Emit a pkgdata_DATA variable only if some snippets add contents to it.
2649         Reported by Martin Lambers <marlam@marlam.de>.
2650
2651 2006-08-21  Bruno Haible <bruno@clisp.org>
2652
2653         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
2654         specify an installation location, don't emit a noinst_LIBRARIES or
2655         noinst_LTLIBRARIES assignment.
2656
2657 2006-08-21  Bruno Haible  <bruno@clisp.org>
2658
2659         BeOS portability.
2660         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
2661         BeOS has mbrtowc() but no <wctype.h>.
2662
2663 2006-08-21  Bruno Haible  <bruno@clisp.org>
2664
2665         BeOS portability.
2666         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
2667         exist.
2668
2669 2006-08-21  Bruno Haible  <bruno@clisp.org>
2670
2671         BeOS portability.
2672         * lib/mbchar.h: Include <wctype.h> only if it exists.
2673
2674 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
2675
2676         Remove files that are no longer needed by their respective modules.
2677         * m4/obstack.m4: Remove.
2678         * m4/strerror_r.m4: Remove.
2679         * m4/uint32_t.m4: Remove.
2680         * m4/uintptr_t.m4: Remove.
2681         * m4/ullong_max.m4: Remove.
2682         * m4/xstrtoimax.m4: Remove.
2683         * m4/xstrtoumax.m4: Remove.
2684
2685         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
2686         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
2687         dependencies now capture this.
2688
2689         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
2690         Do not use AC_LIBSOURCES, since gnulib modules now do this.
2691         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
2692         * m4/human.m4 (gl_HUMAN): Likewise.
2693         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
2694         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
2695
2696         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
2697
2698         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
2699         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
2700         stdint.
2701         * m4/human.m4 (gl_HUMAN): Likewise.
2702         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
2703         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
2704         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
2705         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
2706         * m4/xstrtol (gl_XSTRTOL): Likewise.
2707
2708         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
2709         AC_TYPE_LONG_LONG_INT.
2710         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
2711         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
2712         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
2713         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
2714
2715         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
2716         on stdbool.
2717
2718         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
2719         (gl_PREREQ_XSTRTOUL): Remove.
2720
2721         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
2722
2723         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
2724         mode.
2725
2726 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
2727
2728         Add and change modules to make it easier for coreutils to use
2729         gnulib-tool.
2730         * modules/backupfile (Files): Remove m4/d-ino.m4.
2731         (Depends-on): Add d-ino.
2732         * modules/cycle-check (Depends-on): Add stdint.
2733         (lib_SOURCES): Add cycle-check.h.
2734         * modules/d-ino: New module.
2735         * modules/d-type: New module.
2736         * modules/error (Files): Remove m4/strerror_r.m4.
2737         * modules/filemode (Files): Add m4/st_dm_mode.m4.
2738         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
2739         m4/inttypes_h.m4, m4/uintmax_t.m4.
2740         (Depends-on): Add stdint.
2741         (lib_SOURCES): Add fsusage.h.
2742         * modules/getcwd (Files): Remove d-ino.m4.
2743         (Depends-on): Add d-ino.
2744         * modules/getndelim2 (Depends-on): Add stdint.
2745         * modules/glob (Files): Remove m4/d-type.m4.
2746         (Depends-on): Add d-type.
2747         * modules/host-os: New module.
2748         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
2749         m4/inttypes_h.m4, m4/uintmax_t.m4.
2750         * Depends-on: Add stdint.
2751         (lib_SOURCES): Add human.h.
2752         * modules/inttostr (Files): Remove m4/intmax_t.m4,
2753         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
2754         m4/uintmax_t.m4, m4/ulonglong.m4.
2755         (Depends-on): Add stdint.
2756         (EXTRA_DIST): Add inttostr.h.
2757         * modules/lchmod: New module.
2758         * modules/link-follow: New module.
2759         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
2760         (Depends-on): Add lchmod.
2761         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
2762         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
2763         (Depends-on): Add stdint.
2764         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
2765         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
2766         (Depends-on): Add stdint.
2767         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
2768         * modules/perl: New module.
2769         * modules/regex (Depends-on): Add stdint.
2770         * modules/rmdir-errno: New module.
2771         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
2772         m4/intmax_t.m4.
2773         (Depends-on): Add stdint.
2774         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
2775         m4/uintmax_t.m4.
2776         (Depends-on): Add stdint.
2777         * modules/unlink-busy: New module.
2778         * modules/utimecmp (Depends-on): Add stdint.
2779         * modules/uptime: New module.
2780         * modules/winsz-ioctl: New module.
2781         * modules/winsz-termios: New module.
2782         * modules/xnanosleep (Depends-on): Add nanosleep.
2783         * modules/ullong_max: Remove.
2784         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
2785         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
2786         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
2787         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
2788         (Depends-on): Add inttypes.
2789         (lib_SOURCES): Add xstrtol.h.
2790         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
2791         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
2792         * MODULES.html.sh: Move 'assert' into the assert section.
2793         Move 'dummy' into the linking section.
2794         Remove ullong_max.
2795         Add section for compatibility checks for POSIX:2001 functions,
2796         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
2797         winsz-ioctl, and winsz-termios into it.
2798         Add lchmod.
2799         Add top-level Misc section and put host-os, perl, and uptime
2800         into it.
2801
2802 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
2803
2804         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
2805         now assume the stdint module.  Do not include inttypes.h.
2806         * lib/fsusage.h: Likewise.
2807         * lib/getndelim2.c: Likewise.
2808         * lib/human.h: Likewise.
2809         * lib/inttostr.h: Likewise.
2810         * lib/obstack.c: Likewise.
2811         * lib/regex_internal.h: Likewise.
2812         * lib/tempname.c: Likewise.
2813         * lib/utimecmp.c: Likewise.
2814         * lib/xstrtol.h: Likewise.
2815
2816         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
2817
2818         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
2819         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
2820         * lib/xtime.h: Likewise.
2821
2822 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
2823
2824         * modules/openat (Files): Add lib/fchmodat.c.
2825         Fixes problem reported by Jay Youngman.
2826
2827 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
2828
2829         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
2830         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
2831
2832 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
2833             Bruno Haible  <bruno@clisp.org>
2834
2835         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
2836         and is a script that invokes bison. Tighten the code. Add comments.
2837
2838 2006-08-18  Jim Meyering  <jim@meyering.net>
2839
2840         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
2841         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
2842         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
2843         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
2844
2845 2006-08-18  Bruno Haible  <bruno@clisp.org>
2846
2847         * modules/bison-i18n: New file.
2848         * MODULES.html.sh (Internationalization functions): Add it.
2849
2850 2006-08-18  Bruno Haible  <bruno@clisp.org>
2851
2852         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
2853         sys/statvfs.h. When getmntinfo was found, check its declaration and
2854         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
2855
2856 2006-08-18  Bruno Haible  <bruno@clisp.org>
2857
2858         * m4/bison-i18n.m4: New file, from bison.
2859
2860 2006-08-18  Bruno Haible  <bruno@clisp.org>
2861
2862         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
2863         (ME_DUMMY): Treat "kernfs" as a dummy.
2864         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
2865
2866 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
2867
2868         Update from coreutils.
2869
2870         2006-08-15  Jim Meyering  <jim@meyering.net>
2871
2872         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
2873
2874         2006-01-17  Jim Meyering  <jim@meyering.net>
2875
2876         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
2877
2878         2006-01-11  Jim Meyering  <jim@meyering.net>
2879
2880         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
2881         Check for the lchmod function.
2882
2883 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
2884
2885         Update from coreutils.
2886
2887         * lib/__fpending.h: Add copyright notice.
2888         * lib/fprintftime.h: Likewise.
2889         * lib/savedir.c: Use (C) in copyright notice.
2890         * lib/savedir.h: Likewise.
2891
2892         2006-08-15  Jim Meyering  <jim@meyering.net>
2893
2894         * lib/at-func.c: New file, with the logic of all emulated at-functions.
2895         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
2896         in support of the EXPECTED_ERRNO macro.
2897         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
2898         definitions.  Instead, define the appropriate symbols and include
2899         "at-func.c".
2900         * lib/mkdirat.c (mkdirat): Likewise.
2901         * lib/fchmodat.c (fchmodat): Likewise.
2902         (ENOSYS): Remove definition.
2903         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
2904         it.  Don't include "unistd--.h" -- it wasn't ever used.
2905
2906         2006-01-17  Jim Meyering  <jim@meyering.net>
2907
2908         Rewrite fts.c not to change the current working directory,
2909         by using openat, fstatat, fdopendir, etc..
2910
2911         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
2912         (HAVE_OPENAT_SUPPORT): Define.
2913         [_LIBC] (fchdir): Don't undef or define; no longer used.
2914         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
2915         Now, this `function' always succeeds, and consumes its file descriptor
2916         parameter -- so callers must not close such FDs.  Update callers.
2917         (diropen_fd, opendirat, cwd_advance_fd): New functions.
2918         (diropen): Add parameter, SP.  Adjust all callers.
2919         Implement using diropen_fd, rather than open.
2920         (fts_open): Initialize new member, fts_cwd_fd.
2921         Remove fts_rft-setting code.
2922         (fts_close): Close fts_cwd_fd, if necessary.
2923         (__opendir2): Define in terms of opendir or opendirat,
2924         depending on whether the FST_NOCHDIR flag is set.
2925         (fts_build): Since fts_safe_changedir consumes its FD, and since
2926         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
2927         and close the dup'd file descriptor upon failure.
2928         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
2929         (fts_safe_changedir): Tweak semantics to reflect that this function
2930         now calls cwd_advance_fd and hence consumes its FD argument.
2931         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
2932         [struct FTS] (fts_rft): Remove now-unused member.
2933         [struct FTS] (fts_cycle.state): Improve comment.
2934
2935         * lib/openat.c (openat_needs_fchdir): New function.
2936         * lib/openat.h (openat_needs_fchdir): Declare it.
2937
2938 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
2939
2940         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
2941         Problem and fix reported by Pádraig Brady in
2942         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
2943
2944 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
2945
2946         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
2947
2948 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
2949
2950         * lib/memcoll.c (memcoll): Optimize for the common case where the
2951         arguments are bytewise equal.
2952
2953 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
2954
2955         * doc/regexprops-generic.texi: Add a copyright notice.
2956
2957 2006-08-15  Bruno Haible  <bruno@clisp.org>
2958
2959         * modules/tmpdir (License): Change to LGPL.
2960
2961 2006-08-15  Bruno Haible  <bruno@clisp.org>
2962
2963         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
2964         module.
2965
2966 2006-08-14  Simon Josefsson  <jas@extundo.com>
2967
2968         * config/srclist.txt: Add gnupload.
2969
2970 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
2971
2972         Change copyright notice from LGPL 2 to GPL 2, since that's the
2973         standard form used in the gnulib repository.
2974         * tests/test-lock.c: Likewise.
2975         * tests/test-stdint.c: Likewise.
2976         * tests/test-tls.c: Likewise.
2977
2978         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
2979         prelude-manager.  User shorter URLs for GNU projects, without '?'.
2980         Add copyright notice.
2981
2982         * check-module: Add copyright notice.  Output a copyright
2983         notice if "--version" is specified.
2984         * modules/COPYING: New file.
2985         * tests/test-getaddrinfo.c: Add copyright notice.
2986         * tests/test-verify.c: Likewise.
2987
2988 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
2989
2990         Change copyright notice from LGPL 2 to GPL 2, since that's the
2991         standard form used in the gnulib repository.
2992         * lib/lock.c: LGPL -> GPL.
2993         * lib/lock.h: Likewise.
2994         * lib/strnlen1.c: Likewise.
2995         * lib/strnlen1.h: Likewise.
2996         * lib/tls.c: Likewise.
2997         * lib/tls.h: Likewise.
2998         * lib/tmpdir.c: Likewise.
2999
3000         * lib/TODO: Remove; this belongs only in coreutils.
3001
3002 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3003
3004         Add copyright notices to long-enough files that lack them, since
3005         otherwise the files aren't clearly free.  Use the same notice that
3006         getdate.texi already uses.
3007         * doc/alloca-opt.texi: Add copyright notice.
3008         * doc/alloca.texi: Likewise.
3009         * doc/ctime.texi: Likewise.
3010         * doc/functions.texi: Likewise.
3011         * doc/gcd.texi: Likewise.
3012         * doc/gnulib-tool.texi: Likewise.
3013         * doc/inet_ntoa.texi: Likewise.
3014         * doc/visibility.texi: Likewise.
3015
3016         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
3017         * doc/quote.texi: Add copyright notice.
3018
3019         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
3020         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
3021         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
3022         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
3023         is now obsolete, and give a pointer to the Sun list.
3024         Add copyright notice.
3025
3026 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3027
3028         * config/srclistvars.sh: Add copyright notice.
3029
3030 2006-08-14  Eric Blake  <ebb9@byu.net>
3031
3032         Import the following change from libc:
3033
3034         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
3035
3036         Upstream bug 2997.
3037         * lib/misc/error.c: Add space between program name and message if file
3038         name is missing.
3039
3040 2006-08-12  Karl Berry  <karl@gnu.org>
3041
3042         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
3043         remove, these originate in gnulib now.
3044
3045 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3046
3047         * doc/Makefile (standards.info standards.html standards.dvi):
3048         Also depend on make-stds.texi.
3049
3050 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
3051
3052         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
3053         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
3054
3055         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
3056         in wchar_t.  Problem reported by Eric Blake.
3057
3058         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
3059         LEN is smaller than SIZE.  Suggested by Bruno Haible.
3060         Also, help the compiler to keep LEN in a register.
3061
3062 2006-08-11  Eric Blake  <ebb9@byu.net>
3063
3064         * users.txt: Sort.  Add tar.
3065
3066 2006-08-11  Bruno Haible  <bruno@clisp.org>
3067
3068         * users.txt: New file.
3069
3070 2006-08-11  Bruno Haible  <bruno@clisp.org>
3071
3072         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
3073         before <wchar.h>. Needed for OSF/1 and BSD/OS.
3074
3075 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
3076
3077         * modules/snprintf (Depends-on): Remove minmax.
3078         (Maintainer): Add self and Bruno.
3079
3080 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
3081
3082         * lib/.cppi-disable: Add snprintf.h, socket_.h.
3083         * lib/snprintf.c: Include <errno.h> and <limits.h>.
3084         (EOVERFLOW): Define if the system does not.
3085         Do not include "minmax.h"; it wasn't used.
3086         (snprintf): Don't assume size_t promotes to an unsigned type.
3087         Fix bug when generated string was too long for the buffer: the
3088         buffer's contents are supposed to be the initial prefix of the
3089         output.  Don't assume vasnprintf returns EOVERFLOW if the size
3090         exceeds INT_MAX; do the check ourselves.
3091
3092         Import the following changes from libc:
3093
3094         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
3095
3096         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
3097         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
3098         set wc to the byte which couldn't be converted.
3099         (re_string_reconstruct): Don't clear valid_raw_len before calling
3100         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
3101         tip_context using re_string_context_at.
3102
3103         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
3104
3105         * lib/posix/regex.h: g++ still cannot handled [restrict].
3106
3107         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
3108
3109         * lib/posix/regex.h: Remove special handling for VMS.
3110
3111 2006-08-10  Jim Meyering  <jim@meyering.net>
3112
3113         * modules/same-inode: New module.
3114         * modules/dev-ino: New module.
3115         * modules/cycle-check: Depend on these modules, rather than simply
3116         including their .h files.
3117         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
3118         required via m4/cycle-check.m4.
3119         * modules/same: Depend on new same-inode module, rather than
3120         including same-inode.h.
3121         * modules/chdir-safer: New file.
3122
3123         * modules/chown (Depends-on): Add stat-macros.
3124
3125 2006-08-10  Jim Meyering  <jim@meyering.net>
3126
3127         * m4/cycle-check.m4: New file.
3128         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
3129         * m4/dev-ino.m4, same-inode.m4: New files.
3130
3131 2006-08-10  Eric Blake  <ebb9@byu.net>
3132
3133         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
3134         in from original proposal.
3135
3136 2006-08-10  Eric Blake  <ebb9@byu.net>
3137         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3138
3139         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
3140         namespace.
3141
3142 2006-08-10  Bruno Haible  <bruno@clisp.org>
3143
3144         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
3145         as well.
3146
3147 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3148
3149         Sync from coreutils.
3150
3151         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
3152
3153         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
3154         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
3155
3156 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3157
3158         * modules/restrict: Remove; no longer needed now that we assume
3159         Autoconf 2.59 or later.
3160         * MODULES.html.sh: Remove 'restrict'.
3161         * modules/argp (Depends-on): Remove 'restrict'.
3162         * modules/base64 (Depends-on): Likewise.
3163         * modules/gc (Depends-on): Likewise.
3164         * modules/getaddrinfo (Depends-on): Likewise.
3165         * modules/glob (Depends-on): Likewise.
3166         * modules/inet_ntop (Depends-on): Likewise.
3167         * modules/inet_pton (Depends-on): Likewise.
3168         * modules/memxor (Depends-on): Likewise.
3169         * modules/regex (Depends-on): Likewise.
3170         * modules/strtok_r (Depends-on): Likewise.
3171         * modules/time_r (Depends-on): Likewise.
3172
3173 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3174
3175         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
3176         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
3177         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
3178         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
3179         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
3180         * m4/memxor.m4 (gl_MEMXOR): Likewise.
3181         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
3182         gl_C_RESTRICT replaced by AC_C_RESTRICT.
3183
3184         Merge from coreutils.
3185         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
3186         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
3187         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
3188         * m4/time_r.m4 (gl_TIME_R): Likewise.
3189
3190 2006-08-09  Karl Berry  <karl@gnu.org>
3191
3192         * config/srclist.txt: no more gettext-tools, per Bruno.
3193
3194 2006-08-08  Eric Blake  <ebb9@byu.net>
3195
3196         * modules/verror: New module.
3197         * MODULES.html.sh: Document it.
3198
3199 2006-08-08  Eric Blake  <ebb9@byu.net>
3200
3201         * lib/verror.h, verror.c: New files.
3202
3203 2006-08-08  Eric Blake  <ebb9@byu.net>
3204
3205         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
3206         verror_at_line output complies with GNU Coding Standards even when
3207         file is NULL.
3208
3209 2006-08-07  Bruno Haible  <bruno@clisp.org>
3210
3211         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
3212         versions of AIX.
3213         Reported by Ralf Wildenhues.
3214
3215 2006-08-07  Bruno Haible  <bruno@clisp.org>
3216
3217         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
3218         in an AC_DEFUN. Needed so that the autoconf snippets can use
3219         AC_REQUIRE.
3220
3221 2006-08-06  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3222
3223         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3224         Initialize pkgdata_DATA.
3225         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
3226         overriding it.
3227
3228 2006-08-06  Eric Blake  <ebb9@byu.net>
3229
3230         * lib/error.h: Fold in some upstream changes from glibc.
3231         * lib/error.c: Likewise.
3232
3233 2006-08-04  Bruno Haible  <bruno@clisp.org>
3234
3235         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3236         Make the mostlyclean-local rule depend on mostlyclean-generic.
3237         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
3238
3239 2006-07-31  Bruno Haible  <bruno@clisp.org>
3240
3241         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
3242         <stdlib.h>, <string.h>.
3243
3244 2006-07-30  Bruno Haible  <bruno@clisp.org>
3245
3246         * modules/readlink (License): Change to LGPL.
3247
3248 2006-07-30  Bruno Haible  <bruno@clisp.org>
3249
3250         * modules/javaversion (Makefile.am): Distribute javaversion.java and
3251         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
3252         set PKGDATADIR to point to it.
3253
3254 2006-07-30  Bruno Haible  <bruno@clisp.org>
3255
3256         * modules/csharpexec (configure.ac): Comment out macro invocation.
3257         * modules/javaexec (configure.ac): Likewise.
3258         * modules/javacomp-script (configure.ac): Likewise.
3259
3260         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
3261
3262 2006-07-30  Bruno Haible  <bruno@clisp.org>
3263
3264         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
3265         linked-list.
3266
3267 2006-07-30  Bruno Haible  <bruno@clisp.org>
3268
3269         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
3270
3271 2006-07-30  Bruno Haible  <bruno@clisp.org>
3272
3273         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3274         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
3275         get removed.
3276
3277 2006-07-29  Bruno Haible  <bruno@clisp.org>
3278
3279         Make it possible for gnulib-tool to work with locally modified or
3280         augmented gnulib repositories.
3281         * gnulib-tool (func_usage): Document --local-dir option.
3282         (local_gnulib_dir): New variable.
3283         Handle --local-dir option.
3284         (func_lookup_file): New function.
3285         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
3286         (func_get_description, func_get_filelist, func_get_description,
3287         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
3288         func_get_automake_snippet, func_get_include_directive,
3289         func_get_license, func_get_maintainer): Use func_lookup_file.
3290         (func_import, func_create_testdir): Use func_lookup_file.
3291
3292 2006-07-29  Bruno Haible  <bruno@clisp.org>
3293
3294         * modules/setenv (Depends-on): Add unistd.
3295
3296 2006-07-29  Bruno Haible  <bruno@clisp.org>
3297
3298         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
3299
3300 2006-07-29  Bruno Haible  <bruno@clisp.org>
3301
3302         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
3303
3304 2006-07-29  Bruno Haible  <bruno@clisp.org>
3305
3306         * gnulib-tool (import, update): If there is no Makefile.am, look at
3307         aclocal.m4, instead of bailing out.
3308
3309 2006-07-29  Bruno Haible  <bruno@clisp.org>
3310
3311         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
3312         Categorize the options by when they are useful.
3313
3314 2006-07-29  Bruno Haible  <bruno@clisp.org>
3315
3316         * gnulib-tool (func_usage): Document option --no-libtool.
3317         Handle option --no-libtool.
3318         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
3319         for changed semantics of $libtool variable.
3320         (func_import): Likewise. If libtool is not used, show this through
3321         an option --no-libtool.
3322         (func_create_testdir): Update.
3323
3324 2006-07-29  Bruno Haible  <bruno@clisp.org>
3325
3326         * gnulib-tool (func_import): Extend error message about missing
3327         --doc-base.
3328
3329 2006-07-29  Bruno Haible  <bruno@clisp.org>
3330
3331         * gnulib-tool (func_import): Don't create the $docbase directory if
3332         there is no file to store there.
3333
3334 2006-07-29  Bruno Haible  <bruno@clisp.org>
3335
3336         * gnulib-tool (autoconf_minversion): If a --dir option is given and
3337         relevant, look for configure.ac there, not in the current directory.
3338         Also use a simple search for AC_PREREQ, not "autoconf --trace".
3339
3340 2006-07-29  Bruno Haible  <bruno@clisp.org>
3341
3342         * gnulib-tool (SORT): New variable.
3343         (func_usage): Undocument --assume-autoconf option.
3344         Remove --assume-autoconf option handling.
3345         (autoconf_minversion): Determine from the contents of configure.ac.
3346         (func_import): Remove autoconf_minversion handling.
3347         Suggested by Eric Blake.
3348
3349 2006-07-29  Bruno Haible  <bruno@clisp.org>
3350
3351         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
3352
3353 2006-07-29  Bruno Haible  <bruno@clisp.org>
3354
3355         * config/srclist.txt (*setenv.[ch]): Remove rules.
3356
3357 2006-07-28  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3358
3359         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
3360
3361 2006-07-28  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3362
3363         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
3364         arpa/inet.h.
3365
3366 2006-07-28  Simon Josefsson  <jas@extundo.com>
3367
3368         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
3369         * modules/inet_pton (Depends-on): Likewise.
3370
3371 2006-07-28  Simon Josefsson  <jas@extundo.com>
3372
3373         * m4/netinet_in_h.m4: New file.
3374
3375 2006-07-28  Simon Josefsson  <jas@extundo.com>
3376
3377         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
3378         #include's.
3379
3380 2006-07-28  Simon Josefsson  <jas@extundo.com>
3381
3382         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
3383         #include's.
3384
3385 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
3386
3387         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
3388         setgid on directories only if they set these bits.
3389         * lib/modechange.h: Remove obsolete comment about masks.
3390
3391 2006-07-28  Eric Blake  <ebb9@byu.net>
3392
3393         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
3394         macro expansion.
3395
3396 2006-07-28  Bruno Haible <bruno@clisp.org>
3397
3398         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
3399
3400 2006-07-28  Bruno Haible  <bruno@clisp.org>
3401
3402         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
3403
3404 2006-07-28  Bruno Haible  <bruno@clisp.org>
3405
3406         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
3407         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
3408         Define fallbacks.
3409         Avoids link error on FreeBSD 4.x.
3410         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
3411
3412         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
3413         encoding.
3414         * lib/mbswidth.c (iswcntrl): Likewise.
3415
3416 2006-07-27  Bruno Haible  <bruno@clisp.org>
3417
3418         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
3419         test.
3420
3421 2006-07-27  Bruno Haible  <bruno@clisp.org>
3422
3423         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
3424         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
3425         defined.
3426
3427 2006-07-26  Eric Blake  <ebb9@byu.net>
3428
3429         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
3430
3431 2006-07-26  Eric Blake  <ebb9@byu.net>
3432
3433         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
3434         like mingw that lack mkstemp.
3435         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
3436         avoid compilation warning on mingw.
3437
3438 2006-07-26  Bruno Haible  <bruno@clisp.org>
3439
3440         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
3441         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
3442         INT_FAST*_MIN, INTPTR_MIN.
3443
3444 2006-07-25  Bruno Haible  <bruno@clisp.org>
3445
3446         * modules/version-etc (Depends-on): Add stdarg.
3447
3448 2006-07-25  Bruno Haible  <bruno@clisp.org>
3449
3450         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
3451         complex commands.
3452
3453 2006-07-25  Bruno Haible  <bruno@clisp.org>
3454
3455         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
3456         defined in <stdarg.h> or config.h.
3457
3458 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
3459
3460         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
3461         (gl_STDIO_SAFER): Remove.
3462
3463 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
3464
3465         * MODULES.html.sh (File stream based Input/Output):
3466         Add fopen-safer, tmpfile-safer; remove stdio-safer.
3467         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
3468         * modules/fopen-safer, modules/tmpfile-safer: New files.
3469         * modules/stdio-safer: Remove.
3470
3471 2006-07-24  Bruno Haible  <bruno@clisp.org>
3472
3473         * modules/tmpdir: New file.
3474         * MODULES.html.sh (File system functions): Add it.
3475
3476 2006-07-24  Bruno Haible  <bruno@clisp.org>
3477
3478         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
3479         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
3480
3481 2006-07-24  Bruno Haible  <bruno@clisp.org>
3482
3483         * modules/clean-temp: New file.
3484
3485 2006-07-24  Bruno Haible  <bruno@clisp.org>
3486
3487         * m4/tmpdir.m4: New file, from GNU gettext.
3488
3489 2006-07-24  Bruno Haible  <bruno@clisp.org>
3490
3491         * lib/tmpdir.h: New file, from GNU gettext.
3492         * lib/tmpdir.c: New file, from GNU gettext.
3493
3494 2006-07-24  Bruno Haible  <bruno@clisp.org>
3495
3496         * lib/clean-temp.h: New file, from GNU gettext.
3497         * lib/clean-temp.c: New file, from GNU gettext.
3498
3499 2006-07-23  Eric Blake  <ebb9@byu.net>
3500
3501         * modules/stdio-safer (Files): Add tmpfile-safer.c.
3502         (Depends-on): Add binary-io.
3503
3504 2006-07-23  Eric Blake  <ebb9@byu.net>
3505
3506         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
3507
3508 2006-07-23  Eric Blake  <ebb9@byu.net>
3509
3510         * lib/tmpfile-safer.c: New file.
3511         * lib/stdio-safer.h (fopen_safer): Add prototype.
3512         * lib/stdio--.h (tmpfile): Make safer.
3513
3514 2006-07-23  Bruno Haible  <bruno@clisp.org>
3515
3516         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
3517         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
3518         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
3519         gl_linked_remove_at): Use it.
3520
3521 2006-07-22  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3522         and Simon Josefsson <jas@extundo.com>
3523
3524         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
3525
3526         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
3527
3528 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
3529
3530         * modules/close-stream: New file.
3531         * modules/closeout (Description): Make it clear that it exits
3532         with a diagnostic on error.
3533         (Depends-on): Add close-stream.  Remove fpending, stdbool.
3534         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
3535
3536 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
3537
3538         * m4/close-stream.m4: New file.
3539
3540 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
3541
3542         * lib/close-stream.c, close-stream.h: New files.
3543
3544 2006-07-22  Bruno Haible  <bruno@clisp.org>
3545
3546         Merge from GNU gettext 0.15.
3547
3548         2006-05-01  Bruno Haible  <bruno@clisp.org>
3549
3550                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
3551
3552         2006-07-22  Bruno Haible  <bruno@clisp.org>
3553
3554                 * modules/javaversion: New file.
3555                 * MODULES.html.sh (Java): Add javaversion.
3556
3557         2006-03-12  Bruno Haible  <bruno@clisp.org>
3558
3559                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
3560
3561         2005-12-04  Bruno Haible  <bruno@clisp.org>
3562
3563                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
3564                 (untested).
3565
3566         2006-06-21  Bruno Haible  <bruno@clisp.org>
3567
3568                 Avoid warnings from recent versions of mcs.
3569                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
3570                 -o, -L, -r any more. Use options documented since mcs-1.0
3571                 instead. Similarly for -g.
3572
3573         2005-12-04  Bruno Haible  <bruno@clisp.org>
3574
3575                 * build-aux/csharpcomp.sh.in: Suffix for resources is
3576                 .resources, not .resource.
3577
3578         2005-07-09  Bruno Haible  <bruno@clisp.org>
3579
3580                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
3581                 add a .dll suffix.
3582                 Reported by Mark Junker <mjscod@gmx.de>.
3583
3584         2006-07-22  Bruno Haible  <bruno@clisp.org>
3585
3586                 * modules/gettext: Upgrade to gettext-0.15.
3587                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
3588                 m4/visibility.m4.
3589                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
3590
3591 2006-07-22  Bruno Haible  <bruno@clisp.org>
3592
3593         Merge from GNU gettext 0.15.
3594
3595         2006-03-25  Bruno Haible  <bruno@clisp.org>
3596
3597                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
3598
3599         2006-07-21  Bruno Haible  <bruno@clisp.org>
3600
3601                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
3602                 "1.1".
3603
3604         2006-05-09  Bruno Haible  <bruno@clisp.org>
3605
3606                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
3607                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
3608                 for the conftestver execution.
3609
3610         2006-05-01  Bruno Haible  <bruno@clisp.org>
3611
3612                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
3613                 optional target-version argument. Verify that the compiler
3614                 groks source of the specified source-version, or add -source
3615                 option as necessary. Verify that the compiler produces
3616                 bytecode in the specified target-version, or add -target and
3617                 -source options as necessary. Make the result of the test
3618                 available as variable CONF_JAVAC. Also log error output in
3619                 config.log.
3620
3621         2006-03-11  Bruno Haible  <bruno@clisp.org>
3622
3623                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
3624
3625         2006-05-09  Bruno Haible  <bruno@clisp.org>
3626
3627                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
3628                 CLASSPATH_SEPARATOR to a semicolon.
3629
3630         2006-03-12  Bruno Haible  <bruno@clisp.org>
3631
3632                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
3633                 available as variable CONF_JAVA, for subsequent autoconf
3634                 tests. Also log error output in config.log.
3635
3636         2006-07-19  Bruno Haible  <bruno@clisp.org>
3637
3638                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
3639                 that getline works on glibc2 systems. Needed to avoid trouble
3640                 in relocatable.c.
3641                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
3642
3643         2005-12-04  Bruno Haible  <bruno@clisp.org>
3644
3645                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
3646                 launcher (untested).
3647
3648         2005-12-04  Bruno Haible  <bruno@clisp.org>
3649
3650                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
3651
3652         2006-07-22  Bruno Haible  <bruno@clisp.org>
3653
3654                 * gettext.m4: Update from GNU gettext-0.15.
3655                 * nls.m4: Likewise.
3656                 * po.m4: Likewise.
3657                 * inttypes-pri.m4: Likewise.
3658                 * inttypes-h.m4: Renamed from inttypes.m4.
3659                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
3660
3661 2006-07-22  Bruno Haible  <bruno@clisp.org>
3662
3663         Merge from GNU gettext 0.15.
3664
3665         2005-07-05  Bruno Haible  <bruno@clisp.org>
3666
3667                 * printf-args.c (printf_fetchargs): Work around broken
3668                 definition of wint_t on mingw.
3669
3670         2005-02-12  Bruno Haible  <bruno@clisp.org>
3671
3672                 * xallocsa.h: Add extern "C" for C++.
3673
3674         2006-05-17  Bruno Haible  <bruno@clisp.org>
3675
3676                 Cygwin portability.
3677                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
3678
3679         2006-04-30  Bruno Haible  <bruno@clisp.org>
3680
3681                 * progreloc.c: Include <mach-o/dyld.h> if available.
3682                 (find_executable): Use _NSGetExecutablePath when possible.
3683
3684         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3685
3686                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
3687                 function.
3688
3689         2005-12-29  Bruno Haible  <bruno@clisp.org>
3690
3691                 * progreloc.c (set_program_name_and_installdir): Fix
3692                 compilation error.
3693
3694         2005-12-04  Bruno Haible  <bruno@clisp.org>
3695
3696                 Cygwin portability.
3697                 * progreloc.c: Include <windows.h> also on Cygwin.
3698                 (find_executable): Add support for Cygwin.
3699                 (set_program_name_and_installdir): Handle also platforms with
3700                 nonempty EXEEXT.
3701
3702         2006-07-11  Bruno Haible  <bruno@clisp.org>
3703
3704                 * javacomp.c: Fix a comment.
3705                 Reported by Jim Meyering.
3706
3707         2006-04-30  Bruno Haible  <bruno@clisp.org>
3708
3709                 * javacomp.h (compile_java_class): Add source_version,
3710                 target_version arguments.
3711                 * javacomp.c: Rewritten to choose only a compiler that
3712                 respects the specified source_version and target_version.
3713
3714         2006-06-27  Bruno Haible  <bruno@clisp.org>
3715
3716                 Assume correct S_ISDIR macro.
3717                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
3718
3719         2006-07-22  Bruno Haible  <bruno@clisp.org>
3720
3721                 * javaversion.h: New file, from GNU gettext.
3722                 * javaversion.c: New file, from GNU gettext.
3723                 * javaversion.java: New file, from GNU gettext.
3724                 * javaversion.class: New file, from GNU gettext.
3725
3726         2006-05-17  Bruno Haible  <bruno@clisp.org>
3727
3728                 Cygwin portability.
3729                 * javaexec.c (execute_java_class): Test for jview program
3730                 also on Cygwin.
3731
3732         2006-04-09  Bruno Haible  <bruno@clisp.org>
3733
3734                 * fatal-signal.c: Don't include string.h.
3735                 (at_fatal_signal): Use a copying loop instead of memcpy.
3736
3737         2005-12-04  Bruno Haible  <bruno@clisp.org>
3738
3739                 * csharpexec.c: Add support for 'clix' launcher (untested).
3740                 (execute_csharp_using_sscli): New function.
3741                 (execute_csharp_program): Call it.
3742
3743         2006-06-21  Bruno Haible  <bruno@clisp.org>
3744
3745                 Avoid warnings from recent versions of mcs.
3746                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
3747                 -o, -L, -r any more. Use options documented since mcs-1.0
3748                 instead. Similarly for -g.
3749
3750         2005-07-09  Bruno Haible  <bruno@clisp.org>
3751
3752                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
3753                 add a .dll suffix.
3754                 Reported by Mark Junker <mjscod@gmx.de>.
3755
3756         2006-06-17  Bruno Haible  <bruno@clisp.org>
3757
3758                 * config.charset: Update for NetBSD 3.0.
3759
3760         2006-05-17  Bruno Haible  <bruno@clisp.org>
3761
3762                 Cygwin portability.
3763                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
3764
3765         2006-05-16  Bruno Haible  <bruno@clisp.org>
3766
3767                 * localcharset.c [CYGWIN]: Include <windows.h>.
3768                 (get_charset_aliases): For Cygwin, return the same CPxxx
3769                 aliases list as under WIN32.
3770                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
3771                 the environment variables. Fall back to GetACP().
3772
3773         2006-04-05  Bruno Haible  <bruno@clisp.org>
3774
3775                 * config.charset: Update Juan Manuel Guerrero's address.
3776
3777         2005-02-12  Bruno Haible  <bruno@clisp.org>
3778
3779                 * allocsa.h: Add extern "C" for C++.
3780
3781         2005-02-10  Bruno Haible  <bruno@clisp.org>
3782
3783                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
3784                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
3785
3786         2006-07-22  Bruno Haible  <bruno@clisp.org>
3787
3788                 * gettext.h: Update to GNU gettext-0.15.
3789
3790 2006-07-22  Bruno Haible  <bruno@clisp.org>
3791
3792         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
3793         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
3794         lib-prefix.m4, longdouble.m4, ssize_t.m4.
3795
3796 2006-07-21  Eric Blake  <ebb9@byu.net>
3797
3798         * modules/stdlib-safer: New file.
3799         * MODULES.html.sh (File stream based Input/Output): Add
3800         stdlib-safer.
3801
3802 2006-07-21  Eric Blake  <ebb9@byu.net>
3803
3804         * lib/stdlib-safer.h: New file from coreutils, required by
3805         stdlib--.h.
3806
3807 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
3808
3809         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
3810
3811 2006-07-20  Bruno Haible  <bruno@clisp.org>
3812
3813         * gnulib-tool: Recognize new option --assume-autoconf.
3814         (autoconf_minversion): New variable.
3815         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
3816
3817 2006-07-20  Bruno Haible  <bruno@clisp.org>
3818
3819         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
3820
3821 2006-07-19  Derek R. Price  <derek@ximbiot.com>
3822
3823         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
3824         Reindent and repaginate.
3825
3826 2006-07-19  Derek Price  <derek@ximbiot.com>
3827
3828         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
3829         Correct grammar.
3830
3831 2006-07-17  Bruno Haible  <bruno@clisp.org>
3832
3833         * modules/list: New file.
3834         * modules/array-list: New file.
3835         * modules/carray-list, modules/carray-list-tests: New files.
3836         * modules/linked-list, modules/linked-list-tests: New files.
3837         * modules/avltree-list, modules/avltree-list-tests: New files.
3838         * modules/rbtree-list, modules/rbtree-list-tests: New files.
3839         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
3840         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
3841         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
3842         * modules/oset: New file.
3843         * modules/array-oset: New file.
3844         * modules/avltree-oset, modules/avltree-oset-tests: New files.
3845         * modules/rbtree-oset, rbtree-oset-tests: New files.
3846         * tests/test-carray_list.c: New file.
3847         * tests/test-linked_list.c: New file.
3848         * tests/test-avltree_list.c: New file.
3849         * tests/test-rbtree_list.c: New file.
3850         * tests/test-linkedhash_list.c: New file.
3851         * tests/test-avltreehash_list.c: New file.
3852         * tests/test-rbtreehash_list.c: New file.
3853         * tests/test-avltree_oset.c: New file.
3854         * tests/test-rbtree_oset.c: New file.
3855         * MODULES.html.sh (Container data structures): New section.
3856
3857 2006-07-17  Bruno Haible  <bruno@clisp.org>
3858
3859         * m4/gl_list.m4: New file.
3860
3861 2006-07-17  Bruno Haible  <bruno@clisp.org>
3862
3863         * lib/gl_list.h: New file.
3864         * lib/gl_list.c: New file.
3865         * lib/gl_array_list.h: New file.
3866         * lib/gl_array_list.c: New file.
3867         * lib/gl_carray_list.h: New file.
3868         * lib/gl_carray_list.c: New file.
3869         * lib/gl_linked_list.h: New file.
3870         * lib/gl_linked_list.c: New file.
3871         * lib/gl_anylinked_list1.h: New file.
3872         * lib/gl_anylinked_list2.h: New file.
3873         * lib/gl_avltree_list.h: New file.
3874         * lib/gl_avltree_list.c: New file.
3875         * lib/gl_anyavltree_list1.h: New file.
3876         * lib/gl_anyavltree_list2.h: New file.
3877         * lib/gl_rbtree_list.h: New file.
3878         * lib/gl_rbtree_list.c: New file.
3879         * lib/gl_anyrbtree_list1.h: New file.
3880         * lib/gl_anyrbtree_list2.h: New file.
3881         * lib/gl_anytree_list1.h: New file.
3882         * lib/gl_anytree_list2.h: New file.
3883         * lib/gl_linkedhash_list.h: New file.
3884         * lib/gl_linkedhash_list.c: New file.
3885         * lib/gl_anyhash_list1.h: New file.
3886         * lib/gl_anyhash_list2.h: New file.
3887         * lib/gl_avltreehash_list.h: New file.
3888         * lib/gl_avltreehash_list.c: New file.
3889         * lib/gl_rbtreehash_list.h: New file.
3890         * lib/gl_rbtreehash_list.c: New file.
3891         * lib/gl_anytreehash_list1.h: New file.
3892         * lib/gl_anytreehash_list2.h: New file.
3893
3894         * lib/gl_oset.h: New file.
3895         * lib/gl_oset.c: New file.
3896         * lib/gl_array_oset.h: New file.
3897         * lib/gl_array_oset.c: New file.
3898         * lib/gl_avltree_oset.h: New file.
3899         * lib/gl_avltree_oset.c: New file.
3900         * lib/gl_rbtree_oset.h: New file.
3901         * lib/gl_rbtree_oset.c: New file.
3902         * lib/gl_anytree_oset.h: New file.
3903
3904 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
3905
3906         * m4/mkancesdirs.m4: New file.
3907         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
3908         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
3909         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
3910         it.
3911
3912 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
3913
3914         * lib/dirchownmod.c, dirchownmod.h, mkancesdirs.c, mkancesdirs.h:
3915         New files.
3916         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
3917         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
3918         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
3919         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
3920         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
3921         callers changed.  Revamp internals significantly, by not
3922         attempting to create directories that are temporarily more
3923         permissive than the final results.  Do not attempt to use
3924         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
3925         This removes some race conditions, fixes some bugs, and simplifies
3926         things.  Use new dirchownmod function to do owner and mode changes.
3927         * lib/mkdir-p.h: Likewise.
3928         * lib/modechange.c (octal_to_mode): New function.
3929         (struct mode_change): New member mentioned.
3930         (make_node_op_equals): New arg mentioned.  All callers changed.
3931         (mode_compile): Keep track of which mode bits the user has explicitly
3932         mentioned.
3933         (mode_adjust): New arg DIR, so that we implement the X op correctly.
3934         New arg PMODE_BITS, to keep track of which mode bits the user
3935         mentioned; it treats S_ISUID and S_ISGID speciall.
3936         All callers changed.
3937         * lib/modechange.h: Likewise.
3938
3939 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
3940
3941         * MODULES.html.sh: Add mkancestors.
3942         * modules/mkancesdirs: New module.
3943         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
3944         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
3945         The chdir-safer and afs files are now orphans; I'll remove them
3946         unless someone speaks up.
3947         Add lib/dirchownmod.c, lib/dirchownmod.h.
3948         (Depends-on): Remove alloca, chown, save-cwd, dirname.
3949         Add lchown, mkancesdirs.
3950         (Maintainer): Add self.
3951
3952 2006-07-15  Karl Berry  <karl@gnu.org>
3953
3954         * gnulib-tool: help message wording/arrangement.
3955
3956 2006-07-14  Simon Josefsson  <jas@extundo.com>
3957
3958         * doc/gnulib.texi (Libtool and Windows): New section.
3959
3960 2006-07-12  Simon Josefsson  <jas@extundo.com>
3961
3962         * modules/gendocs (License): Fix license, approved by Karl.
3963
3964 2006-07-12  Eric Blake  <ebb9@byu.net>
3965
3966         * MODULES.html.sh: Add gendocs.
3967
3968 2006-07-11  Eric Blake  <ebb9@byu.net>
3969
3970         * modules/fdl: New module, to install doc/fdl.texi.
3971         * MODULES.html.sh: Add new section for documentation modules.
3972         * gnulib-tool: Avoid space-tab.
3973         (--doc-base): New option, to manage files from doc.
3974
3975 2006-07-11  Eric Blake  <ebb9@byu.net>
3976
3977         * m4/absolute-header.m4: Fix comments to match recent change.
3978
3979 2006-07-11  Eric Blake  <ebb9@byu.net>
3980
3981         * gnulib-tool: List --doc-base before --tests-base.
3982
3983 2006-07-11  Derek R. Price  <derek@ximbiot.com>
3984
3985         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
3986
3987 2006-07-11  Bruno Haible  <bruno@clisp.org>
3988
3989         * README: Mention where to put documentation.
3990
3991 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3992
3993         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
3994
3995 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
3996
3997         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
3998         to stdint.m4.
3999
4000 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
4001
4002         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
4003         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
4004         "no/such/file/stdint.h" when there is no such file, so that
4005         the resulting C code can be parsed by dodgy compilers.
4006         Problems reported by Bob Proulx.
4007
4008 2006-07-10  Derek R. Price  <derek@ximbiot.com>
4009
4010         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
4011         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
4012         macros into the GNU _D_EXACT_NAMLEN.
4013         * lib/savedir.c:  Likewise.
4014         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
4015
4016 2006-07-10  Derek R. Price  <derek@ximbiot.com>
4017         and Paul Eggert  <eggert@cs.ucla.edu>
4018
4019         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
4020         * m4/savedir.m4:
4021         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
4022         macros into the GNU _D_EXACT_NAMLEN.
4023
4024 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4025
4026         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
4027         around the absolute name, to work around a problem with the HP-UX
4028         11.23 native C compiler, reported by Bob Proulx.
4029
4030 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4031
4032         * doc/maintain.texi, make-stds.texi: Sync from
4033         <http://savannah.gnu.org/projects/gnustandards>.
4034
4035 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4036
4037         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
4038
4039 2006-07-09  Jim Meyering  <jim@meyering.net>
4040
4041         * m4/glob.m4: Remove a doubled word in a comment.
4042
4043 2006-07-09  Jim Meyering  <jim@meyering.net>
4044
4045         * lib/argp-pv.c: Remove a doubled word in a comment.
4046         * lib/check-version.c (check_version): Likewise.
4047         * lib/javacomp.c (compile_java_class): Likewise.
4048
4049 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
4050
4051         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
4052         for the benefit of people using Autoconf 2.60.  If you want to
4053         support older Autoconf versions you can copy m4/onceonly_2_57.m4
4054         (or m4/onceonly.m4, if pre-2.57) manually.
4055
4056 2006-07-08  Jim Meyering  <jim@meyering.net>
4057
4058         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
4059         comment.
4060         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
4061         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
4062         comment.
4063
4064 2006-07-08  Jim Meyering  <jim@meyering.net>
4065
4066         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
4067
4068 2006-07-07  Simon Josefsson  <jas@extundo.com>
4069
4070         * tests/test-crc.c: Change expected crc value, the test vector
4071         were probably computed using the old broken crc.c?
4072
4073 2006-07-06  Simon Josefsson  <jas@extundo.com>
4074
4075         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
4076         now the canonical place for the M4 file).
4077
4078         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
4079         from the sys_socket dependency now.
4080
4081         * modules/inet_pton (Files): Ditto.
4082
4083         * modules/inet_ntop (Files): Ditto.
4084
4085 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
4086
4087         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
4088         not gl_PREREQ_GETUSERSHELL.
4089
4090 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4091
4092         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
4093         with only one argument, for Autoconf 2.60.
4094         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
4095         expand to nothing, so add a shell command to avoid syntax error.
4096         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
4097
4098 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4099
4100         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
4101
4102 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
4103
4104         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
4105         no longer needed.  Check for isblank decl.
4106         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
4107         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
4108         of existence.
4109
4110 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
4111
4112         * lib/getloadavg.c: Use __VMS, not VMS.
4113         * lib/getopt.c: Likewise.
4114         * lib/getpagesize.h: Likewise.
4115         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
4116         and probably does not work.
4117
4118 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
4119
4120         * lib/.cppi-disable: Add wcwidth.
4121         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
4122         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
4123         (ISGRAPH): Remove.  All uses changed to isgraph.
4124         (FOLD) [!defined _LIBC]: Remove special case.
4125         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
4126         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
4127         HAVE_ISBLANK.
4128         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
4129         case.
4130
4131 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
4132
4133         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
4134         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
4135         brackets.  Other minor changes to suppress some compiler
4136         warnings.
4137
4138 2006-07-06  Derek R. Price  <derek@ximbiot.com>
4139         and Paul Eggert  <eggert@cs.ucla.edu>
4140
4141         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
4142         of invoking obsolescent AC_HEADER_DIRENT macro.
4143         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
4144         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
4145         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
4146         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
4147         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
4148         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
4149         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
4150         * m4/readdir.m4: Remove; no longer needed.
4151
4152 2006-07-06  Derek R. Price  <derek@ximbiot.com>
4153         and Paul Eggert  <eggert@cs.ucla.edu>
4154
4155         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
4156         Don't worry about this obsolete case any more.
4157         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
4158         directories.
4159         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
4160         worry about this obsolete case any more.
4161         * lib/fts.c: Likewise.
4162         * lib/getcwd.c: Likewise.
4163         * lib/glob.h: Likewise.
4164         * lib/savedir.c: Likewise.
4165
4166 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
4167
4168         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
4169         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
4170         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
4171         needed.
4172         All uses removed.
4173         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
4174         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
4175         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
4176         needed.
4177         * m4/getdate.m4 (gl_GETDATE): Likewise.
4178         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
4179         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
4180         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
4181         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
4182         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
4183         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
4184         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
4185         needed.
4186
4187 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
4188
4189         * lib/memcasecmp.c: Include <limits.h>.
4190         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
4191         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
4192         Don't assume isdigit succeeds only on '0' through '9'.
4193
4194 2006-07-05  Eric Blake  <ebb9@byu.net>
4195
4196         * modules/getaddrinfo (Depends-on): Add snprintf.
4197
4198 2006-07-05  Eric Blake  <ebb9@byu.net>
4199
4200         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
4201         to avoid 'header present but could not be compiled' on cygwin.
4202
4203 2006-07-05  Eric Blake  <ebb9@byu.net>
4204
4205         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
4206         missing from netdb.h.
4207         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
4208
4209 2006-07-05  Derek R. Price  <derek@ximbiot.com>
4210
4211         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
4212         no longer needed.
4213         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
4214         * m4/getdate.m4 (gl_GETDATE): Likewise.
4215         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
4216         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
4217         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
4218         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
4219         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
4220
4221 2006-07-05  Derek R. Price  <derek@ximbiot.com>
4222
4223         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
4224         All uses of is_space replaced by isspace.
4225         * lib/exit.h: Don't talk about STDC_HEADERS.
4226         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
4227         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
4228         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
4229         replaced by isprint etc.
4230         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
4231         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
4232         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
4233         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
4234         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
4235         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
4236
4237 2006-07-05  Bruno Haible  <bruno@clisp.org>
4238
4239         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
4240         the function exists, before testing against AIX.
4241         Reported by Martin Lambers <marlam@marlam.de>.
4242
4243 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
4244
4245         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
4246         From Mark D. Baushke.
4247
4248 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
4249
4250         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
4251         to the absolute name, not just one, to bypass Sun C 5.8's
4252         "warning: #include of /usr/include/... may be non-portable".
4253
4254 2006-07-04  Eric Blake  <ebb9@byu.net>
4255
4256         * modules/dirname-tests: New test module.
4257         * tests/test-dirname.c: New file, replacing dirname.c
4258         TEST_DIRNAME section that was recently deleted.
4259
4260 2006-07-04  Bruno Haible  <bruno@clisp.org>
4261
4262         Assume ANSI C header files and <ctype.h> functions.
4263         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
4264         (mbsnwidth): Use isprint, iscntrl instead.
4265
4266 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
4267
4268         Merge from coreutils.
4269         * MODULES.html.sh: Add xstrtold.
4270         * modules/xstrtold: New file.
4271         * modules/cycle-check (Files): Add lib/same-inode.h.
4272         * modules/dirname (Files): Add m4/double-slash-root.m4.
4273         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
4274         * modules/mkdir-p (Files): Add lib/same-inode.h.
4275         * modules/same (Files): Add lib/same-inode.h.
4276
4277 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
4278
4279         * m4/absolute-header.m4: Renamed from full-header-path.m4.
4280         This is to keep the terminology clean; POSIX talks about
4281         "absolute pathnames", not "full pathnames", but the GNU
4282         Coding Standards say to use "path" for something else;
4283         so use "absolute" to keep both sides happy.
4284         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
4285         Set gl_absolute_header, not gl_full_header_path.
4286         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
4287         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
4288         All uses changed.
4289
4290         Merge from coreutils.
4291
4292         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
4293
4294         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
4295         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
4296         want to require the building of c-strtod.o.
4297         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
4298         needs -lm directly.
4299         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
4300
4301         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
4302
4303         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
4304         --as-needed option if available.  Problem reported by Albert Chin in
4305         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
4306         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
4307         cc merely issues a bunch of annoying warnings for --as-needed
4308         (this problem was reported by Bob Proulx).  Also, try linking with
4309         -lm to detect a bug in binutils 2.16 (this problem was reported
4310         by Ralf Wildenhues).
4311
4312         2006-06-18  Jim Meyering  <jim@meyering.net>
4313
4314         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
4315         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
4316         macro.
4317         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
4318         also check for glibc-2.4's abort-inducing bug.
4319
4320         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
4321         Low-probability clean-up should be to use rmdir to get rid of
4322         the just-created directory, not unlink.
4323
4324         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
4325         configure fail, and request a bug report to inform us about it.
4326         Add a comment that, barring reports to the contrary, in 2007 we'll
4327         assume ftruncate is universally available.
4328
4329         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
4330
4331         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
4332
4333         2006-03-12  Jim Meyering  <jim@meyering.net>
4334
4335         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
4336         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
4337         * m4/same.m4 (gl_SAME): Likewise.
4338         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
4339
4340         2006-03-11  Eric Blake  <ebb9@byu.net>
4341
4342         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
4343         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
4344         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
4345         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
4346
4347 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
4348
4349         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
4350         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
4351         reported by Mark D. Baushke, one in
4352         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
4353
4354         Merge from coreutils.
4355
4356         * lib/.cppi-disable: Add stdint_.h.
4357         * lib/.cvsignore: Add stdint.h.
4358
4359         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
4360
4361         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
4362         both double and long double versions.
4363         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
4364         * lib/xstrtold.c: New file.
4365         * lib/xstrtod.h (xstrtold): New decl.
4366
4367         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
4368
4369         * lib/filemode.c (setst): Remove.
4370         (strmode): Rewrite to avoid setst.  This makes the code shorter,
4371         (arguably) clearer, and the generated code is a bit smaller on my
4372         Debian GNU/Linux stable x86 host.
4373
4374         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
4375
4376         * lib/filemode.c: Include "filemode.h" first, to test the interface.
4377         Assume that filemode.h includes sys/types.h and sys/stat.h.
4378         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
4379         (ftypelet): Reorder to put common cases first, for efficiency.
4380         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
4381         to do 'M'.
4382         (strmode): Renamed from mode_string, and now stores 12 bytes instead
4383         of 10, for compatibility with FreeBSD.  All callers changed.
4384         (filemodestring): Now stores 12 bytes instead of 10, and sets file
4385         types that can't be deduced solely from st_mode.  First arg is now a
4386         const pointer.
4387         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
4388         (strmode): Renamed from mode_string.
4389         (filemodestring): New decl.
4390         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
4391         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
4392         needed.
4393         (S_ISPORT, S_ISWHT): New macros, if not already defined.
4394
4395         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
4396
4397         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
4398         fsusage.h now does that.  Include fsusage.h first, to test interface.
4399         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
4400         at most one method (the old code could have generated decls that
4401         didn't conform to C89, not that this was ever exercised).
4402         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
4403
4404         2006-03-19  Jim Meyering  <jim@meyering.net>
4405
4406         Work even in a chroot where d_ino values for entries in "/"
4407         don't match the stat.st_ino values for the same names.
4408         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
4409         number, iterate through all entries again, using lstat instead.
4410         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
4411         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
4412
4413         * lib/getcwd.c (__getcwd): Clarify a comment.
4414         Use memcpy in place of a call to strcpy.
4415
4416         2006-03-12  Jim Meyering  <jim@meyering.net>
4417
4418         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
4419         matches that of the current directory (which we're about to chdir ".."
4420         out of), then save the dev-ino of the parent, instead.
4421
4422         * lib/same-inode.h (SAME_INODE): New file/macro.
4423         * lib/chdir-safer.c (SAME_INODE): Remove definition.
4424         Include "same-inode.h", instead.
4425         * lib/same.c: Likewise.
4426         * lib/cycle-check.h: Include "same-inode.h".
4427         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
4428         * lib/cycle-check.c (SAME_INODE): Remove definition.
4429         * lib/root-dev-ino.h: Include "same-inode.h".
4430
4431         2006-03-11  Eric Blake  <ebb9@byu.net>
4432
4433         * lib/same.c (same_name): s/base_name/last_component/
4434         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
4435         * lib/filenamecat.c (file_name_concat): Likewise.
4436
4437         2006-03-11  Eric Blake  <ebb9@byu.net>,
4438                     Paul Eggert  <eggert@cs.ucla.edu>
4439
4440         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
4441         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
4442         drive prefix.
4443         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
4444         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
4445         (last_component): New method.
4446         * lib/dirname.c (dir_len): Determine when drive letters need a
4447         subsequent slash.  Preserve // when it is special.
4448         (dir_name): Don't append dot when drive letter is absolute.
4449         [TEST_DIRNAME]: Move into a full-blown gnulib test.
4450         * lib/basename.c (base_name): New semantics - malloc the result.
4451         Preserve // when it is special.  Preserve relative files that look
4452         like drive letters.
4453         (base_len): Preserve // when it is special.
4454         (last_component): New method, similar to old base_name semantics.
4455         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
4456         base_name.  Strip redundant slashes from ///.
4457
4458 2006-07-03  Jim Meyering  <jim@meyering.net>
4459
4460         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
4461         macro is used before the first cycle_check call.
4462
4463 2006-07-03  Eric Blake  <ebb9@byu.net>
4464
4465         * modules/dirname (Depends-on): Add xstrndup.
4466
4467 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
4468
4469         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
4470         test cases, so that config.log is a bit easier to follow.
4471
4472 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
4473
4474         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
4475         both are 64 bits, since this seems to be the tradition, and this
4476         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
4477         we ever run into a host that prefers long long to long in this
4478         case, we'll need another configure-time test.  Problem reported by
4479         Jim Meyering.
4480
4481 2006-07-02  Eric Blake  <ebb9@byu.net>
4482
4483         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
4484
4485 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4486
4487         * modules/inttypes (Depends-on): No longer depends on stdint.
4488         * modules/stdint (Description): Say more about assumptions.
4489         Say that the fast types might differ.  Say macros are used.
4490         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
4491         (Makefile.am): Revise list of substituted symbols to match
4492         new stdint.m4.
4493         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
4494         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
4495         * tests/test-stdint.c (verify_same_types)
4496         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
4497         the code conforms to C99/C89.
4498         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
4499         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
4500
4501 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4502
4503         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
4504         but fix a bug, by requiring at least 64 bits.
4505         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
4506         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
4507         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
4508         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
4509
4510         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
4511         changes.  Make 2.59 a prerequisite.  Check and substitute for
4512         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
4513         inttypes.h.  Do not use special include files; just use the
4514         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
4515         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
4516         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
4517         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
4518         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
4519         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
4520         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
4521         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
4522         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
4523         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
4524         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
4525         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
4526         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
4527         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
4528         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
4529         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
4530         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
4531         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
4532         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
4533         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
4534         WINT_MAX.  Check for C99 conformance more strictly, by detecting
4535         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
4536         not check for things that C99 does not require, e.g., int8_t.  If
4537         a test isn't needed unless <stdint.h> isn't working, and is
4538         unlikely to be needed for any other reason, then don't do it
4539         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
4540         size_t, since we assume C89 freestanding at least.  Do not check
4541         for sig_atomic_t, wchar_t, or wint_t, since the code now does
4542         the right thing even if the types are not defined.  Instead use:
4543         (gl_STDINT_TYPE_PROPERTIES): New macro.
4544         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
4545         testing whether <sys/types.h> clashes, as Autoconf does this for
4546         us now.  All uses removed.
4547         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
4548         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
4549         (gl_CHECK_TYPE_SAME):
4550         Remove; no longer needed.
4551         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
4552         exists, since we'll return 0 anyway in that case.
4553         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
4554
4555 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4556
4557         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
4558         possible collision with system files.
4559         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
4560         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
4561         WCHAR_MIN and WCHAR_MAX in this case.
4562         (<stddef.h>): Do not include; no longer needed.
4563         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
4564         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
4565         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
4566         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
4567         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
4568         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
4569         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
4570         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
4571         !defined(__c99))]: Include in this case too, since it's harmless
4572         now.
4573         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
4574         dangerous to do so.
4575         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
4576         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
4577         (_STDINT_MIN, _STDINT_MAX): New macros.
4578         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
4579         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
4580         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
4581         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
4582         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
4583         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
4584         macros, not typedefs; this simplifies things quite a bit.
4585         Use long int for all types narrower than int64_t.
4586         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
4587         Define in terms of long long int or int64_t or long int,
4588         not int64_t or int32_t.  This saves some compile-time testing.
4589         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
4590         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
4591         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
4592         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
4593         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
4594         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
4595         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
4596         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
4597         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
4598         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
4599         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
4600         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
4601         undef any previous version and define our own version, for
4602         simplicity and consistency with the new macros for types.
4603         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
4604         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
4605         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
4606         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
4607         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
4608         @WINT_T_SUFFIX@ to keep things simple here.
4609         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
4610         Simplify by assuming typical 8/16/32/64 host, since we're
4611         already doing that elsewhere anyway.
4612         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
4613         and assume long long int is 64 bits if available.  This
4614         speeds up 'configure'.
4615
4616 2006-07-01  Eric Blake  <ebb9@byu.net>
4617
4618         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
4619         Reported by Andreas Buening.
4620
4621 2006-07-01  Eric Blake  <ebb9@byu.net>
4622
4623         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
4624
4625 2006-06-30  Jim Hyslop <jhyslop@dreampossible.ca>  (tiny change)
4626
4627         * lib/getaddrinfo.c: fixed typo
4628
4629 2006-06-29  Jim Meyering  <jim@meyering.net>
4630
4631         * modules/strftime (Maintainer): Add my name, since with the
4632         FPRINTFTIME changes strftime.c has forked from glibc.
4633
4634 2006-06-29  Eric Blake  <ebb9@byu.net>
4635
4636         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
4637
4638 2006-06-29  Eric Blake  <ebb9@byu.net>
4639
4640         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
4641
4642 2006-06-29  Eric Blake  <ebb9@byu.net>
4643
4644         * lib/stat_.h: New file.
4645
4646 2006-06-29  Eric Blake  <ebb9@byu.net>
4647
4648         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
4649         unused static function.
4650
4651 2006-06-29  Eric Blake  <ebb9@byu.net>
4652
4653         * doc/functions.texi (Function Portability): Document missing lstat
4654         on mingw.
4655
4656 2006-06-29  Eric Blake  <ebb9@byu.net>
4657
4658         * MODULES.html.sh: Add sys_stat.
4659         * modules/sys_stat: New module.
4660         * modules/mkstemp (Depends-on): Add sys_stat.
4661
4662 2006-06-29  Derek R. Price  <derek@ximbiot.com>
4663
4664         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
4665
4666 2006-06-29  Derek R. Price  <derek@ximbiot.com>
4667
4668         * m4/c-bs-a.m4: Removed.
4669
4670 2006-06-29  Derek R. Price  <derek@ximbiot.com>
4671
4672         * lib/strftime.c: Assume strftime() exists.
4673
4674 2006-06-29  Derek Price  <derek@ximbiot.com>
4675
4676         * modules/c-bs-a: Removed - \a is C89.
4677         * MODULES.html.sh: Remove c-bs-a.
4678
4679 2006-06-29  Bruno Haible  <bruno@clisp.org>
4680
4681         * modules/wcwidth (License): Change to LGPL.
4682
4683 2006-06-28  Simon Josefsson  <jas@extundo.com>
4684
4685         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
4686         on _WIN32.
4687
4688         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
4689         getnameinfo.
4690
4691 2006-06-28  Simon Josefsson  <jas@extundo.com>
4692
4693         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
4694
4695 2006-06-28  Simon Josefsson  <jas@extundo.com>
4696
4697         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
4698         functions there.  It will succeed on Windows XP, but on Windows
4699         2000 and (presumably) earlier, it will fail, and use the internal
4700         re-implementation.
4701         (use_win32_p): New function.
4702         (getaddrinfo): Use strtoul on servname, to support numeric ports.
4703         Support AI_NUMERICSERV to disable getservbyname.
4704         (getnameinfo): New function, only supports
4705         NI_NUMERICHOST|NI_NUMERICSERV for now.
4706
4707         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
4708         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
4709         getnameinfo.
4710
4711 2006-06-28  Eric Blake  <ebb9@byu.net>
4712
4713         * modules/wcwidth: New file.
4714         * modules/mbchar (Depends-on): Add wcwidth.
4715         * modules/mbswidth (Depends-on): Add wcwidth.
4716         * MODULES.html.sh: Add wcwidth.
4717
4718 2006-06-28  Eric Blake  <ebb9@byu.net>
4719
4720         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
4721         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
4722
4723 2006-06-28  Eric Blake  <ebb9@byu.net>
4724
4725         * lib/xvasprintf.h: Fix comments.
4726
4727 2006-06-28  Eric Blake  <ebb9@byu.net>
4728
4729         * lib/mbchar.h (wcwidth): Include wcwidth.h.
4730         * lib/mbswidth.c (wcwidth): Move from here...
4731         * lib/wcwidth.h: ...to this new file.
4732
4733 2006-06-28  Derek R. Price  <derek@ximbiot.com>
4734
4735         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
4736
4737         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
4738         it's obsolete.
4739         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
4740
4741 2006-06-28  Derek R. Price  <derek@ximbiot.com>
4742
4743         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
4744         Autoconf 2.60 says this stuff was obsolete.
4745
4746 2006-06-28  Bruno Haible  <bruno@clisp.org>
4747
4748         * modules/wcwidth (Files): Add m4/wchar_t.m4.
4749
4750 2006-06-28  Bruno Haible  <bruno@clisp.org>
4751
4752         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
4753         gt_TYPE_WCHAR_T.
4754
4755 2006-06-28  Bruno Haible  <bruno@clisp.org>
4756
4757         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
4758         declaration for wcwidth.
4759         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
4760
4761 2006-06-28  Bruno Haible  <bruno@clisp.org>
4762
4763         * lib/mkdtemp.c [MINGW]: Include <io.h>.
4764         (mkdir): Define using _mkdir.
4765
4766 2006-06-28  Bruno Haible  <bruno@clisp.org>
4767
4768         * lib/getaddrinfo.h: Fix POSIX URL.
4769         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
4770         _WIN32.
4771         (use_win32_p): Make static.
4772         (getaddrinfo): Reject service name if it is empty or does not consist
4773         solely of decimal digits, or if its value is > 65535.
4774         (getnameinfo): Remove useless casts.
4775
4776 2006-06-27  Simon Josefsson  <jas@extundo.com>
4777
4778         * modules/sys_select: New file, suggested by Bruno Haible, Paul
4779         Eggert and Martin Lambers.
4780
4781 2006-06-27  Simon Josefsson  <jas@extundo.com>
4782
4783         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
4784         Eggert and Martin Lambers.
4785
4786 2006-06-27  Bruno Haible  <bruno@clisp.org>
4787
4788         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
4789         result to 0, not to empty.
4790         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
4791
4792 2006-06-27  Bruno Haible  <bruno@clisp.org>
4793
4794         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
4795
4796 2006-06-26  Simon Josefsson  <jas@extundo.com>
4797
4798         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
4799         present.
4800
4801 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
4802
4803         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
4804         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
4805         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
4806
4807 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
4808
4809         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
4810
4811 2006-06-26  Bruno Haible  <bruno@clisp.org>
4812
4813         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
4814
4815 2006-06-26  Bruno Haible  <bruno@clisp.org>
4816
4817         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
4818
4819 2006-06-26  Bruno Haible  <bruno@clisp.org>
4820
4821         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
4822         SGI C compiler in pre-C99 mode.
4823         Suggested by Mark D. Baushke and Larry Jones.
4824
4825 2006-06-26  Bruno Haible  <bruno@clisp.org>
4826
4827         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
4828         WCHAR_MAX.
4829         Reported by Mark D. Baushke and Larry Jones.
4830
4831 2006-06-26  Bruno Haible  <bruno@clisp.org>
4832
4833         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
4834         in pre-C99 mode.
4835         Suggested by Mark D. Baushke and Larry Jones.
4836
4837 2006-06-23  Simon Josefsson  <jas@extundo.com>
4838             Bruno Haible  <bruno@clisp.org>
4839
4840         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
4841         Emit mostlyclean-local rule.
4842         (func_emit_tests_Makefile_am): Likewise.
4843         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
4844
4845 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
4846
4847         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
4848
4849 2006-06-23  Bruno Haible  <bruno@clisp.org>
4850
4851         * tests/test-stdint.c: Update to match ISO C 99 Technical
4852         Corrigendum 1.
4853
4854 2006-06-23  Bruno Haible  <bruno@clisp.org>
4855
4856         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
4857
4858 2006-06-23  Bruno Haible  <bruno@clisp.org>
4859
4860         * lib/stdint_.h: Treat IRIX like OpenBSD.
4861
4862 2006-06-23  Bruno Haible  <bruno@clisp.org>
4863
4864         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
4865         ISO C 99 Technical Corrigendum 1.
4866
4867 2006-06-22  Simon Josefsson  <jas@extundo.com>
4868
4869         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
4870         MinGW.
4871
4872 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
4873
4874         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
4875         needed.  Some compiler complained about some of them.  Problem reported
4876         by Larry Jones in
4877         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
4878
4879 2006-06-21  Simon Josefsson  <jas@extundo.com>
4880
4881         * tests/test-getaddrinfo.c: New file.
4882
4883         * modules/getaddrinfo-tests: New file.
4884
4885         * MODULES.html.sh: Add inet_pton.
4886
4887         * modules/inet_pton: New file.
4888
4889 2006-06-21  Simon Josefsson  <jas@extundo.com>
4890
4891         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
4892         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
4893         of using the (limited) gnulib implementation on Windows XP.
4894
4895         * m4/inet_pton.m4: New file.
4896
4897 2006-06-21  Simon Josefsson  <jas@extundo.com>
4898
4899         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
4900         variable.
4901
4902         * lib/socket_.h: Don't define WINVER.
4903
4904         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
4905         slightly modified to work in gnulib.
4906
4907 2006-06-21  Simon Josefsson  <jas@extundo.com>
4908
4909         * doc/gnulib.texi (Windows sockets): Add.
4910
4911 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
4912
4913         * lib/read-file.c (fread_file): Start with buffer allocation of
4914         0 bytes rather than 1 byte; this simplifies the code.
4915         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
4916         code to free buffer and save/restore errno.
4917         (internal_read_file): Remove unused local.
4918
4919 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
4920
4921         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
4922         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
4923         Problem reported by Denis Excoffier in
4924         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
4925
4926 2006-06-19  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
4927
4928         * modules/sys_socket, modules/socklen: Include sys/types since
4929         FreeBSD 4.x's sys/socket.h needs it.
4930
4931 2006-06-19  Simon Josefsson  <jas@extundo.com>
4932
4933         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
4934
4935 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
4936
4937         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
4938
4939 2006-06-19  Bruno Haible  <bruno@clisp.org>
4940
4941         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
4942         and FULL_PATH_INTTYPES_H in angle brackets.
4943         Reported by Mark D. Baushke <mdb@gnu.org>.
4944
4945 2006-06-17  Eric Blake  <ebb9@byu.net>
4946
4947         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
4948         errno.
4949
4950 2006-06-17  Bruno Haible  <bruno@clisp.org>
4951
4952         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
4953         <sys/inttypes.h>.
4954
4955 2006-06-17  Bruno Haible  <bruno@clisp.org>
4956
4957         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
4958         whether errno is declared. Assume <errno.h> declares errno.
4959
4960 2006-06-17  Bruno Haible  <bruno@clisp.org>
4961
4962         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
4963
4964 2006-06-17  Bruno Haible  <bruno@clisp.org>
4965
4966         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
4967         problem on Solaris 2.5.1.
4968
4969 2006-06-16  Eric Blake  <ebb9@byu.net>
4970
4971         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
4972         * lib/unicodeio.c [!defined errno]: Likewise.
4973         * lib/strtol.c [!defined errno]: Likewise.
4974         * lib/strtod.c [!defined errno]: Likewise.
4975
4976 2006-06-15  Eric Blake  <ebb9@byu.net>
4977
4978         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
4979
4980 2006-06-15  Eric Blake  <ebb9@byu.net>
4981
4982         * config/srclist.txt (ssize_t.m4): Lose sync.
4983
4984 2006-06-15  Bruno Haible  <bruno@clisp.org>
4985
4986         * modules/stdint (Files): Include m4/full-header-path.m4,
4987         m4/size_max.m4, m4/wchar_t.m4.
4988         (Makefile.am): Many more substitutions.
4989         * modules/stdint-tests: New file.
4990         * tests/test-stdint.c: New file.
4991
4992 2006-06-15  Bruno Haible  <bruno@clisp.org>
4993
4994         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
4995         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
4996         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
4997         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
4998         gl_CHECK_TYPE_SAME): New macros.
4999
5000 2006-06-15  Bruno Haible  <bruno@clisp.org>
5001
5002         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
5003
5004 2006-06-15  Bruno Haible  <bruno@clisp.org>
5005
5006         * lib/stdint_.h: Rewritten to be fully auto-configured.
5007         Fixes bug on HP-UX/IA64.
5008
5009 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
5010
5011         * lib/getdate.y (__attribute__): Don't define if already defined.
5012         Problem reported by Larry Jones.
5013         * lib/utimens.c (__attribute__): Likewise.
5014
5015 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
5016
5017         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
5018         reported by Andreas Schwab.
5019
5020 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5021             Bruno Haible  <bruno@clisp.org>
5022
5023         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
5024         check for the declaration of strnlen and a run test that exposes the
5025         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
5026         rpl_strndup.
5027
5028 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5029             Bruno Haible  <bruno@clisp.org>
5030
5031         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
5032
5033 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5034
5035         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
5036         compile test, for Tru64 4.0D.
5037
5038 2006-05-28  Karl Berry  <karl@gnu.org>
5039
5040         * config/srclist.txt (printf-args.c): lose sync.
5041
5042 2006-05-26  Martin Lambers  <marlam@marlam.de>
5043
5044         * lib/getpass.c: Updates the test for the native W32 API, and adds
5045         missing includes, thus fixing compilation warnings.
5046
5047 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
5048
5049         * lib/exclude.c (exclude_fnmatch): New function.
5050         (excluded_file_name): Call exclude_fnmatch.
5051         * lib/exclude.h (excluded_file_name): New prototype
5052
5053 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
5054
5055         * lib/tempname.c (small_open, large_open): New macros.
5056         (__open, __open64) [!_LIBC]: Remove.
5057         (__gen_tempname): Use small_open and large_open instead of __open
5058         and __open64.  This fixes a portability bug on HP-UX 11.11i
5059         reported by Simon Wing-Tang in
5060         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
5061
5062 2006-05-24  Bruno Haible  <bruno@clisp.org>
5063
5064         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
5065         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
5066         Reported by Thorsten Maerz <torte@netztorte.de> via
5067         Aaron Stone <aaron@serendipity.cx>.
5068
5069 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
5070
5071         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
5072         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
5073         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
5074         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
5075         not really conditional on the cache.
5076         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
5077
5078 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
5079
5080         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
5081         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
5082         (my_usleep): Don't mishandle maximum value.
5083
5084 2006-05-19  Jim Meyering  <jim@meyering.net>
5085
5086         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
5087
5088 2006-05-17  Bruno Haible  <bruno@clisp.org>
5089
5090         Cygwin portability.
5091         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
5092
5093 2006-05-17  Bruno Haible  <bruno@clisp.org>
5094
5095         * lib/stdint_.h: Fix recognition of Cygwin.
5096
5097 2006-05-15  Bruno Haible  <bruno@clisp.org>
5098
5099         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
5100         on libtool patch by Ralf Wildenhues.
5101
5102 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
5103
5104         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
5105         test for C99 conformance; (bool) 0.5 is an integer constant
5106         expression, but (bool) -0.5 is not.  Problem reported by Fedor
5107         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
5108
5109 2006-05-11  Simon Josefsson  <jas@extundo.com>
5110
5111         * m4/xvasprintf.m4: Fix obvious typo.
5112
5113 2006-05-11  Jim Meyering  <jim@meyering.net>
5114
5115         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
5116         James Lemley.
5117
5118 2006-05-10  Simon Josefsson  <jas@extundo.com>
5119
5120         * lib/md4.c: Typo fix, update copyright years.
5121         (K1, K2): Don't use L because it turn computations into 64-bit on
5122         64-bit platforms.
5123
5124 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
5125
5126         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
5127         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
5128         unwanted sign propagation, e.g., on hosts with 64-bit int.
5129         There still are some problems with reeelly weird theoretical hosts
5130         (e.g., 33-bit int) but it's not worth worrying about now.
5131         * lib/sha1.c (rol): Likewise.
5132         (K1, K2, K3, K4): Remove unnecessary L suffix.
5133
5134 2006-05-10  Bruno Haible  <bruno@clisp.org>
5135
5136         * lib/des.c: Cast to avoid warnings.
5137
5138 2006-05-09  Bruno Haible  <bruno@clisp.org>
5139
5140         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
5141         (Depends-on): Depend also on xsize, stdarg.
5142         (configure.ac): Add gl_XVASPRINTF.
5143
5144 2006-05-09  Bruno Haible  <bruno@clisp.org>
5145
5146         * m4/xvasprintf.m4: New file.
5147
5148 2006-05-09  Bruno Haible  <bruno@clisp.org>
5149
5150         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
5151         (EOVERFLOW): Define fallback value.
5152         (xstrcat): New function.
5153         (xvasprintf): Recognize the special case of a string concatenation.
5154
5155 2006-05-08  Eric Blake  <ebb9@byu.net>
5156
5157         * gnulib-tool (func_version): Base copyright year on CVS date.
5158         (func_emit_copyright_notice): New function.
5159         (func_emit_lib_Makefile_am): Use it.
5160         (func_emit_tests_Makefile_am): Likewise.
5161         (func_import): Likewise.
5162
5163 2006-05-08  Bruno Haible  <bruno@clisp.org>
5164
5165         * modules/stdarg: New file.
5166         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
5167
5168 2006-05-08  Bruno Haible  <bruno@clisp.org>
5169
5170         * m4/stdarg.m4: New file, from GNU gettext.
5171
5172 2006-05-08  Bruno Haible  <bruno@clisp.org>
5173
5174         * config/srclist.txt (build-aux/config.rpath): different from latest
5175         release.
5176
5177 2006-05-08  Bruno Haible  <bruno@clisp.org>
5178
5179         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
5180
5181 2006-05-05  Jim Meyering  <jim@meyering.net>
5182
5183         * m4/warning.m4: New file, derived from bison's file by the same name.
5184
5185 2006-05-03  Bruno Haible  <bruno@clisp.org>
5186
5187         * lib/stdint_.h: Shorter URL.
5188         * lib/inttypes.h: Likewise.
5189
5190 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
5191
5192         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
5193
5194 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
5195
5196         * lib/verify.h: Document the internals better.  Most of this change
5197         was written by Bruno Haible.
5198
5199 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
5200
5201         * doc/verify.texi: New file, partly based on a proposal by
5202         Bruno Haible.
5203
5204 2006-05-02  Bruno Haible  <bruno@clisp.org>
5205
5206         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
5207         test from here...
5208         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
5209
5210 2006-04-29  Bruno Haible  <bruno@clisp.org>
5211
5212         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
5213         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
5214
5215 2006-04-29  Bruno Haible  <bruno@clisp.org>
5216
5217         * gnulib-tool: Make --update option actually work.
5218
5219 2006-04-29  Bruno Haible  <bruno@clisp.org>
5220
5221         * doc/gcd.texi: New file.
5222         * doc/gnulib.texi: Include it.
5223
5224 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
5225
5226         * lib/getdate.y (get_date): When adding relative date, start with the
5227         initial time, not with the result of the first mktime call.
5228
5229 2006-04-25  Bruno Haible  <bruno@clisp.org>
5230
5231         * gnulib-tool (func_import): Output the include directives in three
5232         blocks, sorted separately.
5233         Reported by Ben Pfaff <blp@cs.stanford.edu>.
5234
5235 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
5236
5237         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
5238         to define main with arguments, for C++.  Reported by Eric Blake.
5239         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
5240         Prefer 'int main ()' to 'int main (void)', for C++.
5241         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
5242         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
5243         for 'main', for C99 and C++.
5244
5245 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
5246
5247         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
5248         Don't assume that exit status -1 is valid.
5249         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
5250         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
5251         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
5252         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
5253         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
5254         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
5255         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
5256         functions can be used without declaring them, or that you can
5257         exit with status -1.
5258         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
5259
5260 2006-04-24  Karl Berry  <karl@gnu.org>
5261
5262         * config/srclist.txt (longdouble.m4): sync lost.
5263
5264 2006-04-24  Eric Blake  <ebb9@byu.net>
5265
5266         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
5267
5268 2006-04-24  Bruno Haible  <bruno@clisp.org>
5269
5270         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
5271         poll() implementation in AIX.
5272         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5273
5274 2006-04-24  Bruno Haible  <bruno@clisp.org>
5275
5276         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
5277         assigned exactly once.
5278
5279 2006-04-23  Claudio Fontana  <claudio@gnu.org>
5280             Bruno Haible  <bruno@clisp.org>
5281
5282         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
5283         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
5284         for AM_CPPFLAGS.
5285
5286 2006-04-23  Bruno Haible  <bruno@clisp.org>
5287
5288         * modules/copy-file: Depend on unistd.
5289         * modules/execute: Likewise.
5290         * modules/fatal-signal: Likewise.
5291         * modules/findprog: Likewise.
5292         * modules/mkdtemp : Likewise.
5293         * modules/pipe: Likewise.
5294         * modules/wait-process: Likewise.
5295
5296 2006-04-23  Bruno Haible  <bruno@clisp.org>
5297
5298         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
5299         condition was already detected.
5300         Reported by Ben Pfaff <blp@cs.stanford.edu>.
5301
5302 2006-04-23  Bruno Haible  <bruno@clisp.org>
5303
5304         * lib/copy-file.c: Include <unistd.h> unconditionally.
5305         * lib/execute.c: Likewise.
5306         * lib/fatal-signal.c: Likewise.
5307         * lib/findprog.c: Likewise.
5308         * lib/mkdtemp.c: Likewise.
5309         * lib/pipe.h: Likewise.
5310         * lib/pipe.c: Likewise.
5311         * lib/wait-process.h: Likewise.
5312
5313 2006-04-23  Bruno Haible  <bruno@clisp.org>
5314
5315         * gnulib-tool (func_usage): Fix --import description. Document
5316         --update.
5317         (func_import): Create temporary file in a temporary directory, if
5318         --dry-run is specified. Silence errors from 'grep' when there are no
5319         m4 files in $m4dir.
5320         (func_create_testdir): Silence errors from 'grep' when there are no
5321         m4 files in $m4dir.
5322         Reported by Karl Berry <karl@freefriends.org>.
5323
5324 2006-04-20  Bruno Haible  <bruno@clisp.org>
5325
5326         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
5327         one argument, so that the code will be portable to Autoconf 2.60.
5328         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
5329         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
5330         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
5331
5332 2006-04-19  Derek Price  <derek@ximbiot.com>
5333             Eric Blake  <ebb9@byu.net>
5334
5335         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
5336         rather than "/full/path.h".  Update comment to match.  Shorten &
5337         generalize m4_translit call via AS_TR_CPP.
5338
5339 2006-04-19  Derek Price  <derek@ximbiot.com>
5340             Eric Blake  <ebb9@byu.net>
5341
5342         * lib/inttypes.h: Correct grammar in comment.
5343
5344 2006-04-18  Derek Price  <derek@ximbiot.com>
5345             Paul Eggert  <eggert@cs.ucla.edu>
5346
5347         * modules/inttypes: New file.
5348         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
5349
5350 2006-04-18  Derek Price  <derek@ximbiot.com>
5351             Paul Eggert  <eggert@cs.ucla.edu>
5352
5353         * m4/_inttypes_h.m4, full-header-path.m4, include_next: New files.
5354
5355 2006-04-18  Derek Price  <derek@ximbiot.com>
5356             Paul Eggert  <eggert@cs.ucla.edu>
5357
5358         * lib/inttypes.h: New file.
5359         * lib/strtoimax.c: Assume <inttypes.h>.
5360
5361 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
5362
5363         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
5364         isn't mounted.  Problem reported by Kir Kolyshkin.
5365
5366 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
5367
5368         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
5369         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
5370         Derek R. Price.
5371         * lib/regex.h (RE_DUP_MAX): Update comment to match current
5372         implementation.
5373
5374 2006-04-12  Eric Blake  <ebb9@byu.net>
5375
5376         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
5377         is now done automatically by the corresponding Autoconf macro.
5378
5379 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
5380
5381         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
5382         time_r.h.
5383
5384 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5385
5386         Merge regex changes from libc, removing some of our
5387         POSIX-conformance changes that were rejected and redoing them in a
5388         less-intrusive way.
5389
5390         * lib/regcomp.c (re_compile_internal, init_dfa):
5391         Length arg is now size_t, not Idx.  All uses changed.
5392         (peek_token): Forward decl now says internal_function.
5393         (__re_error_msgid, __re_error_msgid_idx):
5394         Now static rather than extern with attribute_hidden.
5395         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
5396         For some reason libc prefers K&R style defns for external functions.
5397         (regerror) [!defined _LIBC]: Likewise.
5398         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
5399         (seek_collating_symbol_entry, lookup_collation_sequence_value):
5400         (build_range_exp, build_collating_symbol):
5401         Use K&R-style defn.
5402         (re_compile_fastmap): Use '\0' to memset, not 0.
5403         (utf8_sb_map): Make the calculations more obvious.
5404         (init_dfa, parse_bracket_exp, build_charclass_op):
5405         Call calloc and cast result, as glibc does.
5406         (init_word_char, fetch_token, peek_token, peek_token_bracket):
5407         (build_range_exp, build_collating_symbol):
5408         Now internal functions.
5409
5410         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
5411
5412         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
5413         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
5414         Don't depend on VMS; depend on __VMS instead, for POSIX
5415         namespace cleanness.
5416         (regoff_t): Define to ssize_t, not long int.
5417
5418         Remove the REG_ macros named below.  Instead, make the old names
5419         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
5420         __USE_GNU_REGEX.
5421         (REG_BACKSLASH_ESCAPE_IN_LISTS):
5422         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
5423         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
5424         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
5425         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
5426         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
5427         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
5428         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
5429         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
5430         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
5431         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
5432         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
5433         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
5434         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
5435         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
5436         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
5437         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
5438         (REG_NREGS):
5439         Remove.  All uses replaced by the old RE_* names.
5440         (RE_BACKSLASH_ESCAPE_IN_LISTS):
5441         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
5442         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
5443         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
5444         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
5445         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
5446         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
5447         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
5448         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
5449         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
5450         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
5451         Don't bother having these macros be independent of each others'
5452         values, since they no longer exist in the POSIX name space.
5453
5454         Rename the following member names back to their old names,
5455         unless !__USE_GNU_REGEX.  All uses changed back.
5456         (buffer): Renamed from re_buffer.
5457         (allocated): Renamed from re_allocated.
5458         (used): Renamed from re_used.
5459         (syntax): Renamed from re_syntax.
5460         (fastmap): Renamed from re_fastmap.
5461         (translate): Renamed from re_translate.
5462         (can_be_null): Renamed from re_can_be_null.
5463         (regs_allocated): Renamed from re_regs_allocated.
5464         (fastmap_accurate): Renamed from re_fastmap_accurate.
5465         (no_sub): Renamed from re_no_sub.
5466         (not_bol): Renamed from re_not_bol.
5467         (not_eol): Renamed from re_not_eol.
5468         (newline_anchor): Renamed from re_newline_anchor.
5469         (num_regs): Renamed from rm_num_regs.
5470         (start): Renamed from rm_start.
5471         (end): Renamed from rm_end.
5472
5473         (free_state): Move up a bit.
5474
5475         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
5476         #define to be empty.
5477         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
5478         when that is what is intended.
5479         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
5480         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
5481         (MAX): New macro.
5482         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
5483         All uses changed back to re_malloc, etc.  It's now the caller's
5484         responsibility to check for overflow; all callers changed.
5485         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
5486         (re_x2nrealloc): Remove.
5487         (free_state): Remove decl.
5488
5489         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
5490         (re_set_registers, re_exec):
5491         Use K&R-style defn.
5492
5493         2006-01-31  Roland McGrath  <roland@redhat.com>
5494
5495         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
5496         Reported by Mike Frysinger <vapier@gentoo.org>.
5497
5498         2006-01-15  Andreas Jaeger  <aj@suse.de>
5499
5500         [BZ #1950]
5501         * lib/regex_internal.c (re_string_reconstruct): Adjust for
5502         build_wcs_upper_buffer change.
5503         (build_wcs_upper_buffer): Change return type.
5504
5505         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
5506
5507         * lib/regex_internal.h: Include <stdint.h> if available.
5508
5509         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
5510
5511         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
5512
5513         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
5514
5515         * lib/regcomp.c: Adjust for changed secondary hash function.
5516
5517         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
5518
5519         * lib/regex.h: Pretty printing.
5520         Clean up namespace a bit.
5521
5522         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
5523
5524         * lib/regexec.c (update_cur_sifted_state, check_arrival,
5525         check_arrival_add_next_nodes): Avoid using uninitialized variable.
5526
5527         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
5528                     Ulrich Drepper  <drepper@redhat.com>
5529
5530         [BZ #1302]
5531         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
5532         changed.
5533         (bitset_word_t): Renamed from bitset_word.  All uses changed.
5534
5535         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
5536
5537         [BZ #281]
5538         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
5539         * lib/regcomp.c: Remove unnecessary uses of
5540         unsigned RE_TRANSLATE_TYPE.
5541         * lib/regex_internal.h: Likewise.
5542         * lib/regex_internal.c: Likewise.
5543         * lib/regexec.c: Likewise.
5544         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
5545
5546         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
5547
5548         * lib/regexec.c (find_recover_state): Remove unnecessary
5549         initialization.
5550         (transit_state_bkref): Make DFA a const pointer.
5551         (get_subexp): Likewise.
5552         (check_arrival): Likewise.
5553         (update_cur_sifted_state): Likewise.
5554         (re_search_internal): Likewise.
5555         (prune_impossible_nodes): Likewise.
5556         (acquire_init_state_context): Likewise.
5557         (proceed_next_node): Likewise.
5558         (set_regs): Likewise.
5559         (free_fail_stack_return): Likewise.
5560         (check_arrival_expand_ecl): Mark DFA parameter as const.
5561         (check_arrival_expand_ecl_sub): Likewise.
5562         (check_subexp_limits): Likewise.
5563         (sub_epsilon_src_nodes):  Likewise.
5564         (add_epsilon_src_nodes):  Likewise.
5565         (merge_state_array): Likewise.
5566         (update_regs): Likewise.
5567         (build_trtable): Likewise.
5568         (sift_states_backward): Mark MCTX parameter as const.
5569         (build_sifted_states): Likewise.
5570         (update_cur_sifted_state): Likewise.
5571         (sift_states_mkref): Likewise.
5572         (check_arrival_expand_ecl): Mark eclosure as const.
5573         (check_dst_limits_calc_pos_1): Likewise.
5574         * lib/regex_internal.h (re_match_context_t): Make dfa a const
5575         pointer.
5576
5577         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
5578
5579         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
5580         (transit_state_sb): Likewise.
5581         (transit_state_mb): Likewise.
5582         (sift_states_iter_mb): Likewise.
5583         (check_arrival_add_next_nodes): Likewise.
5584         (check_node_accept_bytes): Change first parameter to pointer-to-const.
5585         [_LIBC] (re_search_2_stub): Use mempcpy.
5586
5587         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
5588         mbrtowc for very simple UTF-8 case.
5589
5590         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
5591         a pointer-to-const.
5592         (re_acquire_state_context): Likewise.
5593         * lib/regex_internal.h: Adjust prototypes.
5594
5595         * lib/regex.c: Prevent using C++ compilers.
5596
5597         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
5598         (re_acquire_state_context): Likewise.
5599
5600 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5601
5602         * modules/regex (Depends-on): Add ssize_t.
5603
5604 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5605
5606         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
5607         translation table.
5608
5609 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5610
5611         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
5612
5613 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
5614             Bruno Haible  <bruno@clisp.org>
5615
5616         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
5617         <sys/types.h> and <inttypes.h>.
5618
5619 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5620
5621         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
5622         `__error_t_defined', so argp.h will not typedef the former.
5623
5624 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
5625
5626         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
5627         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
5628         glibc names.  Even if glibc is changed to conform to POSIX, the
5629         traditional names will be available anyway, since regex depends on
5630         the extensions module.  Also, fix a longstanding typo in the
5631         implementation of Spencer ERE test #75 from grep 2.3.  Problems
5632         reported by Emanuele Giaquinta.  Also, change sense of cached
5633         variable, so that the message makes sense.
5634
5635 2006-03-24  Simon Josefsson  <jas@extundo.com>
5636
5637         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
5638         including some doc fixes.
5639         (base64_encode_alloc): Fix +1 bug on allocation failures.
5640
5641 2006-03-24  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5642
5643         * lib/base64.c (base64_encode): Do not read past end of array with
5644         unsanitized input on systems with CHAR_BIT > 8.
5645
5646 2006-03-24  Eric Blake  <ebb9@byu.net>
5647
5648         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
5649
5650 2006-03-22  Karl Berry  <karl@gnu.org>
5651
5652         * config/srclist.txt (*setenv.[ch]): get from coreutils.
5653         * config/srclistvars.sh (COREUTILS): new var.
5654
5655 2006-03-17  Jim Meyering  <jim@meyering.net>
5656
5657         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
5658         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
5659
5660 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
5661
5662         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
5663         no longer needs it.  Instead, check that regoff_t is as least
5664         as wide as ptrdiff_t.
5665
5666         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
5667         so that our regex.h stays compatible with the installed regex.
5668         This is helpful for installers who configure --without-included-regex.
5669         Problem reported by Emanuele Giaquinta.
5670
5671 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
5672
5673         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
5674         Typedef to long int, not to off_, as POSIX will likely change
5675         in that direction.
5676
5677 2006-03-15  Eric Blake  <ebb9@byu.net>
5678
5679         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
5680
5681 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
5682
5683         * lib/argp-help.c (validate_uparams): Fix typo
5684         * lib/argp-parse.c (argp_default_options): Consistently begin help
5685         messages with a lowercase letter.
5686
5687 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
5688
5689         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
5690         overrun buffers and shouldn't be used (much as gets shouldn't be
5691         used).
5692         * lib/time_r.c (asctime_r, ctime_r): Likewise.
5693
5694 2006-03-08  Simon Josefsson  <jas@extundo.com>
5695
5696         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
5697         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5698
5699 2006-03-08  Simon Josefsson  <jas@extundo.com>
5700
5701         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
5702         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5703
5704 2006-03-08  Simon Josefsson  <jas@extundo.com>
5705
5706         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
5707         signal that configure disabled the device.
5708
5709 2006-03-08  Simon Josefsson  <jas@extundo.com>
5710
5711         * build-aux/maint.mk: Fix refresh-po, to handle no translated
5712         languages.
5713
5714 2006-03-07  Simon Josefsson  <jas@extundo.com>
5715
5716         * modules/getopt (Depends-on): Add unistd.
5717
5718         * modules/unistd: New file.
5719
5720 2006-03-07  Simon Josefsson  <jas@extundo.com>
5721
5722         * modules/gc-random: New file.
5723
5724 2006-03-07  Simon Josefsson  <jas@extundo.com>
5725
5726         * m4/unistd_h.m4: New file.
5727
5728 2006-03-07  Simon Josefsson  <jas@extundo.com>
5729
5730         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
5731         test to be side-effect free by storing the result in the cache
5732         variable gl_cv_lib_readline, and moving the assignment of
5733         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
5734         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5735
5736 2006-03-07  Simon Josefsson  <jas@extundo.com>
5737
5738         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
5739         error on missing devices (the functions will return an error).
5740
5741         * m4/gc.m4: Move random stuff to gc-random.m4
5742
5743 2006-03-07  Simon Josefsson  <jas@extundo.com>
5744
5745         * lib/unistd_.h: New file.
5746
5747 2006-03-07  Simon Josefsson  <jas@extundo.com>
5748
5749         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
5750
5751 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
5752
5753         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
5754         Problem reported by Juan Manuel Guerrero.
5755
5756 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
5757
5758         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
5759         the unistd module.
5760         * lib/getlogin_r.c: Likewise.
5761         * lib/getlogin_r.h: Likewise.
5762         * lib/glob.c: Likewise.
5763         * lib/pagealign_alloc.c: Likewise.
5764         * lib/unistd_.h: Remove; no longer needed.
5765
5766 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
5767
5768         * MODULES.html.sh (Support for systems lacking POSIX:2001):
5769         Add unistd.
5770         * modules/c-stack (Depends-on): Add unistd.
5771         * modules/getlogin_r: Likewise.
5772         * modules/glob: Likewise.
5773         * modules/pagealign_alloc: Likewise.
5774         * modules/unistd (Files): Remove lib/unistd_.h.
5775         (EXTRA_DIST): Remove.
5776         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
5777         need unistd_.h.
5778         (MOSTLYCLEANFILES): Remove unistd.h-t.
5779
5780 2006-03-03  Simon Josefsson  <jas@extundo.com>
5781
5782         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
5783
5784 2006-03-03  Simon Josefsson  <jas@extundo.com>
5785
5786         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
5787         libidn and bison.
5788
5789 2006-03-03  Simon Josefsson  <jas@extundo.com>
5790
5791         * build-aux/maint.mk: Add indent target.
5792
5793 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
5794
5795         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
5796         our replacement poll.h in any case, to avoid a differing
5797         declaration from a system header.  Seen on AIX.
5798
5799 2006-03-01  Simon Josefsson  <jas@extundo.com>
5800
5801         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
5802         <kasal@ucw.cz>.
5803
5804 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
5805
5806         * modules/gettime (Depends-on): Add extensions module.
5807         * modules/nanosleep (Depends-on): Likewise.
5808         * modules/settime (Depends-on): Likewise.
5809
5810 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
5811
5812         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
5813         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
5814         pedantically.
5815         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
5816         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
5817
5818         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
5819         not "==".  Reported by Ralf Wildenhues.
5820
5821 2006-03-01  Karl Berry  <karl@gnu.org>
5822
5823         * doc/Copyright/request-*: new files, synced from gnuorg.
5824
5825 2006-03-01  Karl Berry  <karl@gnu.org>
5826
5827         * config/srclist.txt (Copyright/*): new entries.
5828
5829 2006-02-28  Simon Josefsson  <jas@extundo.com>
5830
5831         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
5832
5833 2006-02-27  Simon Josefsson  <jas@extundo.com>
5834
5835         * lib/base64.h: Indent #define's.  From Jim Meyering
5836         <jim@meyering.net>.
5837
5838 2006-02-27  Jim Meyering  <jim@meyering.net>
5839
5840         Revert the change of 2006-02-24, so these files can continue
5841         to be sync'd from gettext.
5842         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
5843         of `config.h'.
5844
5845 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
5846
5847         * modules/intprops: New file.
5848         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
5849         Add intprops.
5850         * modules/getloadavg (Files): Remove lib/intprops.h.
5851         (Depends-on): Add intprops.
5852         * modules/human: Likewise.
5853         * modules/inttostr: Likewise.
5854         * modules/openat: Likewise.
5855         * modules/sig2str: Likewise.
5856         * modules/userspec: Likewise.
5857         * modules/utimecmp: Likewise.
5858         * modules/xnanosleep: Likewise.
5859         * modules/xstrtol: Likewise.
5860
5861 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
5862
5863         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
5864         * modules/lock-tests (TESTS): Use $(EXEEXT).
5865         * modules/tls-tests: Likewise.
5866         * modules/argp-tests: Likewise.
5867         (check_PROGRAMS): New var, replacing...
5868         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
5869
5870 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5871
5872         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
5873         `config.h'.
5874
5875 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
5876
5877         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
5878
5879 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5880
5881         Sync from coreutils.
5882         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
5883         gl_CHDIR_SAFER.
5884
5885 2006-02-22  Jim Meyering  <jim@meyering.net>
5886
5887         Sync from coreutils.
5888         * m4/chdir-safer.m4: New file.
5889
5890 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
5891
5892         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
5893         AT_FDCWD exceeds INT_MAX.
5894         * lib/openat.h (AT_FDCWD): Likewise.
5895
5896 2006-02-17  Eric Blake  <address@hidden>
5897
5898         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
5899
5900 2006-02-16  Simon Josefsson  <jas@extundo.com>
5901
5902         * modules/getaddrinfo (Depends-on): Add sys_socket.
5903
5904 2006-02-15  Simon Josefsson  <jas@extundo.com>
5905
5906         * build-aux/maint.mk: Add dsyntax-check rule.
5907
5908 2006-02-15  Eric Blake  <ebb9@byu.net>
5909
5910         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
5911         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
5912         'present but cannot compile' warnings on cygwin.
5913         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
5914         use ws2tcpip.h if sys/socket.h works.
5915         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
5916         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
5917
5918 2006-02-14  Simon Josefsson  <jas@extundo.com>
5919
5920         * modules/maintainer-makefile (Files): Rename.
5921
5922         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
5923         and (the local) Makefile.cfg to maint-cfg.mk.
5924
5925         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
5926         to the latter.
5927
5928         * modules/maintainer-makefile: New module.
5929
5930         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
5931         severaly stripped to make it possible to build it up from scratch
5932         with reliable tests.
5933
5934         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
5935         fixes to permit overriding the default actions when configure and
5936         makefile are not available.
5937
5938 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
5939
5940         Sync from coreutils.
5941         * modules/lstat (Depends-on): Don't depend on xalloc.
5942         (License): Change from GPL to LGPL, since this is now simply a
5943         replacement for a libc function.
5944
5945 2006-02-14  Jim Meyering  <jim@meyering.net>
5946
5947         Sync from coreutils.
5948
5949         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
5950         failure on deficient systems, and simplify gnulib lgpl dependencies.
5951         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
5952         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
5953
5954         * lib/xalloc-die.c: Remove unused definition of N_.
5955
5956 2006-02-14  Jim Meyering  <jim@meyering.net>
5957
5958         Sync from coreutils.
5959         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
5960         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
5961         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
5962         double-quote uses of that variable, to accommodate the rare case in
5963         which getmntent is available in none of the libraries checked.  This
5964         happens at least on FreeBSD 5.0.
5965
5966 2006-02-13  Simon Josefsson  <jas@extundo.com>
5967
5968         * gnulib-tool (Usage): Fix --import, from
5969         karl@freefriends.org (Karl Berry).
5970
5971 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
5972
5973         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
5974
5975 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
5976
5977         * lib/argp-namefrob.h: Restore changes accidentally lost during the
5978         "autoupdate" on 2005-12-12.
5979
5980 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
5981
5982         * modules/closeout (Depends-on): Remove atexit.
5983
5984 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
5985
5986         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
5987         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
5988
5989 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
5990
5991         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
5992         __EXTENSIONS__ if this causes compilation to fail.  Problem
5993         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
5994         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
5995
5996 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
5997
5998         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
5999         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
6000         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
6001         All uses changed.
6002
6003 2006-01-26  Simon Josefsson  <jas@extundo.com>
6004
6005         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
6006         prototype is visible on mingw32.
6007
6008         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
6009         for mingw32.
6010
6011         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
6012         mingw32).
6013
6014 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
6015
6016         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
6017         attempt to open for write; this always fails, at least on POSIX
6018         hosts.  This reinstates the 2006-01-09 change, which was
6019         inadvertently removed.
6020
6021 2006-01-26  Bruno Haible  <bruno@clisp.org>
6022
6023         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
6024         Reported by Paul Eggert.
6025
6026 2006-01-26  Bruno Haible  <bruno@clisp.org>
6027             Paul Eggert  <eggert@cs.ucla.edu>
6028
6029         * lib/stdbool_.h (_Bool)
6030         [(! (defined __cplusplus || defined __BEOS__)
6031           && !defined __GNUC__
6032           && !(defined __HP_cc || defined __xlc__
6033                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
6034                || defined __sgi))]:
6035         #define to signed char in these cases too; this simplifies
6036         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
6037         etc., separately) and makes it more conservative.
6038
6039 2006-01-25  Simon Josefsson  <jas@extundo.com>
6040
6041         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
6042         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
6043         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
6044
6045 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
6046
6047         * lib/argp-namefrob.h: Bugfix. Remove stray #
6048
6049 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
6050
6051         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
6052         so that we test the test.
6053         Check for yet another HP-UX cc bug involving *bool |= bool.
6054
6055 2006-01-25  Karl Berry  <karl@gnu.org>
6056
6057         * config/srclist.txt (vasnprintf.c): sync lost.
6058
6059 2006-01-25  Jim Meyering  <jim@meyering.net>
6060
6061         Sync from the stable (b5) branch of coreutils:
6062
6063         * lib/fts.c (fts_children): Don't let close() clobber errno from
6064         failed fchdir().
6065
6066         * lib/fts.c (fts_stat): When following a symlink-to-directory,
6067         don't necessarily interpret stat-fails+lstat-succeeds as indicating
6068         a dangling symlink.  That can also happen at least for ELOOP.
6069         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
6070         FYI, this bug predates the inclusion of fts.c in coreutils.
6071
6072         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
6073         in their own block, so pre-c99 compilers don't object.
6074
6075         Avoid the double-free (first in fts_read, second in fts_close) that
6076         would occur when an `active' directory is made inaccessible (e.g.,
6077         via chmod a-x) during a traversal.
6078         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
6079         before returning.  Reproduce this failure by
6080         mkdir -p a/b; cd a; chmod a-x . b
6081         Reported by Stavros Passas.
6082
6083 2006-01-25  Jim Meyering  <jim@meyering.net>
6084
6085         * lib/fileblocks.c: Remove more useless parentheses.
6086         * lib/readutmp.h: Likewise.
6087
6088 2006-01-25  Bruno Haible  <bruno@clisp.org>
6089
6090         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
6091         warnings.
6092         Reported by Paul Eggert.
6093
6094 2006-01-25  Bruno Haible  <bruno@clisp.org>
6095
6096         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
6097         rid of a trap command. For Solaris sh.
6098         Reported by Mark D. Baushke <mdb@gnu.org>.
6099
6100 2006-01-24  Simon Josefsson  <jas@extundo.com>
6101
6102         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
6103         Bruno.
6104
6105 2006-01-24  Karl Berry  <karl@gnu.org>
6106
6107         * config/srclist.txt (argp-namefrob.h): sync lost.
6108
6109 2006-01-24  Jim Meyering  <jim@meyering.net>
6110
6111         * modules/openat (Files): Add lib/intprops.h.
6112         From Mark D. Baushke.
6113
6114 2006-01-24  Jim Meyering  <jim@meyering.net>
6115
6116         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
6117         Reported by Mark D. Baushke.
6118
6119 2006-01-24  Jim Meyering  <jim@meyering.net>
6120
6121         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
6122
6123 2006-01-24  Bruno Haible  <bruno@clisp.org>
6124
6125         * modules/strnlen (Maintainer): Change from glibc to all.
6126
6127 2006-01-24  Bruno Haible  <bruno@clisp.org>
6128
6129         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
6130         Patch by Paul Eggert.
6131
6132 2006-01-24  Bruno Haible  <bruno@clisp.org>
6133
6134         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
6135         already has it.
6136         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
6137         2005-11-26.
6138
6139         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
6140         'signed char' to avoid problems with the built-in _Bool type.
6141         Reported by Paul Eggert on 2005-11-26.
6142
6143 2006-01-24  Bruno Haible  <bruno@clisp.org>
6144
6145         * gnulib-tool (func_import): Avoid constructing complicated sed
6146         expressions inside backquote.
6147         Report and solution by Mark D. Baushke <mdb@gnu.org>.
6148
6149 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
6150
6151         These changes imported from libc.
6152         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
6153         test and two separate function calls.
6154         * lib/strndup.c (__strndup): Add libc_hidden_def.
6155
6156 2006-01-23  Simon Josefsson  <jas@extundo.com>
6157
6158         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
6159         Remove the test_*_SOURCES variable: automake infers it by default.
6160         * modules/tls-tests: Likewise.
6161
6162 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6163
6164         Work around porting bugs reported by Dieter in
6165         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
6166         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
6167         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
6168         Include "getopt.h" first, to check interface.
6169         (getenv): Declare only if defined HAVE_DECL_GETENV &&
6170         !HAVE_DECL_GETENV.
6171         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
6172         (__strndup): Revert to K&R-style function dfns, the glibc style.
6173         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
6174         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
6175         Include strnlen.h first, to get prototype properly.
6176         (strnlen): Renamed from __strnlen.
6177         Remove weak alias.
6178
6179 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6180
6181         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
6182
6183 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6184
6185         * config/srclist.txt: Adjust to reflect glibc reorganization.
6186         This affects only comments.
6187
6188 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6189
6190          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
6191          Reported by Bruce Korb <bkorb@gnu.org>.
6192
6193 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
6194
6195         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
6196         to pacify gcc -Wswitch-default.
6197
6198 2006-01-22  Bruno Haible  <bruno@clisp.org>
6199
6200         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
6201         temporary buffer for sprintf, take into account the precision also
6202         for 'd', 'i', 'u', 'o', 'x', 'X'.
6203
6204 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
6205
6206         * modules/argp-tests: New module
6207         * tests/test-argp.c: New file
6208         * tests/test-argp-2.sh: New file
6209
6210 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
6211
6212         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
6213         (__argp_base_name): Removed
6214         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
6215         typo.
6216         (__argp_base_name): Provide macro definition or extern declaration
6217         depending on the configuration
6218
6219 2006-01-20  Simon Josefsson  <jas@extundo.com>
6220
6221         * modules/inet_ntop (Depends-on): Depend on sys_socket.
6222
6223 2006-01-20  Simon Josefsson  <jas@extundo.com>
6224
6225         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
6226
6227 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
6228
6229         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
6230         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
6231         Suggested by Bruno Haible.
6232
6233 2006-01-20  Karl Berry  <karl@gnu.org>
6234
6235         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
6236         until changes propagate, I guess.
6237
6238 2006-01-19  Simon Josefsson  <jas@extundo.com>
6239
6240         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
6241
6242 2006-01-19  Simon Josefsson  <jas@extundo.com>
6243
6244         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
6245
6246 2006-01-19  Simon Josefsson  <jas@extundo.com>
6247
6248         * gnulib-tool: Set check_PROGRAMS.
6249
6250         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
6251         modules/des-tests, modules/gc-arcfour-tests,
6252         modules/gc-arctwo-tests, modules/gc-des-tests,
6253         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
6254         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
6255         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
6256         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
6257         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
6258         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
6259         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
6260         test_*_SOURCES.
6261
6262 2006-01-18  Simon Josefsson  <jas@extundo.com>
6263
6264         * modules/socklen (Depends-on): Depend on sys_socket.
6265
6266 2006-01-18  Simon Josefsson  <jas@extundo.com>
6267
6268         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
6269         modules/des-tests, modules/gc-arcfour-tests,
6270         modules/gc-arctwo-tests, modules/gc-des-tests,
6271         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
6272         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
6273         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
6274         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
6275         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
6276         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
6277         $(EXEEXT) to automake TESTS variable, for mingw32.
6278
6279 2006-01-17  Simon Josefsson  <jas@extundo.com>
6280
6281         * modules/socklen (Include): Need sys/socket.h.
6282
6283 2006-01-17  Bruno Haible  <bruno@clisp.org>
6284
6285         * modules/ssize_t (Include): Add <sys/types.h>.
6286
6287 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
6288
6289         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
6290         it's not portable and it doesn't work with cross-compiles.
6291         Problem reported by Bruno Haible.  Fix missing-$ typo in
6292         'test "gl_cv_ignore_unused_libraries" ...' that prevented
6293         -zignore from being used with Sun's C compiler.
6294
6295 2006-01-12  Simon Josefsson  <jas@extundo.com>
6296
6297         * lib/base64.c: Fix warning, reported by Bruno Haible
6298         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
6299
6300 2006-01-12  Bruno Haible  <bruno@clisp.org>
6301
6302         * modules/ldd: New file.
6303         * build-aux/ldd.sh.in: New file.
6304         * MODULES.html.sh (Support for building libraries and executables): Add
6305         ldd.
6306
6307 2006-01-12  Bruno Haible  <bruno@clisp.org>
6308
6309         * m4/ldd.m4: New file.
6310
6311 2006-01-12  Bruno Haible  <bruno@clisp.org>
6312
6313         * gnulib-tool (func_import, func_create_testdir): Don't go into an
6314         endless loop while replacing $auxdir with build-aux.
6315
6316 2006-01-11  Simon Josefsson  <jas@extundo.com>
6317
6318         * lib/stdint_.h (SIZE_MAX): Add missing (.
6319
6320 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
6321
6322         Sync from coreutils.
6323         * lib/md5.c: Fix commentary typos.
6324         (alignof, UNALIGNED_P): No need for a GCC-specific version.
6325         * lib/md5.h (__attribute__): Remove; unused.
6326         * lib/sha1.c: Fix commentary to match md5 better.
6327         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
6328         so that we don't need to worry about alignment.  All uses changed.
6329         This merges the 2005-10-28 md5 change into sha1.
6330
6331 2006-01-11  Jim Meyering  <jim@meyering.net>
6332
6333         Sync from coreutils.
6334         * lib/md5.c (OP): Fix spacing.
6335
6336 2006-01-11  Bruno Haible  <bruno@clisp.org>
6337
6338         Ensure automatic ordering between gl_LOCK and gl_ARGP.
6339         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
6340         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
6341
6342 2006-01-11  Bruno Haible  <bruno@clisp.org>
6343
6344         Ensure automatic ordering between gl_LOCK and gl_ARGP.
6345         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
6346         the "early" section as well.
6347
6348 2006-01-11  Bruno Haible  <bruno@clisp.org>
6349
6350         Avoid "ar: no archive members specified" error on MacOS X.
6351         * gnulib-tool (func_modules_add_dummy): New function.
6352         (func_import, func_create_testdir): Invoke it.
6353
6354 2006-01-11  Bruno Haible  <bruno@clisp.org>
6355
6356         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
6357         with $auxdir in AC_CONFIG_FILES statements.
6358
6359 2006-01-11  Bruno Haible  <bruno@clisp.org>
6360
6361         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6362         Initialize also noinst_HEADERS to empty.
6363
6364 2006-01-11  Bruno Haible  <bruno@clisp.org>
6365
6366         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
6367         variables.
6368         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
6369         autoreconf.
6370
6371 2006-01-11  Bruno Haible  <bruno@clisp.org>
6372
6373         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
6374         overridable by the user.
6375         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6376
6377 2006-01-10  Simon Josefsson  <jas@extundo.com>
6378
6379         * modules/sys_socket: New file.
6380
6381 2006-01-10  Simon Josefsson  <jas@extundo.com>
6382
6383         * m4/sys_socket_h.m4: New file.
6384
6385 2006-01-10  Simon Josefsson  <jas@extundo.com>
6386
6387         * lib/socket_.h: New file.
6388
6389 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6390
6391         * modules/readutmp (Maintainer): Add myself.
6392
6393 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6394
6395         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
6396         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
6397         People who are still concerned with buggy memcmp implementations
6398         can invoke gl_FUNC_MEMCMP themselves.
6399
6400 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6401
6402         * lib/regex_internal.h (BITSET_WORD_BITS):
6403         Work around a bug in 64-bit PGC (before version 6.1-2), where the
6404         preprocessor mishandles large unsigned values as if they were signed.
6405         Problem reported by Claudio Fontana in
6406         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
6407
6408 2006-01-10  Jim Meyering  <jim@meyering.net>
6409
6410         Avoid the double-free (first in fts_read, second in fts_close) that
6411         would occur when an `active' directory is made inaccessible (e.g.,
6412         via chmod a-x) during a traversal.
6413         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
6414         before returning.  Reproduce this failure by
6415         mkdir -p a/b; cd a; chmod a-x . b
6416         Reported by Stavros Passas.
6417
6418         Sync from coreutils.
6419         * lib/sha1.c: Tweak grammar in a comment.
6420
6421 2006-01-10  Jim Meyering  <jim@meyering.net>
6422
6423         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
6424         Patch by Joerg Sonnenberger.
6425
6426 2006-01-10  Bruno Haible  <bruno@clisp.org>
6427
6428         * modules/readutmp: Depend on module free.
6429         * modules/strtok_r: Depend on module restrict.
6430
6431 2006-01-10  Bruno Haible  <bruno@clisp.org>
6432
6433         * modules/gettext (configure.ac): Add an invocation of
6434         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
6435
6436 2006-01-10  Bruno Haible  <bruno@clisp.org>
6437
6438         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
6439         Reported by Werner Lemberg <wl@gnu.org>.
6440
6441 2006-01-10  Bruno Haible  <bruno@clisp.org>
6442
6443         * lib/localcharset.c: Update from GNU gettext.
6444
6445 2006-01-10  Bruno Haible  <bruno@clisp.org>
6446
6447         * lib/argp.h (__const): Remove macro. Use const instead.
6448         * lib/argp-fmtstream.h (__const): Likewise.
6449         * lib/glob_.h (__const): Remove macro.
6450         * lib/glob-libc.h: Use const instead of __const.
6451
6452 2006-01-10  Bruno Haible  <bruno@clisp.org>
6453
6454         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
6455         variable.
6456         Needed to avoid an automake error regarding the 'gettext' module.
6457
6458 2006-01-09  Simon Josefsson  <jas@extundo.com>
6459
6460         * modules/inet_ntop (Depends-on): Add restrict.
6461
6462 2006-01-09  Simon Josefsson  <jas@extundo.com>
6463
6464         * modules/gc-rijndael-tests (License): Put under LGPL.
6465
6466         * modules/gc-des-tests (License): Likewise.
6467
6468         * modules/gc-arcfour-tests (License): Likewise.
6469
6470         * modules/gc-arctwo-tests (License): Likewise.
6471
6472         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
6473
6474         * modules/gc-hmac-sha1-tests (Files): Likewise.
6475
6476         * modules/gc-hmac-md5-tests (License): Likewise.
6477
6478         * modules/gc-sha1-tests (License): Likewise.
6479
6480         * modules/gc-md5-tests (License): Likewise.
6481
6482         * modules/gc-md4-tests (License): Likewise.
6483
6484         * modules/gc-md2-tests (License): Likewise.
6485
6486         * modules/gc-tests (License): Likewise.
6487
6488         * modules/des-tests (License): Likewise.
6489
6490         * modules/md4-tests (License): Likewise.
6491
6492         * modules/md2-tests (License): Likewise.
6493
6494 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6495
6496         Sync from coreutils:
6497
6498         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
6499         * modules/lib-ignore: New file.
6500         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
6501         chdir-safer.m4, lchmod.m4.
6502         * modules/openat: Add mkdirat.c, openat-priv.h.
6503
6504 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6505
6506         Sync from coreutils.
6507         * m4/lib-ignore.m4: New file.
6508         * m4/lchmod.m4: New file.
6509
6510 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6511
6512         Sync from coreutils.
6513         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
6514         for write access: POSIX says that must fail.
6515         * lib/fts.c (diropen): Likewise.
6516         * lib/save-cwd.c (save_cwd): Likewise.
6517         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
6518         well, for minor improvements on hosts that lack O_DIRECTORY.
6519         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
6520         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
6521         Fall back on chown if open failed with EACCES.
6522
6523         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
6524         Report an error at compile-time if only a 1-second nominal clock
6525         resolution is found.
6526
6527         * lib/lchmod.h: New file.
6528         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
6529         (make_dir_parents): Use lchown rather than chown, and
6530         lchmod rather than chmod.
6531
6532         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
6533         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
6534         "proc" reported by n0dalus.
6535
6536         * lib/mountlist.c: Include <limits.h>.
6537         (dev_from_mount_options)
6538         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
6539         New function.  It no longer assumes "dev=" has the System V meaning
6540         on Linux (since it doesn't).  It also parses "dev=" more carefully.
6541         (read_file_system_list)
6542         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
6543         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
6544         dev= in that case.
6545
6546         * lib/posixtm.h (PDS_PRE_2000): New macro.
6547         * lib/posixtm.c (year): Arg is now syntax_bits rather than
6548         allow_century.  All usages changed.  Reject dates outside the range
6549         1969-1999 if PDS_PRE_2000 is used.
6550
6551 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6552
6553         Sync from coreutils.
6554         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
6555         (Time of day items): Mention the possibility of leap seconds.
6556         Problem reported by Dr. David Alan Gilbert.
6557
6558 2006-01-09  Jim Meyering  <jim@meyering.net>
6559
6560         Sync from coreutils.
6561
6562         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
6563
6564         * lib/chdir-safer.h, chdir-safer.c: New files.
6565
6566         * lib/modechange.c (mode_compile): Reject an invalid mode string
6567         that starts with an octal digit.  From Andreas Gruenbacher.
6568
6569         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
6570         and dup to open_safer and dup_safer, respectively.
6571         (openat_permissive): Fix typo in comment.
6572
6573         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
6574         "gettext.h"; either no longer needed or are guaranteed by openat.h.
6575         (_): Remove; no longer needed.
6576         (openat): Renamed from rpl_openat; no need for rpl_openat
6577         since openat.h renames openat for us.
6578         Replace most of the body with a call to openat_permissive,
6579         to avoid duplicate code.
6580         Port to (probably hypothetical) environments were mode_t is
6581         wider than int.
6582         (openat_permissive): Require mode arg, so that we can check
6583         types better.  Put it just after flags.  Change cwd failure
6584         indicator from pointer-to-bool to pointer-to-errno-value.
6585         All callers changed.
6586         Invoke openat_save_fail and/or openat_restore_fail if
6587         cwd_errno is null, so that openat can call us.
6588         (openat_permissive, fdopendir, fstatat, unlinkat):
6589         Simplify errno handling to avoid some duplicate code,
6590         as it's OK to set errno on success.
6591         * lib/openat.h: Revamp code so that function macros depend on
6592         __OPENAT_PREFIX only, not also on AT_FDCWD.
6593         (openat_ro): Remove.  Caller changed to use openat_permissive.
6594         (openat_permissive): Now a macro, if not a function.
6595         (openat_restore_fail, openat_save_fail): Now always functions,
6596         since mkdirat needs them even if __OPENAT_PREFIX is defined.
6597
6598         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
6599         and openat.c.
6600         * lib/mkdirat.c: Include openat-priv.h.
6601         Remove definitions of macros defined therein.
6602         * lib/openat.c: Likewise.
6603
6604         * lib/mkdirat.c (mkdirat): New file and function.
6605         * lib/openat.h (mkdirat): Declare.
6606
6607         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
6608
6609         * lib/openat.h (openat_permissive): Declare.
6610         (openat_ro): Define.
6611
6612         * lib/openat.c (EXPECTED_ERRNO): New macro.
6613         (openat_permissive): New function -- used in remove.c rewrite.
6614         (all functions): Set errno just before returning, only if there
6615         was an actual failure.
6616         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
6617
6618         Emulate openat-family functions using Linux's procfs, if possible.
6619         Idea and some code based on Ulrich Drepper's glibc changes.
6620
6621         * lib/openat.c: (BUILD_PROC_NAME): New macro.
6622         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
6623         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
6624         before falling back on save_cwd and restore_cwd.
6625         (fdopendir, fstatat, unlinkat): Likewise.
6626
6627         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
6628         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
6629
6630         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
6631         as second argument to va_arg.  Otherwise, some versions of gcc
6632         warn that `if this code is reached, the program will abort'.
6633
6634 2006-01-09  Jim Meyering  <jim@meyering.net>
6635
6636         Sync from coreutils.
6637         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
6638         Require openat-priv.h.
6639
6640 2006-01-09  Bruno Haible  <bruno@clisp.org>
6641
6642         * modules/strnlen (Include): Use strnlen.h.
6643
6644 2006-01-09  Bruno Haible  <bruno@clisp.org>
6645
6646         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
6647
6648 2006-01-09  Bruno Haible  <bruno@clisp.org>
6649
6650         * lib/sysexit_.h (EX_OK): New macro.
6651         Suggested by Martin Lambers <marlam@marlam.de>.
6652
6653 2006-01-09  Bruno Haible  <bruno@clisp.org>
6654
6655         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
6656         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
6657
6658 2006-01-09  Bruno Haible  <bruno@clisp.org>
6659
6660         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
6661         numbers.
6662
6663 2006-01-09  Bruno Haible  <bruno@clisp.org>
6664
6665         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
6666         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
6667         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
6668         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
6669
6670 2006-01-09  Bruno Haible  <bruno@clisp.org>
6671
6672         * build-aux/javacomp.sh.in: New file, moved from lib/.
6673         * modules/javacomp-script (Files): Update.
6674         (configure.ac): Add AC_CONFIG_FILES invocation.
6675         (EXTRA_DIST): Remove variable.
6676
6677         * build-aux/javaexec.sh.in: New file, moved from lib/.
6678         * modules/javaexec (Files): Update.
6679         (configure.ac): Add AC_CONFIG_FILES invocation.
6680         (EXTRA_DIST): Remove javaexec.sh.in.
6681
6682         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
6683         * modules/csharpcomp-script (Files): Update.
6684         (configure.ac): Add AC_CONFIG_FILES invocation.
6685         (EXTRA_DIST): Remove variable.
6686
6687         * build-aux/csharpexec.sh.in: New file, moved from lib/.
6688         * modules/csharpexec (Files): Update.
6689         (configure.ac): Add AC_CONFIG_FILES invocation.
6690         (EXTRA_DIST): Remove csharpexec.sh.in.
6691
6692 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
6693
6694         Sync from coreutils.
6695
6696         Add POSIX ACL support
6697         * lib/acl.h (copy_acl, set_acl): Add declarations.
6698         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
6699         systems other than Linux.
6700         (chmod_or_fchmod): New function: use fchmod when possible,
6701         and chmod otherwise.
6702         (file_has_acl): Add a POSIX ACL implementation, with a
6703         Linux-specific subcase.
6704         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
6705         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
6706         acls are unsupported.
6707         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
6708         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
6709         are unsupported.
6710
6711 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
6712
6713         Sync from coreutils.
6714         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
6715
6716 2006-01-07  Bruno Haible  <bruno@clisp.org>
6717
6718         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
6719         gl_EARLY.
6720
6721 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
6722
6723         * lib/strftime.c (tzname): Don't declare if it is already #defined.
6724         Problem reported for Mingw by Mark Junker.
6725
6726 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
6727
6728         * README: Gnulib normally doesn't generate a tarball.
6729
6730 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
6731
6732         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
6733         long int, not int, for nanosecond counts, so that people who are
6734         used to POSIX struct timespec won't be surprised.  Reported by Jim
6735         Meyering.
6736
6737 2005-12-28  Bruno Haible  <bruno@clisp.org>
6738
6739         * build-aux/config.rpath: Update from GNU gettext.
6740
6741 2005-12-16  Jim Meyering  <jim@meyering.net>
6742
6743         * modules/fprintftime: New module.
6744         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
6745
6746 2005-12-16  Jim Meyering  <jim@meyering.net>
6747
6748         * m4/fprintftime.m4: New file.
6749
6750 2005-12-16  Jim Meyering  <jim@meyering.net>
6751
6752         * lib/fprintftime.c, fprintftime.h: New files.
6753
6754 2005-12-15  Simon Josefsson  <jas@extundo.com>
6755
6756         * modules/socklen (configure.ac): Fix M4 macro name, to align with
6757         new m4/socklen.m4.
6758
6759 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
6760
6761         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
6762         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
6763
6764 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
6765
6766         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
6767         * lib/argp-help.c (fill_in_uparams): Check if the constructed
6768         struct uparams is valid. Fall back to the default values if it is
6769         not.
6770
6771 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
6772
6773         * modules/argp (Files): Add argp-pin.c
6774         (Depends-on): dirname
6775         (lib_SOURCES): Add argp-pin.c
6776
6777 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
6778
6779         * m4/argp.m4:  Check if program_invocation_name and
6780         program_invocation_short_name are declared and define appropriate
6781         macros if they are not.
6782
6783 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
6784
6785         * lib/argp-help.c (__argp_base_name): New function
6786         (__argp_short_program_name): Rewrite using __argp_base_name
6787         * lib/argp-namefrob.h: Define program_invocation_name and
6788         program_invocation_short_name if requested
6789         (__argp_base_name): Add prototype
6790         * lib/argp-parse.c (argp_def): Use gettext wrappers
6791         (argp_default_parser): Use __argp_base_name
6792         * lib/argp-pin.c: New file. Defines program_invocation_name and
6793         program_invocation_short_name on systems that lack them.
6794
6795 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
6796
6797         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
6798         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
6799         porting problem reported by Georg Schwarz in
6800         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
6801
6802 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
6803
6804         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
6805         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
6806         porting problem reported by Georg Schwarz in
6807         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
6808
6809 2005-12-05  Bruno Haible  <bruno@clisp.org>
6810
6811         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
6812         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
6813         Reported by Mark Junker <mjscod@gmx.de>.
6814
6815 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
6816
6817         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
6818         Use implementation from Albert Chin, with some
6819         comments/corrections by Stepan Kasal and myself.
6820
6821 2005-12-02  Bruno Haible  <bruno@clisp.org>
6822
6823         * gnulib-tool (func_import): Accept GPLed build tool modules when
6824         --lgpl is given.
6825         * modules/csharpcomp-script: New file.
6826         * modules/csharpcomp: Depend on it.
6827         * modules/javacomp-script: New file.
6828         * modules/javacomp: Depend on it.
6829         Suggested by Simon Josefsson.
6830
6831 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
6832
6833         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
6834         statement, to work around an HP-UX 10.20 compiler bug reported by
6835         Peter O'Gorman.
6836
6837 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
6838
6839         * modules/savedir (Depends-on): Add openat.
6840
6841 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
6842
6843         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
6844         (uintmax_t) [defined uintmax_t]: Do not declare.
6845         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
6846         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
6847         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
6848         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
6849         sake of portability to weird hosts that C allows (though we don't
6850         know of any practical examples).
6851
6852         * lib/savedir.h (fdsavedir): New decl.
6853         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
6854         contains most of the former guts of savedir.
6855         (savedir): Use savedirstream.
6856         Include "openat.h".
6857
6858 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
6859
6860         * modules/obstack (Files): Add m4/ulonglong.m4.
6861         Problem reported by Davide Angelocola.
6862
6863 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
6864
6865         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
6866         coreutils no longer futzes with rounding modes.
6867
6868 2005-11-14  Jim Meyering  <jim@meyering.net>
6869
6870         * lib/mkstemp-safer.c: Include <config.h>, required for possible
6871         replacement of mkstemp.
6872
6873 2005-11-10  Simon Josefsson  <jas@extundo.com>
6874
6875         * lib/readline.c: Remove EOL.
6876
6877 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
6878
6879         * modules/gethrxtime (Depends-on): Add gettime.
6880
6881 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
6882
6883         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
6884         or gettimeofday; no longer needed.
6885
6886 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
6887
6888         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
6889         time business.
6890         (gethrxtime) [! (HAVE_NANOUPTIME
6891         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
6892         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
6893         our own approximation.
6894
6895 2005-11-08  Eric Blake  <ebb9@byu.net>
6896
6897         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
6898
6899 2005-11-08  Eric Blake  <ebb9@byu.net>
6900
6901         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
6902
6903 2005-11-04  Bruno Haible  <bruno@clisp.org>
6904
6905         * gnulib-tool: Implement --update mode.
6906
6907 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
6908
6909         Fix porting problem reported by Theodoros V. Kalamatianos.
6910         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
6911         Don't assume that futimes failing means we must fail.
6912
6913 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
6914
6915         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
6916         variables to suggest the intended function of the PATH_MAX check.
6917
6918 2005-10-30  Kean Johnston  <jkj@sco.com>
6919
6920         Trivial changes to support SCO systems.
6921         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
6922         as PATH_MAX.
6923         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
6924         where __ptr is null when no I/O is pending.
6925
6926 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
6927
6928         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
6929         leave errno alone.  Problem reported by Dmitry V. Levin.
6930
6931 2005-10-28  Simon Josefsson  <jas@extundo.com>
6932
6933         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
6934         Test more.
6935
6936         * tests/test-gc-md2.c, tests/test-md2.c: New files.
6937
6938         * modules/md2, modules/md2-tests: New files.
6939
6940 2005-10-28  Simon Josefsson  <jas@extundo.com>
6941
6942         * m4/inet_ntop.m4: More tests.
6943
6944         * m4/gc-md2.m4, md2.m4: New file.
6945
6946 2005-10-28  Simon Josefsson  <jas@extundo.com>
6947
6948         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
6949         "restrict" keywords, as per POSIX.  Protect the function
6950         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
6951         Don't use K&R prototypes.  Check the sprintf return values.
6952         Re-define EAFNOSUPPORT if not present.  Indent.
6953
6954         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
6955         suggested by Bruno Haible <bruno@clisp.org>.
6956
6957         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
6958
6959         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
6960
6961         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
6962         libgcrypt).
6963
6964         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
6965
6966         * lib/md2.h, md2.c: New files.
6967
6968 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
6969
6970         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
6971         errno alone.  Problem reported by Frederic Jolliton.
6972
6973 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
6974
6975         * modules/verify (License): Change from GPL to LGPL.  This is a
6976         tiny module and there are apparently near-equivalents that are
6977         under the BSD license.
6978
6979 2005-10-24  Simon Josefsson  <jas@extundo.com>
6980
6981         * modules/sha1: Relicense to LGPL.
6982
6983 2005-10-24  Simon Josefsson  <jas@extundo.com>
6984
6985         * lib/md4.h: Shrink buffer size, now that we changed the type.
6986
6987 2005-10-23  Simon Josefsson  <jas@extundo.com>
6988
6989         * gnulib-tool (func_import): Fix --tests-base.
6990
6991 2005-10-22  Simon Josefsson  <jas@extundo.com>
6992
6993         * modules/arcfour (Depends-on): Need stdint.
6994
6995 2005-10-22  Simon Josefsson  <jas@extundo.com>
6996
6997         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
6998         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
6999
7000 2005-10-22  Simon Josefsson  <jas@extundo.com>
7001
7002         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
7003         suggested by Bruno Haible <bruno@clisp.org>.
7004
7005 2005-10-22  Simon Josefsson  <jas@extundo.com>
7006
7007         * lib/crc.h: Include stddef.h, for size_t.
7008
7009 2005-10-22  Simon Josefsson  <jas@extundo.com>
7010
7011         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
7012         arcfour_context struct (simplify test vector testing in GNU
7013         Shishi).
7014
7015 2005-10-21  Simon Josefsson  <jas@extundo.com>
7016
7017         * modules/des, modules/des-tests: New files.
7018
7019         * modules/gc-des, modules/gc-des-tests: New files.
7020
7021         * tests/test-des.c, tests/test-gc-des.c: New file.
7022
7023 2005-10-21  Simon Josefsson  <jas@extundo.com>
7024
7025         * modules/arctwo, modules/arctwo-tests: New files.
7026
7027         * tests/test-arctwo.c: New file.
7028
7029         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
7030
7031         * tests/test-gc-arctwo.c: New file.
7032
7033 2005-10-21  Simon Josefsson  <jas@extundo.com>
7034
7035         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
7036         Bruno Haible <bruno@clisp.org>.
7037
7038         * m4/gc-des.m4: New file.
7039
7040 2005-10-21  Simon Josefsson  <jas@extundo.com>
7041
7042         * m4/arctwo.m4: New file.
7043
7044         * m4/gc-arctwo.m4: New file.
7045
7046 2005-10-21  Simon Josefsson  <jas@extundo.com>
7047
7048         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
7049         block.
7050
7051 2005-10-21  Simon Josefsson  <jas@extundo.com>
7052
7053         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
7054         <bruno@clisp.org>.
7055
7056         * lib/hmac-sha1.c (hmac_sha1): Likewise.
7057
7058         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
7059         Bruno Haible <bruno@clisp.org>.
7060
7061         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
7062         <bruno@clisp.org>.
7063
7064 2005-10-21  Simon Josefsson  <jas@extundo.com>
7065
7066         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
7067
7068 2005-10-21  Simon Josefsson  <jas@extundo.com>
7069
7070         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
7071
7072 2005-10-21  Simon Josefsson  <jas@extundo.com>
7073
7074         * lib/des.h, des.c: New files.
7075
7076         * lib/gc-gnulib.c: Support DES.c
7077
7078 2005-10-21  Simon Josefsson  <jas@extundo.com>
7079
7080         * lib/arctwo.h, arctwo.c: New files.
7081
7082         * lib/gc-gnulib.c: Support ARCTWO.
7083
7084 2005-10-21  Simon Josefsson  <jas@extundo.com>
7085
7086         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
7087         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7088
7089 2005-10-21  Simon Josefsson  <jas@extundo.com>
7090
7091         * gnulib-tool (func_import, func_create_testdir): Define automake
7092         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
7093         Makefile.am snippet),
7094         suggested by Bruno Haible <bruno@clisp.org>.
7095
7096         * modules/gc (Makefile.am): Use it.
7097
7098 2005-10-21  Bruno Haible  <bruno@clisp.org>
7099
7100         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
7101         patch.
7102
7103 2005-10-19  Simon Josefsson  <jas@extundo.com>
7104
7105         * tests/test-gc-rijndael.c: New file.
7106
7107         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
7108
7109 2005-10-19  Simon Josefsson  <jas@extundo.com>
7110
7111         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
7112         interface too.
7113
7114 2005-10-19  Simon Josefsson  <jas@extundo.com>
7115
7116         * tests/test-gc-arcfour.c: New file.
7117
7118         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
7119
7120 2005-10-19  Simon Josefsson  <jas@extundo.com>
7121
7122         * modules/gc-md4, modules/gc-md4-tests: New file.
7123
7124         * tests/test-gc-md4.c: New file.
7125
7126 2005-10-19  Simon Josefsson  <jas@extundo.com>
7127
7128         * m4/gc-md4.m4: New file.
7129
7130 2005-10-19  Simon Josefsson  <jas@extundo.com>
7131
7132         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
7133         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
7134         <kasal@ucw.cz>.
7135
7136 2005-10-19  Simon Josefsson  <jas@extundo.com>
7137
7138         * m4/gc-arcfour.m4: New file.
7139
7140         * m4/gc-rijndael.m4: New file.
7141
7142 2005-10-19  Simon Josefsson  <jas@extundo.com>
7143
7144         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
7145
7146 2005-10-19  Simon Josefsson  <jas@extundo.com>
7147
7148         * lib/gc-gnulib.c: Support ARCFOUR.
7149
7150 2005-10-19  Simon Josefsson  <jas@extundo.com>
7151
7152         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
7153         support.
7154
7155         * lib/gc.h: Add ECB enum type.
7156
7157         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
7158
7159 2005-10-18  Simon Josefsson  <jas@extundo.com>
7160
7161         * tests/test-md5.c: New file.
7162
7163         * modules/md5-tests: New file.
7164
7165 2005-10-18  Simon Josefsson  <jas@extundo.com>
7166
7167         * tests/test-md4.c: New file.
7168
7169         * modules/md4, modules/md4-tests: New files.
7170
7171 2005-10-18  Simon Josefsson  <jas@extundo.com>
7172
7173         * m4/md4.m4: New file.
7174
7175 2005-10-18  Simon Josefsson  <jas@extundo.com>
7176
7177         * lib/md4.h, md4.c: New files, based on md5.?.
7178
7179 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
7180
7181         * gnulib-tool (func_create_testdir): Omit the second check whether
7182         BUILT_SOURCES in nonempty.
7183
7184 2005-10-17  Simon Josefsson  <jas@extundo.com>
7185
7186         * tests/test-rijndael.c: New file.
7187
7188 2005-10-17  Simon Josefsson  <jas@extundo.com>
7189
7190         * modules/sha1: Depend on stdint instead of md5.
7191
7192         * modules/md5: Depend on stdint, remove uint32_t.
7193
7194 2005-10-17  Simon Josefsson  <jas@extundo.com>
7195
7196         * modules/gc-sha1-tests: New file.
7197
7198         * tests/test-gc-sha1.c: New file.
7199
7200 2005-10-17  Simon Josefsson  <jas@extundo.com>
7201
7202         * m4/md5.m4: Remove call to uint32_t.m4.
7203
7204 2005-10-17  Simon Josefsson  <jas@extundo.com>
7205
7206         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
7207
7208         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
7209         md5.h.
7210
7211         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
7212
7213         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
7214
7215 2005-10-17  Simon Josefsson  <jas@extundo.com>
7216
7217         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
7218
7219 2005-10-17  Simon Josefsson  <jas@extundo.com>
7220
7221         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
7222
7223 2005-10-17  Simon Josefsson  <jas@extundo.com>
7224
7225         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
7226
7227         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
7228
7229 2005-10-17  Bruno Haible  <bruno@clisp.org>
7230
7231         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
7232         that it can also be used in a test.
7233
7234 2005-10-16  Bruno Haible  <bruno@clisp.org>
7235
7236         * gnulib-tool (func_emit_tests_Makefile_am): Also define
7237         TESTS_ENVIRONMENT, so that individual tests can augment it.
7238
7239         * gnulib-tool (func_create_testdir): Use an intermediate target for
7240         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
7241         macros, like $(ALLOCA_H), which cannot be passed through the command
7242         line.
7243
7244 2005-10-15  Simon Josefsson  <jas@extundo.com>
7245
7246         * modules/rijndael-tests: New file.
7247
7248         * modules/rijndael: New file.
7249
7250 2005-10-15  Simon Josefsson  <jas@extundo.com>
7251
7252         * m4/rijndael.m4: New file.
7253
7254 2005-10-15  Simon Josefsson  <jas@extundo.com>
7255
7256         * lib/rijndael-api-fst.h, rijndael-api-fst.c: New files.
7257
7258         * lib/rijndael-alg-fst.h, rijndael-alg-fst.c: New files.
7259
7260 2005-10-14  Simon Josefsson  <jas@extundo.com>
7261
7262         * tests/test-arcfour.c: New file.
7263
7264         * modules/arcfour, modules/arcfour-tests: New files.
7265
7266 2005-10-14  Simon Josefsson  <jas@extundo.com>
7267
7268         * m4/arcfour.m4: New file.
7269
7270 2005-10-14  Simon Josefsson  <jas@extundo.com>
7271
7272         * lib/arcfour.h, arcfour.c: New files.
7273
7274 2005-10-14  Roland McGrath  <roland@redhat.com>
7275
7276         Import from libc.  [BZ #1331]
7277         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
7278         macro argument.
7279         Reported by Matej Vela <vela@debian.org>.
7280
7281 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
7282
7283         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
7284         include <wchar.h>; no longer needed.
7285
7286 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
7287
7288         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
7289
7290 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
7291         and  Ulrich Drepper  <drepper@redhat.com>
7292
7293         Import from libc.
7294         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
7295         instead of inline stream orientation test and two separate
7296         function calls.  Pay no attention to USE_IN_LIBIO.
7297
7298 2005-10-13  Simon Josefsson  <jas@extundo.com>
7299
7300         * modules/gc-hmac-md5-tests: New file.
7301
7302         * tests/test-gc-hmac-sha1.c: New file.
7303
7304         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
7305
7306         * modules/gc-hmac-md5-tests: New file.
7307
7308         * tests/test-gc-md5.c: New file.
7309
7310         * modules/gc-md5-tests: New file.
7311
7312 2005-10-13  Simon Josefsson  <jas@extundo.com>
7313
7314         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
7315         Move memory allocation outside of loop.
7316
7317 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
7318
7319         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
7320         intermediate directory is in a read-only file system.  Problem
7321         reported by Eric Blake.
7322
7323 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
7324
7325         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
7326
7327 2005-10-12  Simon Josefsson  <jas@extundo.com>
7328
7329         * tests/test-hmac-sha1.c: New file.
7330
7331         * modules/hmac-sha1-tests: New file.
7332
7333         * modules/hmac-sha1: New file.
7334
7335 2005-10-12  Simon Josefsson  <jas@extundo.com>
7336
7337         * modules/gc-sha1: New file.
7338
7339 2005-10-12  Simon Josefsson  <jas@extundo.com>
7340
7341         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
7342
7343         * tests/test-gc-pbkdf2-sha1.c: New file.
7344
7345 2005-10-12  Simon Josefsson  <jas@extundo.com>
7346
7347         * modules/gc-md5, modules/gc-hmac-md5: New files.
7348
7349         * modules/gc (Files): Remove md5, memxor and hmac files.
7350
7351 2005-10-12  Simon Josefsson  <jas@extundo.com>
7352
7353         * m4/gc-pbkdf2-sha1.m4: New file.
7354
7355         * m4/gc-hmac-sha1.m4: New file.
7356
7357         * m4/gc-sha1: New file.
7358
7359         * m4/hmac-sha1.m4: New file.
7360
7361 2005-10-12  Simon Josefsson  <jas@extundo.com>
7362
7363         * m4/gc-md5.m4, gc-hmac-md5: New files.
7364
7365         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
7366
7367 2005-10-12  Simon Josefsson  <jas@extundo.com>
7368
7369         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
7370         suggested by Bruno Haible <bruno@clisp.org>.
7371
7372 2005-10-12  Simon Josefsson  <jas@extundo.com>
7373
7374         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
7375
7376 2005-10-12  Simon Josefsson  <jas@extundo.com>
7377
7378         * lib/gc-pbkdf2-sha1.c: New file.
7379
7380         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
7381
7382 2005-10-12  Simon Josefsson  <jas@extundo.com>
7383
7384         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
7385
7386         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
7387
7388 2005-10-12  Simon Josefsson  <jas@extundo.com>
7389
7390         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
7391         GC_USE_HMAC_MD5, respectively.
7392
7393         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
7394         (gc_md5): Fix typo.
7395
7396         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
7397
7398         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
7399
7400         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
7401
7402 2005-10-12  Bruno Haible  <bruno@clisp.org>
7403
7404         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
7405         Reported by Stepan Kasal <kasal@ucw.cz>.
7406
7407 2005-10-11  Simon Josefsson  <jas@extundo.com>
7408
7409         * tests/test-crc.c: New file.
7410
7411         * modules/crc, modules/crc-tests: New files.
7412
7413 2005-10-11  Simon Josefsson  <jas@extundo.com>
7414
7415         * m4/crc.m4: New file.
7416
7417 2005-10-11  Simon Josefsson  <jas@extundo.com>
7418
7419         * lib/gc.h: Add gc_hash and gc_hash_buffer.
7420
7421         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
7422
7423         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
7424
7425 2005-10-11  Simon Josefsson  <jas@extundo.com>
7426
7427         * lib/crc.h, crc.c: New files.
7428
7429         * lib/gc.h (gc_hash_buffer): Add doc.
7430
7431 2005-10-11  Bruno Haible  <bruno@clisp.org>
7432
7433         * modules/c-strcasestr: New file.
7434         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
7435
7436 2005-10-11  Bruno Haible  <bruno@clisp.org>
7437
7438         * modules/c-strcase: New file.
7439         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
7440
7441 2005-10-11  Bruno Haible  <bruno@clisp.org>
7442
7443         * lib/strcasecmp.c: Include limits.h.
7444         (strcasecmp): Avoid integer overflow on exotic platforms.
7445         * lib/strncasecmp.c: Include limits.h.
7446         (strncasecmp): Avoid integer overflow on exotic platforms.
7447         Reported by Paul Eggert.
7448
7449 2005-10-11  Bruno Haible  <bruno@clisp.org>
7450
7451         * lib/c-strcasestr.h: New file, from GNU gettext.
7452         * lib/c-strcasestr.c: New file, from GNU gettext.
7453
7454 2005-10-11  Bruno Haible  <bruno@clisp.org>
7455
7456         * lib/c-strcase.h: New file, from GNU gettext.
7457         * lib/c-strcasecmp.c: New file, from GNU gettext.
7458         * lib/c-strncasecmp.c: New file, from GNU gettext.
7459
7460 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
7461
7462         * modules/mempcpy (License): GPL -> LGPL.
7463         * modules/strchrnul (License): Likewise.
7464         * modules/sysexits (License): Likewise.
7465
7466 2005-10-08  Simon Josefsson  <jas@extundo.com>
7467
7468         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
7469
7470 2005-10-07  Simon Josefsson  <jas@extundo.com>
7471
7472         * m4/memxor.m4: Remove gl_C_RESTRICT call.
7473
7474 2005-10-06  Simon Josefsson  <jas@extundo.com>
7475
7476         * tests/test-hmac-md5.c: New file.
7477
7478         * modules/hmac-md5-tests: New file.
7479
7480         * modules/hmac-md5: New file.
7481
7482 2005-10-06  Simon Josefsson  <jas@extundo.com>
7483
7484         * m4/hmac-md5.m4: New file.
7485
7486         * m4/memxor.m4: Require gl_C_RESTRICT.
7487
7488 2005-10-06  Simon Josefsson  <jas@extundo.com>
7489
7490         * lib/memxor.c (memxor): Avoid casts and warnings.
7491
7492 2005-10-06  Simon Josefsson  <jas@extundo.com>
7493
7494         * lib/hmac-md5.c: New file.
7495
7496         * lib/hmac.h: New file.
7497
7498 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
7499
7500         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
7501         promotes to int, not unsigned int, to catch the AIX 5.3
7502         compiler bug.
7503
7504 2005-10-05  Simon Josefsson  <jas@extundo.com>
7505
7506         * modules/memxor: New file.
7507
7508         * modules/iconv (Files): Move config.rpath to havelib, it is used
7509         there.
7510
7511         * modules/havelib (Files): Add config.rpath.
7512
7513 2005-10-05  Simon Josefsson  <jas@extundo.com>
7514
7515         * m4/memxor.m4: New file.
7516
7517 2005-10-05  Simon Josefsson  <jas@extundo.com>
7518
7519         * lib/memxor.c (memxor): Fix compiler error.
7520
7521         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
7522         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
7523
7524         * lib/memxor.h, memxor.c: New files.
7525
7526         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
7527         we assume all systems have it, suggested by Jim Meyering
7528         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
7529         any systems lack sys/socket.h; mingw32 is known to lack it, but we
7530         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
7531         same reasons.
7532
7533 2005-10-05  Simon Josefsson  <jas@extundo.com>
7534
7535         * config/srclist.txt: Add glibc bug 1423 for md5.h.
7536
7537 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
7538
7539         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
7540         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
7541         needed, since the source code now assumes these .h files.
7542
7543 2005-10-05  Derek Price  <derek@ximbiot.com>
7544
7545         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
7546
7547 2005-10-05  Bruno Haible  <bruno@clisp.org>
7548
7549         * modules/stdint (License): Change to LGPL.
7550
7551 2005-10-04  Simon Josefsson  <jas@extundo.com>
7552
7553         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
7554         D. Baushke" <mdb@gnu.org>.
7555
7556 2005-10-04  Bruno Haible  <bruno@clisp.org>
7557
7558         * lib/verify.h (verify_true): Provide alternative definition for C++.
7559
7560 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
7561
7562         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
7563         (SSIZE_MAX): New macro, if not already defined.
7564         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
7565         than 2 GiB.
7566
7567 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
7568
7569         Sync from coreutils.
7570         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
7571         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
7572         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
7573         ULLONG_MAX doesn't work with 2.7.2.1.
7574
7575 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
7576
7577         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
7578         From Ben Pfaff.
7579
7580         * modules/exclude (Depends-on): Depend on verify.
7581         * modules/strtoimax (Depends-on): Likewise.
7582         * modules/utimecmp (Depends-on): Likewise.
7583
7584 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
7585
7586         * lib/exclude.c: Include verify.h.
7587         (verify): Remove.  All callers changed to use verify.h's version.
7588         * lib/strtoimax.c: Likewise.
7589         * lib/utimecmp.c: Likewis.e
7590
7591         Sync from coreutils.
7592         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
7593         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
7594         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
7595         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
7596         bother returning ENOSYS if settimeofday or stime fails; just let
7597         them return whatever errno they want to return.
7598         * lib/utimens.c: Include unistd.h, for dup2.
7599         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
7600         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
7601
7602 2005-10-02  Jim Meyering  <jim@meyering.net>
7603
7604         Sync from coreutils.
7605         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
7606         from glibc-2.2.5 that fails for read-only files.
7607
7608 2005-10-02  Jim Meyering  <jim@meyering.net>
7609
7610         Sync from coreutils.
7611         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
7612         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
7613         `#if HAVE_CONFIG_H'.
7614         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
7615         Remove AT_FDCWD test.
7616         Do not consume the fd unless successful.
7617         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
7618         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
7619         block, so that we don't even try to compile it if settimeofday is
7620         available.  This works around a compilation failure on OSF1 V5.1,
7621         due to stime requiring a `long int*' while tv_sec is `int'.
7622
7623 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
7624
7625         Sync from coreutils.
7626         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
7627         against `yes', rather than just testing for nonempty.
7628
7629 2005-10-01  Simon Josefsson  <jas@extundo.com>
7630
7631         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
7632         and Darwin.
7633
7634         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
7635         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
7636         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
7637         freeaddrinfo and gai_strerror are declared by the POSIX headers.
7638         Check if struct addrinfo is declared.
7639
7640 2005-10-01  Simon Josefsson  <jas@extundo.com>
7641
7642         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
7643         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
7644         AI_* and EAI_* definitions.  Protect function declarations.
7645
7646 2005-10-01  Jim Meyering  <jim@meyering.net>
7647
7648         Sync from coreutils.
7649
7650         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
7651         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
7652         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
7653         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
7654         in the inet and nsl libraries.  Required on Solaris 5.7.
7655
7656 2005-10-01  Jim Meyering  <jim@meyering.net>
7657
7658         Sync from coreutils.
7659         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
7660         in the inet and nsl libraries.  Required on Solaris 5.7.
7661
7662 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
7663
7664         * lib/getdelim.c (getdelim): Remove unused variables.
7665
7666 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
7667
7668         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
7669         so that the code works even with ancient cpp.  Portability problem
7670         with GCC 2.7.2.1 reported by Thomas M.Ott.
7671
7672 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
7673
7674         * modules/regex (Depends-on): Add strcase.
7675
7676         * modules/gethostname (Licence): Change from GPL to LGPL, since
7677         gethostname.c is a trivial implementation of a standard library
7678         function.
7679         * modules/poll (License): Change from GPL to LGPL, since it's
7680         derived from LGPL code.
7681
7682 2005-09-27  Jim Meyering  <jim@meyering.net>
7683
7684         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
7685         HAVE_CONFIG_H.
7686
7687         * lib/intprops.h (signed_type_or_expr__): Define.
7688         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
7689         for unsigned types.
7690
7691 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
7692
7693         * lib/verify.h (verify_expr): Remove, replacing with:
7694         (verify_true): New macro that returns true instead of void.
7695         (verify_type__): Remove.
7696         (verify): Use verify_true rather than verify_type__.
7697
7698 2005-09-26  Bruno Haible  <bruno@clisp.org>
7699
7700         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
7701         is necessary.
7702         (lib_SOURCES): Remove mbchar.c.
7703         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
7704         (Files): Add m4/mbrtowc.m4.
7705         * modules/mbiter: Likewise.
7706         * modules/mbuiter: Likewise.
7707
7708 2005-09-26  Bruno Haible  <bruno@clisp.org>
7709
7710         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
7711         compile mbchar.c if they are not both present.
7712         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
7713         * m4/mbiter.m4 (gl_MBITER): Likewise.
7714         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
7715         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
7716         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
7717
7718 2005-09-25  Jim Meyering  <jim@meyering.net>
7719
7720         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
7721         also uses socklen_t.
7722
7723 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
7724
7725         * lib/utimens.c (ENOSYS): Define if not already defined.
7726         (futimens): Support having a null PATH if the file descriptor
7727         is nonnegative.
7728
7729         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
7730         Remove.
7731         (__attribute): Define to empty unless GCC 3.1 or later.
7732         This works around a core dump on OpenBSD 3.4, which has GCC
7733         2.95.3, which dumps core when given __attribute__(()).  It also
7734         simplifies other tests, since we really don't want to bother with
7735         worrying about which ancient version of GCC supported what.
7736         Original problem reported by Yoann Vandoorselaere, with part of
7737         the fix suggested by Derek Price.
7738
7739 2005-09-24  Jim Meyering  <jim@meyering.net>
7740
7741         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
7742         so we can once again use a positive bitfield width of 1 -- now we
7743         don't have to explain why we were using a bitfield width of 2.
7744
7745 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
7746
7747         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
7748         and similarly for the other external symbols.  Problem reported
7749         by James Gallager.
7750
7751         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
7752         bug reported by Jim Meyering.
7753
7754         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
7755         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
7756         not needed, since socklen is a prerequisite module.
7757
7758 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
7759
7760         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
7761         Problem reported by Eric Blake.
7762         (getaddrinfo): Initialize se so that it's not garbage.
7763         Redo internal storage allocation so that it doesn't make unportable
7764         assumptions about alignment.
7765         Fix a memory leak.
7766
7767         * lib/utimens.c (futimens): Use futimesat if available.
7768         Prefer it to futimes since it doesn't have the futimes bug.
7769
7770         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
7771         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
7772         Instead, declare a function that returns a pointer to an array,
7773         and use verify_type__ to declare the size of the array.
7774         Problem and germ of a solution reported by Bruno Haible.
7775         (verify_type__): Use 2, not 1, for bitfield size, to avoid
7776         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
7777
7778 2005-09-23  Jim Meyering  <jim@meyering.net>
7779
7780         Sync from coreutils.
7781         Correct build failure (socklen_t not defined) on at least
7782         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
7783         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
7784
7785 2005-09-23  Jim Meyering  <jim@meyering.net>
7786
7787         * modules/getaddrinfo (Depends-on): Add socklen.
7788
7789 2005-09-23  Bruno Haible  <bruno@clisp.org>
7790
7791         * tests/test-verify.c: New file.
7792
7793 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
7794
7795         Sync from coreutils.
7796
7797         * modules/argmatch (Depends-on): Add verify.
7798         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
7799         unistd-safer.
7800         * modules/save-cwd (Depends-on): Likewise.
7801
7802         * modules/openat (Files): Add lib/openat-die.c.
7803         (Depends-on): Remove error, exitfail.
7804         Add dirname.
7805
7806         * modules/verify: New file.
7807         * MODULES.html.sh (Diagnostics <assert.h>): New section,
7808         with "verify" module.
7809
7810 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
7811
7812         Sync from coreutils.
7813
7814         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
7815         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
7816         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
7817         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
7818         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
7819         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
7820         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
7821         Don't bother checking for string.h, stdlib.h, unistd.h.
7822         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
7823         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
7824         module's job.
7825         * m4/jm-macros.m4 (gl_MACROS): Likewise.
7826         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
7827
7828         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
7829         (gl_GETDATE): Use it.
7830
7831         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
7832
7833 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
7834
7835         Sync from coreutils.
7836
7837         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
7838         stat-time.h.
7839         * lib/argmatch.h: Include verify.h
7840         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
7841         (ARGMATCH_ASSERT): Remove; unused.
7842         * lib/canonicalize.c: Assume STDC_HEADERS.
7843         * lib/exclude.c: Include "strcase.h".
7844         * lib/regex_internal.h [!defined _LIBC]: Likewise.
7845         * lib/getusershell.c: Include stdio--.h rather than stdio.h
7846         and stdio-safer.h.
7847         (getusershell): Call fopen, not fopen_safer.
7848         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
7849         Do not include unistd-safer.h.
7850         (save_cwd): Don't call fd_safer; no longer needed
7851         now that we include fcntl--.h.
7852
7853         * lib/getdate.y (relative_time): New type.
7854         (RELATIVE_TIME_0): New constant.
7855         (parser_control): Use relative_time instead of doing it ourselves.
7856         (%union): Add new relative_time rel member.
7857         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
7858         Now typeless.
7859         (relunit, relunit_snumber): Now of type rel.
7860         (zone, rel, relunit, get_date): Adjust to above changes.
7861
7862         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
7863         Do not include unistd-safer.h.
7864         (getloadavg): Don't call fd_safer; no longer needed
7865         now that we include fcntl--.h.
7866
7867         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
7868         (make_dir_parents): Treat ENOSYS like EEXIST.
7869
7870         Improve quality of diagnostics on restore_cwd failure.
7871         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
7872         (make_dir_parents): Last arg is now int * (for errno), not bool *.
7873         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
7874         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
7875         each time through the loop.  Do not diagnose restore_cwd failure;
7876         that is the caller's job (and perhaps the caller does not care).
7877
7878         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
7879         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
7880         If the file already exists but is not a directory, don't bother
7881         to try to make its parents.
7882         Close potential file descriptor leak if we can't chdir("/") (!).
7883         Don't always return true if chdir($PWD) fails; return true only
7884         if the requested action was done successfully (except for the
7885         chdir($PWD)).
7886         Don't log final directory unless we actually made it.
7887         Refactor to avoid duplicate code to fix up permissions.
7888         Don't attempt to fix up parent permissions if chdir($PWD) fails.
7889
7890         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
7891         to make it a bit faster and (I hope) clearer.
7892         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
7893         Fix bug in formats like %2N.
7894
7895         * lib/verify.h: New file.
7896
7897 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
7898
7899         Sync from coreutils.
7900         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
7901
7902 2005-09-22  Jim Meyering  <jim@meyering.net>
7903
7904         Sync from coreutils.
7905
7906         * m4/lstat.m4 (gl_FUNC_LSTAT):
7907         Use AC_LIBSOURCES to require lstat.c and lstat.h.
7908         Remove obsolete comment.
7909         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
7910         * m4/xstrtod.m4: Likewise.
7911
7912         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
7913
7914 2005-09-22  Jim Meyering  <jim@meyering.net>
7915
7916         Sync from coreutils.
7917
7918         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
7919
7920         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
7921         the .tm_year member, since otherwise gcc-4.0 would now warn about
7922         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
7923
7924         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
7925         order to avoid an unsuppressible warning from gcc on 64-bit systems.
7926
7927         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
7928         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
7929         when run in a time zone for which daylight savings time is in effect
7930         for the starting date.
7931
7932         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
7933         stop us from restricting permissions of just-created absolute-named
7934         directories.
7935         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
7936         to restore initial working directory.
7937         * lib/mkdir-p.c (make_dir_parents): New parameter:
7938         different_working_dir, to tell caller if/when we change the working
7939         directory and are unable to return to the initial one.
7940         * lib/mkdir-p.h (make_dir_parents): Update prototype.
7941         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
7942         `return false'.  This fixes a bug introduced on 2004-07-30.
7943
7944         * lib/openat.c (fdopendir): Be sure to close the supplied
7945         file descriptor before returning.  This makes our replacement
7946         implementation a little closer to Solaris's, where fdopendir
7947         ties the file descriptor to the returned DIR* pointer.
7948         * lib/openat.c (unlinkat): New function.
7949         * lib/openat.h (unlinkat): Add prototype.
7950         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
7951         (openat_restore_fail): Rename from openat_restore_die.
7952         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
7953
7954         Provide an alternative to exiting immediately upon save_cwd or
7955         restore_cwd failure.  Now, an application can arrange e.g.,
7956         to perform a longjump in that case.
7957         * lib/openat.c: Include dirname.h.
7958         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
7959         (rpl_openat, fdopendir, fstatat): Call openat_save_die
7960         and openat_restore_die rather than calling error directly.
7961         Don't include "error.h" or "exitfail.h"; they're no longer needed.
7962
7963         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
7964         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
7965         define.
7966
7967         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
7968         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
7969                             int utc, int nanoseconds);
7970         Background:
7971         date should not have to allocate a megabyte of virtual memory to
7972         handle a format argument like +%1048575T.  When implemented with
7973         strftime, it must allocate such a buffer, use strftime to fill it
7974         in, print it, then free it.
7975         With fprintftime, it simply prints everything and exits.
7976         With no need for memory allocation, that's one fewer way to fail.
7977         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
7978         optional field width, not before, so we accept %9:z, not %:9z.
7979         (my_strftime): Be sure to use L_('x') for literals.
7980
7981         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
7982         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
7983         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
7984         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
7985         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
7986         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
7987         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
7988         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
7989         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
7990         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
7991         * lib/xgethostname.c, lib/xreadlink.c:
7992         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
7993
7994         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
7995         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
7996         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
7997         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
7998         and don't include <sys/file.h>).
7999
8000 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
8001
8002         Sync from coreutils.
8003
8004         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
8005         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
8006         [!LDAV_DONE]: Avoid unused variable warning.
8007
8008 2005-09-21  Bruno Haible  <bruno@clisp.org>
8009
8010         * lib/unicodeio.h (unicode_to_mb): New declaration.
8011
8012 2005-09-20  Derek Price  <derek@ximbiot.com>
8013
8014         * lib/getaddrinfo.c: Don't include <netdb.h> included from
8015         getaddrinfo.h.
8016
8017 2005-09-20  Bruno Haible  <bruno@clisp.org>
8018
8019         * gnulib-tool: Remove trailing slashes from the values specified for
8020         --source-base, --m4-base, --tests-base, --aux-dir.
8021         Suggested by Simon Josefsson <jas@extundo.com>.
8022
8023 2005-09-20  Bruno Haible  <bruno@clisp.org>
8024
8025         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
8026         func_modules_to_filelist, func_import, func_create_testdir): Make all
8027         sorting results locale-independent, so that gnulib-cache.m4 doesn't
8028         change when gnulib-tool is invoked in a different locale.
8029
8030 2005-09-19  Simon Josefsson  <jas@extundo.com>
8031
8032         * m4/socklen.m4: Fix typo.
8033
8034 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8035
8036         Use a consistent style for including <config.h>.
8037         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
8038         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
8039         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
8040         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
8041         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
8042         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
8043         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
8044         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
8045         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
8046         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
8047         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
8048         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
8049         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
8050         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
8051         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
8052         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
8053         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
8054         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
8055         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
8056         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
8057         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
8058         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
8059         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
8060         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
8061         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
8062         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
8063         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
8064         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
8065         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
8066         lib/xstrtoumax.c, lib/yesno.c:
8067         Standardize inclusion of config.h.
8068         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
8069         lib/inttostr.h:  Removed inclusion of config.h from header files.
8070         * lib/inttostr.c:  Adjusted in-tree users.
8071         * lib/timespec.h: Remove superfluous warning to include config.h.
8072         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
8073         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
8074         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
8075         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
8076         config.h with HAVE_CONFIG_H.
8077
8078 2005-09-19  Jim Meyering  <jim@meyering.net>
8079
8080         * modules/pathmax (License): Change to LGPL.
8081
8082 2005-09-19  Derek Price  <derek@ximbiot.com>
8083
8084         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
8085
8086 2005-09-19  Bruno Haible  <bruno@clisp.org>
8087
8088         * gnulib-tool (import): Provide default for --tests-base.
8089
8090 2005-09-19  Bruno Haible  <bruno@clisp.org>
8091
8092         * doc/quote.texi: New file, extracted from gnulib.texi.
8093         * doc/ctime.texi: New file, extracted from gnulib.texi.
8094         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
8095         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
8096         * doc/gnulib.texi: Include them.
8097
8098 2005-09-18  Bruno Haible  <bruno@clisp.org>
8099
8100         Portability fix.
8101         * gnulib-tool (func_readlink): New function.
8102         (func_ln_if_changed): Use it.
8103
8104 2005-09-18  Bruno Haible  <bruno@clisp.org>
8105
8106         * gnulib-tool: Support --with-tests also with --import.
8107         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
8108         (func_import): Use variables $testsbase and $inctests. Emit a
8109         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
8110         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
8111         SUBDIRS += $testsdir.
8112         (func_create_testdir): Update.
8113
8114 2005-09-18  Bruno Haible  <bruno@clisp.org>
8115
8116         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
8117         instead of $dry_run.
8118         (func_cp_if_changed, func_mv_if_changed): Remove functions.
8119         (func_ln_if_changed): Don't handle dry-run here.
8120         (func_import): In dry-run mode, detect more precisely which actions
8121         would be performed, and don't use "...ing" verbs.
8122
8123 2005-09-18  Bruno Haible  <bruno@clisp.org>
8124
8125         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
8126         (func_import): Use join on two temporary files instead of three nested
8127         loops, in order to determine which files are new or old.
8128
8129 2005-09-18  Bruno Haible  <bruno@clisp.org>
8130
8131         * gnulib-tool (func_import): Comment out code that spits out the
8132         new files with --dry-run.
8133
8134 2005-09-18  Bruno Haible  <bruno@clisp.org>
8135
8136         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
8137
8138 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
8139
8140         * lib/stat-time.h: New file.
8141         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
8142         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
8143         in a different way.
8144         (timespec_cmp): New function.
8145         * lib/utimecmp.c: Include stat-time.h.
8146         (SYSCALL_RESOLUTION): Depend on whether various struct stat
8147         members exist, not on the obsolescent ST_MTIM_NSEC.
8148         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
8149
8150 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
8151
8152         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
8153
8154 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
8155
8156         * MODULES.html.sh (File system functions): Add stat-time.
8157         * modules/stat-time: New file.
8158         * modules/timespec (Files): Remove m4/st_mtim.m4; this
8159         is now done in a different way, by the stat-time module.
8160         * modules/utimecmp (Depends-on): Add stat-time.
8161
8162 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8163
8164         * m4/st_mtim.m4: Remove.  Superseded by...
8165         * m4/stat-time.m4: New file.
8166         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
8167         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
8168
8169 2005-09-15  Derek Price  <derek@ximbiot.com>
8170
8171         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
8172
8173 2005-09-15  Derek Price  <derek@ximbiot.com>
8174
8175         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
8176         * lib/regex_internal.c: Ditto, using this...
8177         (__GNUC_PREREQ): ...new macro.
8178         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
8179         using...
8180         (__GNUC_PREREQ): ...this new macro.
8181
8182         * lib/strstr.h: Include string.h. Define strstr as a macro here.
8183
8184 2005-09-15  Derek Price  <derek@ximbiot.com>
8185             Paul Eggert  <eggert@cs.ucla.edu>
8186
8187         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
8188         changes, consolidating in...
8189         * lib/regex_internal.h: ...this file.
8190
8191 2005-09-13  Jim Meyering  <jim@meyering.net>
8192
8193         * lib/canon-host.c: Filter through gnu indent and reword comments
8194         slightly.
8195         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
8196
8197 2005-09-13  Derek Price  <derek@ximbiot.com>
8198
8199         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
8200         failure.
8201         Reported by Jim Meyering  <jim@meyering.net>.
8202
8203 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8204
8205         * lib/base64.c: Typo.
8206         (base64_encode): Put b64str in initialized data section.
8207
8208 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
8209
8210         Merge glibc and coreutils changes into gnulib, plus a few
8211         extra fixes.
8212         * lib/md5.c: Use #error rather than a string.
8213         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
8214         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
8215         (__attribute__): Define to empty for non recent-GCC.
8216         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
8217         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
8218         Renamed from their non-__ counterparts, with new macros replacing
8219         them if not _LIBC.  Add __THROW attribute.
8220         (rol): Remove.
8221         (struct md5_ctx): Align buffer if using GCC.
8222         * lib/sha1.h (struct sha1_ctx): Likewise.
8223         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
8224         The old name was backwards.
8225         (NOTSWAP): Remove; not used.
8226         (rol): New macro, moved here from md5.h.
8227         (sha1_process_block): Remove a FIXME that doesn't make sense.
8228
8229 2005-09-12  Derek Price  <derek@ximbiot.com>
8230
8231         Return usable errors from canon-host.
8232         * lib/canon-host.h: New file.
8233         * lib/canon-host.c (canon_host): Wrap...
8234         (canon_host_r): ...this new function, which now relies exclusively on
8235         getaddrinfo.
8236         (ch_strerror): New function.
8237         (last_cherror): New global.
8238         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
8239         interface.
8240         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
8241         void *.
8242         (freeaddrinfo): Free ai->ai_canonname when set.
8243
8244 2005-09-12  Derek Price  <derek@ximbiot.com>
8245
8246         Make canon-host require getaddrinfo.
8247         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
8248         AC_LIBSOURCE canon-host.h.  Call...
8249         (gl_PREREQ_CANON_HOST): ...this new function, which requires
8250         gl_GETADDRINFO.
8251         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
8252
8253 2005-09-12  Derek Price  <derek@ximbiot.com>
8254
8255         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
8256         LGPL.
8257         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
8258
8259 2005-09-12  Derek Price  <derek@ximbiot.com>
8260
8261         * lib/gai_strerror.c: Include config.h when available.  Include
8262         getaddrinfo.h before other headers to test interface.
8263         Reported by Larry Jones <lawrence.jones@ugs.com>.
8264
8265 2005-09-12  Derek Price  <derek@ximbiot.com>
8266             Paul Eggert  <eggert@cs.ucla.edu>
8267
8268         * modules/glob (Files): Add glob-libc.h.
8269
8270 2005-09-12  Derek Price  <derek@ximbiot.com>
8271             Paul Eggert  <eggert@cs.ucla.edu>
8272
8273         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
8274         glob_.h, glob-libc.h.
8275         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
8276
8277 2005-09-12  Derek Price  <derek@ximbiot.com>
8278             Paul Eggert  <eggert@cs.ucla.edu>
8279
8280         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
8281         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
8282         protecting things that should be done only in gnulib contexts.
8283         * lib/glob_.h: New file, containing only the glob things needed for
8284         gnulib.
8285         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
8286         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
8287         (glob, globfree, glob_pattern_p): Now defined simply in terms of
8288         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
8289         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
8290         and to respect the namespace rules better.
8291
8292 2005-09-08  Simon Josefsson  <jas@extundo.com>
8293
8294         * modules/socklen: New file.
8295
8296 2005-09-08  Simon Josefsson  <jas@extundo.com>
8297
8298         * m4/socklen.m4: New file.
8299
8300 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8301
8302         * modules/utimens (Files): Add m4/utimbuf.m4, since
8303         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
8304         Reported by Sergey Poznyakoff.
8305
8306 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8307
8308         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
8309         definitions, since that's the preferred style in glibc.
8310         Fix a minor spacing issue, and update copyright notice to match
8311         glibc's.
8312
8313 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8314
8315         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
8316
8317 2005-09-06  Simon Josefsson  <jas@extundo.com>
8318
8319         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
8320         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
8321
8322 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8323
8324         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
8325         warning.
8326
8327 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8328
8329         * config/srclist.txt: Add glibc bug 1302.
8330
8331 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
8332
8333         Change bitset word type from unsigned int to unsigned long int,
8334         as this has better performance on typical 64-bit hosts.
8335         Port bitset code to hosts with unusual word sizes.
8336         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
8337         (build_collating_symbol):
8338         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
8339         argument is a bitset.  This is merely a style issue, but it makes
8340         it clearer that an entire array is expected.
8341         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
8342         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
8343         Port to the case where bitset_word is not the same as unsigned int.
8344         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
8345         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
8346         Likewise.
8347         * lib/regexec.c (check_dst_limits_calc_pos_1,
8348         check_subexp_matching_top):
8349         (build_trtable, group_nodes_into_DFAstates):
8350         Likewise.
8351         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
8352         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
8353         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
8354         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
8355         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
8356         * lib/regcomp.c (optimize_subexps, lower_subexp):
8357         Work even if bitset_word has holes in its bitwise representation.
8358         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
8359         * lib/regexec.c (check_dst_limits_calc_pos_1,
8360         check_subexp_matching_top):
8361         Likewise.
8362         * lib/regex_internal.c (re_string_reconstruct):
8363         Don't assume UCHAR_MAX == 255.
8364         * lib/regex_internal.h (bitset_set_all): Likewise.
8365         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
8366         All uses changed.
8367         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
8368         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
8369         All uses changed.
8370         (BITSET_WORD_MAX): New macro.
8371         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
8372         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
8373         (bitset_empty, bitset_copy):
8374         Prefer sizeof (bitset) to multiplying it out ourselves.
8375         (bitset_not_merge): Remove; unused.
8376         (bitset_contain): Return bool, not unsigned int with one bit on.
8377         All callers changed.
8378         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
8379         alignment than re_node_set; do this by defining a new internal
8380         type struct dests_alloc and using it to allocate memory.
8381
8382 2005-09-05  Bruno Haible  <bruno@clisp.org>
8383
8384         * gnulib-tool (func_import): Fix comparison in handling of symbolic
8385         links.
8386
8387 2005-09-04  Martin Lambers <marlam@marlam.de>  (tiny change)
8388
8389         * modules/size_max (Makefile.am): Add size_max.h
8390
8391 2005-09-04  Derek Price  <derek@ximbiot.com>
8392
8393         * gnulib-tool (func_import): Fix reversed $symbolic logic.
8394
8395 2005-09-03  Simon Josefsson  <jas@extundo.com>
8396
8397         * gnulib-tool: Fix typo.
8398
8399 2005-09-03  Simon Josefsson  <jas@extundo.com>
8400
8401         * config/srclist.txt: Add glibc bug 1293.
8402
8403 2005-09-03  Derek Price  <derek@ximbiot.com>
8404
8405         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
8406         From Larry Jones <lawrence.jones@ugs.com>.
8407
8408 2005-09-02  Simon Josefsson  <jas@extundo.com>
8409
8410         * modules/socklen: New file.
8411
8412 2005-09-02  Simon Josefsson  <jas@extundo.com>
8413
8414         * modules/havelib: New module.
8415
8416         * modules/gettext, modules/iconv, modules/lock, modules/readline:
8417         Use havelib.
8418
8419 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
8420
8421         Check for arithmetic overflow when calculating sizes, to prevent
8422         some buffer-overflow issues.  These patches are conservative, in the
8423         sense that when I couldn't determine whether an overflow was possible,
8424         I inserted a run-time check.
8425         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
8426         macros.
8427         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
8428         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
8429         (re_xnrealloc, re_x2nrealloc): New inline functions.
8430         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
8431         parse_bracket_exp):
8432         (build_equiv_class, build_charclass): Check for arithmetic overflow
8433         in size expression calculations.
8434         * lib/regex_internal.c (re_string_realloc_buffers):
8435         (build_wcs_upper_buffer, re_node_set_add_intersect):
8436         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
8437         (re_dfa_add_node, register_state): Likewise.
8438         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
8439         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
8440         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
8441         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
8442
8443 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
8444
8445         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
8446         m4/ulonglong.m4.  Problem reported by Martin Lambers.
8447
8448 2005-09-02  Bruno Haible  <bruno@clisp.org>
8449
8450         Support for lib vs. lib64 distinction on biarch platforms.
8451         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
8452         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
8453         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
8454
8455 2005-09-02  Bruno Haible  <bruno@clisp.org>
8456
8457         * gnulib-tool (import): In the other first-use case, provide defaults
8458         as well.
8459
8460 2005-09-02  Bruno Haible  <bruno@clisp.org>
8461
8462         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
8463         patches not yet found in the latest gettext release.
8464
8465 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8466
8467         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
8468         to avoid a collision with bits/local_lim.h in glibc.
8469         All uses changed.  Problem reported by Dmitry V. Levin in
8470         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
8471
8472         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
8473         bugs in int versus size_t comparisons.
8474         (re_string_context_at): Fix bug where the code assumed that
8475         Idx is signed.
8476
8477         Use bool where appropriate.
8478         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
8479         All callers changed.
8480         (calc_eclosure_iter): Likewise, for ROOT arg.
8481         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
8482         (build_charclass_op): Likewise, for NON_MATCH arg.
8483         * lib/regex_internal.c (re_string_allocate, re_string_construct):
8484         (re_string_construct_common): Likewise, for ICASE arg.
8485         * lib/regexec.c (re_search_2_stub, re_search_stub):
8486         Likewise, for RET_LEN arg.
8487         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
8488         (set_regs): Likewise, for FL_BACKTRACK arg.
8489         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
8490         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
8491         (calc_eclosure_iter, parse_bracket_exp):
8492         Use bool for internal variables that are booleans.
8493         * lib/regexec.c (re_search_internal, check_matching,
8494         proceed_next_node):
8495         (set_regs, build_sifted_states, sift_states_bkref):
8496         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
8497         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
8498         (find_collation_sequence_value):
8499         Likewise.
8500         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
8501         (re_node_set_compare):
8502         Return bool, not int. All callers changed.
8503         * lib/regexec.c (check_halt_node_context, check_dst_limits):
8504         (build_trtable, check_node_accept): Likewise.
8505         * lib/regex_internal.h: Include stdbool.h.
8506
8507         Fix bugs uncovered when converting to bool.
8508         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
8509         failure instead of charging ahead blindly.
8510         * lib/regex_internal.c (register_state): Likewise.
8511         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
8512         for freeing internal storage.
8513         (group_nodes_into_DFA_states): Use unsigned int, not int, for
8514         bitset pieces used as boolean, to avoid undefined behavior
8515         on hosts that do int overflow checking.
8516
8517 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8518
8519         * config/srclist.txt: Add glibc bugs 1285-1287.
8520
8521 2005-09-01  Jim Meyering  <jim@meyering.net>
8522
8523         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
8524         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
8525         Require gl_STAT_MACROS, too.
8526
8527 2005-09-01  Bruno Haible  <bruno@clisp.org>
8528
8529         * gnulib-tool (import): In the first-use case, provide defaults.
8530
8531 2005-09-01  Bruno Haible  <bruno@clisp.org>
8532
8533         * gnulib-tool (func_import): Remove the .tmp files.
8534
8535 2005-09-01  Bruno Haible  <bruno@clisp.org>
8536
8537         * gnulib-tool (func_import): Fix handling of symbolic links.
8538
8539 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8540
8541         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
8542         old glibc regex code mishandles strings longer than 2**31 bytes.
8543         This patch fixes this when the regex code is used in gnulib
8544         (i.e., outside glibc).
8545
8546         This patch should not affect the use of the regex code inside
8547         glibc.  No doubt this problem also needs to be handled for glibc
8548         as well, but the result will be an incompatible change to the
8549         glibc ABI, and the old ABI will have to be supported too.  That
8550         can be the the subject for another patch.
8551
8552         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
8553         governing whether the rest of this patch is active.  By default,
8554         the macro is disabled and the patch has no effect.
8555         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
8556         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
8557         (struct re_pattern_buffer, re_search, re_search_2, re_match):
8558         (re_match_2, re_set_registers): Use the new types.
8559         * lib/regex_internal.h (Idx, re_hashval_t): New types.
8560         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
8561         New macros.
8562         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
8563         (re_string_context_at, bin_tree_t, re_dfastate_t):
8564         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
8565         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
8566         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
8567         (re_string_char_size_at, re_string_wchar_at):
8568         (re_string_elem_size_at):
8569         Use the new types and macros to port to 64-bit hosts.
8570         Use unsigned types for internal values, so that the code
8571         mostly works even for arrays larger than SSIZE_MAX.
8572         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
8573         (search_duplicated_node, calc_eclosure_iter, fetch_number):
8574         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
8575         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
8576         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
8577         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
8578         (calc_inveclosure, parse_dup_op, build_range_exp):
8579         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
8580         (fetch_number, create_token_tree, mark_opt_subexp):
8581         Likewise.
8582         * lib/regex_internal.c (re_string_construct_common,
8583         create_ci_newstate):
8584         (create_cd_newstate, re_string_allocate, re_string_construct):
8585         (re_string_realloc_buffers, build_wcs_upper_buffer):
8586         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
8587         (re_string_reconstruct, re_string_peek_byte_case):
8588         (re_string_fetch_byte_case, re_string_context_at):
8589         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
8590         (re_node_set_init_copy, re_node_set_add_intersect):
8591         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
8592         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
8593         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
8594         (re_acquire_state, re_acquire_state_context, register_state):
8595         Likewise.
8596         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
8597         search_cur_bkref_entry):
8598         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
8599         (re_search_internal, re_search_2_stub, re_search_stub)
8600         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
8601         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
8602         (update_cur_sifted_state, check_dst_limits):
8603         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
8604         (check_subexp_limits, sift_states_bkref, merge_state_array):
8605         (check_subexp_matching_top, get_subexp, get_subexp_sub):
8606         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
8607         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
8608         (expand_bkref_cache, check_node_accept_bytes):
8609         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
8610         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
8611         (acquire_init_state_context, check_halt_node_context):
8612         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
8613         (sift_states_backward, clean_state_log_if_needed):
8614         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
8615         (find_recover_state, transit_state_sb, transit_state_mb):
8616         (transit_state_bkref, build_trtable, match_ctx_clean):
8617         Likewise.
8618         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
8619         to work around an assumption that REG_MISSING is negative.
8620
8621         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
8622         (seek_collating_symbol_entry) [defined _LIBC]:
8623         (lookup_collation_sequence_value) [defined _LIBC]:
8624         (build_range_exp, build_collating_symbol) [defined _LIBC]:
8625         Use prototypes rather than old-style function definitions.
8626         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
8627         (transit_state_sb) [0]:
8628         (find_collation_sequence_value) [defined _LIBC]: Likewise.
8629
8630         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
8631         rm_eo.
8632
8633         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
8634         (optimize_subexps, lower_subexp):
8635         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
8636         since the signed shift might overflow.  Use 1u<<31 instead.
8637         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
8638         Likewise.
8639         * lib/regexec.c (check_dst_limits_calc_pos_1,
8640         check_subexp_matching_top): Likewise.
8641
8642         * lib/regcomp.c (optimize_subexps, lower_subexp):
8643         Use CHAR_BIT rather than 8, for clarity.
8644         * lib/regexec.c (check_dst_limits_calc_pos_1):
8645         (check_subexp_matching_top): Likewise.
8646         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
8647         have to worry about portability issues when shifting it left.
8648         Remove no-longer-needed test for table_size > 0.
8649         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
8650         in a word, as the resulting behavior is undefined.
8651         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
8652         in one case, a <= should have been an <, and in another case the
8653         whole test was missing.
8654         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
8655         the standard name CHAR_BIT.
8656         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
8657         this is not true on one's complement and signed-magnitude hosts.
8658
8659         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
8660         next_last_offset.
8661         (struct re_dfa_t): Remove unused member states_alloc.
8662         * lib/regcomp.c (init_dfa): Don't initialize unused members.
8663
8664 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8665
8666         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
8667         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
8668         and large-file glibc and in 32-bit large-file Solaris.
8669
8670 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8671
8672         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
8673         lengths fit in regoff_t; this isn't true if regoff_t is the same
8674         width as size_t.
8675         * lib/regex.c (re_search_internal): 5th arg is LAST_START
8676         (= START + RANGE) instead of RANGE.  This avoids overflow
8677         problems when regoff_t is the same width as size_t.
8678         All callers changed.
8679         (re_search_2_stub): Check for overflow when adding the
8680         sizes of the two strings.
8681         (re_search_stub): Check for overflow when adding START
8682         to RANGE; if it occurs, substitute the extreme value.
8683
8684 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8685
8686         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
8687
8688 2005-08-31  Jim Meyering  <jim@meyering.net>
8689
8690         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
8691         a pointer-to-const.
8692         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
8693         (register_state): Likewise.
8694         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
8695         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
8696         (group_nodes_into_DFAstates): Likewise.
8697
8698 2005-08-31  Jim Meyering  <jim@meyering.net>
8699
8700         * check-module: Add a FIXME comment.
8701
8702 2005-08-31  Eric Blake  <ebb9@byu.net>
8703
8704         * modules/unistd-safer (Files): Add unistd--.h.
8705         * modules/stdio-safer (Files): Add stdio--.h.
8706
8707 2005-08-31  Derek Price  <derek@ximbiot.com>
8708
8709         * lib/getdelim.c (getdelim): Return EOF on EOF.
8710         Reported by Larry Jones <lawrence.jones@ugs.com>.
8711
8712 2005-08-31  Bruno Haible  <bruno@clisp.org>
8713
8714         Avoid unnecessary diffs in the generated lib/Makefile.am.
8715         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
8716         the generated files.
8717         (func_import): Don't set cmd.
8718
8719 2005-08-31  Bruno Haible  <bruno@clisp.org>
8720
8721         * lib/strstr.c: Include <stddef.h>, for NULL.
8722         * lib/strcasestr.c: Likewise.
8723         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
8724
8725 2005-08-31  Bruno Haible  <bruno@clisp.org>
8726
8727         * gnulib-tool: New option --macro-prefix.
8728         (func_import): Use macro_prefix.
8729         (import): Handle option --macro-prefix.
8730
8731 2005-08-31  Bruno Haible  <bruno@clisp.org>
8732
8733         * gnulib-tool (import): Rename most ac_* variables to cached_*.
8734         Also use new variables cached_lgpl, cached_libtool.
8735
8736 2005-08-31  Bruno Haible  <bruno@clisp.org>
8737
8738         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
8739         always instantiating them.
8740
8741 2005-08-31  Bruno Haible  <bruno@clisp.org>
8742
8743         * gnulib-tool (func_import): Read the previous cached settings
8744         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
8745         earlier added by gnulib but are now dropped. Warn when a gnulib file
8746         overwrites a non-gnulib file.
8747
8748 2005-08-31  Bruno Haible  <bruno@clisp.org>
8749
8750         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
8751         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
8752         projects that don't keep autogenerated files in CVS. Put into
8753         actioncmd only the specified modules, not the transitive closure.
8754
8755 2005-08-31  Bruno Haible  <bruno@clisp.org>
8756
8757         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
8758         Create directories that shall be filled.
8759         (import): Don't look for gl_* macros in configure.ac. Recurse across
8760         all directories containing a gnulib-cache.m4 files, if meaningful.
8761
8762 2005-08-31  Bruno Haible  <bruno@clisp.org>
8763
8764         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
8765         (import): Set seen_libtool when we see gl_LIBTOOL.
8766
8767 2005-08-31  Bruno Haible  <bruno@clisp.org>
8768
8769         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
8770         declaration macro definitions from generated gnulib.m4.
8771
8772 2005-08-30  "Oskar Liljeblad" <oskar@osk.mine.nu>
8773
8774         * lib/iconvme.h: Add prototype for iconv_alloc.
8775
8776 2005-08-29  Simon Josefsson  <jas@extundo.com>
8777
8778         * lib/iconvme.c: Fix errno.
8779
8780 2005-08-29  Bruno Haible  <bruno@clisp.org>
8781
8782         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
8783         that it works when the directory contains spaces.
8784
8785 2005-08-29  Bruno Haible  <bruno@clisp.org>
8786
8787         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
8788
8789 2005-08-29  Bruno Haible  <bruno@clisp.org>
8790
8791         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
8792         Emit more advice.
8793
8794 2005-08-29  Bruno Haible  <bruno@clisp.org>
8795         and Stepan Kasal  <kasal@ucw.cz>
8796
8797         * check-module: If more parameters are given, check each of them
8798         separately; add more exceptions, as noted by Jim Meyering.
8799         (check_module): New procedure.
8800         (%exempt_header): Now contains all exceptions.
8801
8802 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
8803
8804         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
8805
8806 2005-08-29  "Oskar Liljeblad" <oskar@osk.mine.nu>
8807
8808         * lib/iconvme.c: Split iconv_string into iconv_alloc.
8809
8810 2005-08-28  Bruno Haible  <bruno@clisp.org>
8811
8812         * m4/gnulib-tool.m4: New file.
8813
8814 2005-08-27  Jim Meyering  <jim@meyering.net>
8815
8816         * modules/unistd-safer (Files): Add pipe-safer.c.
8817         * modules/fcntl-safer (Files): Add creat-safer.c.
8818
8819 2005-08-27  Jim Meyering  <jim@meyering.net>
8820
8821         * m4/stdlib-safer.m4: New file.  From coreutils.
8822         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
8823         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
8824         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
8825         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
8826         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
8827
8828 2005-08-27  Jim Meyering  <jim@meyering.net>
8829
8830         * lib/fopen-safer.c: Merge minor changes from coreutils.
8831         * lib/dup-safer.c: Likewise.
8832         * lib/fd-safer.c: Likewise.
8833
8834         Merge from coreutils.
8835         * lib/stdio--.h: New file.
8836         * lib/stdlib--.h: New file.
8837         * lib/mkstemp-safer.c: New file.
8838
8839         GNU tar needs these.
8840         * lib/pipe-safer.c: New file.
8841         * lib/creat-safer.c: New file.
8842         * lib/fcntl--.h (creat): Define to creat_safer.
8843         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
8844         * lib/unistd--.h (pipe): Define to pipe_safer.
8845         * lib/unistd-safer.h: Declare pipe_safer.
8846
8847 2005-08-26  Simon Josefsson  <jas@extundo.com>
8848
8849         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
8850         Haible <bruno@clisp.org>.
8851
8852 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
8853
8854         * lib/regex_internal.h: Remove all references to
8855         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
8856         or better.
8857         (bitset_not, bitset_merge, bitset_not_merge):
8858         (bitset_mask, re_string_allocate, re_string_construct):
8859         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
8860         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
8861         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
8862         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
8863         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
8864         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
8865         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
8866         (re_acquire_state_context):
8867         Remove unnecessary forward decls.
8868         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
8869         Put __attribute at function definition,
8870         now that the function decl has been removed.
8871         * lib/regex_internal.c (re_string_peek_byte_case):
8872         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
8873         Likewise.
8874
8875 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
8876
8877         * m4/regex.m4: Add AC_PREREQ(2.50).
8878         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
8879
8880 2005-08-25  Simon Josefsson  <jas@extundo.com>
8881
8882         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
8883         __fsetlocking.
8884
8885 2005-08-25  Simon Josefsson  <jas@extundo.com>
8886
8887         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
8888         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
8889         GLIBC specific code.
8890
8891 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8892
8893         Make regex safe for g++.  This fixes one real bug (an "err"
8894         that should have been "*err").  g++ problem reported by
8895         Sam Steingold.
8896         * lib/regex_internal.h (re_calloc): New macro, consistent with
8897         re_malloc etc.  All callers of calloc changed to use re_calloc.
8898         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
8899         not int.  All callers changed.
8900         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
8901         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
8902         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
8903         (find_recover_state): Change "err" to "*err"; this fixes what
8904         appears to be a real bug.
8905         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
8906         versus int.
8907
8908 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8909
8910         * modules/regex (Depends-on): Add malloc, since the code
8911         assumes that !malloc(0) means failure.
8912
8913 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8914
8915         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
8916
8917         alloca modernization/simplification for regex.
8918         * lib/regex.c: Remove portability cruft for alloca.  This no longer
8919         needs to be at the start of the file, and can be moved into
8920         regex_internal.h and simplified.
8921         * lib/regex_internal.h: Include <alloca.h>.
8922         (__libc_use_alloca) [!defined _LIBC]: New macro.
8923         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
8924         now works outside glibc.
8925
8926 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8927
8928         * config/srclist.txt: Add glibc bugs 1241, 1245.
8929
8930 2005-08-25  Jim Meyering  <jim@meyering.net>
8931
8932         * lib/open-safer.c: Include <config.h>.
8933         Otherwise, we'd lose LARGEFILE support in any file using
8934         e.g. "fcntl--.h"
8935
8936 2005-08-25  Bruno Haible  <bruno@clisp.org>
8937
8938         * m4/minmax.m4: Require autoconf 2.52.
8939         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
8940         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
8941         alternatives of translit over the alphabet.
8942         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
8943
8944 2005-08-24  Simon Josefsson  <jas@extundo.com>
8945
8946         * tests/test-getpass.c: New file.
8947
8948 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8949
8950         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
8951         for GNU regex features.
8952
8953 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8954
8955         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
8956         * lib/regex.h (regerror): Likewise.
8957
8958         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
8959         requires this.  (The code never needed it.)
8960
8961         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
8962         All uses of recently-renamed identifiers changed to use the new,
8963         POSIX-compliant names.  The code will build and run just fine
8964         without these changes, but it's better to eat our own dog food
8965         and use the standard-conforming names.
8966
8967         * lib/regex.h: Fix a multitude of POSIX name space violations.
8968         These changes have an effect only for programs that define
8969         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
8970         do not change anything for programs compiled in the normal way.
8971         Also, there is no effect on the ABI.
8972
8973         (_REGEX_SOURCE): New macro.
8974         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
8975         defined and _GNU_SOURCE is not; this fixes a name space violation.
8976
8977         Rename the following macros to obey POSIX requirements.
8978         The old names are still visible as macros if _REGEX_SOURCE is defined.
8979         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
8980         RE_BACKSLASH_ESCAPE_IN_LISTS.
8981         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
8982         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
8983         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
8984         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
8985         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
8986         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
8987         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
8988         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
8989         (REG_INTERVALS): renamed from RE_INTERVALS.
8990         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
8991         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
8992         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
8993         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
8994         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
8995         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
8996         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
8997         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
8998         RE_UNMATCHED_RIGHT_PAREN_ORD.
8999         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
9000         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
9001         (REG_DEBUG): renamed from RE_DEBUG.
9002         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
9003         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
9004         unusual, since we can't clash with the POSIX REG_ICASE.
9005         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
9006         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
9007         (REG_NO_SUB): renamed from RE_NO_SUB.
9008         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
9009         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
9010         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
9011         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
9012         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
9013         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
9014         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
9015         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
9016         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
9017         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
9018         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
9019         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
9020         RE_SYNTAX_POSIX_MINIMAL_BASIC.
9021         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
9022         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
9023         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
9024         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
9025         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
9026         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
9027         (REG_FIXED): Renamed from REGS_FIXED.
9028         (REG_NREGS): Renamed from RE_NREGS.
9029
9030         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
9031         of other REG_* macros, since POSIX says the user is allowed to
9032         #undef these macros selectively.
9033
9034         (reg_errcode_t): Update comment stating what other tables need
9035         to be consistent.
9036
9037         Rename the following enum values to obey POSIX requirements.
9038         The old names are still visible as macros.
9039         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
9040         is not defined, since GNU is supposed to be a superset of POSIX as
9041         much as possible, and since we want reg_errcode_t to be a signed
9042         type for implementation consistency.
9043         (_REG_NOERROR): Renamed from REG_NOERROR.
9044         (_REG_NOMATCH): Renamed from REG_NOMATCH.
9045         (_REG_BADPAT): Renamed from REG_BADPAT.
9046         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
9047         (_REG_ECTYPE): Renamed from REG_ECTYPE.
9048         (_REG_EESCAPE): Renamed from REG_EESCAPE.
9049         (_REG_ESUBREG): Renamed from REG_ESUBREG.
9050         (_REG_EBRACK): Renamed from REG_EBRACK.
9051         (_REG_EPAREN): Renamed from REG_EPAREN.
9052         (_REG_EBRACE): Renamed from REG_EBRACE.
9053         (_REG_BADBR): Renamed from REG_BADBR.
9054         (_REG_ERANGE): Renamed from REG_ERANGE.
9055         (_REG_ESPACE): Renamed from REG_ESPACE.
9056         (_REG_BADRPT): Renamed from REG_BADRPT.
9057         (_REG_EEND): Renamed from REG_EEND.
9058         (_REG_ESIZE): Renamed from REG_ESIZE.
9059         (_REG_ERPAREN): Renamed from REG_ERPAREN.
9060         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
9061         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
9062         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
9063         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
9064
9065         (_REG_RE_NAME, _REG_RM_NAME): New macros.
9066         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
9067         changed.  But support the old name if the new one is not defined
9068         and if _REGEX_SOURCE.
9069
9070         Change the following member names in struct re_pattern_buffer.
9071         The old names are still supported if !_REGEX_SOURCE.
9072         The new names are always supported, regardless of _REGEX_SOURCE.
9073         (re_buffer): Renamed from buffer.
9074         (re_allocated): Renamed from allocated.
9075         (re_used): Renamed from used.
9076         (re_syntax): Renamed from syntax.
9077         (re_fastmap): Renamed from fastmap.
9078         (re_translate): Renamed from translate.
9079         (re_can_be_null): Renamed from can_be_null.
9080         (re_regs_allocated): Renamed from regs_allocated.
9081         (re_fastmap_accurate): Renamed from fastmap_accurate.
9082         (re_no_sub): Renamed from no_sub.
9083         (re_not_bol): Renamed from not_bol.
9084         (re_not_eol): Renamed from not_eol.
9085         (re_newline_anchor): Renamed from newline_anchor.
9086
9087         Change the following member names in struct re_registers.
9088         The old names are still supported if !_REGEX_SOURCE.
9089         The new names are always supported, regardless of _REGEX_SOURCE.
9090         (rm_num_regs): Renamed from num_regs.
9091         (rm_start): Renamed from start.
9092         (rm_end): Renamed from end.
9093
9094         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
9095         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
9096         Prepend __ to parameter names.
9097
9098         Undo yesterday's changes.
9099
9100 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9101
9102         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
9103         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
9104         lib/regex.c.
9105
9106 2005-08-24  Jim Meyering  <jim@meyering.net>
9107
9108         Sync from coreutils.
9109         * m4/fcntl-safer.m4: New file.
9110
9111         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
9112         and object files for this module.
9113
9114 2005-08-24  Jim Meyering  <jim@meyering.net>
9115
9116         Sync from coreutils.
9117         * lib/fcntl--.h, fcntl-safer.h, open-safer.c: New files.
9118
9119 2005-08-24  Jim Meyering  <jim@meyering.net>
9120
9121         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
9122         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
9123
9124 2005-08-24  Jim Meyering  <jim@meyering.net>
9125
9126         * modules/fcntl-safer: New module.
9127         * modules/fts (Depends-on): Add fcntl-safer.
9128         * MODULES.html.sh (File descriptor based Input/Output):
9129         Add fcntl-safer.
9130
9131 2005-08-24  Bruno Haible  <bruno@clisp.org>
9132
9133         Support for unit test modules.
9134         * modules/README: Mention tests modules.
9135         * modules/TEMPLATE-TESTS: New file.
9136         * gnulib-tool: New options --extract-tests-module, --with-tests and
9137         --tests-base (unused for the moment).
9138         (testsbase, inctests): New variables.
9139         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
9140         (func_verify_module): Exclude TEMPLATE-TESTS.
9141         (func_verify_nontests_module, func_verify_tests_module): New functions.
9142         (func_get_dependencies): Add implicit dependency for tests modules.
9143         (func_get_tests_module): New function.
9144         (func_modules_transitive_closure): When --with-tests was specified,
9145         include the unit tests as well, unless explicitly avoided.
9146         (func_emit_lib_Makefile_am): Ignore the tests modules here.
9147         (func_emit_tests_Makefile_am): New function.
9148         (func_create_testdir): When --with-tests was specified, emit a
9149         tests/ directory.
9150         * MODULES.html.sh (Future developments): Update.
9151
9152 2005-08-24  Bruno Haible  <bruno@clisp.org>
9153
9154         * modules/tls-tests: New file.
9155         * tests/test-tls.c: New file, from GNU gettext.
9156
9157 2005-08-24  Bruno Haible  <bruno@clisp.org>
9158
9159         * modules/lock-tests: New file.
9160         * tests/test-lock.c: New file, from GNU gettext.
9161
9162 2005-08-24  Bruno Haible  <bruno@clisp.org>
9163
9164         * lib/lock.h: Add multiple inclusion guard.
9165         * lib/tls.h: Add multiple inclusion guard.
9166
9167 2005-08-24  Bruno Haible  <bruno@clisp.org>
9168
9169         * gnulib-tool: Add support for the --aux-dir option to
9170         --create-testdir, --create-megatestdir, --test, --megatest.
9171         (func_create_testdir, func_create_megatestdir): Optionally emit a
9172         AC_CONFIG_AUX_DIR directive.
9173         (create-testdir, create-megatestdir, test, megatest): Provide a
9174         default value for $auxdir.
9175
9176 2005-08-24  Bruno Haible  <bruno@clisp.org>
9177
9178         * gnulib-tool (import): Use compound statement instead of subshell
9179         where possible.
9180
9181 2005-08-24  Bruno Haible  <bruno@clisp.org>
9182
9183         * gnulib-tool (import): Change --aux-dir default to "build-aux".
9184
9185 2005-08-24  Bruno Haible  <bruno@clisp.org>
9186
9187         * gnulib-tool (func_version): Update.
9188
9189 2005-08-24  Bruno Haible  <bruno@clisp.org>
9190
9191         * gnulib-tool (func_import, func_create_testdir,
9192         func_create_megatestdir): Quote all autoconf macro arguments.
9193
9194 2005-08-24  Bruno Haible  <bruno@clisp.org>
9195
9196         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
9197         option --force, because --force causes the aclocal.m4 of each
9198         subdirectory to be newer than the corresponding config.h.in.
9199
9200 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9201
9202         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
9203         All contents moved to gl_REGEX.
9204         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
9205         assume that it does.
9206
9207 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9208
9209         * lib/regex.h (REG_NOSYS)
9210         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
9211         Define, since POSIX requires it as of 2001.
9212         (_REG_ENOSYS)
9213         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
9214         New private symbol, used to keep the enum signed in all cases.
9215         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
9216         Youngman in
9217         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
9218
9219         * lib/regex_internal.c (re_string_skip_chars, register_state):
9220         (calc_state_hash):
9221         Remove forward decls; no longer needed now that we use prototypes.
9222         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
9223         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
9224         (clean_state_log_if_needed): Likewise.
9225
9226 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9227
9228         * config/srclist.txt: Add glibc bugs 1231-1233.
9229
9230 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9231
9232         Fix problems reported by Sam Steingold in
9233         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
9234         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
9235         assumed that reg_errcode_t is a signed type, which is not
9236         necessarily true if _XOPEN_SOURCE is not defined.
9237         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
9238         since some compilers warn about it otherwise.
9239
9240 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9241
9242         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
9243         (init_word_char, create_initial_state, duplicate_node_closure):
9244         (fetch_token, peek_token_bracket, build_range_exp):
9245         (build_collating_symbol): Remove forward decls; no longer needed
9246         now that we use prototypes.
9247
9248         * lib/regcomp.c:
9249         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
9250         (re_compile_fastmap_iter, regcomp, regerror, regfree):
9251         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
9252         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
9253         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
9254         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
9255         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
9256         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
9257         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
9258         (build_range_exp, build_collating_symbol, parse_bracket_exp):
9259         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
9260         (build_charclass, build_charclass_op, fetch_number, create_tree):
9261         (create_token_tree, mark_opt_subexp, duplicate_tree):
9262         Use prototypes rather than old-style definitions.
9263
9264         * lib/regex_internal.c:
9265         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
9266         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
9267         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
9268         (re_string_reconstruct, re_string_peek_byte_case):
9269         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
9270         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
9271         (re_node_set_init_copy, re_node_set_add_intersect):
9272         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
9273         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
9274         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
9275         (re_acquire_state, re_acquire_state_context, register_state):
9276         (create_ci_newstate, create_cd_newstate, free_state):
9277         Likewise.
9278         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
9279         re_search_2):
9280         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
9281         (re_search_internal, prune_impossible_nodes):
9282         (acquire_init_state_context, check_matching, static):
9283         (check_halt_node_context, check_halt_state_context, proceed_next_node):
9284         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
9285         (update_regs, sift_states_backward, build_sifted_states):
9286         (clean_state_log_if_needed, merge_state_array):
9287         (update_cur_sifted_state, add_epsilon_src_nodes):
9288         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
9289         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
9290         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
9291         (find_recover_state, check_subexp_matching_top, transit_state_mb):
9292         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
9293         (check_arrival, check_arrival_add_next_nodes):
9294         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
9295         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
9296         (check_node_accept_bytes, check_node_accept, extend_buffers):
9297         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
9298         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
9299         (sift_ctx_init):
9300         Likewise.
9301
9302         * lib/regex_internal.h:
9303         (re_string_allocate, re_string_construct, re_string_reconstruct):
9304         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
9305         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
9306         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
9307         (re_string_context_at, re_string_peek_byte_case):
9308         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
9309         is defined, since we now use prototypes always.
9310
9311         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
9312         C89 or better.  All uses removed.
9313
9314 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9315
9316         * config/srclist.txt: Add glibc bugs 1220-1227.
9317
9318 2005-08-20  Jim Meyering  <jim@meyering.net>
9319
9320         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
9321         of unused local, dfa.
9322
9323 2005-08-20  Bruno Haible  <bruno@clisp.org>
9324
9325         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
9326
9327 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9328
9329         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
9330         (re_node_set_insert_last, re_dfa_add_node):
9331         Rename local variables to avoid GCC shadowing warnings.
9332
9333 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9334
9335         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
9336         [defined lint]: Suppress bogus uninitialized-variable warnings.
9337
9338         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
9339         and let the caller return REG_ESPACE if out of space.  This
9340         removes an uninitialied-variable warning with GCC 4.0.1, and also
9341         avoids taking the address of a local variable.  All callers
9342         changed.
9343
9344 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9345
9346         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
9347         $LIBCSRC/posix/regexec.c.
9348         Add glibc bug 1217 for regcomp.c.
9349
9350 2005-08-19  Jim Meyering  <jim@meyering.net>
9351
9352         * lib/regexec.c (proceed_next_node): Redo local variables to
9353         avoid GCC shadowing warnings.
9354
9355 2005-08-18  Bruno Haible  <bruno@clisp.org>
9356
9357         * lib/strstr.c (strstr): Fix return value in multibyte case.
9358         * lib/strcasestr.c (strcasestr): Likewise.
9359
9360 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9361
9362         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
9363
9364 2005-08-17  Jim Meyering  <jim@meyering.net>
9365
9366         Make the %s format (seconds since the epoch) work for a negative
9367         number and when used with a zero-padded field width, e.g. %015s.
9368
9369         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
9370         label so that it precedes the code to set `digits'.  Otherwise,
9371         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
9372         print `00-22'.  Now, it prints `-0022', as it should.
9373
9374 2005-08-17  Bruno Haible  <bruno@clisp.org>
9375
9376         * modules/strstr (Files): Add m4/mbrtowc.m4.
9377         (Depends-on): Add mbuiter.
9378
9379 2005-08-17  Bruno Haible  <bruno@clisp.org>
9380
9381         * modules/strcasestr: New file.
9382         * MODULES.html.sh (String handling, based on ANSI C 89): Add
9383         strcasestr.
9384
9385 2005-08-17  Bruno Haible  <bruno@clisp.org>
9386
9387         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
9388
9389 2005-08-17  Bruno Haible  <bruno@clisp.org>
9390
9391         * modules/mbuiter: New file.
9392         * MODULES.html.sh (Extended multibyte and wide character utilities):
9393         Add mbuiter.
9394
9395 2005-08-17  Bruno Haible  <bruno@clisp.org>
9396
9397         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
9398         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
9399
9400 2005-08-17  Bruno Haible  <bruno@clisp.org>
9401
9402         * m4/strcasestr.m4: New file.
9403
9404 2005-08-17  Bruno Haible  <bruno@clisp.org>
9405
9406         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
9407         * lib/strstr.c: Completely rewritten, with multibyte locale support.
9408
9409 2005-08-17  Bruno Haible  <bruno@clisp.org>
9410
9411         * lib/strcasestr.h: New file.
9412         * lib/strcasestr.c: New file.
9413
9414 2005-08-17  Bruno Haible  <bruno@clisp.org>
9415
9416         * lib/strcasecmp.c: Use mbuiter.h.
9417
9418 2005-08-17  Bruno Haible  <bruno@clisp.org>
9419
9420         * lib/mbuiter.h: New file.
9421
9422 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
9423
9424         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
9425         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
9426         and gl_GETOPT are both invoked via different paths (as happens
9427         with GNU tar CVS because it uses both argp and getopt), the former
9428         wins.
9429
9430 2005-08-16  Bruno Haible  <bruno@clisp.org>
9431
9432         * modules/tls: New file.
9433         * MODULES.html.sh (Multithreading): Add tls.
9434
9435 2005-08-16  Bruno Haible  <bruno@clisp.org>
9436
9437         * modules/strnlen1: New file.
9438         * MODULES.html.sh (String handling): Add strnlen1.
9439
9440 2005-08-16  Bruno Haible  <bruno@clisp.org>
9441
9442         * modules/strcase (Files): Add m4/mbrtowc.m4.
9443         (Depends-on): Add strnlen1, mbchar.
9444
9445 2005-08-16  Bruno Haible  <bruno@clisp.org>
9446
9447         * modules/mbiter: New file.
9448         * MODULES.html.sh (Extended multibyte and wide character utilities):
9449         Add mbiter.
9450
9451 2005-08-16  Bruno Haible  <bruno@clisp.org>
9452
9453         * modules/mbfile: New file.
9454         * MODULES.html.sh (Extended multibyte and wide character utilities):
9455         Add mbfile.
9456
9457 2005-08-16  Bruno Haible  <bruno@clisp.org>
9458
9459         * modules/mbchar: New file.
9460         * MODULES.html.sh (Extended multibyte and wide character utilities):
9461         New section.
9462
9463 2005-08-16  Bruno Haible  <bruno@clisp.org>
9464
9465         * m4/tls.m4: New file, from GNU gettext.
9466
9467 2005-08-16  Bruno Haible  <bruno@clisp.org>
9468
9469         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
9470         always.
9471         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
9472
9473 2005-08-16  Bruno Haible  <bruno@clisp.org>
9474
9475         * m4/mbiter.m4: New file.
9476
9477 2005-08-16  Bruno Haible  <bruno@clisp.org>
9478
9479         * m4/mbfile.m4: New file.
9480
9481 2005-08-16  Bruno Haible  <bruno@clisp.org>
9482
9483         * m4/mbchar.m4: New file.
9484
9485 2005-08-16  Bruno Haible  <bruno@clisp.org>
9486
9487         * lib/tls.h: New file, from GNU gettext.
9488         * lib/tls.c: New file, from GNU gettext.
9489
9490 2005-08-16  Bruno Haible  <bruno@clisp.org>
9491
9492         * lib/strnlen1.h: New file.
9493         * lib/strnlen1.c: New file.
9494
9495 2005-08-16  Bruno Haible  <bruno@clisp.org>
9496
9497         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
9498         (mbi_init): Update.
9499         (mbi_avail, mbi_advance): Let the iteration end before the terminating
9500         NUL byte, not after it.
9501
9502 2005-08-16  Bruno Haible  <bruno@clisp.org>
9503
9504         * lib/strcase.h (strcasecmp): Add note in comments.
9505         * lib/strncasecmp.c: Use code from strcasecmp.c.
9506         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
9507         (strcasecmp): Work correctly in multibyte locales.
9508
9509 2005-08-16  Bruno Haible  <bruno@clisp.org>
9510
9511         * lib/mbiter.h: New file.
9512
9513 2005-08-16  Bruno Haible  <bruno@clisp.org>
9514
9515         * lib/mbfile.h: New file.
9516
9517 2005-08-16  Bruno Haible  <bruno@clisp.org>
9518
9519         * lib/mbchar.h: New file.
9520         * lib/mbchar.c: New file.
9521
9522 2005-08-16  Bruno Haible  <bruno@clisp.org>
9523
9524         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
9525         the valid ones. Makes the comparison operations transitive:
9526         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
9527         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
9528
9529 2005-08-15  Simon Josefsson  <jas@extundo.com>
9530
9531         * modules/ssize_t (License): Change to 'unlimited'.
9532
9533         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
9534
9535 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9536
9537         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
9538         Add comments for each pending glibc patch.
9539
9540 2005-08-15  Bruno Haible  <bruno@clisp.org>
9541
9542         * lib/regex.h (__restrict_arr): Don't define to __restrict if
9543         __cplusplus is defined.
9544
9545 2005-08-14  Jim Meyering  <jim@meyering.net>
9546
9547         Sync from coreutils.
9548
9549         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
9550         Use the hash-table-based cycle-detection code not just when
9551         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
9552         Reported by James Youngman in
9553         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
9554         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
9555         FTS_TIGHT_CYCLE_CHECK.
9556         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
9557         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
9558         once again.
9559         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
9560         * lib/fts.c (fd_safer): Remove decl.
9561         Include fcntl--.h rather than unistd-safer.h
9562         (fts_safe_changedir): Don't call fd_safer; no longer needed
9563         now that we include fcntl--.h.
9564
9565 2005-08-12  Simon Josefsson  <jas@extundo.com>
9566
9567         * modules/getndelim2: Use ssize_t module.
9568         * modules/getnline: Likewise.
9569         * modules/safe-read: Likewise.
9570         * modules/xreadlink: Likewise.
9571
9572         * modules/ssize_t: New file.
9573
9574 2005-08-12  Simon Josefsson  <jas@extundo.com>
9575
9576         * m4/readline.m4: Look for termcap, curses or ncurses if required.
9577
9578 2005-08-12  Simon Josefsson  <jas@extundo.com>
9579
9580         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
9581         ssize_t.
9582
9583 2005-08-12  Simon Josefsson  <jas@extundo.com>
9584
9585         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
9586         readline, getdelim and check_version.
9587         (Support for systems lacking ISO C 99: Sizes of integer types):
9588         Add size_max.
9589
9590 2005-08-12  Bruno Haible  <bruno@clisp.org>
9591
9592         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
9593
9594 2005-08-11  Simon Josefsson  <jas@extundo.com>
9595
9596         * modules/readline: New file.
9597
9598         * modules/strnlen (Files): Add strnlen.h.
9599
9600 2005-08-11  Simon Josefsson  <jas@extundo.com>
9601
9602         * m4/readline.m4: New file.
9603
9604 2005-08-11  Simon Josefsson  <jas@extundo.com>
9605
9606         * lib/readline.h, readline.c: New file.
9607
9608 2005-08-11  Simon Josefsson  <jas@extundo.com>
9609
9610         * doc/gnulib.texi (Initial import, Finishing touches): Mention
9611         gl_AVOID.
9612
9613 2005-08-11  Bruno Haible  <bruno@clisp.org>
9614
9615         * lib/strnlen.h (strnlen): Change parameter name to match comment.
9616
9617 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
9618
9619         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
9620
9621 2005-08-10  Simon Josefsson  <jas@extundo.com>
9622
9623         * tests/test-iconvme.c: New file.
9624
9625 2005-08-10  Simon Josefsson  <jas@extundo.com>
9626
9627         * m4/strnlen.m4: New file.
9628
9629         * m4/strndup.m4: Don't check for strnlen declaration, done in
9630         strnlen.m4.
9631
9632 2005-08-10  Simon Josefsson  <jas@extundo.com>
9633
9634         * lib/strndup.c: Use strnlen.h.
9635
9636         * lib/strnlen.h: New file.
9637
9638 2005-08-08  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>  (tiny change)
9639
9640         * README: Typos.
9641
9642 2005-08-02  Simon Josefsson  <jas@extundo.com>
9643
9644         * modules/readline: New file.
9645
9646 2005-08-02  Simon Josefsson  <jas@extundo.com>
9647
9648         * modules/getdelim: New file.
9649
9650         * modules/getline: Rewrite, don't use getndelim2.
9651
9652 2005-08-02  Simon Josefsson  <jas@extundo.com>
9653
9654         * m4/getline.m4: Separate out getdelim stuff into separate module.
9655
9656         * m4/getdelim.m4: New file.
9657
9658 2005-08-02  Simon Josefsson  <jas@extundo.com>
9659
9660         * lib/getline.h, getline.c: Rewrite.
9661
9662         * lib/getdelim.h, getdelim.c: New files, ported from glibc.
9663
9664 2005-07-31  Bruno Haible  <bruno@clisp.org>
9665
9666         * lib/lock.h (gl_lock_initializer): New macro.
9667         (gl_lock_define_initialized): Use it.
9668         (gl_rwlock_initializer): New macro.
9669         (gl_rwlock_define_initialized): Use it.
9670         (gl_recursive_lock_initializer): New macro.
9671         (gl_recursive_lock_define_initialized): Use it.
9672
9673 2005-07-30  Karl Berry  <karl@gnu.org>
9674
9675         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
9676         Report from Ben Pfaff, regarding getopt.
9677
9678 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
9679
9680         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
9681         normal way.
9682         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
9683         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
9684         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
9685         (gl_GETOPT): Use the new macros.  Most of the implementation
9686         is moved to the new macros.  This is for programs like Emacs
9687         that don't want all the functionality of gl_GETOPT.
9688
9689 2005-07-26  Bruno Haible  <bruno@clisp.org>
9690
9691         * m4/lock.m4: Update from GNU gettext.
9692
9693 2005-07-26  Bruno Haible  <bruno@clisp.org>
9694
9695         * lib/lock.h: Update from GNU gettext.
9696         * lib/lock.c: Update from GNU gettext.
9697
9698 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
9699
9700         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
9701         obsolescent AC_TRY_RUN.  Include the default includes files, for
9702         'exit'.
9703
9704 2005-07-24  Bruno Haible  <bruno@clisp.org>
9705
9706         * modules/visibility: New file.
9707         * MODULES.html.sh (Misc): Add visibility.
9708
9709 2005-07-24  Bruno Haible  <bruno@clisp.org>
9710
9711         * m4/visibility.m4: New file.
9712
9713 2005-07-24  Bruno Haible  <bruno@clisp.org>
9714
9715         * doc/visibility.texi: New file.
9716
9717 2005-07-22  Bruno Haible  <bruno@clisp.org>
9718
9719         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
9720         $(ALLOCA_H), redundant through BUILT_SOURCES.
9721         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
9722         redundant through BUILT_SOURCES.
9723         * modules/byteswap (Makefile.am): Remove explicit dependency on
9724         $(BYTESWAP_H), redundant through BUILT_SOURCES.
9725         * modules/fnmatch (Makefile.am): Remove explicit dependency on
9726         $(FNMATCH_H), redundant through BUILT_SOURCES.
9727         * modules/getopt (Makefile.am): Remove explicit dependency on
9728         $(GETOPT_H), redundant through BUILT_SOURCES.
9729         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
9730         redundant through BUILT_SOURCES.
9731         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
9732         redundant through BUILT_SOURCES.
9733         * modules/stdbool (Makefile.am): Remove explicit dependency on
9734         $(STDBOOL_H), redundant through BUILT_SOURCES.
9735         * modules/stdint (Makefile.am): Remove explicit dependency on
9736         $(STDINT_H), redundant through BUILT_SOURCES.
9737         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
9738         Remove explicit dependency on $(SYSEXITS_H).
9739         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
9740
9741 2005-07-18  Simon Josefsson  <jas@extundo.com>
9742
9743         * lib/check-version.c (check_version): Accept identical versions too.
9744
9745 2005-07-18  Bruno Haible  <bruno@clisp.org>
9746
9747         * modules/lock: New file.
9748         * MODULES.html.sh (Multithreading): New section.
9749
9750 2005-07-18  Bruno Haible  <bruno@clisp.org>
9751
9752         * m4/lock.m4: New file, from GNU gettext.
9753
9754 2005-07-18  Bruno Haible  <bruno@clisp.org>
9755
9756         * lib/lock.h: New file, from GNU gettext.
9757         * lib/lock.c: New file, from GNU gettext.
9758
9759 2005-07-18  Bruno Haible  <bruno@clisp.org>
9760
9761         * lib/lock.h (gl_once_t): New type.
9762         (gl_once_define, gl_once): New macros.
9763         * lib/lock.c (fresh_once): New variable.
9764         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
9765         functions.
9766
9767 2005-07-16  Simon Josefsson  <jas@extundo.com>
9768
9769         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
9770         workaround, suggested by Bruno.
9771
9772 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
9773
9774         * modules/xalloc (Depends-on): Add xalloc-die.
9775         * modules/xvasprintf (Depends-on): Add xalloc-die.
9776
9777 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
9778
9779         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
9780         with a minor change.
9781
9782 2005-07-15  Bruno Haible  <bruno@clisp.org>
9783
9784         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
9785         When using lib/poll.c, define poll as rpl_poll.
9786
9787 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
9788
9789         * modules/argp (Depends-on): Remove unlocked-io.
9790
9791 2005-07-14  Derek Price  <derek@ximbiot.com>
9792
9793         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
9794         for glob symlink bug.
9795
9796 2005-07-14  Bruno Haible  <bruno@clisp.org>
9797
9798         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
9799         Instead, test for *_unlocked function declarations directly.
9800
9801 2005-07-11  Simon Josefsson  <jas@extundo.com>
9802
9803         * modules/size_max: New file.
9804
9805         * modules/xsize: Depend on size_max module for size_max.m4.
9806
9807 2005-07-11  Simon Josefsson  <jas@extundo.com>
9808
9809         * lib/size_max.h: New file.
9810
9811 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
9812
9813         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
9814         copyright symbol and the year.
9815         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
9816         (version_etc_va): Use parameterized copyright notice.
9817         Reword to conform to the current GNU coding standards.
9818
9819 2005-07-11  Karl Berry  <karl@gnu.org>
9820
9821         * doc/gnulib.texi (Quoting): new node.
9822         (Initial import): more info, from Patrice.
9823
9824 2005-07-11  Bruno Haible  <bruno@clisp.org>
9825
9826         * gnulib-tool (func_usage): Document option --avoid.
9827         (Command line options): Handle --avoid.
9828         (func_acceptable): New function.
9829         (func_modules_transitive_closure): Use it.
9830
9831 2005-07-11  Bruno Haible  <bruno@clisp.org>
9832
9833         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
9834         Reported by Jim Meyering.
9835
9836 2005-07-10  Bruno Haible  <bruno@clisp.org>
9837
9838         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
9839         Needed when size_t is smaller than 'unsigned int'.
9840         Reported by Paul Eggert.
9841
9842 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9843
9844         * modules/argp (Depends-on): Add unlocked-io
9845
9846 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9847
9848         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
9849         block of defines.
9850
9851 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
9852
9853         * config/srclist.txt: Comment out regcomp.c, since we have a porting
9854         fix now.
9855
9856 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
9857         and Paul Eggert  <eggert@cs.ucla.edu>
9858
9859         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
9860         in wint_t, not wchar_t.  Remove now-unnecessary cast.
9861
9862 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
9863
9864         * modules/regex (Files): Add lib/regex_internal.c,
9865         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
9866         (Depends-on): Add extensions.
9867         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
9868
9869 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
9870
9871         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
9872         pathconf.
9873         * m4/same.m4 (gl_SAME): Likewise.
9874         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
9875
9876         * m4/regex.m4: Adjust to new libc regex implementation.
9877         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
9878         all the .c and .h parts of (the new) regex.
9879         Quote the m4 stuff better.
9880         Check for RE_ICASE bug of old gnulib.
9881         Check for REG_STARTEND of recent libc.
9882         Rename local variables from jm_* to gl_*.
9883         Quote operand of "test -f".
9884         Say "recent enough" version of libc, not "version 2".
9885         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
9886         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
9887         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
9888         Remove check for btowc, isascii.
9889         Require AM_LANGINFO_CODESET.
9890
9891 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
9892
9893         * lib/regex.c, regex.h: Sync from libc.
9894         * lib/regcomp.c, regexec_internal.c, regex_internal.h, regexec.c:
9895         New files, synced from libc, except that regex_internal.h
9896         currently has a small porting fix.
9897
9898 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
9899
9900         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
9901         regex_internal.c, regexec.c.
9902         Add regex_internal.h too, but as a comment, since the libc version
9903         is currently broken in gnulib mode.
9904
9905 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9906
9907         Support programs like Emacs that use gnulib but not gettext.
9908         * MODULES.html.sh (Internationalization functions): Add gettext-h.
9909         * modules/gettext-h: New file.
9910         * modules/gettext (Files): Remove lib/gettext.h.
9911         (Depends-on): Add gettext-h.
9912         (Makefile.am): Remove lib_SOURCES.
9913         * modules/argmatch, modules/c-stack, modules/closeout:
9914         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
9915         * modules/execute, modules/file-type, modules/getaddrinfo:
9916         * modules/getopt, modules/human, modules/javacomp:
9917         * modules/javaexec, modules/mkdir-p, modules/obstack:
9918         * modules/openat, modules/pagealign_alloc, modules/pipe:
9919         * modules/quotearg, modules/regex, modules/rpmatch:
9920         * modules/unicodeio, modules/userspec, modules/version-etc:
9921         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
9922         * modules/xsetenv:
9923         Depend on gettext-h, not gettext.
9924
9925 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
9926
9927         * gnulib-tool (func_import): Add support for 'public domain' license.
9928         * modules/alloca, modules/atexit, modules/memmove:
9929         Now public domain, not GPL.
9930         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
9931         * modules/realloc, modules/strerror, modules/strtod:
9932         Now LGPL, not GPL.
9933
9934 2005-07-05  Bruno Haible  <bruno@clisp.org>
9935
9936         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
9937         autoconf CVS. Needed for mingw.
9938
9939 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9940
9941         Remove the dependency of the strftime module on the tzset module.
9942         * modules/strftime (Depends-on): Remove dependency on tzset.
9943
9944 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9945
9946         Remove the dependency of the strftime module on the tzset module.
9947         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
9948         gl_FUNC_TZSET_CLOBBER.
9949
9950 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9951
9952         Remove the dependency of the strftime module on the tzset module.
9953         * lib/strftime.c (my_strftime)
9954         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
9955         Copy the input structure, to work around some of the bug with
9956         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
9957         Solaris releases, you should also use the tzset module, but we won't
9958         require it as a dependency any more since we don't want LGPLed code
9959         to depend on GPLed code.
9960
9961 2005-07-02  Jim Meyering  <jim@meyering.net>
9962
9963         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
9964         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
9965         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
9966         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
9967
9968 2005-07-02  Jim Meyering  <jim@meyering.net>
9969
9970         * lib/backupfile.c (backup_args): Change a `0' to NULL.
9971
9972 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9973
9974         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
9975         declares only 'struct timespec;' (!).
9976
9977 2005-07-01  Jim Meyering  <jim@meyering.net>
9978
9979         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
9980         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
9981         * lib/save-cwd.c, tempname.c:
9982         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
9983         and don't include <sys/file.h>).
9984
9985 2005-06-29  Jim Meyering  <jim@meyering.net>
9986
9987         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
9988         type name.  Use the variable name instead.
9989         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
9990         Likewise.
9991
9992 2005-06-28  Simon Josefsson  <jas@extundo.com>
9993
9994         * modules/check-version (Files): Add check-version.m4.
9995
9996 2005-06-28  Simon Josefsson  <jas@extundo.com>
9997
9998         * m4/check-version.m4: New file, suggested by Jim Meyering
9999         <jim@meyering.net>.
10000
10001 2005-06-28  Simon Josefsson  <jas@extundo.com>
10002
10003         * lib/check-version.h, check-version.c: New files.
10004
10005 2005-06-28  Simon Josefsson  <jas@extundo.com>
10006
10007         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
10008         collision with global variable.  Better indentation.  Don't
10009         increment buffer pointer beyond buffer end.  Based on comments
10010         from Paul Eggert <eggert@cs.ucla.edu>.
10011
10012         * lib/base64.h: Indent.
10013
10014 2005-06-28  Simon Josefsson  <jas@extundo.com>
10015
10016         * doc/gnulib.texi (Library version handling): New section.
10017
10018 2005-06-28  Jim Meyering  <jim@meyering.net>
10019
10020         * check-module (find_included_lib_files): Hard-code another
10021         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
10022         but modules/fts-lgpl (correctly) does not list those files.
10023
10024         * modules/canonicalize (Files): Add lib/pathmax.h.
10025
10026 2005-06-25  Simon Josefsson  <jas@extundo.com>
10027
10028         * modules/check-version: New file.
10029
10030 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
10031
10032         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
10033         initializer of struct addrinfo, as an indication that we don't
10034         care how many members the structure has.
10035
10036 2005-06-24  Derek Price  <derek@ximbiot.com>
10037         and Bruno Haible  <bruno@clisp.org>
10038
10039         Remove stat module & update lstat.
10040         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
10041         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
10042         * m4/stat.m4: Remove this file.
10043
10044 2005-06-24  Derek Price  <derek@ximbiot.com>
10045         and Bruno Haible  <bruno@clisp.org>
10046
10047         Remove stat module & update lstat.
10048         * lib/stat.c: Remove this file...
10049         (slash_aware_lstat): ...moving this content and its support...
10050         * lib/lstat.c (rpl_lstat): ...into here.
10051         * lib/lstat.h: New file.
10052
10053 2005-06-24  Derek Price  <derek@ximbiot.com>
10054         and Bruno Haible  <bruno@clisp.org>
10055
10056         Remove stat module & update lstat.
10057         * config/srclist.txt (libc sources): Remove stat.
10058
10059 2005-06-24  Derek Price  <derek@ximbiot.com>
10060         and Bruno Haible  <bruno@clisp.org>
10061
10062         Remove stat module & update lstat.
10063         * MODULES.html.sh (stat): Remove.
10064         * MODULES.html: Regenerated.
10065         * modules/lstat (Description): Correct function name.
10066         (Files): Add "lstat.h".
10067         (Depends-on): Remove stat, add xalloc, stat-macros.
10068         * modules/stat: Remove this file.
10069         (Include): Add "lstat.h", remove <sys/stat.h>.
10070
10071 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
10072
10073         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
10074         (ranged_convert): Don't save conversion in a temporary struct.
10075         This causes a warning with GCC 4.0.0, and anyway in the typical
10076         case it's not worth the extra 100 bytes or so of code.
10077         (ranged_convert, __mktime_internal): When calling a function via a
10078         pointer P, use P () rather than (*P) (), as we now assume C89 or
10079         better.
10080
10081 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
10082
10083         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
10084         "who -r" failed to give output.  Problem reported by Tim Waugh.
10085
10086         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
10087         (xcalloc): Use it to avoid needless tests.
10088         Problem reported by Jim Meyering.
10089
10090 2005-06-20  Derek Price  <derek@ximbiot.com>
10091
10092         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
10093         unnecessary for Autoconfs > 2.59c.
10094
10095 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
10096
10097         * lib/argp.h (__option_is_short): Check upper limit of
10098         __key. Isprint() requires its argument to have the value
10099         of an unsigned char or EOF.
10100
10101 2005-06-16  Jim Meyering  <jim@meyering.net>
10102
10103         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
10104         when either N or S is zero.
10105
10106 2005-06-16  Derek Price  <derek@ximbiot.com>
10107
10108         * m4/bison.m4: Declare YACC & YFLAGS precious.
10109
10110 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
10111
10112         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
10113         multibyte string or pattern, fall back on unibyte matching.
10114         Problem reported by James Youngman.
10115
10116 2005-06-08  Bruno Haible  <bruno@clisp.org>
10117
10118         * modules/csharpcomp: New file.
10119         * MODULES.html.sh (C#): Add csharpcomp.
10120
10121 2005-06-08  Bruno Haible  <bruno@clisp.org>
10122
10123         * m4/csharpcomp.m4: New file, from GNU gettext.
10124
10125 2005-06-08  Bruno Haible  <bruno@clisp.org>
10126
10127         * lib/csharpcomp.h: New file, from GNU gettext.
10128         * lib/csharpcomp.c: New file, from GNU gettext.
10129         * lib/csharpcomp.sh.in: New file, from GNU gettext.
10130
10131 2005-06-08  Bruno Haible  <bruno@clisp.org>
10132
10133         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
10134         warning on mingw.
10135
10136 2005-06-07  Derek Price  <derek@ximbiot.com>
10137
10138         Sync from CVS.
10139         * lib/glob_.h: Indent nested #ifdef.
10140
10141 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
10142
10143         Sync from coreutils.
10144         Use "file name" when talking about file names, instead of "filename"
10145         or "path", as per the GNU coding standards.
10146         * lib/mkdir-p.c: Renamed from makepath.c.
10147         (make_dir_parents): Renamed from make_path.  All callers changed.
10148         * lib/mkdir-p.h: Likewise.  All includers changed.
10149         * lib/filenamecat.c: Renamed from path-concat.c.
10150         (file_name_concat): Renamed from path_concat.  All callers changed.
10151         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
10152         * lib/filenamecat.h: Likewise.  All includers changed.
10153         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
10154         in comments or local variable names.
10155         * lib/basename.c: Likewise.
10156         * lib/canonicalize.c, canonicalize.h: Likewise.
10157         * lib/dirname.c, dirname.h: Likewise.
10158         * lib/euidaccess.c: Likewise.
10159         * lib/exclude.c: Likewise
10160         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
10161         * lib/fsusage.c, fsuage.h: Likewise.
10162         * lib/fts.c, fts_.h: Likewise.
10163         * lib/getcwd.c: Likewise.
10164         * lib/getloadavg.c: Likewise.
10165         * lib/mkstemp.c: Likewise.
10166         * lib/mountlist.c, mountlist.h: Likewise.
10167         * lib/openat.c, openat.h: Likewise.
10168         * lib/readlink-stub.c: Likewise.
10169         * lib/readutmp.c, readutmp.h: Likewise.
10170         * lib/rename.c: Likewise.
10171         * lib/rmdir.c: Likewise.
10172         * lib/same.c: Likewise.
10173         * lib/savedir.c: Likewise.
10174         * lib/stripslash.c: Likewise.
10175         * lib/tempname.c: Likewise.
10176         * lib/xreadlink.c: Likewise.
10177         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
10178         All uses changed.
10179         * lib/exclude.h: Likewise.
10180
10181         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
10182         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
10183         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
10184         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
10185         * lib/pathmax.h: Include <limits.h> unconditionally, since other
10186         files have been getting away with it for years (MORE/BSD 4.3
10187         is extinct now).
10188         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
10189         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
10190
10191         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
10192         Define to 256, not 255, as per modern POSIX.
10193
10194 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
10195
10196         Sync from coreutils.
10197         Use "file name" when talking about file names, instead of "filename"
10198         or "path", as per the GNU coding standards.
10199         * MODULES.html.sh: mkdir-p renamed from makepath.
10200         filenamecat renamed from path-concat.
10201         * modules/filenamecat: Renamed from modules/path-concat.
10202         (Files): filenamecat.h and filenamecat.c renamed from
10203         path-concat.h and path-concat.c.
10204         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
10205         (Include): filenamecat.h, not path-concat.h.
10206         * modules/mkdir-p: Renamed from modules/makepath.
10207         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
10208         makepath.c.
10209         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
10210         (Include): mkdir-p.h, not makepath.h.
10211
10212 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
10213
10214         Sync from coreutils.
10215         * m4/mkdir-p.m4: Renamed from makepath.m4.
10216         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
10217         Rename files from makepath.c to mkdir-p.c, and from
10218         makepath.h to mkdir-p.h.
10219         * m4/filenamecat.m4: Renamed from path-concat.m4.
10220         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
10221         Rename files from path-concat.c to filenamecat.c,
10222         and from path-concat.h to filenamecat.h.
10223         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
10224         "file name" in local variables or comments.
10225         * m4/rename.m4: Likewise.
10226
10227 2005-06-01  Bruno Haible  <bruno@clisp.org>
10228
10229         * modules/csharpexec: New file.
10230         * MODULES.html.sh (C#): New section.
10231
10232 2005-06-01  Bruno Haible  <bruno@clisp.org>
10233
10234         * m4/csharp.m4: New file, from GNU gettext.
10235         * m4/csharpexec.m4: New file, from GNU gettext.
10236
10237 2005-06-01  Bruno Haible  <bruno@clisp.org>
10238
10239         * lib/csharpexec.h: New file, from GNU gettext.
10240         * lib/csharpexec.c: New file, from GNU gettext.
10241         * lib/csharpexec.sh.in: New file, from GNU gettext.
10242
10243 2005-05-31  Derek Price  <derek@ximbiot.com>
10244             Paul Eggert  <eggert@cs.ucla.edu>
10245
10246         Sync from cvs.
10247         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
10248
10249 2005-05-31  Derek Price  <derek@ximbiot.com>
10250             Paul Eggert  <eggert@cs.ucla.edu>
10251
10252         Sync from cvs.
10253         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
10254
10255 2005-05-29  Derek Price  <derek@ximbiot.com>
10256
10257         * config/srclist.txt (glob_.h, glob.c): Add these files.
10258
10259 2005-05-29  Derek Price  <derek@ximbiot.com>
10260
10261         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
10262         * modules/glob: New file.
10263         * modules/getlogin_r: Add link to POSIX spec in description.
10264
10265 2005-05-29  Derek Price  <derek@ximbiot.com>
10266             Paul Eggert  <eggert@cs.ucla.edu>
10267
10268         * m4/glob.m4: New file.
10269
10270 2005-05-29  Derek Price  <derek@ximbiot.com>
10271             Paul Eggert  <eggert@cs.ucla.edu>
10272
10273         * lib/glob_.h, glob.c: New files.
10274
10275 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
10276
10277         * modules/fts (Files): Remove m4/inttypes-pri.m4.
10278         * modules/fts-lgpl (Depends-on): Remove gettext.
10279
10280 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
10281
10282         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
10283         and don't require gt_INTTYPES_PRI.
10284
10285 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
10286
10287         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
10288
10289         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
10290         the configuration hassle isn't worth it.
10291         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
10292         (LONGEST_MODIFIER, PRIuMAX): Remove.
10293
10294 2005-05-27  Bruno Haible  <bruno@clisp.org>
10295
10296         * lib/getlogin_r.h: Remove second include of <stddef.h>.
10297
10298 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
10299
10300         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
10301         _POSIX_PTHREAD_SEMANTICS for Solaris.
10302
10303 2005-05-25  Derek Price  <derek@ximbiot.com>
10304
10305         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
10306
10307 2005-05-25  Derek Price  <derek@ximbiot.com>
10308             Paul Eggert  <eggert@cs.ucla.edu>
10309
10310         * modules/getlogin_r: New files.
10311
10312 2005-05-25  Derek Price  <derek@ximbiot.com>
10313             Paul Eggert  <eggert@cs.ucla.edu>
10314
10315         * m4/getlogin_r.m4: New files.
10316
10317 2005-05-25  Derek Price  <derek@ximbiot.com>
10318             Paul Eggert  <eggert@cs.ucla.edu>
10319
10320         * lib/getlogin_r.c, getlogin_r.h: New files.
10321
10322 2005-05-25  Bruno Haible  <bruno@clisp.org>
10323             Derek Price  <derek@ximbiot.com>
10324
10325         * lib/getlogin_r.h: Simplify API documentation.
10326
10327 2005-05-23  Derek Price  <derek@ximbiot.com>
10328
10329         * modules/minmax (Files): Add m4/minmax.m4.
10330         (configure.ac): Add gl_MINMAX.
10331
10332 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
10333
10334         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
10335         so that unistd-safer.h (GPL'ed code) need not be included.
10336
10337 2005-05-22  Bruno Haible  <bruno@clisp.org>
10338
10339         * m4/minmax.m4: New file.
10340         Based on a patch by Derek Price <derek@ximbiot.com>.
10341
10342 2005-05-22  Bruno Haible  <bruno@clisp.org>
10343
10344         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
10345         (INT64_MIN): Fix definition.
10346         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
10347
10348         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
10349         NEED_SIGNED_INT_TYPES.
10350
10351         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
10352         HAVE_SYSTEM_INTTYPES.
10353
10354 2005-05-22  Bruno Haible  <bruno@clisp.org>
10355
10356         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
10357         Also include <sys/param.h> if it defines MIN, MAX.
10358         Based on a patch by Derek Price <derek@ximbiot.com>.
10359
10360 2005-05-21  Jim Meyering  <jim@meyering.net>
10361
10362         * modules/fts (Files): Add m4/inttypes-pri.m4.
10363         (Depends-on): Add lstat and remove gettext.  Alphabetize.
10364
10365 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
10366
10367         New fts module.
10368         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
10369         (setup_dir, free_dir): New functions.
10370         (enter_dir, leave_dir): Define trivial
10371         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
10372         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
10373         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
10374         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
10375         Move to fts-cycle.c.
10376         (fts_open): Use setup_dir.
10377         (fts_close): Use free_dir.
10378         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
10379         This adds a label and some gotos, but the alternatives were messier.
10380         Check for memory allocation failure when entering a dir.
10381         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
10382         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
10383         (FTS): New member fts_cycle, that is a union that contains the
10384         old active_dir_ht and cycle_state.  All uses changed to mention
10385         fts_cycle.ht and fts_cycle.state.
10386         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
10387         fts.c, with the following changes:
10388         (setup_dir, free_dir): New functions.
10389         (enter_dir): Now returns bool.  Return true if successful, false
10390         if memory exhausted.  All callers changed.
10391         Do not bother partly cleaning up on
10392         memory allocation failure; that is free_dir's job.
10393         However, free ad if hash_insert fails, to avoid memory leak.
10394         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
10395         fts->fts_options to see which union member to use.
10396
10397 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
10398
10399         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
10400         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
10401
10402 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
10403
10404         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
10405
10406 2005-05-20  Jim Meyering  <jim@meyering.net>
10407
10408         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
10409         Now a macro, to pacify GCC.
10410
10411 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
10412
10413         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
10414         of -1.
10415
10416 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
10417
10418         * lib/chown.c (rpl_chown): Return -1 on failure.
10419
10420 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
10421
10422         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
10423         Don't check for stddef.h.
10424         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
10425         don't use its results.
10426         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
10427         since we include them unconditionally.  Don't require
10428         AM_STDBOOL_H, since stdbool is a prerequisite.
10429         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
10430         since we assume C89 or better.
10431         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
10432         as we don't use their results.
10433         Don't check for fchdir, memmove, memset, strrchr, as we use
10434         them unconditionally.
10435         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
10436         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
10437
10438 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
10439
10440         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
10441         Include <stddef.h> unconditionally, since we assume C89 now.
10442         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
10443         * lib/fts.c: Include fts_.h first, to check interface.
10444         Do not include intprops.h; no longer needed.
10445         Include cycle-check.h and hash.h, since fts_.h no longer does.
10446         Remove unnecessary casts of closedir to void.
10447         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
10448         decide whether to decrement nlinks.
10449         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
10450         (FTS): Use struct hash_table * instead of Hash_table, so that
10451         we no longer need to include hash.h here.
10452
10453 2005-05-18  Jim Meyering  <jim@meyering.net>
10454
10455         * modules/dirfd (License): Change to LGPL.  Most of the code
10456         is already in the public domain.
10457
10458 2005-05-18  Jim Meyering  <jim@meyering.net>
10459
10460         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
10461         Reported by Yoann Vandoorselaere.
10462
10463 2005-05-17  Jim Meyering  <jim@meyering.net>
10464
10465         * m4/fts.m4: New file, from coreutils.
10466
10467 2005-05-17  Jim Meyering  <jim@meyering.net>
10468
10469         * lib/fts.c, fts_.h: New files, from coreutils.
10470
10471 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10472
10473         Sync from coreutils.
10474         * m4/unlinkdir.m4: New file.
10475
10476 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10477
10478         Sync from coreutils.
10479         * lib/unlinkdir.c, unlinkdir.h: New files.
10480         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
10481         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
10482         White space changes only.
10483         * lib/makepath.c (make_path): Port to hosts where leading "//" is
10484         special.
10485         * lib/yesno.c: Include getline.h, not ctype.h.
10486         (yesno): Don't remove leading white space; POSIX doesn't allow it.
10487         Use getline to remove arbitrary restriction on response length.
10488
10489 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10490
10491         * config/srclist-update: Spell out "Street" in FSF postal
10492         mail address; this is the style the FSF seems to prefer.
10493
10494         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
10495         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
10496         this updates FSF postal mail address.
10497
10498         Sync from coreutils.
10499         * modules/unlinkdir: New file.
10500         * modules/yesno (Depends-on): Add getline.
10501         * MODULES.html.sh (File system functions): Add unlinkdir.
10502
10503 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
10504
10505         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
10506         lib/strsep.h:
10507         Change the initial comment to refer to GPL, not LGPL.
10508         gnulib-tool will change it to LGPL as needed.
10509
10510         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
10511         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
10512         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
10513         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
10514         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
10515         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
10516         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
10517         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
10518         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
10519         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
10520         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
10521         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
10522         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
10523         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
10524         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
10525         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
10526         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
10527         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
10528         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
10529         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
10530         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
10531         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
10532         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
10533         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
10534         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
10535         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
10536         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
10537         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
10538         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
10539         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
10540         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
10541         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
10542         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
10543         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
10544         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
10545         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
10546         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
10547         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
10548         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
10549         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
10550         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
10551         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
10552         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
10553         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
10554         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
10555         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
10556         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
10557         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
10558         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
10559         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
10560         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
10561         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
10562         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
10563         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
10564         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
10565         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
10566         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
10567         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
10568         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
10569         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
10570         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
10571         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
10572         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
10573         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
10574         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
10575         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
10576         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
10577         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
10578         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
10579         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
10580         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
10581         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
10582         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
10583         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
10584         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
10585         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
10586         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
10587         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
10588         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
10589         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
10590         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
10591         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
10592         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
10593         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
10594         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
10595         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
10596         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
10597         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
10598         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
10599         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
10600         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
10601         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
10602         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
10603         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
10604         lib/yesno.c, lib/yesno.h:
10605         Update FSF postal mail address.
10606
10607 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
10608
10609         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
10610         tests/test-memmem.c, tests/test-stpncpy.c:
10611         Update FSF postal mail address.
10612
10613 2005-05-13  Bruno Haible  <bruno@clisp.org>
10614
10615         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
10616         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
10617         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
10618         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
10619         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
10620         Add support for 64-bit integers in the MSVC compiler.
10621
10622 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
10623
10624         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
10625
10626 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
10627
10628         * gnulib-tool (func_import): Sort and uniquify recommended includes.
10629
10630 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
10631
10632         * doc/getdate.texi (General date syntax): Don't say that date
10633         date --iso-8601=ns generates acceptable dates; it doesn't yet.
10634         Problem reported by Nic Ferrier.
10635
10636 2005-05-10  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
10637
10638         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
10639         specified in ai_socktype. Fix invalid ai_protocol
10640         check. ai_protocol is usually set to 0 or depending on
10641         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
10642         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
10643         ai_socktype / ai_protocol in the returned addrinfo structure.
10644
10645 2005-05-10  Simon Josefsson  <jas@extundo.com>
10646
10647         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
10648         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
10649
10650 2005-05-10  Karl Berry  <karl@gnu.org>
10651
10652         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
10653         (from http://www.gnu.org/licenses).
10654         * doc/COPYING.LIB: also rename to COPYING.LESSER.
10655         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
10656         fdl.texi suffices.
10657
10658 2005-05-10  Karl Berry  <karl@gnu.org>
10659
10660         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
10661         (COPYING.DOC): remove.
10662
10663         * config/srclist-update: new FSF address.
10664
10665 2005-05-10  Derek Price  <derek@ximbiot.com>
10666
10667         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
10668         possible.
10669
10670 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
10671             Bruno Haible  <bruno@clisp.org>
10672
10673         * modules/inet_ntop: New file.
10674         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10675         inet_ntop.
10676
10677 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
10678             Bruno Haible  <bruno@clisp.org>
10679
10680         * m4/inet_ntop.m4: New file.
10681
10682 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
10683             Bruno Haible  <bruno@clisp.org>
10684
10685         * lib/inet_ntop.h: New file.
10686         * lib/inet_ntop.c: New file, from glibc with modifications.
10687
10688 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
10689
10690         * modules/time_r (License): Change to LGPL.
10691         * modules/extensions (License): Change to LGPL.  Actually,
10692         the license is more permissive than that, but currently gnulib-tool
10693         doesn't know how to handle more-permissive licenses.
10694
10695         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
10696         Problem reported by Dave Love.
10697
10698 2005-05-08  Jim Meyering  <jim@meyering.net>
10699
10700         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
10701         blank.
10702
10703 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
10704
10705         * modules/argmatch (Depends-on): Add stdbool.
10706         * modules/backupfile (Depends-on): Likewise.
10707         * modules/chdir-long (Depends-on): Likewise.
10708         * modules/closeout (Depends-on): Likewise.
10709         * modules/cycle-check (Depends-on): Likewise.
10710         * modules/dirname (Depends-on): Likewise.
10711         * modules/fnmatch (Depends-on): Likewise.
10712         * modules/fsusage (Depends-on): Likewise.
10713         * modules/fwriteerror (Depends-on): Likewise.
10714         * modules/getcwd (Depends-on): Likewise.
10715         * modules/getloadavg (Depends-on): Likewise.
10716         * modules/hard-locale (Depends-on): Likewise.
10717         * modules/makepath (Depends-on): Likewise.
10718         * modules/mountlist (Depends-on): Likewise.
10719         * modules/nanosleep (Depends-on): Likewise.
10720         * modules/posixtm (Depends-on): Likewise.
10721         * modules/quotearg (Depends-on): Likewise.
10722         * modules/readtokens (Depends-on): Likewise.
10723         * modules/readtokens0 (Depends-on): Likewise.
10724         * modules/readutmp (Depends-on): Likewise.
10725         * modules/save-cwd (Depends-on): Likewise.
10726         * modules/strftime (Depends-on): Likewise.
10727         * modules/userspec (Depends-on): Likewise.
10728         * modules/utimecmp (Depends-on): Likewise.
10729         * modules/xgetcwd (Depends-on): Likewise.
10730         * modules/xnanosleep (Depends-on): Likewise.
10731         * modules/xstrtod (Depends-on): Likewise.
10732         * modules/yesno (Depends-on): Likewise.
10733
10734 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
10735
10736         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
10737         needless checks.
10738
10739 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
10740
10741         Merge from coreutils.  Among other things,
10742         add bulletproofing for cases where stdin, stdout, or stderr are closed.
10743         * lib/fd-safer.c: New file.
10744         * lib/fcntl-safer.h, open-safer.c: Remove.
10745         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
10746         * lib/dup-safer.c: Include unistd-safer.h first.
10747         Don't include errno.h.
10748         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
10749         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
10750         * lib/file-type.c: Rely on file-type.h change.
10751         * lib/getloadavg.c: Include unistd-safer.h.
10752         (getloadavg): Use safer open.
10753         * lib/getusershell.c: Include "stdio-safer.h".
10754         (getusershell): Use safer fopen.
10755         * lib/long-options.c (long_options): Use NULL rather than 0.
10756         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
10757         'free'.
10758         * lib/modechange.c: Likewise.
10759         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
10760         (MODE_DONE): New constant.
10761         (struct mode_change): Remove 'next' member.
10762         (make_node_op_equals): New function; like the old one of the
10763         same name, except it allocates an array.
10764         (mode_compile, mode_create_from_ref): Use it.
10765         (mode_compile): Allocate result as an array, not a linked list.
10766         Parse octal string ourself, so that we catch mistakes like "+0".
10767         (mode_adjust): Arg is an array, not a linked list.
10768         * lib/modechange.c: Include stat-macros.h, xalloc.h.
10769         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
10770         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
10771         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
10772         Remove.  This is now stat-macros.h's job.
10773         (talloc): Remove.  All callers replaced by xalloc, so that
10774         our invokers don't have to worry about reporting memory failures.
10775         (make_node_op_equals): Remove.
10776         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
10777         New constants.
10778         (struct mode_change): Moved here from modechange.h.
10779         (mode_append_entry): Remove.
10780         (mode_compile): Remove MASKED_OPS arg, since it encouraged
10781         apps to have incorrect behavior.  Use simpler algorithm for head
10782         and tail.  Don't futz with umask; that's now the job of mode_adjust.
10783         Detect more invalid usages rather than having somewhat-random behavior.
10784         Don't insert an "a=" action, as that leads to incorrect behavior.
10785         (mode_compile, mode_create_from_ref): Return NULL on error instead
10786         of an enum, since now there's only one way to have an error.  All
10787         callers changed.
10788         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
10789         at the correct time.  Simplify calculation of "+u" and its ilk.
10790         Don't mishandle "+X".
10791         (mode_free): Remove "register" and localize decls.
10792         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
10793         (struct mode_change): Move to modechange.c; callers don't
10794         need to see this stuff.
10795         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
10796         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
10797         (mode_change, mode_adjust): Reflect the new signatures noted above.
10798         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
10799         that might redefine system include files.
10800         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
10801         (my_usleep): Use NULL rather than (void *) 0.
10802         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
10803         Use siginterrupt to specify that system calls should be interrupted.
10804         (rpl_nanosleep): Move initialization of suspended closer to call of
10805         my_usleep.
10806         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
10807         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
10808         (desirable_utmp_entry): New function.
10809         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
10810         using x2nrealloc, to simplify logic.
10811         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
10812         size calculation.  Do not assume utmp file is a regular file.
10813         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
10814         (READ_UTMP_CHECK_PIDS): New constant.
10815         * lib/save-cwd.c: Include unistd-safer.h.
10816         (save_cwd): Use fd_safer.
10817         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
10818         [!_LIBC] Include "stat-macros.h" instead.
10819         * lib/unistd-safer.h (fd_safer): New decl.
10820
10821 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
10822
10823         * modules/getloadavg (Depends-on): Add unistd-safer.
10824         * modules/getusershell (Depends-on): Add stdio-safer.
10825         * modules/lstat (Depends-on): Remove xalloc.
10826         * modules/mkstemp (Depends-on): Add stat-macros.
10827         * modules/modechange (Depends-on): Remove xstrtol.
10828         Add stat-macros, xalloc.
10829         * modules/save-cwd (Depends-on): Add unistd-safer.
10830         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
10831         * modules/unistd-safer (Files): Add lib/fd-safer.c
10832         (Makefile.am): Remove lib_SOURCES.
10833
10834         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
10835         Remove fcntl-safer; unistd-safer supersedes it.
10836
10837 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
10838
10839         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
10840         AC_HEADER_STAT.
10841         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
10842         (gl_PREREQ_CHOWN): Remove.
10843         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
10844         it.  Don't require AC_HEADER_STAT.
10845         (gl_PREREQ_LSTAT): Remove.
10846         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
10847         Don't require AC_HEADER_STAT.
10848         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
10849         (gl_PREREQ_RMDIR): Remove.
10850         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
10851         mention stat-macros.h or AC_HEADER_STAT, since we'll make
10852         the stat-macros module a prerequisite.
10853         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
10854         * m4/filemode.m4 (gl_FILEMODE): Likewise.
10855         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
10856         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
10857         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
10858         variable names.
10859         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
10860         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
10861         variable prefixes.
10862         * m4/fcntl-safer.m4: Remove.
10863         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
10864         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
10865         Invoke gl_PREREQ_FD_SAFER.
10866         (gl_PREREQ_FD_SAFER): New macro.
10867         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
10868         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
10869         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
10870         Remove duplicate call to AC_LIBOBJ(readutmp).
10871         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
10872
10873         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
10874         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
10875
10876 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
10877
10878         * MODULES.html.sh (Misc): Add byteswap.
10879
10880 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
10881
10882         * modules/getcwd (Depends-on): Add extensions.
10883         * modules/openat (Depends-on): Likewise.
10884
10885 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
10886
10887         * modules/byteswap: New file.
10888
10889 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
10890
10891         * m4/byteswap.m4: New file.
10892
10893 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
10894
10895         * lib/byteswap_.h: New file.
10896
10897 2005-04-25  Karl Berry  <karl@gnu.org>
10898
10899         * m4/gettext.m4: Update from GNU gettext 0.14.4.
10900
10901 2005-04-25  Albert Chin  <china@thewrittenword.com>
10902
10903         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
10904         Toolkit C bug.
10905
10906 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
10907
10908         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
10909         (func_ln_if_changed) Remove forcibly for no error message
10910         in case file does not exist.
10911
10912 2005-04-19  Simon Josefsson  <jas@extundo.com>
10913
10914         * gnulib-tool (Options): Make --symlink mean --symbolic.
10915
10916 2005-04-18  Oskar Liljeblad <oskar@osk.mine.nu>
10917
10918         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
10919
10920 2005-04-16  Simon Josefsson  <jas@extundo.com>
10921
10922         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
10923
10924 2005-04-15  Simon Josefsson  <jas@extundo.com>
10925
10926         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
10927
10928 2005-04-15  Simon Josefsson  <jas@extundo.com>
10929
10930         * gnulib-tool: Rename --symlink to --symbolic.
10931
10932 2005-04-15  Oskar Liljeblad <oskar@osk.mine.nu>
10933
10934         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
10935         symbolic links to files instead of copying/moving.  Add --aux-dir,
10936         specifying directory relative --dir where auxiliary build tools
10937         are placed.
10938
10939 2005-04-14  Bruno Haible  <bruno@clisp.org>
10940
10941         * modules/allocsa (License): Change to LGPL.
10942         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
10943
10944 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
10945
10946         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
10947         that "UTC +1 second" continues to work.  Problem reported
10948         by Dmitry V. Levin.
10949         (relunit_snumber): New rule.
10950         (relunit): Use it.
10951
10952 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
10953
10954         * lib/getdate.y (universal_time_zone_table): New constant.
10955         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
10956         universal_time_zone_table.
10957         (lookup_zone): Prefer universal_time_zone_table to
10958         local_time_zone_table, so that "GMT" time stamps are allowed in
10959         London during the summer.  Problem reported by Ian Abbott.
10960
10961 2005-04-12  Jim Meyering  <jim@meyering.net>
10962
10963         * lib/human.c (humblock): Set *options even when returning due to
10964         xstrtoumax conversion failure.  Thanks to a used-uninitialized
10965         warning from gcc-4.
10966
10967 2005-04-09  Jim Meyering  <jim@meyering.net>
10968
10969         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
10970         -Wuninitialized: initialize tm0.tm_year.
10971
10972 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
10973
10974         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
10975         count, since there's no maximum.  All uses changed.
10976         Add member dsts_seen.
10977         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
10978         not being INT_MAX.
10979         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
10980         Use pc_rels_seen to decide whther a date is absolute.
10981
10982         * lib/getdate.y (number): Don't overwrite year.
10983         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
10984         check.
10985
10986 2005-04-02  Simon Josefsson  <jas@extundo.com>
10987
10988         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
10989         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
10990
10991 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
10992
10993         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
10994         where no absolute path name can be longer than PATH_MAX.
10995
10996 2005-03-27  Jim Meyering  <jim@meyering.net>
10997
10998         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
10999
11000 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
11001
11002         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
11003         "one's complement" -> "ones' complement" in comment, as per Knuth.
11004         "value of type" -> "type or expression" in comment.
11005         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
11006
11007 2005-03-26  Jim Meyering  <jim@meyering.net>
11008
11009         Comment nits.
11010         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
11011         Correct typos: s/or/of/.
11012
11013 2005-03-26  Jim Meyering  <jim@meyering.net>
11014
11015         * modules/check-include-files: Move to ../ and rename to...
11016         * check-module: ...this.
11017
11018 2005-03-25  Jim Meyering  <jim@meyering.net>
11019
11020         * modules/xvasprintf (Files): Add xalloc.h.
11021
11022 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
11023
11024         * modules/gettext (Files): config/config.rpath ->
11025         build-aux/config.rpath
11026         * modules/iconv (Files): Likewise.
11027         Problem reported by Oskar Liljeblad.
11028
11029 2005-03-23  Jim Meyering  <jim@meyering.net>
11030
11031         * modules/check-include-files: New script to check for
11032         missing dependencies, multiple includes, etc.
11033
11034         * modules/c-strtold (Depends-on): Add xalloc.
11035         * modules/c-strtod (Depends-on): Add xalloc.
11036         * modules/hash (Depends-on): Add xalloc.
11037         (Files): Remove lib/xalloc.h.
11038
11039         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
11040         * modules/userspec (Files): Add lib/inttostr.h.
11041
11042 2005-03-23  Jim Meyering  <jim@meyering.net>
11043
11044         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
11045
11046 2005-03-22  Jim Meyering  <jim@meyering.net>
11047
11048         * modules/stat-macros: New module.
11049         * modules/canonicalize, modules/euidaccess, modules/file-type,
11050         * modules/filemode, modules/lchown, modules/makepath,
11051         * modules/rmdir, modules/stat: Depend on new stat-macros module
11052         rather than listing lib/stat-macros.h manually.
11053         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
11054
11055 2005-03-22  Jim Meyering  <jim@meyering.net>
11056
11057         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
11058
11059 2005-03-22  Bruno Haible  <bruno@clisp.org>
11060
11061         * config/srclist.txt: Replace target directory 'config' with
11062         'build-aux'.
11063         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
11064         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
11065         ../build-aux/.
11066
11067 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
11068
11069         * modules/chdir-long (Depends-on): Add mempcpy.
11070
11071         * modules/acl, modules/backupfile, modules/c-strtod,
11072         modules/c-strtold, modules/canon-host, modules/canonicalize,
11073         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
11074         modules/exclude, modules/exitfail, modules/file-type,
11075         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
11076         modules/getdate, modules/getline, modules/getpagesize,
11077         modules/getpass, modules/getugroups, modules/group-member,
11078         modules/hard-locale, modules/hash, modules/human, modules/idcache,
11079         modules/inttostr, modules/long-options, modules/makepath,
11080         modules/md5, modules/memcasecmp, modules/memcoll,
11081         modules/modechange, modules/mountlist, modules/path-concat,
11082         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
11083         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
11084         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
11085         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
11086         modules/strftime, modules/strndup, modules/strverscmp,
11087         modules/timespec, modules/unlocked-io, modules/userspec,
11088         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
11089         modules/yesno:
11090         Remove lib_SOURCES line from Makefile.am section, as this is now
11091         done automatically by the corresponding Autoconf macro.
11092
11093 2005-03-21  Jim Meyering  <jim@meyering.net>
11094
11095         Changes imported from coreutils.
11096
11097         * lib/cycle-check.c: Don't include xalloc.h.
11098
11099         * lib/path-concat.c: Don't include assert.h.
11100         (path_concat): Remove assertion that would have triggered
11101         for ABASE starting with more than one slash.
11102         Reported by Andreas Schwab.
11103
11104         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
11105         properly when ABASE is an absolute file name.
11106         Correct the description of this function.
11107         Include <assert.h>.
11108         Add an assertion and a test driver.
11109         This fixes a bug introduced on 2004-07-02.
11110         Andreas Schwab reported the resulting failure of cp --parents:
11111         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
11112
11113 2005-03-21  Jim Meyering  <jim@meyering.net>
11114
11115         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
11116         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
11117
11118 2005-03-21  Jim Meyering  <jim@meyering.net>
11119         and  Paul Eggert  <eggert@cs.ucla.edu>
11120
11121         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
11122         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
11123         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
11124         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
11125         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
11126         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
11127         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
11128         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
11129         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
11130         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
11131         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
11132         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
11133         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
11134         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
11135         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
11136         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
11137         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
11138         for these modules.
11139
11140 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
11141
11142         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
11143         (which shouldn't happen), generate nothing instead of returning 0
11144         immediately, so that nstrftime (NULL, ...) doesn't return 0.
11145
11146 2005-03-16  Bruno Haible  <bruno@clisp.org>
11147
11148         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
11149         HAVE_LONGLONG_64BIT.
11150
11151 2005-03-16  Bruno Haible  <bruno@clisp.org>
11152
11153         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
11154         HAVE_LONGLONG_64BIT.
11155
11156 2005-03-16  Bruno Haible  <bruno@clisp.org>
11157
11158         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
11159         HAVE_LONGLONG_64BIT.
11160
11161 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
11162
11163         * lib/strftime.c (my_strftime): Prepend space to format so that we can
11164         reliably distinguish strftime failure from empty output on POSIX
11165         hosts.
11166
11167 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
11168
11169         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
11170         (iconv_string): Don't guess a size-zero buffer, as that might cause
11171         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
11172         result would be 'too large', where 'too large' is (heuristically)
11173         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
11174         overflow concerns.  This will prevent some unwanted malloc failures
11175         when the inputs are very large.
11176
11177 2005-03-15  Karl Berry  <karl@gnu.org>
11178
11179         * config/srclist.txt (config.rpath): from gettext.
11180         * config/config.rpath: update.
11181
11182 2005-03-15  Bruno Haible  <bruno@clisp.org>
11183
11184         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
11185         to 'negate'.
11186
11187         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
11188         variable.
11189
11190         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
11191         results.
11192
11193 2005-03-14  Simon Josefsson  <jas@extundo.com>
11194
11195         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
11196         <fx@gnu.org>.
11197
11198 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
11199
11200         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
11201         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
11202         intprops.h.
11203         * lib/strtol.c: Likewise.
11204
11205 2005-03-14  Jim Meyering  <jim@meyering.net>
11206
11207         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
11208         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
11209         to be nonzero so that we (and caller) can detect the difference
11210         between a valid zero-length expansion and an error return, even
11211         when the underlying strftime fails before writing anything into
11212         that location.
11213
11214 2005-03-14  Bruno Haible  <bruno@clisp.org>
11215
11216         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
11217         Update from GNU gettext 0.14.3.
11218
11219 2005-03-10  Jim Meyering  <jim@meyering.net>
11220
11221         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
11222
11223 2005-03-10  Jim Meyering  <jim@meyering.net>
11224
11225         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
11226         so that this module works on systems without fchdir.
11227
11228 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
11229
11230         Factor int-properties macros into a single file, except for
11231         glibc-related files.
11232         * lib/intprops.h: New file.
11233         * lib/getloadavg.c: Include it instead of limits.h.
11234         (INT_STRLEN_BOUND): Remove.
11235         * lib/human.c: Include intprops.h.
11236         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
11237         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
11238         302/1000.
11239         * lib/inttostr.h: Include intprops.h instead of limits.h.
11240         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
11241         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
11242         for consistency with intprops.h.
11243         (time_t_is_integer, twos_complement_arithmetic): Use them.
11244         * lib/sig2str.h: Include <signal.h>, intprops.h.
11245         (INT_STRLEN_BOUND): Remove.
11246         * lib/strftime.c (TYPE_SIGNED): Remove.
11247         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
11248         * lib/strtol.c: Adjust comments to match intprops.h.
11249         * lib/userspec.c: Include intprops.h.
11250         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
11251         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
11252         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
11253         instead of rolling our own expressions.
11254         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
11255
11256         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
11257         instead of int.
11258         (my_strftime): Do not mishandle years close to INT_MAX, by doing
11259         the right thing even if adding 1900 would overflow.  Similarly
11260         for tm_mon + 1 and tm_yday + 1.
11261         Make %Y always equivalent to %C%y, and similarly for %G and %g.
11262         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
11263         (DO_SIGNED_NUMBER): New macro.
11264         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
11265
11266 2005-03-07  Bruno Haible  <bruno@clisp.org>
11267
11268         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
11269
11270 2005-03-07  Bruno Haible  <bruno@clisp.org>
11271
11272         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
11273
11274 2005-03-04  Derek R. Price  <derek@ximbiot.com>
11275
11276         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
11277         (func_import): Only replace files via --import when they have actually
11278         changed.
11279
11280 2005-03-03  Derek R. Price  <derek@ximbiot.com>
11281
11282         * m4/mmap-anon.m4: New file.
11283         * m4/pagealign_alloc.m4: New file.
11284
11285 2005-03-03  Derek R. Price  <derek@ximbiot.com>
11286             Bruno Haible  <bruno@clisp.org>
11287
11288         * modules/pagealign_alloc: New file.
11289         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
11290
11291 2005-03-03  Derek R. Price  <derek@ximbiot.com>
11292             Bruno Haible  <bruno@clisp.org>
11293
11294         * lib/pagealign_alloc.h: New file.
11295         * lib/pagealign_alloc.c: New file.
11296
11297 2005-03-03  Bruno Haible  <bruno@clisp.org>
11298
11299         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
11300         Use an all-permissive copyright notice, recommended by RMS.
11301
11302 2005-03-02  Bruno Haible  <bruno@clisp.org>
11303
11304         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
11305         of AIX, the replacement has to be done only after <string.h> is
11306         included, therefore not in config.h. stpncpy.h does the replacement,
11307         and stpncpy.c uses it.
11308
11309 2005-03-02  Bruno Haible  <bruno@clisp.org>
11310
11311         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
11312         stpncpy.c uses it.
11313
11314 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11315
11316         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
11317         The workaround isn't strictly needed for POSIX conformance, and
11318         it's too much of a pain to configure and maintain.  We'll ask
11319         people to fix their kernels instead.
11320         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
11321         (NANOSLEEP_BUG_WORKAROUND): Remove.
11322         (xnanosleep): Remove the workaround.
11323
11324 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11325
11326         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
11327         Reported by Derek Price.
11328         (Include): Add "timespec.h".
11329
11330         * modules/xnanosleep (Depends-on): Remove gethrxtime.
11331
11332 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11333
11334         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
11335         to detect nanosleep bug.
11336
11337 2005-03-01  Bruno Haible  <bruno@clisp.org>
11338
11339         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
11340
11341 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
11342
11343         * modules/gethrxtime: New file.
11344         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
11345         (Depends-on): Add gethrxtime.
11346         (configure.ac): Add gl_XNANOSLEEP.
11347         (Makefile.am): Remove lib_SOURCES line.
11348
11349 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
11350
11351         * m4/gethrxtime.m4, xnanosleep.m4: New files.
11352         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
11353
11354 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
11355
11356         * lib/gethrxtime.h, gethrxtime.c, xtime.h: New files.
11357         * lib/timespec.h (gettime): Return void, since it always
11358         succeeds now.  All uses changed.
11359         * lib/gettime.c (gettime) Likewise.
11360         [HAVE_NANOTIME]: Prefer nanotime.
11361         Assume gettimeofday succeeds, as POSIX requires.
11362         Assime time () succeeds, since other code already does.
11363         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
11364         (timespec_subtract): Remove.
11365         (NANOSLEEP_BUG_WORKAROUND): New constant.
11366         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
11367         things considerably.  Use it only on GNU/Linux hosts, since the
11368         workaround shouldn't be needed elsewhere.
11369
11370 2005-02-24  Bruno Haible  <bruno@clisp.org>
11371
11372         * modules/gettext (Files): Add m4/glibc2.m4.
11373
11374 2005-02-24  Bruno Haible  <bruno@clisp.org>
11375
11376         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
11377         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
11378         * m4/progtest.m4:
11379         Update from GNU gettext 0.14.2.
11380         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
11381
11382 2005-02-24  Bruno Haible  <bruno@clisp.org>
11383
11384         * lib/localcharset.c: Update from GNU gettext 0.14.2.
11385         * lib/config.charset: Update from GNU gettext 0.14.2.
11386
11387 2005-02-24  Bruno Haible  <bruno@clisp.org>
11388
11389         * lib/gettext.h: Update from GNU gettext 0.14.2.
11390
11391 2005-02-23  Simon Josefsson  <jas@extundo.com>
11392
11393         * m4/iconvme.m4: New file.
11394
11395 2005-02-23  Jim Meyering  <jim@meyering.net>
11396
11397         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
11398         change.
11399         Thanks to Bruno Haible for catching it.
11400
11401 2005-02-22  Simon Josefsson  <jas@extundo.com>
11402
11403         * modules/iconvme: New file.
11404
11405         * MODULES.html.sh: Add iconvme.
11406
11407 2005-02-22  Simon Josefsson  <jas@extundo.com>
11408
11409         * lib/iconvme.h, iconvme.c: New files, from libc.
11410
11411 2005-02-22  Simon Josefsson  <jas@extundo.com>
11412
11413         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
11414
11415 2005-02-22  Jim Meyering  <jim@meyering.net>
11416
11417         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
11418         s/ifndef/ifdef/.
11419
11420 2005-02-20  Neil Conway  <neilc@samurai.com>
11421
11422         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
11423         returned by OSX/Darwin if the specified buffer is not large
11424         enough for the hostname.
11425
11426 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11427
11428         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
11429         pass it to _help, otherwise the latter coredumps trying to
11430         dereference state.root_argp.
11431
11432 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
11433
11434         * modules/chdir-long (Depends-on): Add memrchr.
11435         * modules/memrchr (Files): Add lib/memrchr.h.
11436         (Include): "memrchr.h".
11437
11438 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
11439
11440         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
11441
11442 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
11443
11444         * lib/memrchr.h: New file.
11445         * lib/chdir-long.c: Include it.
11446         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
11447         Don't bother including stddef.h.
11448
11449 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
11450
11451         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
11452         inclusion.
11453         Include <sys/types.h>, for dev_t.
11454         (ME_DUMMY, ME_REMOTE): Move from here....
11455         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
11456         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
11457         Dmitry V. Levin.
11458         Include mountlist.h first, to test the interface.
11459
11460 2005-01-29  Bruno Haible  <bruno@clisp.org>
11461
11462         * lib/progname.c (program_name): Initialize.
11463         Needed when linking statically on MacOS X.
11464
11465 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
11466
11467         Sync from coreutils.
11468         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
11469         (Depends-on): Add c-strtod.
11470         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
11471
11472 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
11473
11474         Sync from coreutils.
11475         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
11476
11477         Remove files that are specific to coreutils.
11478         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
11479
11480 2005-01-28  Bruno Haible  <bruno@clisp.org>
11481
11482         * modules/javacomp: New file.
11483         * MODULES.html.sh (Java): Add javacomp.
11484
11485 2005-01-28  Bruno Haible  <bruno@clisp.org>
11486
11487         * m4/javacomp.m4: New file, from GNU gettext.
11488
11489 2005-01-28  Bruno Haible  <bruno@clisp.org>
11490
11491         * lib/javacomp.sh.in: New file, from GNU gettext.
11492         * lib/javacomp.h: New file, from GNU gettext.
11493         * lib/javacomp.c: New file, from GNU gettext.
11494
11495 2005-01-26  Simon Josefsson  <jas@extundo.com>
11496
11497         * lib/gai_strerror.c: Use GPL in header.
11498
11499 2005-01-26  Bruno Haible  <bruno@clisp.org>
11500
11501         * modules/javaexec: New file.
11502         * MODULES.html.sh (Java): Add javaexec.
11503
11504 2005-01-26  Bruno Haible  <bruno@clisp.org>
11505
11506         * m4/javaexec.m4: New file, from GNU gettext.
11507
11508 2005-01-26  Bruno Haible  <bruno@clisp.org>
11509
11510         * lib/javaexec.sh.in: New file, from GNU gettext.
11511         * lib/javaexec.h: New file, from GNU gettext.
11512         * lib/javaexec.c: New file, from GNU gettext.
11513
11514 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11515
11516         * modules/lchown (Depends-on): Remove lchown.h
11517
11518 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11519
11520         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
11521         must be defined if the header file was not found, in order
11522         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
11523
11524 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11525
11526         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
11527         initializers for struct pentry_state.
11528         (__argp_error): Check return value of __asprintf
11529         (__argp_failure): Translate error message
11530
11531         * lib/argp-parse.c: Removed braces around the expansion of N_()
11532
11533 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11534
11535         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
11536         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
11537         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
11538         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
11539         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
11540         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
11541         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
11542         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
11543         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
11544         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
11545         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
11546         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
11547         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
11548         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
11549         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
11550         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
11551         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
11552         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
11553         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
11554         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
11555         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
11556         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
11557         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
11558         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
11559         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
11560         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
11561         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
11562         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
11563         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
11564         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
11565         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
11566         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
11567         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
11568         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
11569         xstrtol.m4, xstrtoumax.m4, yesno.m4:
11570         Use an all-permissive copyright notice, recommended by RMS.
11571
11572 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
11573
11574         * modules/chdir-long (Depends-on): Remove mempcpy.
11575
11576 2005-01-21  Jim Meyering  <jim@meyering.net>
11577
11578         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
11579         same value as for Solaris 9.
11580
11581         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
11582         component length.  This included changing the parameter to be
11583         of type `char *' rather than `char const *'.
11584         * lib/chdir-long.h (chdir_long): Update prototype.
11585
11586         * lib/openat.c (fdopendir, fstatat): New functions.
11587         * lib/openat.h: Include headers required for use of DIR and struct
11588         stat.
11589         [AT_SYMLINK_NOFOLLOW]: Define.
11590         (fdopendir, fstatat): Add prototypes.
11591
11592 2005-01-21  Bruno Haible  <bruno@clisp.org>
11593
11594         * modules/classpath: New file.
11595         * MODULES.html.sh (Java): Add classpath.
11596
11597 2005-01-21  Bruno Haible  <bruno@clisp.org>
11598
11599         * lib/classpath.h: New file, from GNU gettext.
11600         * lib/classpath.c: New file, from GNU gettext.
11601
11602 2005-01-20  Simon Josefsson  <jas@extundo.com>
11603
11604         * modules/version-etc-fsf: New file.
11605
11606 2005-01-20  Simon Josefsson  <jas@extundo.com>
11607
11608         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
11609         * lib/version-etc.c: Remove version_etc_copyright.
11610         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
11611         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
11612
11613 2005-01-20  Simon Josefsson  <jas@extundo.com>
11614
11615         * lib/base64.h (isbase64): Add.
11616
11617         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
11618         using a unsigned prototype, don't inline.
11619         (base64_decode): Use it.
11620
11621 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
11622
11623         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
11624         it.
11625
11626 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
11627
11628         * lib/save-cwd.c (save_cwd): Remove code to support the case
11629         where fchdir is missing or flaky.
11630
11631 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
11632
11633         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
11634
11635 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
11636
11637         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
11638         AC_LIBSOURCES now does this.
11639         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
11640         with new ullong_max module.
11641
11642 2005-01-19  Bruno Haible  <bruno@clisp.org>
11643
11644         * modules/sh-quote: New file.
11645         * MODULES.html.sh (Executing programs): Add sh-quote.
11646
11647 2005-01-19  Bruno Haible  <bruno@clisp.org>
11648
11649         * lib/sh-quote.h: New file, from GNU gettext.
11650         * lib/sh-quote.c: New file, from GNU gettext.
11651
11652 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
11653
11654         Merge from coreutils.
11655         * m4/ullong_max.m4: New file.
11656         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
11657         (gl_MACROS): Assume localeconv exists.
11658
11659 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
11660
11661         Merge changes from coreutils, as described below in several
11662         changelogs dated today.
11663
11664         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
11665         (O_DIRECTORY): Remove; not needed here, since "." must be
11666         a directory.  All uses removed.
11667         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
11668         universal on Suns, and we also need to test for IRIX.
11669         Revamp code to use 'if' rather than '#if'.
11670         Avoid unnecessary comparison of cwd->desc to 0.
11671
11672         * lib/utimens.c (futimens): Robustify the previous patch, by checking
11673         for known valid error numbers rather than observed invalid ones.
11674
11675 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
11676
11677         * modules/ullong_max: New file.
11678
11679         * modules/chdir-long, modules/openat: New files.
11680         * modules/save-cwd (Depends-on): Depend on chdir-long.
11681         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
11682
11683 2005-01-18  Jim Meyering  <jim@meyering.net>
11684
11685         Merge from coreutils.
11686         * m4/chdir-long.m4, openat.m4: New files.
11687         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
11688         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
11689         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
11690         is sane and DOES follow symlinks.  Besides, testing 20 different
11691         systems found no broken chown implementations.
11692         Prompted by a change in rsync's copy of this macro.
11693         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
11694
11695         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
11696
11697         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
11698         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
11699         NULL-means-set-to-current-time semantics.
11700         Remove temporary file immediately, rather than waiting
11701         for configure's at-exit trap code to do it.
11702
11703 2005-01-18  Jim Meyering  <jim@meyering.net>
11704
11705         * lib/version-etc.c (version_etc_copyright): Update copyright date.
11706
11707         * lib/utimens.c (futimens): Account for the fact that futimes
11708         can also fail with errno == ENOSYS or errno == ENOENT.
11709         Patch from Dmitry V. Levin.
11710
11711         Change the name of the robust chdir function from chdir to chdir_long.
11712         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
11713         (restore_cwd): Use chdir_long, not chdir.
11714         * lib/chdir-long.c: Renamed from chdir.c.
11715         * lib/chdir-long.h: Renamed from chdir.h.
11716         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
11717         Hurd.
11718
11719 2005-01-18  Bruno Haible  <bruno@clisp.org>
11720
11721         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
11722         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
11723         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
11724         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
11725         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
11726         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
11727         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
11728         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
11729         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
11730         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
11731         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
11732         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
11733         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
11734         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
11735         Use an all-permissive copyright notice, recommended by RMS.
11736
11737 2005-01-18  Bob Proulx  <bob@proulx.com>
11738
11739         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
11740         simplify offsetof() macro construct to avoid compile failure with
11741         native HP-UX 11.0 ANSI C compiler.
11742
11743 2005-01-17  Bruno Haible  <bruno@clisp.org>
11744
11745         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
11746         redundant because stpncpy.m4 takes care of it.
11747
11748 2005-01-17  Bruno Haible  <bruno@clisp.org>
11749
11750         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
11751
11752 2005-01-17  Bruno Haible  <bruno@clisp.org>
11753
11754         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
11755         used.
11756
11757 2005-01-17  Bruno Haible  <bruno@clisp.org>
11758
11759         * lib/fwriteerror.h (fwriteerror): Change specification to include
11760         fclose.
11761         * lib/fwriteerror.c: Include <stdbool.h>.
11762         (fwriteerror): At the end, close the file stream. Record whether
11763         stdout was already closed.
11764
11765 2005-01-17  Bruno Haible  <bruno@clisp.org>
11766
11767         * lib/execute.c (environ): Declare if needed.
11768         * lib/pipe.c (environ): Likewise.
11769         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
11770
11771 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11772
11773         * modules/argp: Depend on vsnprintf
11774
11775 2005-01-10  Jim Meyering  <jim@meyering.net>
11776
11777         * modules/closeout (Depends-on): Add atexit.
11778
11779 2005-01-06  Bruno Haible  <bruno@clisp.org>
11780
11781         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
11782
11783 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
11784
11785         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
11786         definitions to be after all include files, to avoid collisions.
11787         Problem reported by Bob Proulx.
11788
11789 2005-01-04  Jim Meyering  <jim@meyering.net>
11790
11791         Changes imported from coreutils.
11792         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
11793         as the mkstemp template, use a temporary directory and an
11794         8.3-friendly template to avoid trouble on systems like DJGPP.
11795         Reported by Juan M. Guerrero via Stepan Kasal.
11796         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
11797         close. Remove the temporary directory right away, rather than waiting
11798         for configure's at-exit trap code to do it.
11799         Suggestion from Stepan Kasal.
11800
11801 2005-01-01  Simon Josefsson  <jas@extundo.com>
11802
11803         * gnulib-tool: Print #include directives when --import'ing.
11804
11805 2004-12-28  Simon Josefsson  <jas@extundo.com>
11806
11807         * tests/test-base64.c: Include required header files.  Remove
11808         unused variables.
11809
11810 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
11811
11812         * modules/error (Depends-on): Remove gettext.
11813
11814 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
11815
11816         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
11817         not needed.  This removes a dependency on the gettext module.
11818         [defined _LIBC]: Do not include <libintl.h>; not needed.
11819
11820 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
11821
11822         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
11823         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
11824
11825 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
11826
11827         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
11828         HAVE_DECL_STRTOLD.
11829
11830 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
11831
11832         * modules/getdate (Depends-on): Remove alloca-opt.
11833
11834 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
11835
11836         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
11837
11838 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
11839
11840         * lib/argp-parse.c: Include <stddef.h>.
11841         (alignof, alignto): New macros.
11842         (parser_init): Don't assume that void * is aligned sufficiently
11843         for struct option.
11844
11845         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
11846         need to extend the stack.
11847         (YYINITDEPTH): New macro, so that the initial stack isn't overly
11848         large.
11849
11850 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11851
11852         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
11853
11854 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
11855
11856         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
11857         (2004-10-24) change.  Apparently this was a false alarm.
11858
11859         * modules/getdate: Depend on alloca-opt, not alloca.
11860
11861 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
11862
11863         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
11864         Remove now-obsolete comment about AIX.
11865         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
11866         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
11867         (YYMAXDEPTH): New macro.
11868
11869 2004-12-18  Simon Josefsson  <jas@extundo.com>
11870
11871         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
11872
11873 2004-12-18  Bruno Haible  <bruno@clisp.org>
11874
11875         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
11876
11877 2004-12-18  Bruno Haible  <bruno@clisp.org>
11878
11879         * lib/fatal-signal.c (fatal_signals): Make non-const.
11880         (init_fatal_signals): New function.
11881         (uninstall_handlers, install_handlers): Ignore signals that were set to
11882         SIG_IGN.
11883         (at_fatal_signal): Call init_fatal_signals.
11884         (init_fatal_signal_set): Likewise. Ignore signals that were set to
11885         SIG_IGN.
11886         Reported by Paul Eggert.
11887
11888 2004-12-18  Bruno Haible  <bruno@clisp.org>
11889
11890         * doc/alloca.texi: New file.
11891         * doc/alloca-opt.texi: New file.
11892
11893 2004-12-17  Jim Meyering  <jim@meyering.net>
11894
11895         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
11896         Otherwise, install-sh could exit with improper exit status when
11897         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
11898
11899 2004-12-16  Simon Josefsson  <jas@extundo.com>
11900
11901         * tests/test-base64.c: Add license.
11902
11903 2004-12-15  Stepan Kasal  <address@hidden>
11904
11905         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
11906
11907 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
11908
11909         * modules/getcwd (Files): Add m4/d-ino.m4.
11910         Suggested by Mark D. Baushke.
11911
11912 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
11913
11914         * lib/getdate.y (textint): New member "negative".
11915         (time_zone_hhmm): New function.
11916         Expect 14 shift-reduce conflicts, not 13.
11917         (o_colon_minutes): New rule.
11918         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
11919         (yylex): Set the "negative" member of signed numbers.
11920
11921 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
11922
11923         * doc/getdate.texi (Time of day items, Time zone items):
11924         Describe new formats +00:00, UTC+00:00.
11925
11926 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11927
11928         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
11929         spurious "-l"s.  Problem reported by Stepan Kasal.
11930
11931 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
11932
11933         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
11934         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
11935
11936 2004-12-04  Simon Josefsson  <jas@extundo.com>
11937
11938         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
11939         Vandoorselaere <yoann@prelude-ids.org>.
11940
11941 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
11942
11943         Changes imported from coreutils.
11944         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
11945         exist.
11946         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
11947
11948 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
11949
11950         Changes imported from coreutils.
11951         * lib/hard-locale.c: Assume <locale.h> exists.
11952         Include "strdup.h".
11953         (GLIBC_VERSION): New macro.
11954         (hard_locale): Assume setlocale exists.
11955         Rewrite to avoid #ifdef.
11956         Use strdup rather than malloc + strcpy.
11957         * lib/human.c: Assume <locale.h> exists.
11958         (human_readable): Assume localeconv exists.
11959
11960 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
11961
11962         * modules/hard-locale (Depends-on): Add strdup.
11963
11964 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
11965
11966         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
11967         convert T2, not T.  (Imported from libc.)
11968
11969 2004-11-30  Simon Josefsson  <jas@extundo.com>
11970
11971         * modules/restrict (License): Change to LGPL.
11972
11973 2004-11-30  Simon Josefsson  <jas@extundo.com>
11974
11975         * m4/restrict.m4: Add copyright and copying conditions.
11976
11977 2004-11-30  Simon Josefsson  <jas@extundo.com>
11978
11979         * m4/base64.m4: New file.
11980
11981 2004-11-30  Simon Josefsson  <jas@extundo.com>
11982
11983         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
11984         base64.
11985
11986         * tests/test-base64.c: New file.
11987
11988         * modules/base64: New file.
11989
11990 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
11991
11992         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
11993         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
11994
11995         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
11996
11997 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
11998
11999         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
12000         (__getcwd.c): Don't restore errno; glibc doesn't.
12001         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
12002         first, falling back to our code only if its results look suspicious.
12003         Ensure that the resulting buffer is only as large as necessary.
12004
12005         * lib/readutmp.c: Include readutmp.h first.
12006         Include <errno.h>, since readutmp.h no longer does that.
12007         * lib/readutmp.h: Don't include <errno.h>,
12008         <sys/param.h>, <time.h>; not needed to establish interface.
12009         (errno): Remove decl.
12010         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
12011         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
12012         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
12013
12014 2004-11-28  Simon Josefsson  <jas@extundo.com>
12015
12016         * lib/base64.h, base64.c: New file.
12017
12018 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
12019
12020         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
12021
12022 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
12023
12024         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
12025         (Depends-on): Remove pathmax, same.  Add mempcpy.
12026         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
12027         (Makefile.am): Append getcwd.h to lib_SOURCES.
12028         (Include): Add getcwd.h.
12029         (Maintainer): Change from Jim Meyering to "all, glibc",
12030         since getdate now uses intended-for-glibc code.
12031         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
12032         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
12033
12034 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
12035
12036         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
12037         HP's ANSI C compiler.
12038         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
12039         Declaring int functions causes warnings on some modern systems and
12040         shouldn't be needed to compile on ancient ones.
12041         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
12042         defined.
12043
12044         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
12045         with the following changes.
12046         (__set_errno): Parenthesize properly.
12047         Include <stdbool.h>.
12048         (MIN, MAX, MATCHING_INO): New macros.
12049         (__getcwd): Define with prototype, not K&R form.
12050         Use heuristics to allocate default buffer on stack if possible.
12051         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
12052         behavior, and to avoid the PATH_MAX limit when computing
12053         ../../../../...
12054         Use MATCHING_INO to compare inode number to file.
12055         Check for arithmetic overflow in size calculations.
12056         Fix bug in reallocation of dot array that caused getcwd to fail
12057         on directories nested deeper than 75.
12058         Be more careful about saving errno on error.
12059         Do not use realloc; use only free+malloc, as this is a bit
12060         more flexible and avoids a needless copy operation.
12061         Do not inspect st_dev and st_ino for symbolic links; POSIX
12062         doesn't specify the latter.
12063         Check for closedir errors.
12064         Avoid needless casts.
12065         Use "#ifdef weak_alias" around weak_alias, to be like other
12066         glibc code.
12067         The following changes to getcwd.c have effect only when used in
12068         gnulib; they have no effect inside glibc proper.
12069         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
12070         as alloca isn't used.
12071         (alloca, __alloca): Likewise.
12072         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
12073         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
12074         unconditionally, as gnulib assumes C89 or better.
12075         Do not include <sys/param.h>.
12076         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
12077         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
12078         better.
12079         (NULL) [!defined NULL]: Remove; we assume C89 or better.
12080         Include <dirent.h> in a way that is compatible with modern Autoconf.
12081         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
12082         New macros, if not already defined.
12083         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
12084         Use "_LIBC", not "defined _LIBC", for consistency.
12085         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
12086         a mempcpy module.
12087         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
12088         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
12089         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
12090         credit only to Jim Meyering and adjust the copyright dates.
12091         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
12092         <stdlib.h>, <unistd.h>, "pathmax.h".
12093         Instead, include "xgetcwd.h" (first) and "getcwd.h".
12094         (INITIAL_BUFFER_SIZE): Remove.
12095         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
12096
12097 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
12098
12099         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
12100         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
12101         Use the _ONCE methods, for efficiency.
12102         Check for fcntl.h.  In test program, include <errno.h>
12103         and <fcntl.h> if available.  Remove old K&R cruft from
12104         test program.  Check for common errors in GNU/Linux,
12105         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
12106         don't do AC_LIBOBJ, as that's getcwd.m4's job.
12107         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
12108         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
12109         name accordingly.
12110         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
12111         accommodate new getcwd.c.
12112         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
12113         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
12114         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
12115         that's all we need now.
12116
12117 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12118
12119         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
12120         argp-parse.c depends on getopt internals, that means we should
12121         always use our getopt, to be on the safe side.
12122         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
12123         order not to spoil the result of an eventual previous invocation
12124         of gl_GETOPT_SUBSTITUTE.
12125
12126 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12127
12128         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
12129         redefinition warnings. To avoid them, include the defines
12130         in `#if !defined __need_getopt ... #endif'. The only place
12131         where __getopt_argv_const is used is in definitions
12132         of getopt_long and getopt_long_only below, which are as well
12133         protected by `#ifndef __need_getopt'.
12134         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
12135         __need_getopt after including <stdio.h> and <unistd.h> These
12136         headers might have defined it.
12137
12138 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
12139
12140         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
12141
12142 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
12143
12144         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
12145         (futimens): New function, which uses futimes if available.
12146         (futimens, utimens): Support timespec==NULL, with same semantics
12147         as utime and utimens.
12148         * lib/utimens.h (futimens): New decl.
12149
12150 2004-11-23  Jim Meyering  <jim@meyering.net>
12151
12152         * lib/getopt_.h: Remove trailing blanks.
12153
12154 2004-11-23  Jim Meyering  <jim@meyering.net>
12155
12156         * lib/__fpending.c: Add comment.
12157
12158 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
12159
12160         * modules/canonicalize (Depends-on): Add xreadlink.
12161         Problem reported by James Youngman.
12162
12163 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
12164
12165         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
12166         New macros.
12167         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
12168         optopt): Use them instead of invoking ## directly; otherwise, the
12169         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
12170
12171 2004-11-19  Bruno Haible  <bruno@clisp.org>
12172
12173         * lib/strtok_r.c: Move comments from here...
12174         * lib/strtok_r.h: ... to here.
12175
12176 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
12177
12178         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
12179         implementations that mishandle size_t overflow.
12180
12181 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
12182
12183         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
12184         might fail.  Problem reported by Yoann Vandoorselaere.
12185         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
12186         implementations that mishandle size_t overflow.
12187
12188 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12189
12190         * modules/canon-host (Depends-on): Add strdup.
12191
12192 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12193
12194         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
12195
12196 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12197
12198         * lib/canon-host.c: Include "strdup.h".
12199         (canon_host): Use getaddrinfo if available, so that IPv6 works.
12200         Use strdup instead of malloc/strcpy to duplicate strings.
12201
12202         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
12203         (human_space_before_unit): New constant.
12204         * lib/human.c (human_readable): Support it.
12205
12206         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
12207         (xgetcwd): Set errno correctly when failing.
12208         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
12209         the failure is actually due to a PATH_MAX problem.
12210
12211         Further getopt changes to make it more likely that glibc will
12212         buy the changes back.
12213         * lib/getopt.c (POSIXLY_CORRECT): New constant.
12214         (getopt): Use it, so to preserve glibc semantic
12215         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
12216         when compiling for libc.
12217         * lib/getopt_.h (__getopt_argv_const): Bring it back.
12218         (getopt_long, getopt_long_only): Use it.
12219
12220         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
12221         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
12222         (getopt): Argv is now char * const *, as per standard.
12223         (_getopt_internal_r, _getopt_internal): Argv is now char **,
12224         not char *__getopt_argv_const *.
12225         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
12226         _getopt_long_only_r): Likewise.
12227         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
12228         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
12229         _getopt_long_r, _getopt_long_only_r): Likewise.
12230         * lib/getopt_.h (__getopt_argv_const): Remove.
12231         (getopt): Argv is now char * const *, as per standard.
12232
12233         * lib/getdate.y (tORDINAL): New token.
12234         (day, relunit): Allow it for relative times.
12235         (relative_time_table): Use tORDINAL for ordinals.
12236
12237 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12238
12239         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
12240         Document that "second" isn't allowed as an ordinal number.
12241
12242 2004-11-16  Jim Meyering  <jim@meyering.net>
12243
12244         * modules/closeout (Depends-on): Add fpending.
12245
12246 2004-11-15  Jim Meyering  <jim@meyering.net>
12247
12248         * lib/closeout.c: Include "__fpending.h" once again.
12249         Include <stdbool.h>.
12250         (close_stdout): Don't fail just because stdout was closed initially,
12251         since some programs don't write to stdout in the normal course of
12252         operation (other than --version and --help), and we don't want this
12253         function to make e.g. `touch file >&-' fail.
12254         But do fail if it was closed and someone has tried to write to it.
12255         E.g., `printf foo >&-' must fail.
12256
12257 2004-11-13  Jim Meyering  <jim@meyering.net>
12258
12259         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
12260
12261 2004-11-12  Simon Josefsson  <jas@extundo.com>
12262
12263         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
12264         small doc fix is still pending.
12265
12266 2004-11-11  Simon Josefsson  <jas@extundo.com>
12267
12268         * modules/strtok_r: New file.
12269
12270         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12271         strtok_r.
12272
12273 2004-11-11  Simon Josefsson  <jas@extundo.com>
12274
12275         * m4/strtok_r.m4: New file.
12276
12277         * m4/getopt.m4: Replace opterr.
12278
12279 2004-11-11  Simon Josefsson  <jas@extundo.com>
12280
12281         * lib/strtok_r.h, strtok_r.c: New file.
12282
12283 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
12284
12285         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
12286         of replacing opterr, getopt, etc.  This should handle the
12287         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
12288
12289 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
12290
12291         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
12292         we can stop lying to compilers about the constness of argv when we
12293         are compiled outside glibc.
12294         (getopt, getopt_long, getopt_long_only): Use it.
12295         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
12296         _getopt_internal, getopt): Likewise.
12297         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
12298         _getopt_long_only_r): Likewise.
12299         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
12300         _getopt_long_r, _getopt_long_only_r): Likewise.
12301
12302         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
12303         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
12304         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
12305         the other external symbols.
12306         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
12307         declaration, since the above renaming now works around collisions.
12308
12309 2004-11-11  Jim Meyering  <jim@meyering.net>
12310
12311         * lib/linebreak.c: Remove trailing blanks.
12312         * lib/alloca_.h: Likewise.
12313         * lib/acosl.c: Likewise.
12314         * lib/euidaccess.c: Likewise.
12315         * lib/allocsa.h: Likewise.
12316
12317 2004-11-10  Simon Josefsson  <jas@extundo.com>
12318
12319         * m4/getaddrinfo.m4: New file.
12320
12321 2004-11-10  Simon Josefsson  <jas@extundo.com>
12322
12323         * lib/getaddrinfo.h, getaddrinfo.c: New files.
12324
12325 2004-11-10  Simon Josefsson  <jas@extundo.com>
12326
12327         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12328         getaddrinfo.
12329
12330         * modules/getaddrinfo: New file.
12331
12332 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12333
12334         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
12335
12336 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12337
12338         * lib/mktime.c (SHR): New macro, which is a portable
12339         substitute for >> that should work even on Crays.
12340         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
12341         Problem reported by Mark D. Baushke in
12342         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
12343         * lib/getdate.y (SHR): Likewise.
12344         (tm_diff): Use it.
12345         * lib/strftime.c (SHR): Likewise.
12346         (tm_diff): Use it.
12347         * lib/quotearg.c (struct quoting_options): Use unsigned int for
12348         quote_these_too, so that right shifts are well defined.  All uses
12349         changed.
12350
12351 2004-11-10  Jim Meyering  <jim@meyering.net>
12352
12353         Ensure that no close failure goes unreported.
12354         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
12355         return early when it seems there's nothing to flush.
12356         Don't include __fpending.h.
12357
12358 2004-11-10  Jim Meyering  <jim@meyering.net>
12359
12360         * modules/closeout (Depends-on): Remove fpending.
12361
12362 2004-11-10  Jim Meyering  <jim@meyering.net>
12363
12364         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
12365
12366 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
12367
12368         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
12369         gl_FUNC_STRFTIME.
12370         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
12371         and AC_REQUIRE when possible, to avoid duplicate checks.
12372         Check for <wchar.h>.
12373
12374 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
12375
12376         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
12377
12378 2004-11-09  Bruno Haible  <bruno@clisp.org>
12379
12380         * m4/sockpfaf.m4: New file.
12381
12382 2004-11-05  Bruno Haible  <bruno@clisp.org>
12383
12384         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
12385         Reported by Mark D. Baushke <mdb@cvshome.org>.
12386
12387 2004-11-04  Bruno Haible  <bruno@clisp.org>
12388
12389         2004-09-11  Bruno Haible  <bruno@clisp.org>
12390                 * allocsa.valgrind: New file.
12391         2004-02-06  Bruno Haible  <bruno@clisp.org>
12392                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
12393                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
12394                 Reported by Christopher Seip <chris.seip@hp.com>.
12395
12396 2004-11-04  Bruno Haible  <bruno@clisp.org>
12397
12398         * modules/allocsa (Files): Add lib/allocsa.valgrind.
12399         (Makefile.am): Distribute it.
12400
12401 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
12402
12403         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
12404         with errno == ERANGE if the buffer is too small.
12405         Problem reported by Mark D. Baushke.
12406
12407 2004-11-03  Albert Chin <china@thewrittenword.com>
12408             Paul Eggert  <eggert@cs.ucla.edu>
12409
12410         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
12411         equivalent, substitute $ac_type for equivalent type rather than
12412         blindly using uint32_t *always* which won't work if uint32_t is not
12413         available.  Define _UINT32_T to work around typedef of uint32_t if
12414         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
12415         2.5.1.
12416
12417 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
12418
12419         * m4/jm-macros.m4: Sync from coreutils.
12420         (gl_MACROS): Check for mbrlen, for pathchk.
12421         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
12422
12423 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
12424
12425         * lib/xreadlink.c (MAXSIZE): New macro.
12426         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
12427         size does not exceed MAXSIZE.  Avoid cast.
12428         As suggested by Mark D. Baushke in
12429         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
12430         if readlink fails with buffer size just under MAXSIZE, try again
12431         with MAXSIZE.
12432
12433 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
12434
12435         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
12436
12437 2004-11-02  Derek R. Price  <derek@ximbiot.com>
12438         and  Paul Eggert  <eggert@cs.ucla.edu>
12439
12440         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
12441         (get_date): Overparenthesize to avoid GCC warning.
12442
12443 2004-11-02  Bruno Haible  <bruno@clisp.org>
12444
12445         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
12446         returns void.
12447
12448 2004-11-02  Bruno Haible  <bruno@clisp.org>
12449
12450         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
12451         function returns void.
12452
12453 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
12454
12455         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
12456         fflush_unlocked, flockfile, funlockfile, funlockfile,
12457         fputs_unlocked, putc_unlocked.
12458
12459 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
12460
12461         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
12462         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
12463         already declared.
12464
12465 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12466
12467         * modules/getdate (Files): Add doc/getdate.texi.
12468         (Depends-on): Add setenv, xalloc.
12469
12470 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12471
12472         * lib/getdate.y: Add support for TZ="foo" within a date string.
12473         Fix some bugs near time_t boundaries.  Reject dates with
12474         out-of-range components, e.g., "Sept 31".
12475         Include <stdlib.h>, "setenv.h", "xalloc.h".
12476         (ISDIGIT_LOCALE): Remove; unused.
12477         Note that the TZ and time functions used here are not reentrant.
12478         (mktime_ok, get_tz): New functions.
12479         (TZBUFSIZE): New constant.
12480         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
12481         This requires that we sometimes generate our own TZ="XXX..." setting.
12482
12483 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12484
12485         * doc/getdate.texi: New file, from coreutils with modifications for
12486         the new TZ parsing.
12487
12488 2004-10-27  Derek R. Price  <derek@ximbiot.com>
12489
12490         * lib/mktime.c (not_equal_tm): Remove redundant check.
12491
12492 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
12493
12494         * modules/regex (lib_SOURCES): Add regex.c.
12495         Reported by James Youngman in
12496         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
12497
12498 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
12499
12500         * lib/getdate.y: Use Bison 1.875 features, and some minor
12501         code cleanups.  This change does not affect semantics.
12502         Don't include <stdlib.h>; no longer needed.
12503         Don't include unlocked-io.h; only the "#if TEST" code uses
12504         stdio, and performance isn't crucial there.
12505         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
12506         Bison 1.875 features as described below.
12507         All uses of "PC." replaced by "pc->".
12508         (YYSTYPE): Add a forward declaration.
12509         (yylex, yyerror): Use full prototypes in forward decls.
12510         Use "%pure-parser" rather than obsolescent "%pure_parser".
12511         Use %parse-param and %lex-param instead of obsolescent
12512         YYPARSE_PARAM and YYLEX_PARAM.
12513         (meridian_table, month_and_day_table, time_units_table,
12514         relative_time_table, time_zone_table, military_table,
12515         lookup_zone, lookup_word, get_date):
12516         Use NULL instead of 0 where appropriate.
12517         (to_hour): Avoid abort (), to avoid a dependency on
12518         stdlib.h.
12519         (yyerror, yylex): Now accepts parser_control * arg.
12520         (main) [TEST]: Use '\0' rather than 0 for char.
12521
12522 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
12523
12524         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
12525
12526 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
12527
12528         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
12529         It's now the caller's responsibility to handle the case where
12530         !HAVE_GETPAGESIZE && !defined getpagesize.
12531
12532         * lib/mktime.c (leapyear): Arg is long int, not int.
12533
12534 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
12535
12536         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
12537
12538 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
12539
12540         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
12541         missing.  Problem reported by James Youngman.
12542
12543 2004-10-16  Simon Josefsson  <jas@extundo.com>
12544
12545         * gnulib-tool: Fix comments.  Fix parse problem.
12546         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
12547
12548 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
12549
12550         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
12551         implementation of getopt_long.  Problem reported by Alexander Taler in:
12552         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
12553
12554 2004-10-15  Bruno Haible  <bruno@clisp.org>
12555
12556         * gnulib-tool: Untabify. Initialize supplied_libname.
12557         (func_usage): More homogenous output.
12558         (func_modules_transitive_closure, func_modules_to_filelist,
12559         func_emit_lib_Makefile_am): New functions.
12560         (func_import): New function, extracted from big case statement. Use
12561         func_get_license, func_modules_transitive_closure,
12562         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
12563         opt_lgpl. Don't use test -a, as it's not portable.
12564         (func_create_testdir): Use func_modules_transitive_closure,
12565         func_modules_to_filelist, func_emit_lib_Makefile_am.
12566
12567 2004-10-15  Bruno Haible  <bruno@clisp.org>
12568
12569         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
12570
12571 2004-10-15  Bruno Haible  <bruno@clisp.org>
12572
12573         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
12574         the portions belonging to each module.
12575         Suggested by Derek Robert Price <derek@ximbiot.com>.
12576
12577 2004-10-12  Simon Josefsson  <jas@extundo.com>
12578
12579         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
12580         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
12581         to real functions.
12582
12583 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
12584
12585         * modules/vsnprintf: New file.
12586
12587 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
12588
12589         * m4/vsnprintf.m4: New file.
12590
12591 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
12592
12593         * lib/vsnprintf.h: New file.
12594         * lib/vsnprintf.c: New file.
12595
12596 2004-10-11  Bruno Haible  <bruno@clisp.org>
12597
12598         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
12599         vsnprintf.
12600
12601 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
12602
12603         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
12604
12605 2004-10-07  Bruno Haible  <bruno@clisp.org>
12606
12607         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
12608         fits into the provided buffer.
12609
12610 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
12611
12612         * lib/diacrit.c, diacrit.h: Add GPL notice.
12613
12614         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
12615         notice.
12616         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
12617         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
12618         This avoids a potential constant-folding bug.
12619
12620 2004-10-05  Bruno Haible  <bruno@clisp.org>
12621
12622         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
12623         for the declaration of strsep.
12624
12625 2004-10-05  Bruno Haible  <bruno@clisp.org>
12626
12627         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
12628
12629 2004-10-04  Simon Josefsson  <jas@extundo.com>
12630
12631         * modules/memmem: New file.
12632         * tests/test-memmem.c: New file.
12633         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
12634
12635 2004-10-04  Simon Josefsson  <jas@extundo.com>
12636
12637         * m4/memmem.m4: New file.
12638
12639 2004-10-04  Simon Josefsson  <jas@extundo.com>
12640
12641         * lib/memmem.h: New file.
12642         * lib/memmem.c: New file, taken from glibc.
12643
12644 2004-10-04  Simon Josefsson  <jas@extundo.com>
12645
12646         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
12647         '#ifdef USE_UNLOCKED_IO'.
12648
12649 2004-10-04  Simon Josefsson  <jas@extundo.com>
12650
12651         * config/srclist.txt: Add memmem from glibc.
12652
12653 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
12654
12655         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
12656
12657         * modules/argmatch, modules/argp, modules/closeout, modules/error,
12658         modules/exclude, modules/getdate, modules/getline,
12659         modules/getndelim2, modules/getpass, modules/getpass-gnu,
12660         modules/getusershell, modules/linebuffer, modules/md5,
12661         modules/mountlist, modules/posixtm, modules/readtokens,
12662         modules/readutmp, modules/regex, modules/sha1,
12663         modules/version-etc, modules/yesno:
12664         Remove dependency on unlocked-io.
12665
12666 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
12667
12668         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
12669
12670         * m4/unlocked-io.m4: Add copyright notice.
12671         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
12672
12673 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
12674
12675         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
12676         * lib/xmalloc.c (xmemdup): Likewise.
12677         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
12678         XFREE): Remove these long-obsolescent macros.
12679         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
12680         * lib/xstrdup.c: Remove.
12681
12682         * lib/regex.c (re_comp): Cast gettext return value to char *,
12683         Problem reported by Martin Neitzel via Mark D. Baushke.
12684
12685 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
12686
12687         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
12688         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
12689         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
12690         regex.c, sha1.c, version-etc.c, yesno.c:
12691         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
12692         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
12693         the includer's responsibility.
12694
12695         Sync from coreutils.
12696
12697         * lib/modechange.c (mode_compile): Don't decrement a pointer that
12698         points to the start of a string, as the C Standard says the
12699         resulting behavior is undefined.
12700
12701         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
12702         simple -> simple_backups, numbered_existing ->
12703         numbered_existing_backups, numbered -> numbered_backups
12704         to avoid shadowing problems.  All uses changed.
12705         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
12706         * lib/backupfile.c (check_extension, numbered_backup):
12707         Rename locals to avoid shadowing 'basename'.
12708         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
12709         once.
12710
12711         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
12712         * lib/.cvsignore: Add getopt.h.
12713
12714 2004-10-04  Bruno Haible  <bruno@clisp.org>
12715
12716         * modules/README: New file.
12717         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
12718         not a module.
12719
12720 2004-10-02  Jim Meyering  <jim@meyering.net>
12721
12722         * lib/dirfd.h, getpagesize.h: Add copyright notice.
12723
12724 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
12725
12726         * modules/strsep: New file.
12727
12728 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
12729
12730         * m4/strsep.m4: New file.
12731
12732 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
12733
12734         * lib/strsep.h: New file.
12735         * lib/strsep.c: New file.
12736
12737 2004-10-01  Simon Josefsson  <jas@extundo.com>
12738
12739         * lib/snprintf.c (snprintf): Handle size==0.
12740
12741 2004-10-01  Simon Josefsson  <jas@extundo.com>
12742             Bruno Haible  <bruno@clisp.org>
12743
12744         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
12745         (snprintf): Declare 'args'.
12746
12747 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
12748
12749         * lib/snprintf.c: Remove comments as to why each header is needed.
12750
12751 2004-10-01  Bruno Haible  <bruno@clisp.org>
12752
12753         * MODULES.html.sh: Add strsep.
12754
12755 2004-09-30  Simon Josefsson  <jas@extundo.com>
12756
12757         * modules/snprintf: New file.
12758
12759 2004-09-30  Simon Josefsson  <jas@extundo.com>
12760
12761         * m4/snprintf.m4: New file.
12762
12763 2004-09-30  Simon Josefsson  <jas@extundo.com>
12764
12765         * lib/snprintf.h, snprintf.c: New files.
12766
12767 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12768
12769         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
12770         (hol_entry_help): Never translate an empty string.
12771         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
12772         * lib/argp.h (OPTION_NO_TRANS): New option.
12773
12774 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
12775
12776         * modules/argp (Maintainer): Replace Simon Josefsson
12777         by Sergey Poznyakoff.
12778
12779 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
12780
12781         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
12782         changes merged back into glibc.
12783
12784 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
12785
12786         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
12787
12788 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
12789
12790         * lib/xvasprintf.c: Include xalloc.h.
12791         (xvasprintf): Use xalloc_die, not xmalloc_die.
12792
12793 2004-09-29  Bruno Haible  <bruno@clisp.org>
12794
12795         * modules/alloca-opt: New file, derived from modules/alloca.
12796         * modules/allocsa: Depend on alloca-opt instead of alloca.
12797         * modules/setenv: Likewise.
12798         * modules/vasnprintf: Likewise.
12799         * MODULES.html.sh: Add alloca-opt.
12800
12801 2004-09-28  Simon Josefsson  <jas@extundo.com>
12802
12803         * gnulib-tool: New parameter --lgpl, to asseert that modules are
12804         LGPL, and to replace license template from GPL to LGPL.
12805
12806 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
12807
12808         * modules/dummy: Change license to LGPL.
12809
12810 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
12811
12812         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
12813
12814 2004-09-24  Simon Josefsson  <jas@extundo.com>
12815
12816         * modules/minmax (License): Change from GPL to LGPL.
12817
12818 2004-09-23  Simon Josefsson  <jas@extundo.com>
12819
12820         * gnulib-tool (--import): Typo.
12821
12822 2004-09-23  Simon Josefsson  <jas@extundo.com>
12823
12824         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
12825
12826 2004-09-22  Bruno Haible  <bruno@clisp.org>
12827
12828         * modules/*: Add 'License' field.
12829         * gnulib-tool: Accept --extract-license option.
12830         (func_get_license): New function.
12831
12832 2004-09-21  Bruno Haible  <bruno@clisp.org>
12833
12834         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
12835         Reported by Simon Josefsson.
12836
12837 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
12838
12839         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
12840         gl_AC_TYPE_LONG_LONG.
12841
12842 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
12843
12844         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
12845
12846 2004-09-18  Simon Josefsson  <jas@extundo.com>
12847         and  Paul Eggert  <eggert@cs.ucla.edu>
12848
12849         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
12850         calls with autoreconf.  Define GL_LIB.
12851
12852 2004-09-14  Karl Berry  <karl@gnu.org>
12853
12854         * config/srclist.txt: unsync setenv.c, sigh.
12855
12856 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
12857
12858         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
12859         Problem reported by Bruno Haible in:
12860         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
12861
12862 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
12863
12864         * config/srclist.txt: Comment out argp-pvh.c.
12865
12866 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
12867
12868         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
12869         in case some system header has #define'd it.  Problem reported by
12870         Soeren D. Schulze in
12871         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
12872
12873 2004-09-09  Karl Berry  <karl@gnu.org>
12874
12875         * regex.[ch]: delete from the root.  These were supposed to be
12876                 synced with emacs cvs, but this has not happened for about
12877                 a year, and anyway nothing else uses emacs regex.[ch].
12878                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
12879                 lib/regex[.ch] is untouched.
12880
12881 2004-09-09  Bruno Haible  <bruno@clisp.org>
12882
12883         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
12884
12885 2004-09-09  Bruno Haible  <bruno@clisp.org>
12886
12887         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
12888         modifications.
12889         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
12890
12891 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
12892
12893         * modules/xvasprintf: New file.
12894         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
12895
12896 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
12897
12898         * lib/xvasprintf.h: New file.
12899         * lib/xvasprintf.c: New file.
12900         * lib/xasprintf.c: New file.
12901
12902 2004-09-08  Bruno Haible  <bruno@clisp.org>
12903
12904         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
12905
12906 2004-09-08  Bruno Haible  <bruno@clisp.org>
12907
12908         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
12909         length is > INT_MAX.
12910         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
12911         more.
12912
12913 2004-09-08  Bruno Haible  <bruno@clisp.org>
12914
12915         * lib/stdint_.h: New file, taken from GNU clisp.
12916
12917 2004-09-08  Bruno Haible  <bruno@clisp.org>
12918             Oskar Liljeblad  <oskar@osk.mine.nu>
12919
12920         * modules/stdint: New file.
12921         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
12922
12923 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12924
12925         Import from coreutils.
12926         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
12927         strings on unbounded length.  alloca's performance benefits aren't
12928         that important here.
12929         (V_STRDUP): Remove.
12930         (parse_with_separator): New function, with most of the internals
12931         of the old parse_user_spec.  Allow user to omit both user and group,
12932         for compatibility with FreeBSD.
12933         Clone only the user name, not the entire spec.
12934         Do not set *uid, *gid unless entirely successful.
12935         Avoid memory leak in some failing cases.
12936         Fix regression for USER.GROUP reported by Dmitry V. Levin in
12937         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
12938         (parse_user_spec): Rewrite to use parse_with_separator.
12939
12940 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12941
12942         * modules/userspec: Don't depend on alloca.
12943
12944 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12945
12946         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
12947
12948 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12949
12950         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
12951         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
12952         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
12953
12954 2004-08-16  Simon Josefsson  <jas@extundo.com>
12955
12956         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
12957         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
12958         Add --dry-run for --import.
12959         Let user provided command line parameters override configure.ac
12960         settings.
12961
12962 2004-08-12  Simon Josefsson  <jas@extundo.com>
12963
12964         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
12965         as discussed with Paul Eggert in threads rooted at
12966         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
12967         and
12968         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
12969         Before, the test was empty, and relied on ELIDE_CODE in source
12970         code.)
12971         (gl_PREREQ_GETOPT): New macro.
12972         (gl_GETOPT): Use them.
12973
12974 2004-08-12  Simon Josefsson  <jas@extundo.com>
12975
12976         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
12977         * lib/getopt_.h: Renamed from getopt.h.
12978
12979 2004-08-12  Simon Josefsson  <jas@extundo.com>
12980
12981         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
12982         Change default library name from libfoo to libgnu.
12983         Now, if you have a configure.ac that says:
12984                 gl_SOURCE_BASE(gl)
12985                 gl_M4_BASE(gl/m4)
12986                 gl_MODULES(error getopt etcetera)
12987                 gl_INIT
12988         you can import all you need by running:
12989                 ../gnulib/gnulib-tool --import
12990
12991         * modules/getopt (Files): Rename getopt.h to getopt_.h.
12992         (Makefile.am): Rewrite, use logic from argz.
12993         (Include): Use <getopt.h> instead of "getopt.h".
12994
12995 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
12996
12997         * modules/argp (Files): Add m4/unlocked-io.m4.
12998         (Depends-on): Add extensions.
12999
13000 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13001
13002         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
13003         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
13004         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
13005         Check for program_invocation_name, program_invocation_short_name,
13006         flockfile, funlockfile, features.h, _getopt_long_only_r.
13007
13008 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13009
13010         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
13011         its complicated substitute.
13012         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
13013         and program_invocation_name.
13014         (__argp_basename) [!_LIBC]: Remove; the only use was
13015         replaced by its body.
13016         (__argp_short_program_name): Change condition from
13017         !defined __argp_short_program_name to
13018         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
13019         to match argp-namefrob.h.
13020         (__argp_failure): Don't assume strerror_r returns char *.
13021         * lib/argp-parse.c (N_): Define unconditionally.
13022         (argp_default_options): Fill out initializers with 0 to avoid
13023         gcc warnings.
13024
13025 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13026
13027         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
13028         getopt1.c.
13029
13030 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13031
13032         Merge from coreutils.
13033
13034         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
13035
13036         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
13037         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
13038
13039 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13040
13041         Merge from coreutils.
13042
13043         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
13044         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
13045         for Reliant Unix 5.43.
13046
13047         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
13048         (union fooround): Use uintmax_t, not long int.
13049         The rest is a merge from libc:
13050         [defined _LIBC]: Include <shlib-compat.h>.
13051         (_obstack) [defined _LIBC]: Remove after 2.3.4.
13052
13053         * lib/settime.c (settime): Recode to avoid warning with
13054         Sun Forte C 6U2.
13055
13056         * lib/strverscmp.c: Convert to UTF-8.
13057
13058 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13059
13060         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
13061         m4/uintmax_t.m4.
13062
13063 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13064
13065         * modules/xalloc-die: New file.
13066         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
13067
13068         * modules/md5 (Files): Add m4/uint32_t.m4.
13069         * modules/sha1: Renamed from modules/sha.
13070         (Files):
13071         Rename lib/sha.h to lib/sha1.h.
13072         Rename lib/sha.c to lib/sha1.c.
13073         Rename m4/sha.m4 to m4/sha1.m4.
13074         (lib_SOURCES): Likewise.
13075         (configure.ac): Rename gl_SHA to gl_SHA1.
13076         (Include): sha.h -> sha1.h.
13077
13078 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13079
13080         * m4/uint32_t.m4, uintptr_t.m4: New files.
13081         * m4/sha1.m4: Renamed from sha.m4.
13082         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
13083
13084 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13085
13086         * lib/obstack.h (obstack_empty_p):
13087         Don't assume that chunk->contents is suitably aligned.
13088         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
13089         Likewise. Problem reported by Benno in
13090         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
13091
13092         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
13093         readable.  This could be improved further but it'd take some work.
13094
13095 2004-08-08  Simon Josefsson  <jas@extundo.com>
13096
13097         * modules/xgethostname (Depends-on): Remove exit and error (not
13098         used).
13099
13100         * modules/getpass-gnu: Add getpass.h.
13101         (Depends-on): Add stdbool.
13102         * modules/getpass: Add getpass.h.
13103
13104 2004-08-08  Simon Josefsson  <jas@extundo.com>
13105
13106         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
13107         Check getpass declaration.
13108
13109 2004-08-08  Simon Josefsson  <jas@extundo.com>
13110
13111         * lib/xgethostname.c: Don't include error.h (not used).
13112
13113         * lib/getpass.h: Add.
13114         * lib/getpass.c: Include getpass.h first.
13115
13116 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
13117
13118         * lib/xalloc-die.c: New files.
13119         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
13120         All uses removed.
13121         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
13122         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
13123         xalloc-die.c.
13124         (_, N_, xalloc_die): Move to xalloc-die.c.
13125         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
13126         so that we needn't mess with xalloc_msg_memory_exhausted.
13127
13128         * lib/sha1.h: Renamed from sha.h.
13129         (SHA1_H): Renamed from _SHA_H.
13130         (sha1_ctx): Renamed from sha_ctx.
13131         (sha1_init_ctx): Renamed from sha_init_ctx.
13132         (sha1_process_block): Renamed from sha_process_block.
13133         (sha1_process_bytes): Renamed from sha_process_bytes.
13134         (sha1_finish_ctx): Renamed from sha_finish_ctx.
13135         (sha1_read_ctx): Renamed from sha_read_ctx.
13136         (sha1_stream): Renamed from sha_stream.
13137         (sha1_buffer): Renamed from sha_buffer.
13138         * lib/sha1.c: Likewise; renamed from sha.c.
13139         Do not include <sys/types.h>.
13140         Include <stddef.h> rather than <stdlib.h>.
13141
13142 2004-08-08  Bruno Haible  <bruno@clisp.org>
13143
13144         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
13145         FILESYSTEM_PREFIX_LEN.
13146         * lib/progreloc.c: Likewise.
13147         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
13148
13149 2004-08-06  Simon Josefsson  <jas@extundo.com>
13150
13151         * modules/progname (Depends-on): Don't depend on stdbool.
13152
13153 2004-08-06  Simon Josefsson  <jas@extundo.com>
13154
13155         * modules/getsubopt: New file.
13156         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13157         getsubopt.
13158
13159 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
13160
13161         More merge from coreutils.
13162
13163         * m4/utimens.m4, utimecmp.m4: New files.
13164         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
13165         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
13166         prereq.m4, sha.m4: Import changes from coreutils.
13167
13168 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
13169
13170         More merge from coreutils.
13171         * modules/raise, modules/readtokens0, modules/utimens,
13172         modules/utimecmp, module/xnanosleep: New files.
13173         * modules/strftime: Add lib/strftime.h.
13174         Change include from <time.h> to "strftime.h".
13175         * modules/yesno: Add lib/yesno.h.
13176         * modules/backupfile: Remove lib/addext.c.
13177         * modules/euidaccess: Add stat-macros.h.
13178         * modules/canonicalize, modules/euidaccess,
13179         modules/filemode, modules/lchown, modules/makepath,
13180         modules/rmdir, modules/stat: Likewise.
13181
13182 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
13183
13184         Merge from tar.
13185         * lib/argp-help.c (make_hol, hol_append): Don't assume that
13186         SIZE_MAX is a valid preprocessor constant.
13187         (__argp_basename): Change from "#ifndef _LIBC"
13188         to "#ifndef __argp_short_program_name", so that
13189         we don't compile these functions for tar.
13190
13191         More merges from coreutils.
13192         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h,
13193         lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c,
13194         lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
13195         * lib/addext.c: Remove; no longer needed.
13196         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
13197         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
13198         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
13199         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
13200         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
13201         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
13202         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
13203         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
13204         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
13205         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13206         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
13207         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
13208         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
13209         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
13210         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
13211         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
13212         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
13213         Import changes from coreutils.
13214
13215 2004-08-05  Simon Josefsson  <jas@extundo.com>
13216
13217         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
13218
13219 2004-08-05  Simon Josefsson  <jas@extundo.com>
13220
13221         * m4/getsubopt.m4: New file.
13222
13223 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
13224
13225         Merge from coreutils.
13226
13227         * m4/c-strtod.m4, canonicalize.m4, fcntl-safer.m4, getcwd-path-max.m4:
13228         New files.
13229
13230         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
13231         FILESYSTEM_PREFIX_LEN ->
13232         FILE_SYSTEM_PREFIX_LEN.
13233         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
13234         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
13235         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
13236         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
13237
13238         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
13239         prerequisite modules now handle the DOS stuff.
13240         Don't check for unistd.h.
13241
13242 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
13243
13244         Merge from coreutils.
13245
13246         * lib/.gdb-history: Remove; this doesn't belong here.
13247
13248         * lib/c-strtod.c, c-strtod.h, c-strtold.c, cycle-check.c,
13249         cycle-check.h, dev-ino.h, canonicalize.h, canonicalize.c,
13250         fcntl-safer.h, fcntl-safer.c, getcwd.c: New files.
13251
13252         * lib/dirname.h: Include <stdbool.h>.
13253         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
13254         for consistency with POSIX terminology.  All uses changed.
13255         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
13256         (strip_trailing_slashes): Use bool for booleans.
13257         * lib/stripslash.c (strip_trailing_slashes): Likewise.
13258
13259         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
13260         sometimes returns a positive errno value even when it succeeds.
13261         (print_errno_message) [!LIBC]: Fall back on strerror if
13262         __strerror_r fails.
13263
13264         * lib/path-concat.c (mempcpy): Don't define if a system header defines
13265         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
13266         (longest_relative_suffix): New function.
13267         (path_concat): Use it.  Assume first argument is not NULL.
13268         Port to DOS.  Omit redundant separators.
13269         Report an error instead of returning NULL.
13270         Use mempcpy instead of memcpy.
13271         (xpath_concat): Remove: not declared or used.
13272
13273         * lib/same.h: Include <stdbool.h>
13274         (same_name): Return bool, not int.
13275         * lib/same.c (same_name): Likewise.
13276         (errno): Don't declare; we assume C89 or better now.
13277
13278         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
13279         if not already defined.
13280
13281         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
13282         * lib/dup-safer.c (errno): Likewise.
13283
13284 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
13285
13286         Merge from coreutils.
13287         * modules/c-strtod, modules/c-strtold, modules/canonicalize,
13288         modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
13289         * modules/path-concat: Don't depend on strdup.
13290
13291 2004-08-03  Simon Josefsson  <jas@extundo.com>
13292
13293         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
13294         * lib/progname.h: Don't include stdbool.h.
13295
13296 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
13297
13298         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
13299         * MODULES.html.sh (func_all_modules): Remove fatal.
13300
13301 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
13302
13303         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
13304
13305 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
13306
13307         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
13308         working.
13309
13310 2004-08-02  Simon Josefsson  <jas@extundo.com>
13311
13312         * lib/getsubopt.h: New file, with comments from Bruno Haible.
13313         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
13314         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
13315
13316 2004-08-01  Simon Josefsson  <jas@extundo.com>
13317
13318         * lib/xgetdomainname.c: Include stdlib.h, for free().
13319
13320 2004-07-19  Bruno Haible  <bruno@clisp.org>
13321
13322         * MODULES.html.sh (func_all_modules): Add dummy.
13323
13324 2004-07-16  Simon Josefsson  <jas@extundo.com>
13325
13326         * modules/dummy: New file.
13327
13328 2004-07-16  Simon Josefsson  <jas@extundo.com>
13329
13330         * lib/dummy.c: New file.
13331
13332 2004-07-16  Bruno Haible  <bruno@clisp.org>
13333
13334         * lib/backupfile.h: Add extern "C" for C++.
13335         * lib/closeout.h: Likewise.
13336         * lib/copy-file.h: Likewise.
13337         * lib/findprog.h: Likewise.
13338         * lib/full-write.h: Likewise.
13339         * lib/pathname.h: Likewise.
13340         * lib/progname.h: Likewise.
13341         * lib/stpcpy.h: Likewise.
13342         * lib/stpncpy.h: Likewise.
13343         * lib/strcase.h: Likewise.
13344         * lib/strstr.h: Likewise.
13345         * lib/xalloc.h: Likewise.
13346
13347         * lib/mbswidth.h: Add extern "C" for C++.
13348         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
13349
13350 2004-07-13  Robert Millan  <robertmh@gnu.org>
13351
13352         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
13353
13354 2004-07-09  Simon Josefsson  <jas@extundo.com>
13355
13356         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
13357         failed without this.)
13358
13359 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13360
13361         * modules/chown (Files): Add lib/fchown-stub.c, since
13362         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
13363
13364 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13365
13366         * lib/fchown-stub.c: New file.
13367
13368 2004-06-24  Jim Meyering  <jim@meyering.net>
13369
13370         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
13371
13372 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13373
13374         * modules/argz: Omit "#include".
13375
13376         * MODULES.html.sh (func_all_modules): Add calloc, to match
13377         2004-06-01 addition of calloc module.
13378
13379 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13380
13381         * m4/argz.m4: New file, which is autoupdated from libtool.
13382
13383 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13384
13385         * lib/argz.c, argz_.h: New files, which are autoupdated from libtool.
13386
13387 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13388
13389         * config/srclist-update: Don't insist on "USA." before the
13390         close-comment, as libtool omits the period and puts the */ on a
13391         separate line.
13392         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
13393         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
13394
13395 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
13396
13397         * modules/argz: New file.
13398         * MODULES.html.sh (func_all_modules): Add argz.
13399
13400 2004-06-12  Jim Meyering  <jim@meyering.net>
13401         and  Paul Eggert  <eggert@cs.ucla.edu>
13402
13403         * modules/hash (Files): Add lib/xalloc.h.
13404         * modules/pipe (Depends-on): Add wait-process.
13405         * modules/stat (Depends-on): Add xalloc.
13406         * modules/userspec (Files): Add lib/userspec.h.
13407         * modules/xstrto
13408
13409         Upgrade from gettext-0.13.
13410         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
13411         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
13412         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
13413
13414 2004-06-10  Jim Meyering  <jim@meyering.net>
13415
13416         * lib/calloc.c: New file.
13417
13418 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
13419
13420         * lib/getdate.y (yylex): Allow space between sign and number.
13421         Problem reported by Dan Jacobson.
13422
13423 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
13424
13425         Merge from coreutils CVS.
13426
13427         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
13428         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
13429         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
13430         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
13431         xstrtol.m4: Fix copyright date and/or serial number.
13432
13433         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
13434         See if we need an fchown replacement.
13435         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
13436         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
13437         and use the replacement function if we detect either defect.
13438
13439         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
13440         gl_UTIMECMP.
13441
13442 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
13443         and  Jim Meyering  <jim@meyering.net>
13444
13445         Merge from coreutils CVS.
13446
13447         * lib/stat-macros.h: New file, with contents from file-type.h
13448         and coreutils' system.h.
13449         * lib/file-type.c: Include "stat-macros.h".
13450         * lib/file-type.h (file_type): Move all macro definitions to new file,
13451         stat-macros.h.
13452
13453         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
13454         Wrap old code with this conditional.
13455         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
13456         function that does not dereference symlinks.
13457         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
13458
13459         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
13460         dependency problems.
13461         (xreadlink): Accept new arg SIZE, for efficiency.
13462         All decls and uses changed.
13463         * lib/xreadlink.h: Include <stddef.h>, for size_t.
13464
13465         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
13466         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
13467
13468         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
13469         sysexits.h.
13470
13471 2004-06-01  Jim Meyering  <jim@meyering.net>
13472
13473         * m4/calloc.m4: New file.
13474
13475 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
13476
13477         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
13478         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
13479         Also, fix a typo in a diagnostic.
13480
13481 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
13482
13483         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
13484         or AC_FUNC_REALLOC.
13485
13486 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
13487
13488         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
13489         macros to be defined.
13490         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
13491         the allocator returns NULL because the requested size is zero.
13492
13493 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13494
13495         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
13496         var.  Add comment explaining why libc still defines it.  This
13497         merges the following patch from glibc:
13498         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
13499
13500 2004-05-20  Andreas Schwab  <schwab@suse.de>
13501
13502         * m4/free.m4: Replace free if it not known to work, not the other
13503         way round.
13504
13505 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
13506
13507         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
13508         present in glibc since revision 1.1 of this file.
13509         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
13510         obstack_alignment_mask, obstack_alloc, obstack_base,
13511         obstack_blank, obstack_blank_fast, obstack_chunk_size,
13512         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
13513         obstack_grow0, obstack_init, obstack_int_grow,
13514         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
13515         obstack_next_free, obstack_object_size, obstack_ptr_grow,
13516         obstack_ptr_grow_fast, obstack_room): Remove declarations of
13517         nonexistent functions.
13518
13519 2004-05-18  Karl Berry  <karl@gnu.org>
13520
13521         * config/srclist.txt: break link for vasnprintf.c.
13522
13523 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
13524
13525         Port obstack to the AS/400, where pointers are 16 bytes wide and
13526         you cannot cast an integer to a valid pointer.  This patch is
13527         currently waiting to be integrated into glibc; see
13528         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
13529
13530         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
13531         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
13532         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
13533         (struct obstack): temp member is now a union of a pointer and
13534         an integer, instead of an integer.  All integer uses changed.
13535         This does not affect the physical layout of struct obstack,
13536         except on hosts (like the AS/400) where the size or alignment of
13537         void * is greater than that of ptrdiff_t.
13538         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
13539         __STDC__)]: Store temporary in pointer member of union, not
13540         integer member.
13541         * lib/obstack.c: Include <stddef.h>, for offsetof.
13542         (struct fooalign): Remove; it doesn't need a name.
13543         (union fooround): Change double to long double, and add void *.
13544         (DEFAULT_ALIGNMENT): Use offsetof to compute.
13545         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
13546         not a macro.  Hence the values are always int; so remove all
13547         casts-to-int in uses.
13548
13549 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
13550
13551         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
13552         we can get this patch merged into glibc.
13553
13554 2004-05-17  Derek R. Price  <derek@ximbiot.com>
13555             Paul Eggert  <eggert@cs.ucla.edu>
13556
13557         * m4/argp: Depend on alloca.
13558
13559 2004-05-17  Derek R. Price  <derek@ximbiot.com>
13560             Paul Eggert  <eggert@cs.ucla.edu>
13561
13562         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
13563         freecoding.
13564
13565 2004-05-17  Bruno Haible  <bruno@clisp.org>
13566
13567         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
13568         precision that consists of a '.' followed by an empty digit string.
13569         Patch by Tor Lillqvist <tml@iki.fi>.
13570
13571 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
13572
13573         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
13574         for backward compatibility with older code.  We need our own
13575         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
13576         it under some other name, and our alloca.h will define it.
13577
13578 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
13579             Derek Price  <derek@ximbiot.com>
13580
13581         * lib/alloca.c: Include <alloca.h>, to get our interface.
13582         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
13583         include <alloca.h> first.  Use C89 prototype for alloca; this
13584         requires including <stddef.h> for size_t.  Use extern "C" if C++.
13585         Use #elif for simplicity, since we can assume C89 now.
13586         Don't try to source the system alloca.h since it will not be found
13587         and to prevent recursively including its replacement.
13588         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
13589         * lib/regex.c: Likewise.
13590
13591 2004-05-16  Derek Price  <derek@ximbiot.com>
13592             Paul Eggert  <eggert@cs.ucla.edu>
13593
13594         getline cleanup.  This changes the getndelim2 API: both order of
13595         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
13596         no delimiter).
13597
13598         * lib/getline.c: Don't include stddef.h or stdio.h, since our
13599         interface does that.
13600         (getline): Always use getdelim, so that we don't have two
13601         copies of this code.
13602         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
13603         if available.
13604         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
13605         (GETNDELIM2_MAXIMUM): New macro.
13606         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
13607         instead of the old practice of delim2==0.  All callers changed.
13608         Return -1 on overflow, instead of returning junk.
13609         Do not set *linesize unless allocation succeeds.
13610         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
13611         that we include sys/types.h.
13612         * lib/getnline.h: Likewise.
13613         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
13614         (getndelim2): Reorder arguments.
13615         * lib/getnline.c (getnline, getndelim):
13616         Don't discard the NMAX argument.
13617         (getnline): Invoke getndelim, to avoid code duplication.
13618         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
13619         of (size_t) -1 by callers of the getnline family.
13620
13621 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13622
13623         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
13624         Check for gettimeofday.
13625         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
13626         Check for settimeofday, stime.
13627
13628 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13629
13630         * lib/nanosleep.c (suspended): Change its type from int to
13631         sig_atomic_t volatile.
13632         (first_call): Make it private to rpl_nanosleep, and have it
13633         be zero initially as that's a bit faster.
13634         (my_usleep): Round up fractional times instead of truncating them,
13635         as this is the usual meaning for 'sleep'.
13636
13637         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
13638         doesn't work.
13639         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
13640         (ENOSYS): Define if not defined.
13641         (settime): Fall back on stime if it exists and settimeofday fails.
13642         But don't bother with fallbacks if a method fails with errno == EPERM.
13643
13644 2004-05-11  Jim Meyering  <jim@meyering.net>
13645
13646         Prior to this change, the save_cwd caller required read access to the
13647         current directory on most systems (ones with the fchdir function).
13648
13649         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
13650         fails, try write-only, and finally, resort to using xgetcwd.
13651
13652 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13653
13654         * lib/obstack.c, obstack.h: Import changes from libc.
13655
13656 2004-04-28  Bruno Haible  <bruno@clisp.org>
13657
13658         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
13659         also implicitly appends .exe to executables.
13660         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
13661         accepts Windows pathnames.
13662         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
13663         Treat Cygwin like Windows, since it now accepts Windows pathnames.
13664         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
13665         Treat Cygwin like Windows, since it now accepts Windows pathnames.
13666         Reported by Derek Robert Price <derek@ximbiot.com>.
13667
13668 2004-04-21  Karl Berry  <karl@gnu.org>
13669
13670         * config/srclist.txt (localcharset.c): break sync.
13671
13672 2004-04-20  Paul Eggert  <eggert@twinsun.com>
13673
13674         * m4/host-os.m4: Add a copyright notice.
13675
13676 2004-04-20  Jim Meyering  <jim@meyering.net>
13677
13678         Change UTILS_ to gl_ in AC_DEFINE'd names.
13679         Change utils_- and jm_-prefixed variables, too.
13680         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
13681         UTILS_FUNC_MKDIR_TRAILING_SLASH.
13682         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
13683
13684         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
13685         Don't emit trailing blanks.
13686         Also rename jm_-prefixed variables to have gl_ prefix.
13687
13688         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
13689         Also rename jm_-prefixed variables to have gl_ prefix.
13690
13691         * m4/jm-macros.m4: Reflect the renamings.
13692         * m4/prereq.m4: Likewise.
13693
13694 2004-04-20  Jim Meyering  <jim@meyering.net>
13695
13696         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
13697         memory.
13698
13699 2004-04-20  Jim Meyering  <jim@meyering.net>
13700             Bruno Haible  <bruno@clisp.org>
13701
13702         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
13703         memory when realloc fails.
13704
13705 2004-04-19  Jim Meyering  <jim@meyering.net>
13706
13707         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
13708         now that readutmp.c may call `free (0)'.
13709
13710 2004-04-19  Bruno Haible  <bruno@clisp.org>
13711
13712         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
13713         * m4/inttypes_h.m4: Likewise.
13714         * m4/stdint_h.m4: Likewise.
13715         * m4/intmax_t.m4: Likewise.
13716         * m4/uintmax_t.m4: Likewise.
13717
13718 2004-04-18  Jim Meyering  <jim@meyering.net>
13719
13720         * m4/prereq.m4: Don't forbid jm_ prefix.
13721
13722         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
13723         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
13724         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
13725         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
13726         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
13727         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
13728         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
13729         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
13730         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
13731         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
13732         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
13733         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
13734         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
13735         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
13736         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
13737         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
13738         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
13739         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
13740         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
13741
13742 2004-04-18  Jim Meyering  <jim@meyering.net>
13743
13744         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
13745         failure, don't leak memory and do call END_UTMP_ENT.
13746
13747 2004-04-16  Jim Meyering  <jim@meyering.net>
13748
13749         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
13750         coreutils' stat program.
13751         (gl_PREREQ): Don't require jm_PREREQ_STAT.
13752
13753 2004-04-11  Paul Eggert  <eggert@twinsun.com>
13754
13755         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
13756         C89.
13757         (CHAR_BIT): Remove, since we assume C89.
13758         Include <stdint.h> if available, as per current Autoconf CVS advice.
13759
13760 2004-03-31  Jim Meyering  <jim@meyering.net>
13761
13762         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
13763         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
13764         * m4/xalloc.m4: Likewise.
13765
13766 2004-03-30  Paul Eggert  <eggert@twinsun.com>
13767
13768         Merge from coreutils.
13769
13770         * m4/inttostr.m4: New file.
13771         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
13772         Require AM_STDBOOL_H and gl_TIMESPEC instead.
13773         Require gl_CLOCK_TIME.
13774         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
13775
13776 2004-03-30  Paul Eggert  <eggert@twinsun.com>
13777
13778         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
13779         not bool, to be more consistent with Unix conventions.
13780         Suggested by Bruno Haible.
13781
13782         Merge from coreutils.
13783
13784         * lib/imaxtostr.c, inttostr.c, inttostr.h, offtostr.c, umaxtostr.c:
13785         New files.
13786
13787         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
13788         the usual <time.h> dance.
13789         (get_date): Change signature to support fractional time stamps.
13790         All callers changed.
13791         * lib/getdate.y: Include "getdate.h" first, as we can now
13792         assume C89 and don't need to worry about 'const'.
13793         Similarly, include "unlocked-io.h" near start, not in middle.
13794         Include <limits.h>.
13795         (textint.value): Use long int rather than int.
13796         (textint.digits): Use size_t rather than int.
13797         (BILLION, LOG10_BILLION): New constants.
13798         (parser_control): New member rel_ns.  Members day_ordinal,
13799         time_zone, month, day, hour, minutes, rel_year, rel_month,
13800         rel_day, rel_hour, rel_minutes, rel_seconds
13801         are now long int, not int.  Member seconds is now struct timespec,
13802         not int.  New member timespec_seen.  Members dates_seen, days_seen,
13803         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
13804         not int.
13805         (%union.intval): Now long int, not int.
13806         New member timespec.
13807         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
13808         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
13809         (spec): Now is a timespec or an item list.
13810         (timespec, items): New nonterminals.
13811         (time, rel, relunit, number, get_date):
13812         Add support for fractional seconds.
13813         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
13814         (gmtime, localtime, mktime): Remove decls; not needed with C89.
13815         (to_hour): First arg is now long int, not int.
13816         (to_year): Returns long int, not int.
13817         Don't treat year -70 like 70.
13818         (tm_diff): Returns long int, not int.
13819         (lookup_word): Use bool instead of int when appropriate.
13820         (yylex): Use size_t for count, not int.
13821         Detect overflow when parsing large integer constants.
13822         Add support for fractions.
13823         (get_date): Make pointers 'const' if possible.
13824         Use more-portable code to detect integer overflow.
13825         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
13826         Don't use ctime; it's not reliable if the year has >4 digits.
13827
13828         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
13829         This is for compatibility with BSD.
13830
13831         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
13832         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
13833         From coreutils' system.h.
13834
13835         * lib/userspec.c: Don't include "posixver.h".
13836         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
13837         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
13838         compatible extension.  Simplify code by removing a boolean int
13839         that was always nonzero if a string was nonnull.
13840
13841 2004-03-30  Jim Meyering  <jim@meyering.net>
13842
13843         Merge from coreutils.
13844
13845         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
13846         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
13847         on some systems one must include <grp.h> before it.
13848         Reported by Christian Krackowizer.
13849
13850 2004-03-30  Jim Meyering  <jim@meyering.net>
13851
13852         Merge from coreutils.
13853
13854         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
13855
13856         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
13857         an empty input stream.
13858
13859         * lib/readtokens.c: Include <stdbool.h>.
13860         (readtoken): Use `size_t' rather than int/long.
13861         All callers adjusted.
13862         Use `bool' rather than `int' where appropriate.
13863         Use memset rather than an explicit loop.
13864         Use x2nrealloc rather than xrealloc.
13865         Allow the use of `\0' as a delimiter.
13866         (readtokens): Likewise.
13867         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
13868
13869 2004-03-30  Jim Meyering  <jim@meyering.net>
13870
13871         * m4/realloc.m4: Remove file, since now it does no more than
13872         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
13873         the `configure.ac' section of module/realloc.
13874         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
13875
13876 2004-03-30  Bruno Haible  <bruno@clisp.org>
13877
13878         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
13879         nonnull.
13880
13881 2004-03-29  Paul Eggert  <eggert@twinsun.com>
13882
13883         Merge changes to getloadavg.c from coreutils and Emacs.
13884
13885         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
13886         Define to an expression, not to the empty string.
13887         Include cloexec.h and xalloc.h.
13888         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
13889         Use set_cloexec_flag rather than rolling our own.
13890         * lib/cloexec.c, cloexec.h: New files.
13891
13892 2004-03-29  Paul Eggert  <eggert@twinsun.com>
13893
13894         * m4/cloexec.m4: New file.
13895
13896 2004-03-18  Paul Eggert  <eggert@twinsun.com>
13897
13898         * lib/getopt.h: Sync with libc CVS.
13899
13900 2004-03-18  Paul Eggert  <eggert@twinsun.com>
13901             Bruno Haible  <bruno@clisp.org>
13902
13903         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
13904         mbswidth.
13905
13906 2004-03-18  Paul Eggert  <eggert@twinsun.com>
13907             Bruno Haible  <bruno@clisp.org>
13908
13909         * lib/mbswidth.h: Include <wchar.h> only if
13910         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
13911         <wchar.h>.
13912         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
13913
13914 2004-03-09  Paul Eggert  <eggert@twinsun.com>
13915
13916         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
13917         Sync with libc CVS.
13918         * lib/getopt_int.h: New file, also synced from libc.
13919
13920 2004-03-09  Paul Eggert  <eggert@twinsun.com>
13921
13922         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
13923         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
13924         Bring back getopt.c, getopt.h, getopt1.c.
13925
13926 2004-03-07  Paul Eggert  <eggert@twinsun.com>
13927
13928         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
13929         All uses changed.  Check for sa_sigaction member; this fixes
13930         a bug first reported by Jason Andrade in
13931         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
13932
13933 2004-03-07  Paul Eggert  <eggert@twinsun.com>
13934
13935         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
13936         '#if' expressions.  Unlike the code it replaces, it does not
13937         depend on (defined _SC_PAGESIZE).  However, it does depend on
13938         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
13939         first reported by Jason Andrade in
13940         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
13941
13942 2004-02-25  Simon Josefsson  <jas@extundo.com>
13943
13944         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
13945
13946 2004-02-25  Simon Josefsson  <jas@extundo.com>
13947
13948         * lib/strdup.h: New file.
13949         * lib/strdup.c: Include it.
13950         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
13951         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
13952
13953 2004-02-23  Karl Berry  <karl@gnu.org>
13954
13955         * doc/maintain.texi, standards.texi, make-stds.texi: new files
13956         (from fencepost.gnu.org:/gd/gnuorg).
13957
13958 2004-02-23  Karl Berry  <karl@gnu.org>
13959
13960         * config/srclistvars.sh (GNUORG) [karl]: redefine.
13961         * config/srclist.txt: add maintain/standards documents.
13962
13963 2004-02-18  Bruno Haible  <bruno@clisp.org>
13964
13965         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
13966         Reported by Derek Robert Price <derek@ximbiot.com>.
13967
13968 2004-02-16  Karl Berry  <karl@gnu.org>
13969
13970         * config/mkinstalldirs, install-sh: update from automake.
13971
13972 2004-02-06  Karl Berry  <karl@gnu.org>
13973
13974         * m4/po.m4: update from gettext 0.14.1.
13975
13976 2004-02-06  Karl Berry  <karl@gnu.org>
13977
13978         * lib/config.charset: update from gettext 0.14.1.
13979
13980 2004-02-05  Paul Eggert  <eggert@twinsun.com>
13981
13982         Add comments and code, prompted by suggestions from Bruno Haible
13983         for sh-quote.
13984         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
13985         describing the enum quoting_style values.
13986         * lib/quotearg.c (quotearg_alloc): New function.
13987         (quotearg_buffer_restyled): Treat lone { and } as special.
13988         Treat = as special.  Work around bug with older shells
13989         that "see" a '\' that is really the 2nd byte of a multibyte char.
13990         Quote empty string with shell_quoting_style.
13991
13992 2004-02-03  Bruno Haible  <bruno@clisp.org>
13993
13994         * m4/pipe.m4: New file, from GNU gettext.
13995
13996 2004-02-03  Bruno Haible  <bruno@clisp.org>
13997
13998         * lib/pipe.h: New file, from GNU gettext.
13999         * lib/pipe.c: New file, from GNU gettext.
14000
14001 2004-01-27  Bruno Haible  <bruno@clisp.org>
14002
14003         * m4/execute.m4: New file, from GNU gettext.
14004
14005 2004-01-27  Bruno Haible  <bruno@clisp.org>
14006
14007         * lib/execute.h: New file, from GNU gettext.
14008         * lib/execute.c: New file, from GNU gettext.
14009         * lib/w32spawn.h: New file, from GNU gettext.
14010
14011 2004-01-24  Paul Eggert  <eggert@twinsun.com>
14012
14013         Merge from diffutils.
14014
14015         * lib/file-type.c (file_type): Add typed memory objects.
14016         * lib/file-type.h (S_TYPEISTMO): New macro.
14017
14018         * lib/c-stack.h (c_stack_action): Remove argv argument.
14019         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
14020         (die): Don't calculate message unless segv_action returns.
14021         (get_stack_location, min_address_from_argv, max_address_from_argv,
14022         volatile stack_base, volatile_stack_size): Remove.
14023         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
14024         that every segmentation violation is a stack overflow.  (Ouch!)
14025         See Debian bug 136249 (still outstanding) for more info about why
14026         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
14027
14028 2004-01-24  Paul Eggert  <eggert@twinsun.com>
14029
14030         Exit-status fix from coreutils.
14031
14032         Use exit_failure consistently in place of EXIT_FAILURE,
14033         so that program exit statuses are consistent on failure.
14034
14035         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
14036         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
14037         * lib/argmatch.h: Comment fix to match the above.
14038         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
14039         Now a macro referring to exit_failure, instead of a separate
14040         variable.  Include "exitfail.h" to get it.
14041         * lib/xstrtol.h: Include "exitfail.h".
14042         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
14043
14044         * lib/long-options.c (parse_long_options): Use prototype
14045         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
14046         for clarity.
14047
14048 2004-01-21  Jim Meyering  <jim@meyering.net>
14049
14050         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
14051         so as not to conflict with a different-sized __mktime_internal
14052         function in GNU libc.
14053         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
14054         Problem building statically-linked `ls' reported by Michael Brunnbauer.
14055
14056 2004-01-20  Karl Berry  <karl@gnu.org>
14057
14058         * config/config.guess: update from config.
14059
14060         * config/srclistvars.sh: GNUWWWLICENSES for karl.
14061
14062 2004-01-20  Bruno Haible  <bruno@clisp.org>
14063
14064         Safer stack allocation.
14065         * lib/setenv.c: Include allocsa.h.
14066         (alloca): Remove fallback definition.
14067         (freea): Remove macro.
14068         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
14069         instead of freea.
14070
14071 2004-01-20  Bruno Haible  <bruno@clisp.org>
14072
14073         * m4/eealloc.m4: New file, from GNU gettext.
14074
14075 2004-01-20  Bruno Haible  <bruno@clisp.org>
14076
14077         * m4/allocsa.m4: New file, from GNU gettext.
14078
14079 2004-01-20  Bruno Haible  <bruno@clisp.org>
14080
14081         * lib/xallocsa.h: New file, from GNU gettext.
14082         * lib/xallocsa.c: New file, from GNU gettext.
14083
14084 2004-01-20  Bruno Haible  <bruno@clisp.org>
14085
14086         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
14087
14088 2004-01-20  Bruno Haible  <bruno@clisp.org>
14089
14090         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
14091         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
14092         specially.
14093
14094 2004-01-20  Bruno Haible  <bruno@clisp.org>
14095
14096         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
14097         patch.
14098
14099 2004-01-20  Bruno Haible  <bruno@clisp.org>
14100
14101         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
14102
14103 2004-01-20  Bruno Haible  <bruno@clisp.org>
14104
14105         * lib/eealloc.h: New file.
14106
14107 2004-01-20  Bruno Haible  <bruno@clisp.org>
14108
14109         * lib/binary-io.h: Avoid warnings on Cygwin.
14110
14111 2004-01-20  Bruno Haible  <bruno@clisp.org>
14112
14113         * lib/allocsa.h: New file, from GNU gettext.
14114         * lib/allocsa.c: New file, from GNU gettext.
14115
14116 2004-01-18  Karl Berry  <karl@gnu.org>
14117
14118         * doc/gpl.texi, lgpl.texi: new files.
14119
14120 2004-01-18  Karl Berry  <karl@gnu.org>
14121
14122         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
14123         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
14124
14125 2004-01-15  Paul Eggert  <eggert@twinsun.com>
14126
14127         Merge from coreutils.
14128
14129         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
14130         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
14131         (gl_DEFAULT_POSIX2_VERSION): Move
14132         the documentation from 'configure' into 'config.hin',
14133         so that 'configure --help' isn't burdened by it and
14134         we don't have to worry about its formatting there.
14135         Reword the documentation so that it's more succinct
14136         and can be run together into a single paragraph.
14137         * m4/same.m4 (gl_SAME): Check for pathconf.
14138
14139 2004-01-15  Paul Eggert  <eggert@twinsun.com>
14140
14141         Merge from coreutils.
14142
14143         * lib/posixver.c: Include posixver.h.
14144
14145         * lib/same.c: Include <stdbool.h>, <limits.h>.
14146         (_POSIX_NAME_MAX): Define if not defined.
14147         (MIN): New macro.
14148         (same_name): If file names are silently truncated, report
14149         that the file names are the same if they are the same after
14150         the silent truncation.
14151
14152         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
14153         conversion function.
14154         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
14155         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
14156         longer needed.
14157
14158 2004-01-15  Jim Meyering  <jim@meyering.net>
14159
14160         Merge from coreutils.
14161
14162         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
14163         if no library is required.
14164         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
14165         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
14166         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
14167         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
14168         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
14169         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
14170         value, $ac_cv_search_crypt, if it's "none required".
14171         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
14172         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
14173         not gl_FUNC_GETLOADAVG.
14174         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
14175         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
14176
14177 2004-01-15  Jim Meyering  <jim@meyering.net>
14178
14179         Merge from coreutils.
14180
14181         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
14182         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
14183         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
14184
14185         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
14186         optional configure-time default.
14187
14188         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14189
14190         * lib/xreadlink.c (xreadlink): Correct outdated comment.
14191
14192 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
14193
14194         Merge from coreutils.
14195
14196         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
14197         value, $ac_cv_search_nanosleep, if it's "none required".
14198
14199 2004-01-14  Paul Eggert  <eggert@twinsun.com>
14200
14201         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
14202         with like-named macro in fnmatch.c.
14203         (EXT): Use an internal constant instead.
14204
14205         Merge fnmatch patches from glibc.
14206         * lib/fnmatch.c (mbsinit): Remove define.
14207         Add libc_hidden_ver (__fnmatch, fnmatch).
14208         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
14209         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
14210
14211 2004-01-14  Karl Berry  <karl@gnu.org>
14212
14213         * config/install-sh: update from automake.
14214
14215 2004-01-13  Karl Berry  <karl@gnu.org>
14216
14217         * config/install-sh: update from automake.
14218
14219 2004-01-09  Karl Berry  <karl@gnu.org>
14220
14221         * config/install-sh: update from automake.
14222
14223 2004-01-05  Karl Berry  <karl@gnu.org>
14224
14225         * config/config.{sub,guess}: update from config.
14226
14227 2003-12-31  Karl Berry  <karl@gnu.org>
14228
14229         * config/depcomp: update from automake.
14230
14231 2003-12-14  Karl Berry  <karl@gnu.org>
14232
14233         * lib/config.charset: update from gettext-runtime.
14234
14235 2003-12-03  Paul Eggert  <eggert@twinsun.com>
14236
14237         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
14238         Bug reported by Alfred M. Szmidt.
14239
14240 2003-12-03  Bruno Haible  <bruno@clisp.org>
14241
14242         * m4/gettext.m4: Upgrade from gettext-0.13.
14243         * m4/po.m4: Upgrade from gettext-0.13.
14244         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
14245         * m4/intmax.m4: New file, from gettext-0.13.
14246         * m4/printf-posix.m4: New file, from gettext-0.13.
14247
14248 2003-11-29  Karl Berry  <karl@gnu.org>
14249
14250         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
14251
14252 2003-11-25  Paul Eggert  <eggert@twinsun.com>
14253             Bruno Haible  <bruno@clisp.org>
14254
14255         * lib/printf-parse.h: Don't include sys/types.h.
14256         (ARG_NONE): New macro.
14257         (char_directive): Change type of *arg_index fields to size_t.
14258         * lib/printf-parse.c: Don't include sys/types.h.
14259         (SSIZE_MAX): Remove macro.
14260         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
14261         Remove unnecessary overflow check.
14262         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
14263         fields.
14264
14265 2003-11-25  Bruno Haible  <bruno@clisp.org>
14266
14267         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
14268
14269 2003-11-25  Bruno Haible  <bruno@clisp.org>
14270
14271         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
14272         gt_TYPE_SSIZE_T.
14273
14274 2003-11-24  Paul Eggert  <eggert@twinsun.com>
14275
14276         * modules/alloca: Remove dependency on xalloc.
14277
14278 2003-11-24  Paul Eggert  <eggert@twinsun.com>
14279
14280         * lib/alloca.c: Remove dependency on xalloc module.
14281         (xalloc_die): Remove.
14282         (memory_full) [!defined emacs]: New macro.
14283         [!defined emacs]: Don't include xalloc.h.
14284         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
14285         address arithmetic overflows.  Change datatypes a bit to avoid
14286         unnecessary casts.
14287
14288 2003-11-22  Jim Meyering  <jim@meyering.net>
14289
14290         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
14291         s/size/size_t/.
14292
14293 2003-11-21  Karl Berry  <karl@gnu.org>
14294
14295         * config/config.{sub,guess}: update from config.
14296
14297 2003-11-18  Karl Berry  <karl@gnu.org>
14298
14299         * config/config.{sub,guess}: update from config.
14300
14301         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
14302
14303 2003-11-17  Paul Eggert  <eggert@twinsun.com>
14304
14305         * README: Mention that S+T cannot overflow if S is the size of
14306         an existing object and T is sufficiently small.
14307
14308 2003-11-17  Jim Meyering  <jim@meyering.net>
14309
14310         On systems without utime and without a utimes function capable of
14311         dealing with a NULL struct utimbuf* argument, this utime replacement
14312         could -- in unusual circumstances -- leak a file descriptor.
14313         * lib/utime.c: Include <unistd.h> and <errno.h>.
14314         (utime_null): Be sure to close `fd' and to preserve errno.
14315         Reported by Geoff Collyer via Arnold Robbins.
14316
14317 2003-11-17  Bruno Haible  <bruno@clisp.org>
14318
14319         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
14320         (Depends-on): Add xsize.
14321
14322 2003-11-17  Bruno Haible  <bruno@clisp.org>
14323
14324         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
14325
14326 2003-11-17  Bruno Haible  <bruno@clisp.org>
14327
14328         * lib/vasnprintf.c (alloca): Remove fallback definition.
14329         (freea): Remove definition.
14330         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
14331         Reported by Paul Eggert.
14332
14333 2003-11-16  Paul Eggert  <eggert@twinsun.com>
14334             Bruno Haible  <bruno@clisp.org>
14335
14336         Protect against address arithmetic overflow.
14337         * lib/printf-args.h: Include stddef.h.
14338         (arguments): Change type of field 'count' to size_t.
14339         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
14340         'unsigned int' where appropriate.
14341         * lib/printf-parse.h: Include sys/types.h.
14342         (char_directive): Change type of *arg_index fields to ssize_t.
14343         (char_directives): Change type of fields 'count', max_*_length to
14344         size_t.
14345         * lib/printf-parse.c: Include sys/types.h and xsize.h.
14346         (SSIZE_MAX): Define fallback value.
14347         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
14348         instead of 'int' where appropriate. Check a_allocated, d_allocated
14349         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
14350         * lib/vasnprintf.c: Include xsize.h.
14351         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
14352         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
14353         overflow. Avoid wraparound when converting a width or precision from
14354         decimal to binary.
14355
14356 2003-11-16  Bruno Haible  <bruno@clisp.org>
14357
14358         Update from GNU gettext.
14359         * lib/printf-parse.c: Generalize to it can be compiled for wide
14360         strings.
14361         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
14362         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
14363         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
14364         SNPRINTF): New macros.
14365         Don't include <alloca.h> if the file is used inside libintl.
14366         (local_wcslen): New function, for Solaris 2.5.1.
14367         (VASNPRINTF): Use it instead of wcslen.
14368
14369 2003-11-16  Bruno Haible  <bruno@clisp.org>
14370
14371         * lib/xsize.h (xmax): New function.
14372         (xsum, xsum3, xsum4): Declare as "pure" functions.
14373
14374 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14375
14376         * modules/xalloc (Files): Undo latest change, since xalloc.h
14377         no longer needs SIZE_MAX or PTRDIFF_MAX.
14378
14379 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14380
14381         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
14382         gl_PTRDIFF_MAX.
14383
14384 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14385
14386         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
14387         "return", to pacify some unknown compiler.  Problem reported
14388         by Joerg Schilling.
14389
14390 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14391
14392         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
14393         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
14394         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
14395         heuristic is just as accurate as far as we know, and it removes a
14396         dependency on size_max.m4 and ptrdiff_max.m4.
14397
14398 2003-11-11  Bruno Haible  <bruno@clisp.org>
14399
14400         * modules/xsize (Files): Add m4/size_max.m4.
14401         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
14402
14403 2003-11-11  Bruno Haible  <bruno@clisp.org>
14404
14405         * m4/size_max.m4: New file.
14406         * m4/ptrdiff_max.m4: New file.
14407         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
14408         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
14409         (gl_XALLOC): Invoke it.
14410
14411 2003-11-11  Bruno Haible  <bruno@clisp.org>
14412
14413         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
14414         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
14415         defined.
14416
14417 2003-11-10  Paul Eggert  <eggert@twinsun.com>
14418
14419         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
14420         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
14421         rejected some allocations of exactly SIZE_MAX - 2 bytes.
14422         From Bruno Haible.
14423         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
14424         not (size_t) -1, since it's defined here.
14425
14426 2003-11-09  Karl Berry  <karl@gnu.org>
14427
14428         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
14429
14430 2003-11-06  Paul Eggert  <eggert@twinsun.com>
14431
14432         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
14433         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
14434         Reject sizes of exactly SIZE_MAX bytes.
14435         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
14436         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
14437
14438 2003-11-05  Bruno Haible  <bruno@clisp.org>
14439
14440         * lib/xsize.h: Include limits.h, to avoid a possible collision with
14441         SIZE_MAX defined in <limits.h> on Solaris.
14442
14443 2003-11-04  Jim Meyering  <jim@meyering.net>
14444
14445         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
14446         variable names, rather than @VAR@.
14447         * modules/poll: Likewise.
14448
14449 2003-11-04  Bruno Haible  <bruno@clisp.org>
14450
14451         * modules/xsize: New file.
14452         * modules/linebreak: Depend on xsize.
14453         * MODULES.html.sh (func_all_modules): Add xsize.
14454
14455 2003-11-04  Bruno Haible  <bruno@clisp.org>
14456
14457         * m4/xsize.m4: New file.
14458
14459 2003-11-04  Bruno Haible  <bruno@clisp.org>
14460
14461         * lib/xsize.h: New file.
14462         * lib/linebreak.c: Include xsize.h.
14463         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
14464         argument for overflow.
14465         Suggested by Paul Eggert.
14466
14467 2003-11-03  Karl Berry  <karl@gnu.org>
14468
14469         * config/config.{guess,sub}: update from config.
14470
14471 2003-11-03  Jim Meyering  <jim@meyering.net>
14472
14473         * modules/userspec (lib_SOURCES): Add userspec.h.
14474         (Include): Add "userspec.h".
14475         Improve description.
14476
14477 2003-11-03  Jim Meyering  <jim@meyering.net>
14478
14479         * lib/userspec.c: Include "userspec.h".
14480         * lib/userspec.h: New file.
14481
14482 2003-11-03  Bruno Haible  <bruno@clisp.org>
14483
14484         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
14485
14486 2003-11-03  Bruno Haible  <bruno@clisp.org>
14487
14488         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
14489         available, to avoid (extremely rare) race condition.
14490         Suggested by Paul Eggert.
14491
14492 2003-11-02  Karl Berry  <karl@gnu.org>
14493
14494         * config/srclist.txt (vasprintf.c): sync broken, sigh.
14495
14496 2003-10-31  Paul Eggert  <eggert@twinsun.com>
14497
14498         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
14499         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
14500         (read_filesystem_list): Set and use me_type_malloced.
14501         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
14502         whatever the type happens to be), for brevity and consistency.
14503         Check for size calculation overflow on Alphas running OSF/1.
14504
14505 2003-10-31  Jim Meyering  <jim@meyering.net>
14506
14507         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
14508
14509         * lib/linebuffer.c: Include <string.h> for declaration of memset.
14510
14511 2003-10-30  Paul Eggert  <eggert@twinsun.com>
14512             Bruno Haible  <bruno@clisp.org>
14513
14514         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
14515         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
14516
14517 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
14518
14519         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
14520         netbsd*-gnu*.  Suggested by Robert Millan.
14521
14522 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14523
14524         * modules/group-member: Depend on stdbool.
14525
14526 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14527
14528         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
14529
14530 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14531
14532         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
14533         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
14534         after the 'gnu' in these cases.  This fixes some bugs in the
14535         previous change, and is based on suggestions by Robert Millan.
14536
14537 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14538
14539         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
14540         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
14541         no longer needed.
14542         * lib/quotearg.c (quotearg_n_options): Use it.
14543         * lib/group-member.c: Include <stdbool.h>.
14544         (free_group_info): Arg is now const *; don't free arg.
14545         (get_group_info): Now returns bool and accepts struct group_info *,
14546         rather than returning a malloc'ed struct group_info *.
14547         All uses changed.  Check for overflow in internal size calculation.
14548
14549         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
14550         rather than xmalloc/xrealloc.
14551         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
14552         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
14553         conformance bug: the old code used a pointer after freeing the
14554         storage that it addressed.
14555         * lib/hash.c (hash_initialize): Simplify the code by using
14556         xalloc_oversized rather than doing it by hand.
14557         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
14558         the buffer preserved.  Use free and xmalloc instead.
14559         * lib/quotearg.c (quotearg_n_options): Likewise.
14560         Use a simpler test for size overflow.  Don't use xalloc_oversized
14561         because unsigned int might be wider than size_t (!); this suggests
14562         that we should switch from unsigned int to size_t for slot numbers.
14563
14564 2003-10-28  Paul Eggert  <eggert@twinsun.com>
14565
14566         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
14567         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
14568         NetBSD kernels.  Requested by Richard Stallman.
14569
14570 2003-10-27  Paul Eggert  <eggert@twinsun.com>
14571
14572         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
14573         to allocate the returned structure.  Do not allocate a subarray,
14574         as x2nrealloc will do that.
14575         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
14576         instead of xnrealloc.
14577         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
14578
14579 2003-10-27  Bruno Haible  <bruno@clisp.org>
14580
14581         * lib/stdbool_.h: Better support for BeOS.
14582
14583 2003-10-26  Paul Eggert  <eggert@twinsun.com>
14584
14585         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
14586         now uses inline.
14587
14588 2003-10-26  Paul Eggert  <eggert@twinsun.com>
14589
14590         * lib/xalloc.h (xalloc_oversized): New static inline function, for
14591         callers that want to do their own size-overflow checking.  Include
14592         <stdbool.h>, since xalloc_oversized returns bool.
14593         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
14594         to use xalloc_oversized.
14595
14596         Add two functions x2realloc, x2nrealloc, for programs that grow
14597         arrays dynamically by doubling their sizes.
14598         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
14599         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
14600         New functions.
14601
14602         Port to C99 semantics for 'inline' of external functions.
14603         Bug reported by Bruno Haible.
14604         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
14605         with the old contents of xnmalloc.
14606         (xnmalloc, xmalloc): Use it.
14607         (xnrealloc_inline): New static inline function,
14608         with the old contents of xnrealloc.
14609         (xnrealloc, xrealloc): Use it.
14610
14611         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
14612         that.
14613
14614 2003-10-26  Karl Berry  <karl@gnu.org>
14615
14616         * config/srclist.txt (COPYING.DOC): no longer available from
14617         /gd/gnuorg; don't know where the ultimate source is.
14618
14619 2003-10-25  Paul Eggert  <eggert@twinsun.com>
14620
14621         Fix several address-calculation bugs in the hash modules,
14622         plus some minor code cleanup.
14623
14624         * lib/hash.h: Include <stdbool.h>, for bool.
14625         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
14626         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
14627         hash_get_n_entries, hash_get_max_bucket_length,
14628         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
14629         hash_rehash): Use size_t rather than unsigned.
14630         * lib/hash.c (struct hash_table, hash_get_n_buckets,
14631         hash_get_n_buckets_used, hash_get_n_entries,
14632         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
14633         hash_get_entries, hash_do_for_each, hash_string, is_prime,
14634         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
14635         Likewise.
14636         (SIZE_MAX): Define if not defined.
14637         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
14638         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
14639         hash_print):
14640         Use const * when possible.
14641         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
14642         (check_tuning): Fix bug: if tuning parameters were very close to
14643         0 or 1, rounding errors could have caused subscript violations.
14644         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
14645         (hash_initialize): Add 'fail:' label
14646         to free table and return NULL, and use it to simplify code.
14647         Use calloc rather than clearing the storage ourself.
14648         (hash_initialize, hash_rehash): Check for arithmetic overflow in
14649         buffer size calculations.
14650         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
14651         Include <stddef.h>, for size_t.
14652         * lib/hash-pjw.c (hash_pjw): Likewise.
14653         Switch to method described by Bruno Haible.
14654         Include <limits.h>, for CHAR_BIT.
14655         (SIZE_BITS): New macro.
14656
14657 2003-10-23  Paul Eggert  <eggert@twinsun.com>
14658
14659         * m4/getline.m4 (AM_FUNC_GETLINE):
14660         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
14661         hosts.  Problem reported by Derek Robert Price in
14662         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
14663         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
14664         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
14665
14666 2003-10-21  Paul Eggert  <eggert@twinsun.com>
14667
14668         * lib/getndelim2.c (getndelim2): When size calculation overflows,
14669         ceiling the allocation at NMAX bytes rather than silently
14670         discarding input bytes before NMAX is reached.  This makes
14671         a difference only if NMAX exceeds SIZE_MAX / 2.
14672
14673         * lib/obstack.c: Merge from glibc.
14674         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
14675         Add libc_hidden_def (_obstack_newchunk).
14676         (_obstack_free) [! defined _LIBC]: Remove.
14677         [defined _LIBC]: Make a strong alias from obstack_free, rather than
14678         a clone of the function body.
14679         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
14680         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
14681
14682         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
14683         glibc.
14684         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
14685         arg to memcpy.
14686
14687         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
14688         (obstack_ptr_grow_fast, obstack_int_grow_fast):
14689         Don't use lvalue casts, as GCC plans to remove support for them
14690         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
14691         was also present in the non-GCC version, indicating that this
14692         code had always been buggy and had never been widely used.
14693         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
14694         Use the fast variant of each macro, rather than copying the
14695         definiens of the fast variant; that way, we'll be more likely to
14696         catch future bugs in the fast variants.
14697
14698 2003-10-20  Bruno Haible  <bruno@clisp.org>
14699
14700         * modules/wait-process: New file.
14701         * MODULES.html.sh (func_all_modules): Add wait-process.
14702
14703 2003-10-20  Bruno Haible  <bruno@clisp.org>
14704
14705         * m4/wait-process.m4: New file.
14706
14707 2003-10-20  Bruno Haible  <bruno@clisp.org>
14708
14709         * lib/wait-process.h: New file, from GNU gettext.
14710         * lib/wait-process.c: New file, from GNU gettext.
14711
14712 2003-10-19  Jim Meyering  <jim@meyering.net>
14713
14714         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
14715         HPUX 10.20.
14716
14717 2003-10-18  Karl Berry  <karl@gnu.org>
14718
14719         * config/config.guess: update from config.
14720
14721 2003-10-16  Paul Eggert  <eggert@twinsun.com>
14722
14723         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
14724         (getgroups): First arg is int, not size_t.
14725         Don't let 'free' mangle errno.
14726
14727 2003-10-16  Paul Eggert  <eggert@twinsun.com>
14728
14729         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
14730
14731 2003-10-16  Karl Berry  <karl@gnu.org>
14732
14733         * config/config.{guess,sub}: update from config.
14734
14735 2003-10-16  Jim Meyering  <jim@meyering.net>
14736
14737         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
14738         memcpy.
14739
14740 2003-10-15  Paul Eggert  <eggert@twinsun.com>
14741
14742         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
14743         (SIZE_MAX): Remove.
14744         (new_exclude, add_exclude_file): Initial size no longer needs to
14745         be a power of 2.
14746         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
14747         our own address arithmetic overflow checking.
14748
14749         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
14750         (fnmatch): Do not alloca more than 2000 wide characters;
14751         instead, use malloc for large buffers.
14752         Check for address arithmetic overflow, and return -1
14753         with errno set to ENOMEM in that case.
14754         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
14755         (NEW_PATTERN): Do not alloca more than 8000 bytes;
14756         instead, return -1.  Check for address arithmetic overflow.
14757
14758 2003-10-14  Paul Eggert  <eggert@twinsun.com>
14759
14760         Handle invalid suffixes and overflow independently, so that
14761         callers can treat them independently as needed.  Fix some bugs in
14762         suffix handling, e.g., "100k@" was not diagnosed as an invalid
14763         suffix for a human-readable blocksize.  The major caller-visible
14764         change is the addition of a new
14765         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
14766         that both overflow and suffix chars were found.
14767
14768         * lib/human.c (humblock): Don't check separately for invalid suffix
14769         char; that is xstrtoumax's job (now that its bug is fixed).
14770         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
14771         INTMAX_MAX]: New macros.
14772         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
14773         TYPE_MAXIMUM): New macros.
14774         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
14775         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
14776         if overflow occurs, as it's what __strtol does and it's more useful
14777         in practice.
14778         (__xstrtol): If __strtol reports some error other than ERANGE,
14779         reflect it to the caller as LONGINT_INVALID.  If it reports
14780         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
14781         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
14782         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
14783         value.
14784         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
14785         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
14786         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
14787         [defined UINTMAX_MAX]: New macros.
14788
14789 2003-10-14  Bruno Haible  <bruno@clisp.org>
14790
14791         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
14792
14793 2003-10-14  Bruno Haible  <bruno@clisp.org>
14794
14795         * m4/sig_atomic_t: New file, from GNU gettext.
14796         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
14797
14798 2003-10-14  Bruno Haible  <bruno@clisp.org>
14799
14800         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
14801         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
14802         Also use volatile where needed.
14803
14804 2003-10-12  Paul Eggert  <eggert@twinsun.com>
14805
14806         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
14807         Change maintainer from Bruno Haible to 'all'.
14808
14809 2003-10-12  Paul Eggert  <eggert@twinsun.com>
14810
14811         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
14812
14813 2003-10-12  Paul Eggert  <eggert@twinsun.com>
14814
14815         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
14816         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
14817         and define in terms of the other primitives.
14818         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
14819         (SIZE_MAX): Define if not already defined.
14820         (array_size_overflow): New function.
14821         (xalloc_die): Abort instead of exiting if 'error' returns.
14822         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
14823         (xmalloc, xrealloc): Use them.
14824         (xcalloc): Check for address arithmetic overflow.
14825         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
14826         a bit faster than strcpy.
14827
14828 2003-10-10  Simon Josefsson  <jas@extundo.com>
14829
14830         * modules/argp (Depends-on): Add restrict and strcase.
14831
14832 2003-10-10  Simon Josefsson  <jas@extundo.com>
14833
14834         * m4/argp.m4: Add AC_C_INLINE.
14835
14836 2003-10-08  Paul Eggert  <eggert@twinsun.com>
14837
14838         Merge getpass from libc, plus a few fixes.
14839
14840         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
14841         Include <stdbool.h>.
14842         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
14843         __fsetlocking to empty.
14844         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
14845         do include <bits/libc-lock.h>.
14846         Do not include <fcntl.h>; not needed.
14847         [_LIBC]: Include <wchar.h>.
14848         (NOTCANCEL_MODE): New macro.
14849         (flockfile, funlockfile) [_LIBC]: New macros.
14850         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
14851         [!_LIBC]: New macros.
14852         (call_fclose): New function.
14853         (getpass): Use it.  Save tty stream separately; this simplifies the
14854         code and makes it more reliable if stdin happens to equal stdout.
14855         Invoke __fsetlocking on tty.
14856         Handle thread cancellation if needed.
14857         Namespace cleanup (use __tcgetattr, __getline).
14858         Use bool for Booleans.
14859         [USE_IN_LIBIO]: Handle wide streams.
14860         [!_LIBC]: Unconditionally do the fseek, since we don't know what
14861         stream might go where.
14862
14863         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
14864         doesn't have to include <stdio.h> before us.
14865         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
14866         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
14867         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
14868         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
14869         if not declared, so that we can use getpass.c code from libc without
14870         rewriting it.
14871         (flockfile, ftrylockfile, funlockfile): New macros.
14872
14873 2003-10-08  Paul Eggert  <eggert@twinsun.com>
14874
14875         * modules/getpass: Depend on stdbool.
14876
14877 2003-10-08  Paul Eggert  <eggert@twinsun.com>
14878
14879         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
14880
14881 2003-10-07  Karl Berry  <karl@gnu.org>
14882
14883         * config/config.{guess,sub}: update from config.
14884
14885 2003-10-06  Jim Meyering  <jim@meyering.net>
14886             Bruno Haible  <bruno@clisp.org>
14887
14888         This lets translators provide better translations for the
14889         "Written by ..." part of --version output.
14890         * lib/version-etc.h: Include stdarg.h.
14891         (version_etc_copyright): Declare as readonly.
14892         (version_etc): Make this function variadic with a NULL-terminated list
14893         of author name strings.
14894         (version_etc_va): New declaration.
14895         * lib/version-etc.c: Include stdarg.h, stdlib.h.
14896         (version_etc_copyright): Declare as readonly.
14897         (version_etc_va): New function. Provide a different translatable string
14898         for each possible number of authors < 10. Abbreviate when there are 10
14899         authors or more.
14900         (version_etc): Make this function variadic. Call version_etc_va.
14901         Suggestion from Gary V. Vaughan.
14902
14903         * lib/long-options.h (parse_long_options): Change prototype: the
14904         authors string is moved to the end and becomes variadic.
14905         * lib/long-options.c: Include stdarg.h.
14906         (parse_long_options): Make this function variadic, too.
14907         Call version_etc_va, not version_etc.
14908
14909 2003-10-06  Bruno Haible  <bruno@clisp.org>
14910
14911         * modules/version-etc-2: Remove file.
14912         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
14913
14914 2003-10-06  Bruno Haible  <bruno@clisp.org>
14915
14916         * modules/fatal-signal: New file.
14917         * MODULES.html.sh (func_all_modules): Add fatal-signal.
14918
14919 2003-10-06  Bruno Haible  <bruno@clisp.org>
14920
14921         * m4/fatal-signal.m4: New file.
14922         * m4/signalblocking.m4: New file, from GNU gettext.
14923
14924 2003-10-06  Bruno Haible  <bruno@clisp.org>
14925
14926         * lib/version-etc-2.h: Remove file.
14927         * lib/version-etc-2.c: Remove file.
14928
14929 2003-10-06  Bruno Haible  <bruno@clisp.org>
14930
14931         * lib/fatal-signal.h: New file, from GNU gettext.
14932         * lib/fatal-signal.c: New file, from GNU gettext.
14933
14934 2003-10-05  Paul Eggert  <eggert@twinsun.com>
14935
14936         * README: Rework advice for preventing empty .o files.
14937         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
14938         not <sys/types.h>.
14939
14940 2003-10-04  Karl Berry  <karl@gnu.org>
14941
14942         * lib/argp*: update from libc.
14943
14944 2003-10-04  Karl Berry  <karl@gnu.org>
14945
14946         * config/config.{guess,sub}: update from config.
14947
14948 2003-10-02  Bruno Haible  <bruno@clisp.org>
14949
14950         * modules/lchown (Include): Add lchown.h.
14951         * modules/time_r (Include): Use "..." syntax.
14952         * modules/xgetdomainname (Include): Add xgetdomainname.h.
14953
14954 2003-10-01  Simon Josefsson  <jas@extundo.com>
14955
14956         * MODULES.html.sh (func_all_modules): Move gethostname from section
14957         'based on' to section 'lacking' POSIX:2001.
14958
14959 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
14960
14961         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
14962         to output mode on the same stream.
14963
14964 2003-09-29  Paul Eggert  <eggert@twinsun.com>
14965
14966         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
14967         Fix arg typo in previous patch.
14968
14969 2003-09-28  Jim Meyering  <jim@meyering.net>
14970
14971         * lib/error.c: Correct cpp indentation.
14972
14973 2003-09-27  Paul Eggert  <eggert@twinsun.com>
14974
14975         * modules/free: New file.
14976
14977 2003-09-27  Paul Eggert  <eggert@twinsun.com>
14978
14979         * m4/free.m4: New file.
14980
14981 2003-09-27  Paul Eggert  <eggert@twinsun.com>
14982
14983         * lib/minmax.h (MIN, MAX)
14984         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
14985         Omit the special code that used __typeof__, since we worry that
14986         it could be more trouble than it's worth.  See:
14987         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
14988         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
14989
14990         * lib/free.c: New file.
14991
14992 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
14993
14994         Trivial fixes to Makefile.am parts of module listings.
14995         * modules/strstr: Append strstr.h to lib_SOURCES.
14996         * modules/strcase: Likewise, for strcase.h.
14997
14998 2003-09-27  Karl Berry  <karl@gnu.org>
14999
15000         * config/mkinstalldirs: update from automake.
15001
15002 2003-09-26  Paul Eggert  <eggert@twinsun.com>
15003
15004         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
15005         (error_tail): Do not loop, reallocating temporary buffer, since
15006         the output cannot contain more wide characters than the input
15007         contains bytes, the size must be big enough already.  This avoids
15008         one potential size overflow calculation.  Check for size overflow
15009         when calculating temporary buffer size.  Free temporary buffer
15010         when done, if it was allocated with malloc; this plugs a memory
15011         leak.  Remove casts from void * to pointers, that are no longer
15012         needed now that we're assuming C89 or better.
15013
15014         Merge error changes from glibc.
15015
15016         * lib/error.c, error.h: Update copyright notice header to match glibc.
15017         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
15018         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
15019         Disable cancellation while printing error.
15020         * lib/error.h: Prepend __ to parameter names.
15021
15022 2003-09-26  Jim Meyering  <jim@meyering.net>
15023
15024         * lib/error.c (error_tail): Move some declarations
15025         into inner scope where the local variables are used.
15026
15027 2003-09-26  Bruno Haible  <bruno@clisp.org>
15028
15029         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
15030         stpncpy().
15031         Don't define stpncpy through config.h; it's now done through stpncpy.h.
15032
15033 2003-09-26  Bruno Haible  <bruno@clisp.org>
15034
15035         * lib/stpncpy.h (gnu_stpncpy): New declaration.
15036         (stpncpy): Define as alias for gnu_stpncpy.
15037         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
15038
15039 2003-09-25  Simon Josefsson  <jas@extundo.com>
15040
15041         * lib/xgetdomainname.h: New file.
15042         * lib/xgetdomainname.c: New file.
15043
15044 2003-09-25  Simon Josefsson  <jas@extundo.com>
15045             Bruno Haible  <bruno@clisp.org>
15046
15047         * modules/getdomainname: New file.
15048         * modules/xgetdomainname: New file.
15049         * MODULES.html.sh (func_all_modules): Add getdomainname,
15050         xgetdomainname.
15051
15052 2003-09-25  Simon Josefsson  <jas@extundo.com>
15053             Bruno Haible  <bruno@clisp.org>
15054
15055         * m4/getdomainname.m4: New file.
15056
15057 2003-09-25  Simon Josefsson  <jas@extundo.com>
15058             Bruno Haible  <bruno@clisp.org>
15059
15060         * lib/getdomainname.h: New file.
15061         * lib/getdomainname.c: New file.
15062
15063 2003-09-25  Karl Berry  <karl@gnu.org>
15064
15065         * lib/argp-fmtstream.c, argp-help.c: update from libc.
15066
15067 2003-09-25  Karl Berry  <karl@gnu.org>
15068
15069         * config/install-sh: update from automake.
15070
15071 2003-09-25  Bruno Haible  <bruno@clisp.org>
15072
15073         * modules/version-etc-2: New file, from modules/version-etc with
15074         modifications.
15075         * MODULES.html.sh (func_all_modules): Add version-etc-2.
15076
15077 2003-09-25  Bruno Haible  <bruno@clisp.org>
15078
15079         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
15080         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
15081
15082 2003-09-24  Simon Josefsson  <jas@extundo.com>
15083
15084         * modules/xgethostname: Add xgethostname.h.
15085
15086 2003-09-24  Paul Eggert  <eggert@twinsun.com>
15087
15088         * lib/linebuffer.c (freebuffer): Don't free the argument, just
15089         the buffer associated with the argument.  Bug reported by
15090         Simon Josefsson.
15091
15092 2003-09-24  Paul Eggert  <eggert@twinsun.com>
15093
15094         * README: Document assumptions that 'int' is at least 32 bits
15095         wide, that integer arithmetic is 2's complement without overflow,
15096         that there are no holes in integer values, that adding sizes of
15097         two nonoverlapping objects can't overflow, and that all-bits-zero
15098         yields scalar zero.  Fix spelling and capitalization typos.
15099
15100 2003-09-19  Karl Berry  <karl@gnu.org>
15101
15102         * lib/argp.h: update from libc.
15103
15104 2003-09-17  Paul Eggert  <eggert@twinsun.com>
15105
15106         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
15107         to avoid spurious warnings like "AC_RUN_IFELSE was called before
15108         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
15109
15110 2003-09-17  Paul Eggert  <eggert@twinsun.com>
15111
15112         * gnulib-tool: Use "test -h", not "test -L", for portability
15113         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
15114         (tags_regexp): Remove, since \| doesn't conform to POSIX.
15115         (sed_extract_prog): Issue s commands one-by-one, rather than
15116         using \| in one s command.
15117
15118 2003-09-16  Paul Eggert  <eggert@twinsun.com>
15119
15120         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
15121         input error, instead of returning NULL the next time we are called
15122         (and therefore losing track of errno).
15123
15124 2003-09-16  Bruno Haible  <bruno@clisp.org>
15125
15126         * gnulib-tool (func_create_testdir): Warn about duplicated
15127         dependencies.
15128
15129 2003-09-15  Paul Eggert  <eggert@twinsun.com>
15130
15131         * modules/argmatch, modules/fatal, modules/obstack,
15132         modules/xalloc, modules/xgethostname: Sort dependencies by
15133         importance, not alphabetically.
15134
15135 2003-09-15  Paul Eggert  <eggert@twinsun.com>
15136
15137         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
15138         fails, so that the caller gets the proper errno.
15139
15140         * lib/readutmp.c (read_utmp): Likewise.
15141         Check for fstat error.  Close stream and free storage
15142         when failing.
15143
15144 2003-09-14  Karl Berry  <karl@gnu.org>
15145
15146         * config/srclist.txt (strdup.c): disable for c89 changes.
15147
15148 2003-09-14  Jim Meyering  <jim@meyering.net>
15149
15150         * lib/getloadavg.c: Correct cpp indentation.
15151         * lib/strdup.c: Likewise.
15152         * lib/vasnprintf.c: Likewise.
15153
15154 2003-09-14  Bruno Haible  <bruno@clisp.org>
15155
15156         * modules/fwriteerror: New file.
15157         * MODULES.html.sh (func_all_modules): Add fwriteerror.
15158
15159 2003-09-14  Bruno Haible  <bruno@clisp.org>
15160
15161         * lib/fwriteerror.h: New file.
15162         * lib/fwriteerror.c: New file.
15163
15164 2003-09-12  Paul Eggert  <eggert@twinsun.com>
15165
15166         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
15167         modules/xgethostname, modules/xalloc: Depend on exit.
15168
15169 2003-09-12  Paul Eggert  <eggert@twinsun.com>
15170
15171         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
15172
15173         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
15174         and AC_MINIX, too, so that their extensions are available.
15175
15176         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
15177         This macro has been superseded by gl_BACKUPFILE.
15178
15179         More patches to assume C89 or better.
15180
15181         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
15182
15183         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
15184         unconditionally.
15185         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
15186         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
15187         Include <string.h>, <stdlib.h> unconditionally.
15188         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
15189         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
15190         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
15191         headers or for string.h.
15192         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
15193         or strtoul.
15194
15195         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
15196         headers.
15197         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
15198         * m4/userspec.m4 (gl_USERSPEC): Likewise.
15199         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
15200         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
15201         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
15202         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
15203         memcpy, memset.
15204         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
15205         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
15206         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
15207         strtol.
15208         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
15209         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
15210         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
15211         strtoul.
15212
15213 2003-09-12  Paul Eggert  <eggert@twinsun.com>
15214
15215         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
15216         * lib/obstack.c [!defined _LIBC]: Likewise.
15217         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
15218         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
15219         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
15220
15221         More changes to assume C89 or better.
15222
15223         * lib/error.c (error_tail): Assume vprintf.
15224
15225         * lib/argmatch.c (getenv): Remove decl.
15226         * lib/progreloc.c (get_full_program_name): Define via prototype.
15227         * lib/setenv.c (clearenv): Likewise.
15228         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
15229         needed.
15230         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
15231         (malloc, memcpy): Remove decls.
15232         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
15233         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
15234         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
15235         (memcpy): Remove macro.
15236         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
15237         (__P): Remove.  All uses removed.
15238         (PTR): Remove.  All uses changed to void *.
15239         (CHAR_BIT, NULL): Remove.
15240         (spaces, zeros, memset_space, memset_zero)
15241         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
15242         Remove.
15243         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
15244         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
15245         Define with prototype.
15246         Remove now-unnecessary prototype decl.
15247         (extra_args_spec): Assume ANSI C.  All uses changed.
15248         (extra_args_spec_iso): Remove.
15249         (my_strftime, emacs_strftimeu): Define via prototype.
15250         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
15251         unconditionally.
15252         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
15253         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
15254         (strtoul, strtol): Remove decls.
15255         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
15256         LONG_MAX): Remove.
15257         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
15258         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
15259         (LOCALE_PARAM_PROTO): New macro.
15260         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
15261         (INTERNAL (strtol), strtol): Define with a prototype.
15262         (PARAMS): Remove.  All uses removed.
15263         * lib/tempname.c: Include <string.h> unconditionally.
15264         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
15265         * lib/xgethostname.c (main): Define with a prototype.
15266         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
15267         Include <stdlib.h> unconditionally.
15268         (calloc, malloc, realloc, free): Remove decls.
15269         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
15270         Include <stdlib.h> unconditionally.  Sort include file names.
15271         (strtod): Remove.
15272         (xstrtod): Define with a prototype.
15273         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
15274         (strtol, strtoul): Remove decls.
15275
15276 2003-09-11  Paul Eggert  <eggert@twinsun.com>
15277
15278         More patches to assume C89 or better.
15279         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
15280         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
15281         string.h, memchr, STDC_HEADERS.
15282
15283 2003-09-11  Paul Eggert  <eggert@twinsun.com>
15284
15285         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
15286         Include <stdlib.h>, <string.h> unconditionally.
15287         Remove now-unnecessary cast to char *.
15288         * lib/strnlen.c: Include <string.h> unconditionally.
15289         * lib/yesno.c (yesno): Define with a prototype.
15290
15291 2003-09-11  Bruno Haible  <bruno@clisp.org>
15292
15293         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
15294
15295 2003-09-10  Jim Meyering  <jim@meyering.net>
15296
15297         * lib/error.c: Correct indentation of cpp directives.
15298
15299 2003-09-10  Bruno Haible  <bruno@clisp.org>
15300
15301         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
15302         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
15303         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
15304         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
15305         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
15306         <stdlib.h> and <string.h> checks.
15307         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
15308         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
15309
15310 2003-09-10  Bruno Haible  <bruno@clisp.org>
15311
15312         * lib/strcspn.c: Include <string.h> unconditionally.
15313         * lib/strpbrk.c: Include <string.h> unconditionally.
15314         * lib/strstr.c: Include <string.h> unconditionally.
15315         * lib/unicodeio.c: Include <string.h> unconditionally.
15316         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
15317         * lib/unsetenv.c: Likewise.
15318         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
15319         * lib/yesno.c: Include <stdlib.h> unconditionally.
15320         (rpmatch): Add prototype.
15321
15322 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15323
15324         More patches to assume C89 or better.
15325         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
15326         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
15327         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
15328         or for string.h.
15329         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
15330         stdlib.h.
15331         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
15332         C headers.
15333         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
15334         string.h.
15335         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
15336         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
15337         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
15338         or for string.h.
15339         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
15340         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
15341         C headers.
15342         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
15343         memcpy.
15344         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
15345         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
15346         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
15347         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
15348         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
15349         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
15350         string.h, free.
15351         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
15352         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
15353         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
15354         C headers, or for string.h.
15355         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
15356         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
15357         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
15358         headers, memory.h, stdlib.h, string.h, strings.h.
15359         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
15360         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
15361         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
15362         strchr.
15363         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
15364         headers, memory.h, string.h.
15365         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
15366         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
15367         free.
15368         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
15369         headers.
15370         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
15371         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
15372         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
15373         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
15374         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
15375
15376 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15377
15378         More K&R removal.
15379
15380         * lib/acosl.c (main): Use a prototype.
15381         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
15382         tanl.c: Likewise.
15383
15384         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
15385
15386         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
15387         (getopt, etopt_long, getopt_long_only, _getopt_internal)
15388         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
15389         with a prototype.
15390         * lib/getopt.c (const): Remove macro.
15391         Include <string.h> unconditionally.
15392         (my_index): Remove; all uses changed to strchr.
15393         (strlen): Remove decl.
15394         (exchange): Remove forward decl; no longer needed.
15395         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
15396         Define with prototype.
15397         * lib/getopt1.c (const): Remove macro.
15398         (getopt_long, getopt_long_only, main): Define with prototype.
15399
15400         * lib/getugroups.c: Include <string.h> unconditionally.
15401
15402         * lib/getusershell.c: Include <stdlib.h> unconditionally.
15403         (getusershell, setusershell, endusershell, readname, main):
15404         Define with prototypes.
15405
15406         * lib/group-member.c: Include group-member.h first.
15407         Include <stdlib.h> unconditionally.
15408
15409         * lib/hard-locale.c: Include hard-locale.h first.
15410         Include <stdlib.h>, <string.h> unconditionally.
15411
15412         * lib/hash.c (free, malloc): Remove decls.
15413         Include <stdlib.h> unconditionally.
15414
15415         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
15416         (getenv): Do not declare.
15417
15418         * lib/idcache.c: Include <string.h> unconditionally.
15419
15420         * lib/long-options.c: Include long-options.h first, to test interface.
15421         Include <stdlib.h> unconditionally.
15422
15423         * lib/makepath.c: Include makepath.h first, to test interface.
15424         Include <stdlib.h> and <string.h> unconditionally.
15425
15426         * lib/linebuffer.c: Include <stdlib.h>.
15427         (free): Remove decl.
15428
15429         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
15430         stddef.h. rpl_malloc returns void *, not char *.
15431         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
15432         prototype.
15433
15434         * lib/md5.h: Include <limits.h> unconditionally.
15435         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
15436         (__P): Remove; all uses removed.
15437         * lib/md5.c: Include "md5.h" first.
15438         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
15439         md5_buffer, md5_process_bytes, md5_process_block):
15440         Define with prototypes.
15441         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
15442         * lib/sha.c: Include "sha.h" first.
15443         Include <stdlib.h>, <string.h> unconditionally.
15444
15445         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
15446         * lib/memcmp.c (__ptr_t): Likewise.
15447         * lib/memrchr.c (__ptr_t): Likewise.
15448         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
15449         Include <string.h> unconditionally.
15450         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
15451         * lib/memchr.c: Include <stdlib.h> unconditionally.
15452         * lib/memchr.c (LONG_MAX): Remove.
15453         * lib/memrchr.c (LONG_MAX): Likewise.
15454         * lib/memchr.c (__memchr): Define via a prototype.
15455         * lib/memrchr.c (__memrchr): Likewise.
15456         * lib/memcmp.c (__P): Remove, and remove all uses.
15457         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
15458         Remove forward decls; no longer needed.
15459         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
15460         Use types required by C89 in prototype.
15461
15462         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
15463         * lib/savedir.c: Likewise.
15464         * lib/mkdir.c (free): Remove decl.
15465         * lib/rmdir.c (rmdir): Define with a prototype.
15466         * lib/savedir.c: Include savedir.h first, to test interface.
15467
15468         * lib/mktime.c (STDC_HEADERS): Remove.
15469         Include <stdlib.h>, <string.h> unconditionally.
15470
15471         * lib/modechange.c: Include <stdlib.h> unconditionally.
15472         (malloc): Remove decl.
15473
15474         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
15475         (free): Remove decl.
15476
15477         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
15478         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
15479         (This type really should be intptr_t, but that's a C99ism.)
15480         (_obstack_memcpy): Remove: all uses changed to memcpy.
15481         Include <string.h> unconditionally.
15482         (struct obstack): Assume __STDC__ for types of members
15483         chunkfun, freefun, extra_arg.
15484         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
15485         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
15486         obstack_begin, obstack_specify_allocation,
15487         obstack_specify_allocation_with_arg, obstack_chunkfun,
15488         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
15489         Remove unprototyped decls and the macros that use them.
15490         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
15491         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
15492         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
15493         (defined __STDC__ && __STDC__)]:
15494         Remove nonprototyped code.
15495         Include <stdlib.h> unconditionally.
15496         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
15497         _obstack_allocated_p, _obstack_free, obstack_free,
15498         _obstack_memory_used, print_and_abort):
15499         Define using prototypes.
15500         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
15501         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
15502         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
15503         obstack_next_free, obstack_object_size, obstack_room) [0]:
15504         Remove unused, unprototyped code.
15505
15506         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
15507
15508         * lib/physmem.c (physmem_total, physmem_available, main): Define
15509         with prototypes.
15510
15511         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
15512         (main): Define with a prototype.
15513
15514         * lib/posixver.c (getenv): Remove decl.
15515
15516         * lib/putenv.c (malloc): Returns void *, not char *.
15517         Include <string.h> unconditionally.
15518         (strchr, memcpy, NULL): Do not define.
15519
15520         * lib/readtokens.c: Include readtokens.h first, to test interface.
15521         Include <stdlib.h>, <string.h> unconditionally.
15522         (init_tokenbuffer): Define with a prototype.
15523
15524         * lib/regex.c (PARAMS): Remove.  All uses removed.
15525         All uses of _RE_ARGS removed, too.
15526         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15527         unconditionally.
15528         (bzero): Assume memset exists.
15529         (memcmp, memcpy, NULL): Remove.
15530         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
15531         char, or assignments to local vars of type signed char.
15532         (init_syntax_once, PREFIX(extract_number_and_incr),
15533         PREFIX(print_partial_compiled_pattern),
15534         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
15535         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
15536         PREFIX(regex_grow_registers), PREFIX(regex_compile),
15537         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
15538         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
15539         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
15540         wcs_compile_range, byte_compile_range, truncate_wchar,
15541         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
15542         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
15543         count_mbs_length, wcs_re_match_2_internal,
15544         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
15545         PREFIX(alt_match_null_string_p),
15546         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
15547         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
15548         regfree, PREFIX(extract_number)): Define with prototype.  Remove
15549         now-unnecessary declaration, if any.
15550         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
15551         regcomp, regexec):
15552         Remove now-unnecessary casts among pointer types.
15553         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
15554
15555         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
15556         (free): Remove decl.
15557
15558         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
15559
15560         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
15561         (free): Remove decl.
15562
15563         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
15564         * lib/xgetcwd.c: Likewise.
15565
15566         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
15567         (free): Remove decl.
15568
15569         * lib/strchrnul.c (strchrnul): Define with a prototype.
15570         Fix bug: c_in was not converted to char before searching.
15571
15572         The following changes are not K&R related:
15573
15574         * lib/group-member.h: Include <sys/types.h>, so that this file is
15575         self-contained.
15576         * lib/makepath.h: Likewise.
15577
15578         * lib/getusershell.c (readname, default_index, line_size, readname):
15579         Use size_t, not int, for sizes.
15580         (readname): If the size overflows, report an error instead of
15581         looping forever.
15582
15583 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15584
15585         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
15586         libc.
15587
15588 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15589
15590         * README: New section: portability guidelines.
15591
15592 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
15593
15594         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
15595         C89 spec.
15596
15597 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
15598
15599         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
15600
15601 2003-09-08  Paul Eggert  <eggert@twinsun.com>
15602
15603         Assume C89 or better; remove K&R cruft.
15604         A few of these changes were first proposed by Derek Robert Price
15605         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
15606
15607         * lib/addext.c: Include <string.h> unconditionally.
15608         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
15609         Don't declare getenv or malloc.
15610
15611         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
15612         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
15613         (NULL): Remove.
15614         (find_stack_direction, alloca): Use prototypes.
15615
15616         * lib/atexit.c (atexit): Define using a prototype.
15617
15618         * lib/basename.c, dirname.c, stripslash.c:
15619         Include <string.h> unconditionally.
15620
15621         * lib/bcopy.c: Include <stddef.h>.
15622         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
15623
15624         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
15625
15626         * lib/error.h (error, error_at_line, error_print_progname)
15627         [! (defined (__STDC__) && __STDC__)]: Remove decls.
15628         * lib/error.c: Include error.h first, to check interface.
15629         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
15630         (VA_START): Remove; all uses changeed to va_start.
15631         (exit, strerror): Remove decls.
15632         (error_print_progname): Prototype uncondionally.
15633         Don't include <errno.h>; no longer needed.
15634         (private_strerror): Remove.
15635         (error_tail): Always define.
15636         (error, error_at_line): Assume C89 or better; always use prototypes.
15637         * lib/fatal.c: Include "fatal.h" first, to test interface.
15638         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
15639         (VA_START): Remove; all uses changed to va_start.
15640         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
15641         this case.
15642         (exit): Remove decl.
15643         (fatal): Prototype unconditionally.  Assume va_start works.
15644         Abort at end, to pacify gcc.
15645
15646         * lib/euidaccess.c (main): Define with a prototype.
15647
15648         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
15649
15650         * lib/exitfail.c: Include <stdlib.h> unconditionally.
15651
15652         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
15653         prototypes.
15654         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
15655         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
15656         (getenv): Remove decl.
15657         (fnmatch): Define using a prototype.
15658         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
15659         (FCT): Define using a prototype.
15660
15661         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
15662
15663         * lib/gethostname.c: Include <stddef.h>.
15664         (gethostname): Define with prototype.  Length is size_t, not int.
15665
15666 2003-09-08  Paul Eggert  <eggert@twinsun.com>
15667
15668         Assume C89 or better; remove K&R cruft.
15669         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
15670         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
15671         string.h, getenv, malloc.
15672         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
15673         headers.
15674         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
15675         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
15676         do not check for strerror.
15677         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
15678         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
15679         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
15680         do not check for doprnt or vprintf.
15681         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
15682         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
15683
15684 2003-09-08  Paul Eggert  <eggert@twinsun.com>
15685
15686         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
15687         getversion.c should have been removed then, but was accidentally
15688         preserved.
15689
15690         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
15691         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
15692
15693 2003-09-08  Karl Berry  <karl@gnu.org>
15694
15695         * config/config.sub, config.guess, srclistvars.sh: update from savannah
15696                 config, forget about prep.
15697
15698         * config/depcomp, missing: update from automake.
15699
15700 2003-09-07  Paul Eggert  <eggert@twinsun.com>
15701
15702         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
15703         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
15704
15705 2003-09-07  Paul Eggert  <eggert@twinsun.com>
15706
15707         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
15708         copy_tm_result.  Bug reported by Simon Josefsson in
15709         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
15710
15711 2003-09-06  Paul Eggert  <eggert@twinsun.com>
15712
15713         * m4/time_r.m4: New file.
15714         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
15715         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
15716         is. Check for timegm declaration.
15717         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
15718         Do not check for gmtime_r.
15719         Replace mktime if __mktime_internal does not exist and if mktime
15720         hasn't been replaced already.
15721
15722 2003-09-06  Paul Eggert  <eggert@twinsun.com>
15723
15724         * lib/time_r.c, time_r.h: New files.
15725
15726         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
15727         __localtime_r.
15728         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
15729         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
15730
15731         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
15732         __gmtime_r.
15733         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
15734         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
15735         Include <time_r.h>.
15736
15737         * lib/timegm.c: Switch to glibc implementation, with the following
15738         changes:
15739         [defined HAVE_CONFIG_H]: Include <config.h>.
15740         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
15741         (__mktime_internal) [!defined _LIBC]: New decl.
15742         (__gmtime_r) [!defined _LIBC]: New macro and function.
15743         (timegm): Use a prototype, since gnulib assumes C89.
15744         Do not bother declaring tmp to be const, as it's not really usefu.
15745         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
15746         (timegm): Declare only if HAVE_DECL_TIMEGM.
15747
15748 2003-09-06  Paul Eggert  <eggert@twinsun.com>
15749
15750         * MODULES.html.sh (func_all_modules): Add time_r.
15751         * modules/time_r: New file.
15752         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
15753         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
15754
15755 2003-09-03  Paul Eggert  <eggert@twinsun.com>
15756
15757         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
15758         Bug reported by Lute Kamstra in
15759         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
15760
15761         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
15762         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
15763         course with correspondingly smaller numbers for tomorrow and
15764         yesterday.  From Tadayoshi Funaba.  Originally installed into
15765         sh-utils on 1999-08-07, but the patch got lost (I guess during the
15766         coreutils merge?).
15767
15768 2003-08-31  Simon Josefsson  <jas@extundo.com>
15769
15770         * modules/timegm: New file.
15771         * MODULES.html.sh (func_all_modules): Add timegm.
15772
15773 2003-08-31  Simon Josefsson  <jas@extundo.com>
15774
15775         * m4/timegm.m4: New file.
15776
15777 2003-08-31  Simon Josefsson  <jas@extundo.com>
15778
15779         * lib/timegm.h: New file.
15780         * lib/timegm.c: New file.  Based on
15781         wget-1.8.2/src/http.c:mktime_from_utc.
15782
15783 2003-08-31  Karl Berry  <karl@gnu.org>
15784
15785         * lib/argp.h: update from libc.
15786
15787 2003-08-28  Bruno Haible  <bruno@clisp.org>
15788
15789         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
15790         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
15791         followed by '#define fnmatch fnmatch_posix' gives an error.
15792
15793 2003-08-28  Bruno Haible  <bruno@clisp.org>
15794
15795         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
15796         warning on QNX, which defines O_BINARY to 000000.
15797
15798 2003-08-27  Jim Meyering  <jim@meyering.net>
15799
15800         * m4/mkstemp.m4: Require that the system mkstemp be able to create
15801         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
15802         would fail after 32.  Reported by Danny Levinson.  Details here:
15803         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
15804
15805 2003-08-24  Bruno Haible  <bruno@clisp.org>
15806
15807         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
15808         MSVC7 <stdio.h> is included later.
15809
15810 2003-08-22  Simon Josefsson  <jas@extundo.com>
15811
15812         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
15813
15814 2003-08-20  Karl Berry  <karl@gnu.org>
15815
15816         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
15817
15818 2003-08-20  Bruno Haible  <bruno@clisp.org>
15819
15820         * modules/progname: New file.
15821         * MODULES.html.sh (func_all_modules): Add progname.
15822
15823 2003-08-20  Bruno Haible  <bruno@clisp.org>
15824
15825         * lib/progname.h: New file, from GNU gettext.
15826         * lib/progname.c: New file, from GNU gettext.
15827         * lib/progreloc.c: New file, from GNU gettext.
15828
15829 2003-08-19  Jim Meyering  <jim@meyering.net>
15830
15831         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
15832         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
15833
15834 2003-08-19  Bruno Haible  <bruno@clisp.org>
15835
15836         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
15837         more.
15838
15839 2003-08-19  Bruno Haible  <bruno@clisp.org>
15840
15841         * lib/xstrdup.c: Assume <string.h> exists.
15842
15843 2003-08-18  Paul Eggert  <eggert@twinsun.com>
15844
15845         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
15846         in makefile rules.
15847
15848 2003-08-18  Jim Meyering  <jim@meyering.net>
15849
15850         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
15851         * m4/lib-ld.m4: Likewise.
15852
15853 2003-08-18  Jim Meyering  <jim@meyering.net>
15854
15855         * lib/setenv.h: Indent nested cpp directive.
15856         * lib/vasnprintf.c: Remove trailing blanks.
15857
15858 2003-08-17  Simon Josefsson  <jas@extundo.com>
15859
15860         * modules/xstrndup: New file.
15861         * MODULES.html.sh (func_all_modules): Add xstrndup.
15862
15863 2003-08-17  Simon Josefsson  <jas@extundo.com>
15864
15865         * modules/argp: Fix autoconf macro name. Add more dependencies.
15866
15867 2003-08-17  Simon Josefsson  <jas@extundo.com>
15868
15869         * m4/xstrndup.m4: New file.
15870
15871 2003-08-17  Simon Josefsson  <jas@extundo.com>
15872
15873         * m4/argp.m4: New file.
15874
15875 2003-08-17  Simon Josefsson  <jas@extundo.com>
15876             Bruno Haible  <bruno@clisp.org>
15877
15878         * lib/xstrndup.h: New file.
15879         * lib/xstrndup.c: New file.
15880
15881 2003-08-17  Bruno Haible  <bruno@clisp.org>
15882
15883         * modules/strndup (Files, Include): Add lib/strndup.h.
15884
15885 2003-08-17  Bruno Haible  <bruno@clisp.org>
15886
15887         * modules/euidaccess (Files): Add lib/euidaccess.h.
15888
15889 2003-08-17  Bruno Haible  <bruno@clisp.org>
15890
15891         * lib/strndup.h: New file.
15892
15893 2003-08-17  Bruno Haible  <bruno@clisp.org>
15894
15895         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
15896         like AC_GNU_SOURCE.
15897         * modules/extensions (configure.ac): Comment out the invocation of
15898         gl_USE_SYSTEM_EXTENSIONS.
15899
15900 2003-08-16  Paul Eggert  <eggert@twinsun.com>
15901
15902         Merges from coreutils, etc.
15903         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
15904         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
15905         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
15906         fixing a typo.
15907         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
15908         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
15909
15910 2003-08-16  Paul Eggert  <eggert@twinsun.com>
15911
15912         Document merge from coreutils.
15913         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
15914         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
15915         * modules/utime: Add m4/utimes-null.m4.
15916
15917 2003-08-16  Paul Eggert  <eggert@twinsun.com>
15918
15919         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
15920         space, undoing this 2003-08-12 change:
15921         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
15922
15923 2003-08-16  Paul Eggert  <eggert@twinsun.com>
15924
15925         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
15926         strtoul.c from libc, undoing this 2003-08-12 change:
15927         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
15928
15929 2003-08-16  Jim Meyering  <jim@meyering.net>
15930
15931         Merges from coreutils.
15932         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
15933         prefix.  Adjust cache variables similarly.  Create 500 rather than
15934         just 300 files, to exercise bug on Darwin6.5, too.
15935         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
15936         $missing_dir.
15937         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
15938         AM_SYS_POSIX_TERMIOS.
15939         Reported by mkc@mathdogs.com.
15940         Also change use of $am_cv_sys_posix_termios
15941         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
15942         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
15943         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
15944         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
15945         in /proc/mounts until it finds one with matching device number.  This
15946         is unnecessary when the FILE argument *is* a mount point.  No stat call
15947         is necessary in that case.  So, disable the statvfs-testing code on
15948         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
15949         as RedHat bug# 84846.
15950         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
15951         to 1MB, so as not to render systems with no stack size limit (e.g.,
15952         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
15953         Include <unistd.h>.  On some systems,
15954         it is required for the definition of _SC_PAGESIZE.
15955
15956 2003-08-16  Jim Meyering  <jim@meyering.net>
15957
15958         Merge from coreutils.
15959         * lib/xstrtoimax.c: #else #if -> #elif.
15960         * lib/xstrtoumax.c: Likewise.
15961
15962 2003-08-16  Jim Meyering  <jim@meyering.net>
15963
15964         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
15965         * m4/utimes.m4: Removed.
15966         * m4/utimes-null.m4: Renamed from utimes.m4.
15967
15968         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
15969         to 1MB, so as not to render systems with no stack size limit (e.g.,
15970         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
15971         Include <unistd.h>.  On some systems,
15972         it is required for the definition of _SC_PAGESIZE.
15973
15974 2003-08-16  Jim Meyering  <jim@meyering.net>
15975         and Paul Eggert  <eggert@cs.ucla.edu>
15976
15977         Merges from coreutils, etc.
15978
15979         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
15980         using the latest version from cvs.  This avoids problems with #line
15981         directives using a vendor (Sun) compiler.
15982         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
15983         Don't set GETGROUPS_LIB here; now it's
15984         done via getgroups.m4's wrapper function.
15985         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
15986         rather than just in sh-util/configure.in, so that the
15987         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
15988         same.
15989         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
15990         AC_FUNC_GETLOADAVG where to find getloadavg.c.
15991         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
15992         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
15993         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
15994         Remove code that is now done by the newly-required macros.
15995         Append $(EXEEXT) to DF_PROG.
15996         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
15997         Do not invoke or require the following here,
15998         since prereq.m4 or some gnulib .m4 now does this for us:
15999         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
16000         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
16001         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
16002         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
16003         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
16004         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
16005         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
16006         AC_FUNC_OBSTACK.
16007         Do not replace the following functions, as this is now the job
16008         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
16009         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
16010         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
16011         atexit getpass, strdup, getpagesize.
16012         Replace 'raise'.
16013         Do not check for the following functions, as this is now the job
16014         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
16015         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
16016         setregid.
16017         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
16018         Check for sys/sysctl.h.
16019         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
16020         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
16021         of checking for ssize_t ourselves.
16022
16023         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
16024         Require every macro that gnulib/modules/* suggests for us.
16025         (jm_PREREQ_ADDEXT): New macro.
16026         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
16027         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
16028
16029         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
16030         (gl_PHYSMEM): Use it.
16031         Also check for `table' function.
16032         Check for new headers and functions.
16033         Add check for sys/sysmp.h.
16034         With suggestions from Kaveh Ghazi.
16035         Ignore headers that are present but cannot be compiled.  This
16036         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
16037         C 5.4.
16038
16039 2003-08-15  Paul Eggert  <eggert@twinsun.com>
16040
16041         Document merge from coreutils.
16042         * modules/userspec: Depend on posixver.
16043         * modules/strftime: Depend on tzset.
16044
16045 2003-08-15  Paul Eggert  <eggert@twinsun.com>
16046
16047         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
16048         rather than tab, after '#' in shell-script copyright notices.
16049         Suggested by Bruno Haible.
16050
16051 2003-08-15  Paul Eggert  <eggert@twinsun.com>
16052
16053         * config/srclist-update: Use three spaces, rather than tab, after '#'
16054         in shell-script copyright notices.  Suggested by Bruno Haible.
16055         Remove unnecessary parenthesization in regular expression.
16056
16057 2003-08-15  Jim Meyering  <jim@meyering.net>
16058
16059         Merge from coreutils.
16060         * lib/xgethostname.c: Include <stdlib.h>.
16061         (xghostname): Don't exit for anything other than memory-related
16062         failure; just return NULL.
16063         * lib/userspec.c: Include "posixver.h".
16064         (parse_user_spec): Accept `.' as a separator only
16065         in pre-POSIX-200112 mode.
16066         * lib/strtoimax.c: Use #elif rather than #else #if.
16067         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
16068         Remove function, now that we can rely on a working tzset function.
16069         [!_LIBC]: Ensure that the required autoconf test has been run.
16070         [!defined _NL_CURRENT && HAVE_STRFTIME]:
16071         Use underlying_strftime for %r.
16072         * lib/sha.c: Merge in some clean-up and optimization changes from
16073         glibc.
16074         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
16075         Ensure that it is a multiple of 64.
16076         Rearrange loop exit tests so as to avoid performing an
16077         additional fread after encountering an error or EOF.
16078         * lib/realloc.c: Update copyright date.
16079
16080 2003-08-15  Jim Meyering  <jim@meyering.net>
16081         and Paul Eggert  <eggert@twinsun.com>
16082
16083         Merge from coreutils.
16084         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
16085         member but strut utmpx does not.  Needed for AIX 4.3.3.
16086         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
16087
16088 2003-08-15  Jim Meyering  <jim@meyering.net>
16089         and Paul Eggert  <eggert@cs.ucla.edu>
16090
16091         Merges from coreutils, etc.
16092         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
16093         Require gl_FUNC_TZSET_CLOBBER.
16094         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
16095         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
16096         members.
16097
16098 2003-08-14  Paul Eggert  <eggert@twinsun.com>
16099
16100         Help the merge from coreutils.
16101         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
16102         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
16103         * m4/tzset.m4: Use it too.
16104
16105 2003-08-14  Paul Eggert  <eggert@twinsun.com>
16106
16107         * modules/tzset: New file.
16108
16109 2003-08-14  Jim Meyering  <jim@meyering.net>
16110
16111         Merges from coreutils.
16112         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
16113         variable names, rather than @FNMATCH_H@.
16114         * modules/alloca: Likewise for $(ALLOCA_H).
16115
16116         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
16117         the three copies of the literal target, `fnmatch.h'.
16118         * modules/alloca (alloca.h): Likewise.
16119
16120 2003-08-14  Jim Meyering  <jim@meyering.net>
16121
16122         Merge from coreutils.
16123         * m4/tzset.m4: New file.
16124         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
16125         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
16126         otherwise, AIX 5.1 systems would end up using the latter.
16127         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
16128         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
16129         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
16130         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
16131
16132 2003-08-14  Jim Meyering  <jim@meyering.net>
16133
16134         Merge from coreutils.
16135         * lib/obstack.h: Whitespace changes.
16136         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
16137         and xcalloc return values.
16138         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
16139         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
16140         hang on OSF/1 5.1 for DIR on both local and remote file systems.
16141         Reported by (and fix confirmed by) Nelson H. F. Beebe.
16142         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
16143         error from mntctl.
16144         Use mntctl's return value to drive the entry-processing loop, since
16145         we can't rely on the value of the vmt_length member in the last
16146         entry.  On some systems doing so could result in exhausting
16147         virtual memory.  Based in part on a patch from Mike Jetzer.
16148
16149 2003-08-14  Jim Meyering  <jim@meyering.net>
16150         and Paul Eggert  <eggert@twinsun.com>
16151
16152         Merges from coreutils, plus other fixes.
16153         * lib/physmem.c: Merge in portability changes from gcc/libiberty
16154         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
16155         for credits and details.  Thanks to Kaveh Ghazi for helping
16156         to keep these files in sync.
16157         (ARRAY_SIZE): Define it.
16158         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
16159         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
16160         (memcasecmp): Don't assume size_t fits in unsigned int.
16161         Remove casts and duplicate code.
16162         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
16163         (memcpy): Remove definition.
16164         Merge in some clean-up and optimization changes from glibc.
16165         [BLOCKSIZE]: Move definition to top of file.
16166         Ensure that it is a multiple of 64.
16167         Rearrange loop exit tests so as to avoid performing an
16168         additional fread after encountering an error or EOF.
16169         * lib/md5.h (md5_uintptr): Define.
16170         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
16171         return to the initial working directory.  Preserve errno
16172         for caller.
16173         * lib/idcache.c: Include "xalloc.h".
16174         (xmalloc, xrealloc): Remove decls.
16175         (getuser): Remove casts no longer required in C89.
16176         * lib/human.c: Include stdio.h, for sprintf.
16177         * lib/group-member.c: Include "xalloc.h".
16178         (xmalloc, xrealloc): Remove decls.
16179         (get_group_info): Remove casts no longer required in C89.
16180         * lib/getusershell.c (readname): Remove casts no longer required in
16181         C89.
16182         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
16183         * lib/getline.c: Whitespace fix, from coreutils.
16184
16185 2003-08-13  Paul Eggert  <eggert@twinsun.com>
16186
16187         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
16188         Check for isascii.
16189
16190         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
16191         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
16192         Undo previous (whitespace-only) change.
16193
16194 2003-08-13  Paul Eggert  <eggert@twinsun.com>
16195
16196         * lib/exclude.c: Include <ctype.h>
16197         (IN_CTYPE_DOMAIN): New macro.
16198         (is_space): New fn.
16199         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
16200         and empty lines.
16201
16202         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
16203         Undo previous (whitespace-only) change.
16204
16205 2003-08-13  Paul Eggert  <eggert@twinsun.com>
16206
16207         * config/srclist-update: Change update back to the old behavior,
16208         leaving whitespace alone.  Use one 'sed' command rather than a
16209         pipeline.
16210         (fixlicense): Now a variable, not a function.
16211         (remove_trailing_blanks): Remove.
16212         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
16213         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
16214         Undo previous (whitespace-only) change.
16215
16216 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16217
16218         Merge from coreutils.
16219         * modules/euidaccess: Add lib_SOURCES, include for new
16220         file euidaccess.h
16221
16222 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16223
16224         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
16225         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
16226         Normalize leading white space and remove trailing white space.
16227
16228         Merge from coreutils
16229         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
16230
16231         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
16232         0.12.1.  These files are now being upgraded automatically by
16233         ../config/srclist-update.
16234
16235 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16236
16237         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
16238         Normalize leading white space and remove trailing white space.
16239         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
16240         notice, as per ../config/srclist-update.
16241
16242         Merge from coreutils.
16243         * lib/euidaccess.h: New file.
16244         * lib/euidaccess.c: Include it.
16245         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
16246         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
16247         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
16248
16249 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16250
16251         * config/srclist-update: Add copyright notice.
16252         (remove_id_lines, remove_trailing_blanks): New constants.
16253         (fixfile): Use them to normalize spacing a bit in copied files.
16254         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
16255         Normalize leading white space and remove trailing white space.
16256
16257         * config/texinfo.tex: Sync with texinfo.
16258
16259         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
16260         strtoul.c from libc, to merge coreutils whitespace changes.
16261
16262         * config/srclist.txt: Get the following m4 files from gettext:
16263         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
16264         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
16265         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
16266         wint_t.m4.
16267
16268 2003-08-12  Karl Berry  <karl@gnu.org>
16269
16270         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
16271         been made.
16272
16273 2003-08-11  Paul Eggert  <eggert@twinsun.com>
16274
16275         * modules/gnu-source, m4/gnu-source.m4:
16276         Remove; we're assuming Autoconf 2.54 or later now.
16277         Suggested by Bruno Haible.
16278         * MODULES.html.sh (func_all_modules): Remove gnu-source.
16279
16280 2003-08-11  Bruno Haible  <bruno@clisp.org>
16281
16282         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
16283
16284 2003-08-11  Bruno Haible  <bruno@clisp.org>
16285
16286         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
16287         (vasnprintf): Use it instead of wcslen.
16288
16289 2003-08-11  Bruno Haible  <bruno@clisp.org>
16290
16291         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
16292         value to ensure that _Bool promotes to int. Use #define for _Bool when
16293         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
16294
16295 2003-08-10  Karl Berry  <karl@gnu.org>
16296
16297         * lib/regex.h: update from libc (whitespace fix).
16298
16299 2003-08-09  Paul Eggert  <eggert@twinsun.com>
16300
16301         Merge some files from coreutils.  These changes were
16302         originally made by Jim Meyering.
16303         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
16304         many older Unixes require this.
16305         * lib/alloca.c (alloca): Remove cast to argument of free;
16306         no longer needed in C89.
16307         * lib/alloca_.h, regex.h: Fix white space to match
16308         what GNU indent does.
16309
16310 2003-08-09  Paul Eggert  <eggert@twinsun.com>
16311
16312         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
16313         apparently Emacs's Unicode mode got confused before my 2003-08-05
16314         checkin.
16315
16316 2003-08-08  Paul Eggert  <eggert@twinsun.com>
16317
16318         * m4/extensions.m4: New file.
16319         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
16320         Require gl_USE_SYSTEM_EXTENSIONS.
16321         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
16322         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
16323
16324 2003-08-08  Paul Eggert  <eggert@twinsun.com>
16325
16326         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
16327         * modules/extensions, modules/gnu-source: New files.
16328         * modules/timespec, modules/unlocked-io: Depend on extensions.
16329
16330 2003-08-07 Paul Eggert  <eggert@twinsun.com>
16331
16332         * modules/restrict: New file.
16333         * MODULES.html.sh (func_all_modules): Add restrict.
16334         * modules/regex: Depend on restrict.
16335
16336 2003-08-07  Paul Eggert  <eggert@twinsun.com>
16337
16338         * m4/restrict.m4: New file.
16339         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
16340
16341 2003-08-07  Bruno Haible  <bruno@clisp.org>
16342
16343         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
16344         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
16345
16346 2003-08-07  Bruno Haible  <bruno@clisp.org>
16347
16348         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
16349         makes the module 'getndelim2' compatible with the module 'getline'.
16350
16351 2003-08-05  Paul Eggert  <eggert@twinsun.com>
16352
16353         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
16354         byte with "\201" to avoid glitches when editing that source file
16355         with multi-gnome-terminal.
16356
16357 2003-08-05  Paul Eggert  <eggert@twinsun.com>
16358
16359         * lib/bumpalloc.h: Remove.
16360
16361 2003-08-05  Paul Eggert  <eggert@twinsun.com>
16362
16363         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
16364         * modules/bumpalloc: Remove.
16365
16366 2003-08-04  Paul Eggert  <eggert@twinsun.com>
16367
16368         * lib/getloadavg.c: Change copyright notice and spacing to conform to
16369         GNU coding style.
16370
16371         Merge from coreutils.
16372         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
16373         1. From glibc.
16374         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
16375         from Karl Berry, implemented by Jim Meyering.
16376         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
16377         from Dmitry V. Levin.
16378         Remove anachronistic cast of xrealloc.
16379         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
16380         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
16381         type. Otherwise, it wouldn't compile with at least /bin/cc on
16382         ymp-cray-unicos9.0.2.X.
16383         Combine two mostly-identical uses of alloca into one.
16384         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
16385
16386 2003-08-04  Dave Love <d.love@dl.ac.uk>
16387
16388         [From Emacs.]
16389
16390         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
16391         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
16392         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
16393         obsolete NLIST_NAME_UNION.
16394         [__GNU__]: Undef BSD and FSCALE.
16395         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
16396
16397 2003-08-03  Paul Eggert  <eggert@twinsun.com>
16398
16399         * lib/stdbool_.h (_Bool): Make it signed char, instead of
16400         an enum type, so that it's guaranteed to promote to int.  See:
16401         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
16402
16403 2003-08-03  Karl Berry  <karl@gnu.org>
16404
16405         * config/depcomp: update from automake.
16406
16407 2003-07-31  Paul Eggert  <eggert@twinsun.com>
16408
16409         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
16410         (strerror): Don't assume that a printable int fits in 14 bytes.
16411
16412 2003-07-31  Bruno Haible  <bruno@clisp.org>
16413
16414         * modules/getpass-gnu: New file.
16415         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
16416
16417 2003-07-31  Bruno Haible  <bruno@clisp.org>
16418
16419         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
16420
16421 2003-07-24  Karl Berry  <karl@gnu.org>
16422
16423         * config/missing: update from automake.
16424
16425 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
16426             Bruno Haible  <bruno@clisp.org>
16427
16428         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
16429         * lib/getline.c (getline, getdelim): Likewise.
16430         Remove _GNU_SOURCE define; now it's defined in config.h through
16431         m4/getline.m4.
16432
16433 2003-07-23  Karl Berry  <karl@gnu.org>
16434
16435         * config/config.sub: update from prep.
16436
16437 2003-07-22  Paul Eggert  <eggert@twinsun.com>
16438
16439         * modules/xalloc (Depends-on): Add exitfail.
16440         * modules/xmemcoll: Likewise.
16441
16442 2003-07-22  Paul Eggert  <eggert@twinsun.com>
16443
16444         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
16445         over-parenthesization in macros.
16446
16447         Sync with coreutils.
16448
16449         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
16450         required by C99.
16451
16452         Use `exit_failure' for xalloc and xmemcoll instead of their own
16453         private exit-failure variables.
16454         * lib/xalloc.h (xalloc_exit_failure): Remove.
16455         * lib/xmalloc.c: Likewise.  Include exitfail.h.
16456         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
16457         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
16458         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
16459         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
16460
16461 2003-07-20  Jim Meyering  <jim@meyering.net>
16462
16463         * modules/closeout (Depends-on): Add exitfail.
16464         Suggestion from Bruno Haible.
16465
16466 2003-07-19  Karl Berry  <karl@gnu.org>
16467
16468         * config/config.sub: update from prep.
16469
16470 2003-07-18  Paul Eggert  <eggert@twinsun.com>
16471
16472         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
16473         Remove.
16474         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
16475         to test that it can stand by itself.  Include "exitfail.h".
16476         Clients should set exit_failure instead.
16477         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
16478
16479 2003-07-18  Bruno Haible  <bruno@clisp.org>
16480
16481         * modules/getndelim2: New file.
16482         * modules/getline: Share files with module getndelim2.
16483         * modules/getnline: Depend on getndelim2 instead of sharing files with
16484         it. Add getnline.c to lib_SOURCES.
16485         * MODULES.html.sh (func_all_modules): Add getndelim2.
16486
16487 2003-07-18  Bruno Haible  <bruno@clisp.org>
16488
16489         * m4/getndelim2.m4: New file.
16490         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
16491         invoke gl_PREREQ_GETNDELIM2.
16492         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
16493         gl_PREREQ_GETNDELIM2.
16494         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
16495         gl_GETNDELIM2.
16496
16497 2003-07-18  Bruno Haible  <bruno@clisp.org>
16498
16499         * lib/getndelim2.h: New file.
16500         * lib/getndelim2.c: Make into a module of its own. Include config.h,
16501         getndelim2.h.
16502         (getndelim2): Make non-static. Change return type to ssize_t.
16503         * lib/getline.h: Change argument names.
16504         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
16505         * lib/getnline.c: Include getndelim2.h.
16506
16507 2003-07-18  Andreas Schwab  <schwab@suse.de>
16508
16509         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
16510
16511 2003-07-17  Karl Berry  <karl@gnu.org>
16512
16513         * config/config.sub: update from prep.
16514
16515 2003-07-17  Bruno Haible  <bruno@clisp.org>
16516
16517         * modules/getnline: New file.
16518         * modules/getline: Add lib/getndelim2.c to source file list.
16519         * MODULES.html.sh (func_all_modules): Add getnline.
16520
16521 2003-07-17  Bruno Haible  <bruno@clisp.org>
16522
16523         * m4/getnline.m4: New file.
16524
16525 2003-07-17  Bruno Haible  <bruno@clisp.org>
16526
16527         * m4/Makefile.am.in: Remove file.
16528         * m4/Makefile.am: Remove file.
16529         * m4/Makefile.in: Remove file.
16530
16531 2003-07-17  Bruno Haible  <bruno@clisp.org>
16532
16533         * lib/getnline.h: New file.
16534         * lib/getnline.c: New file.
16535         * lib/getndelim2.c: New file, extracted from getline.c.
16536         (getndelim2): Renamed from getdelim2, with added nmax argument.
16537         * lib/getline.c: Include getndelim2.c.
16538         (getdelim2): Moved out to getndelim2.c.
16539         (getline, getdelim): Update.
16540
16541 2003-07-17  Bruno Haible  <bruno@clisp.org>
16542
16543         * lib/Makefile.am: Remove file.
16544         * lib/Makefile.in: Remove file.
16545
16546 2003-07-17  Bruno Haible  <bruno@clisp.org>
16547
16548         * configure.in: Remove file.
16549         * Makefile.in: Remove file.
16550
16551 2003-07-17  Bruno Haible  <bruno@clisp.org>
16552
16553         * MODULES.html.sh: Put the </BODY> right before </HTML>.
16554
16555 2003-07-16  Karl Berry  <karl@gnu.org>
16556
16557         * config/srclist-update: was running fixlicense twice, which caused
16558                 texinfo.tex to be nullified for some reason.  Simplify,
16559                 $gplsrc is no longer needed as far as I can see?
16560
16561 2003-07-16  Jim Meyering  <jim@meyering.net>
16562
16563         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
16564
16565 2003-07-15  Paul Eggert  <eggert@twinsun.com>
16566
16567         * config/srclist.txt: Get the following files from gettext-runtime/intl
16568         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
16569         ref-del.sin.  From Bruno Haible.
16570         * config/srclist-update (fixfile): Change grep pattern again, since the
16571         previous fix didn't work (there was another trailing $).  Use
16572         '[$]' to escape the $s.
16573
16574 2003-07-15  Karl Berry  <karl@gnu.org>
16575
16576         * lib/vasnprintf.c: update from gettext.
16577
16578 2003-07-15  Karl Berry  <karl@gnu.org>
16579
16580         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
16581         gets expanded when surrounded by '$'.
16582
16583 2003-07-15  Jim Meyering  <jim@meyering.net>
16584
16585         * modules/save-cwd: Don't depend on error.  From Derek Price.
16586
16587 2003-07-15  Jim Meyering  <jim@meyering.net>
16588
16589         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
16590
16591 2003-07-14  Simon Josefsson  <jas@extundo.com>
16592
16593         * modules/mempcpy: New file.
16594         * MODULES.html.sh (func_all_modules): Add mempcpy.
16595
16596 2003-07-14  Simon Josefsson  <jas@extundo.com>
16597
16598         * m4/mempcpy.m4: New file.
16599
16600 2003-07-14  Simon Josefsson  <jas@extundo.com>
16601
16602         * lib/mempcpy.h: New file.
16603         * lib/mempcpy.c: New file.
16604
16605 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16606
16607         * modules/getdate, modules/posixtm: Depend on mktime.
16608
16609 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16610
16611         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
16612         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
16613         unicodeio.c, unicodeio.h, unlocked-io.h:
16614         Switch from LGPL to GPL.
16615
16616 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16617
16618         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
16619         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
16620         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
16621         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
16622         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
16623         updated automatically by ../config/srclist-update.  This changes
16624         their license from LPGL to GPL.
16625
16626 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16627
16628         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
16629         assumed to refer to the root of the most recent stable gettext version.
16630         * config/srclistvars.sh: Add defaults for eggert.
16631         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
16632         Match "This program" as well as "The program".  This is needed
16633         for gettext.
16634
16635 2003-07-14  Jim Meyering  <jim@meyering.net>
16636
16637         Don't emit diagnostics.  Let callers do that.
16638         * lib/save-cwd.c: Don't include "error.h".
16639         (save_cwd): Don't call error.  Ensure that errno is valid
16640         when returning nonzero.
16641
16642         * lib/save-cwd.h (restore_cwd): Update prototype.
16643         * lib/save-cwd.c (restore_cwd): Remove two parameters.
16644         Simplify.  Don't call error upon failure.  Let callers do that.
16645         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
16646         when auditing is enabled.  But don't bother updating the #if.
16647
16648 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
16649
16650         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
16651         it breaks C++ compilation.
16652         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
16653
16654 2003-07-10  Simon Josefsson  <jas@extundo.com>
16655
16656         * modules/strchrnul (Makefile.am): Add strchrnul.h.
16657
16658 2003-07-10  Jim Meyering  <jim@meyering.net>
16659
16660         * m4/clock_time.m4: Remove trailing blank.
16661         * m4/intmax_t.m4: Likewise.
16662
16663 2003-07-10  Jim Meyering  <jim@meyering.net>
16664
16665         * lib/vasnprintf.c: Remove trailing blanks.
16666         Make cpp indentation consistent.
16667
16668 2003-07-09  Paul Eggert  <eggert@twinsun.com>
16669
16670         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
16671         posixver.c, strftime.c, strnlen.c, strverscmp.c:
16672         Switch from LGPL to GPL.
16673
16674 2003-07-09  Paul Eggert  <eggert@twinsun.com>
16675
16676         * config/srclist.txt: Sort sublists.  Add
16677         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
16678         that differ from gnulib for one reason or another; we'd like this list
16679         to be smaller but for now let's document what we have.
16680
16681 2003-07-08  Paul Eggert  <eggert@twinsun.com>
16682
16683         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
16684         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
16685         and sweeter "eval x=$x".
16686         * config/srclist.txt: Get lib/argp* from glibc.
16687
16688 2003-07-07  Paul Eggert  <eggert@twinsun.com>
16689
16690         * lib/mktime.c: Fix some boundary cases and remove need for floating
16691         point.
16692
16693         Issue a compile-time diagnostic if time_t is floating point, or if
16694         two's complement arithmetic is not in effect, or if arithmetic
16695         right shift does not propagate the sign.  These assumptions were
16696         all in the original code but they weren't checked.
16697
16698         (TIME_T_MIDPOINT, verify): New macros.
16699         (__isleap): Remove; it has integer overflow problems.
16700         (leapyear): New function, without those problems.
16701         (ydhms_tm_diff): Remove; splitting into two parts.
16702         (ydhms_diff): New function, containing the arithmetic part of
16703         the old ydhms_tm_diff function.  Issue a compile-time
16704         diagnostic if we are not using C99 integer division.
16705         Avoid casts when possible.
16706         (guess_time_tm): New function, containing the checking part of
16707         the old ydhms_tm_diff function.  Return the new value, rather than
16708         the difference between it and the old.  Accept a new argument T
16709         so that *T specifies the old value.  Check for overflow in the result.
16710
16711         (__mktime_internal): Use a time_t offset, not a long int offset.
16712         This undoes the 2003-06-04 change, which is no longer needed now
16713         that we have better overflow checking.
16714         (localtime_offset): Likewise.
16715
16716         (__mktime_internal): Avoid harmful overflow on hosts where time_t
16717         and long are 64-bit but int is only 32-bit.
16718         (ydhms_diff): Use long int to store year1 and yday1.
16719         Issue a compile-time diagnostic if long int is not wide enough.
16720
16721         (__mktime_internal): Use long int to store adjusted year and yday.
16722         Use plain C rather than preprocessor commands, if that doesn't
16723         affect efficiency.
16724         Check for overflow (and try to repair) after each probe
16725         rather than checking only at the very end.  This avoids some bugs
16726         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
16727         does not equal GMT offset at maximum time).
16728         Use integer to check for overflow rather than floating point; this
16729         is more portable to non-IEEE hosts, and is a tad faster.
16730         When we detect that we are oscillating between two values,
16731         don't check whether tm_isdst has the requested value, since
16732         we already know the answer.  When tm_isdst has the wrong value,
16733         use a different heuristic to find the right one, based on the
16734         extreme values actually observed in practice in tz2003a,
16735         rather than the (overly optimistic) "previous 3 calendar quarters".
16736
16737         (not_equal_tm, print_tm, check_result): Use "const T" rather than
16738         "T const" to accommodate glibc style.
16739         (check_result): Use less-confusing report format.  "long" -> "long int.
16740         (main): Likewise.
16741         Don't loop if the iteration overflows time_t.
16742         Allow a negative step in the iteration.
16743
16744 2003-07-06  Karl Berry  <karl@gnu.org>
16745
16746         * config/depcomp: update from automake.
16747         * config/config.sub: update from prep.
16748
16749 2003-07-03  Karl Berry  <karl@gnu.org>
16750
16751         * config/config.guess: update from prep.
16752
16753 2003-07-01  Paul Eggert  <eggert@twinsun.com>
16754
16755         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
16756         xreadlink.c now includes it unconditionally.
16757
16758 2003-07-01  Paul Eggert  <eggert@twinsun.com>
16759
16760         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
16761         having it depend on HAVE_SYS_TYPES_H.
16762
16763 2003-07-01  Bruno Haible  <bruno@clisp.org>
16764
16765         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
16766         <sys/types.h> should be sufficient.
16767         Reported by Paul Eggert.
16768
16769 2003-06-26  Karl Berry  <karl@gnu.org>
16770
16771         * config/depcomp: update from automake.
16772
16773 2003-06-26  Bruno Haible  <bruno@clisp.org>
16774
16775         * modules/human: Depend on module stdbool.
16776
16777 2003-06-25  Bruno Haible  <bruno@clisp.org>
16778
16779         * modules/readlink: New file.
16780         * modules/xreadlink: Depend on it.
16781         * MODULES.html.sh (func_all_modules): Add readlink.
16782
16783 2003-06-25  Bruno Haible  <bruno@clisp.org>
16784
16785         * m4/readlink.m4: New file.
16786
16787 2003-06-25  Bruno Haible  <bruno@clisp.org>
16788
16789         * lib/readlink.c: New file.
16790
16791 2003-06-22  Karl Berry  <karl@gnu.org>
16792
16793         * config/srclist.txt: update mkinstalldirs from automake.
16794         * config/mkinstalldirs: update.
16795
16796 2003-06-22  Bruno Haible  <bruno@clisp.org>
16797
16798         Portability to mingw32.
16799         * m4/ssize_t.m4: New file, from GNU gettext.
16800         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
16801         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
16802
16803 2003-06-22  Bruno Haible  <bruno@clisp.org>
16804
16805         * modules/safe-read: Add m4/ssize_t.m4.
16806         * modules/xreadlink: Add m4/ssize_t.m4.
16807
16808 2003-06-20  Bruno Haible  <bruno@clisp.org>
16809
16810         Assume C89, so PARAMS isn't needed.
16811         * lib/unicodeio.h (PARAMS): Remove.
16812         * lib/unicodeio.c: Don't use PARAMS.
16813
16814 2003-06-18  Karl Berry  <karl@gnu.org>
16815
16816         * config/config.{guess,sub}: update from prep.
16817
16818 2003-06-18  Jim Meyering  <jim@meyering.net>
16819
16820         Merge changes from coreutils.
16821         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
16822         Remove explicit declarations of xmalloc and realloc.
16823         Include xalloc.h.
16824         (read_utmp): Remove anachronistic cast of xmalloc.
16825
16826 2003-06-17  Paul Eggert  <eggert@twinsun.com>
16827
16828         Assume C89, so PARAMS isn't needed.
16829         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
16830         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
16831         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
16832         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
16833         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
16834         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
16835         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
16836         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
16837         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
16838         lib/xstrtod.h, lib/xstrtol.h: Likewise.
16839         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
16840         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
16841         no longer needed. Anyway, config.h should always be included before any
16842         other file.
16843
16844 2003-06-11  Simon Josefsson  <jas@extundo.com>
16845
16846         * modules/sysexits: New file.
16847         * MODULES.html.sh (func_all_modules): Add sysexits.
16848
16849 2003-06-11  Simon Josefsson  <jas@extundo.com>
16850
16851         * lib/sysexit_.h: New file.
16852
16853 2003-06-11  Derek Price  <derek@ximbiot.com>
16854
16855         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
16856         necessary.
16857
16858 2003-06-11  Bruno Haible  <bruno@clisp.org>
16859
16860         * m4/sysexits.m4: New file.
16861
16862 2003-06-10  Simon Josefsson <jas@extundo.com>
16863
16864         * lib/argp.h: New file, from glibc.
16865         * lib/argp-ba.c: New file, from glibc.
16866         * lib/argp-eexst.c: New file, from glibc.
16867         * lib/argp-fmtstream.c: New file, from glibc.
16868         * lib/argp-fmtstream.h: New file, from glibc.
16869         * lib/argp-fs-xinl.c: New file, from glibc.
16870         * lib/argp-help.c: New file, from glibc.
16871         * lib/argp-namefrob.h: New file, from glibc.
16872         * lib/argp-parse.c: New file, from glibc.
16873         * lib/argp-pv.c: New file, from glibc.
16874         * lib/argp-pvh.c: New file, from glibc.
16875         * lib/argp-xinl.c: New file, from glibc.
16876
16877 2003-06-10  Simon Josefsson  <jas@extundo.com>
16878
16879         * modules/strchrnul: New file.
16880
16881 2003-06-10  Simon Josefsson  <jas@extundo.com>
16882
16883         * modules/argp: New file.
16884
16885 2003-06-10  Simon Josefsson  <jas@extundo.com>
16886
16887         * m4/strchrnul.m4: New file.
16888
16889 2003-06-10  Simon Josefsson  <jas@extundo.com>
16890
16891         * lib/strchrnul.h: New file.
16892         * lib/strchrnul.c: New file.
16893
16894 2003-06-10  Bruno Haible  <bruno@clisp.org>
16895
16896         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
16897
16898 2003-06-07  Karl Berry  <karl@gnu.org>
16899
16900         * config/config.{guess,sub}: update from prep.
16901
16902 2003-06-07  Jim Meyering  <jim@meyering.net>
16903
16904         * modules/strtod: Use $(...) notation, not @...@ for
16905         AC_REPLACE'd variables.
16906         * modules/localcharset: Likewise.
16907
16908 2003-06-07  Jim Meyering  <jim@meyering.net>
16909
16910         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
16911         in place of my name in the copyright comment.
16912         Remove definition and uses of __P.
16913
16914         From coreutils.
16915         * lib/stat.c: Don't declare xmalloc explicitly.
16916         Instead, include "xalloc.h".
16917         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
16918         xrealloc, and xcalloc return values.
16919         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
16920         Improve comment.
16921         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
16922
16923 2003-06-07  Bruno Haible  <bruno@clisp.org>
16924
16925         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
16926         avoid AC_CONFIG_LINKS.
16927         * modules/fnmatch (Makefile.am): Use explicit creation rule for
16928         fnmatch.h, to avoid AC_CONFIG_LINKS.
16929         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
16930
16931 2003-06-07  Bruno Haible  <bruno@clisp.org>
16932
16933         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
16934         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
16935         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
16936         directory.
16937         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
16938         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
16939         directory.
16940
16941 2003-06-06  Jim Meyering  <jim@meyering.net>
16942
16943         Merge from coreutils.
16944         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
16945         Consolidate declarations and initializations of *_base* locals.
16946
16947         Merge from coreutils.
16948         This avoids a core dump on systems without GNU putenv,
16949         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
16950         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
16951         (unsetenv): New static function, from GNU libc.
16952         (rpl_putenv): Use it.
16953
16954         * lib/modechange.c: Remove trailing blanks.
16955
16956         Merge from coreutils.
16957         * lib/fsusage.c: Remove declaration of statfs.
16958         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
16959
16960         * lib/posixtm.c: Include <stdbool.h> unconditionally.
16961
16962 2003-06-06  Jim Meyering  <jim@meyering.net>
16963
16964         * lib/stdbool_.h: Renamed from stdbool.h.in.
16965
16966 2003-06-06  Jim Meyering  <jim@meyering.net>
16967             Bruno Haible  <bruno@clisp.org>
16968
16969         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
16970         Adjust Makefile.am snippet not to redirect directly to target.
16971         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
16972
16973 2003-06-05  Paul Eggert  <eggert@twinsun.com>
16974
16975         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
16976         mismatch, look in future quarters as well as past.  This fixes a
16977         bug when processing fall-backwards gaps immediately after a long
16978         period of daylight-saving time.
16979
16980         * lib/mktime.c: Assume freestanding C89 or better.
16981         (HAVE_LIMITS_H): Remove.  Assume it's 1.
16982         (__P): Remove; not used.
16983         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
16984         (mktime, not_equal_tm, print_tm, check_result,
16985         main): Use prototypes.  Use const * where appropriate.
16986         (main): Fix typo in testing code that uncovered by above changes.
16987         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
16988
16989 2003-06-04  Paul Eggert  <eggert@twinsun.com>
16990
16991         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
16992         locale.h, localeconv.  This merges changes from coreutils.
16993
16994         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
16995         It can be removed after the next Autoconf is released.
16996         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
16997         needed.
16998
16999 2003-06-04  Paul Eggert  <eggert@twinsun.com>
17000
17001         * lib/mktime.c: Fix Debian bug 177940
17002         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
17003         (localtime_offset): Now long int, not time_t, because we want it
17004         to be guaranteed to be signed.  All uses changed.
17005         (__mktime_internal): If overflow would occur when adding offset,
17006         don't add it.
17007
17008         Merge 'human' changes from coreutils.  Rewrite to support
17009         locale-specific notations like thousands separators.
17010         * lib/human.c: Simplify authorship notice.
17011         Include human.h immediately after config.h.
17012         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
17013         <limits.h>: Do not include, since human.h does.
17014         (SIZE_MAX, UINTMAX_MAX): New macros.
17015         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
17016         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
17017         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
17018         (power_letter): Renamed from suffixes.
17019         (generate_suffix_backwards): Remove.
17020         (adjust_value): Now takes int style (because of human.h changes)
17021         and long double value (for greater precision on some platforms).
17022         (group_number): New function.
17023         (human_readable): Use it.  Use integer options, not enum.
17024         Put the options before the sizes in the arg list.
17025         Support all the new options.
17026         The old human_readable function has been removed;
17027         use inttostr.h instead.
17028         (human_readable, default_block_size, humblock):
17029         Use uintmax_t, not int, for block sizes.
17030         (human_readable_inexact, block_size_types): Remove.
17031         (block_size_opts): New constant.
17032         (human_options): Renamed from human_block_size, with new signature
17033         that allows block sizes up to UINTMAX_MAX.  All callers changed.
17034         * lib/human.h: Add copyright and authorship notice.
17035         Include <limits.h> and <stdbool.h> unconditionally.
17036         (PARAMS): Remove.  All uses removed.
17037         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
17038         (enum human_inexact_style): Remove tag; now a nameless enum.
17039         (human_floor, human_ceiling, human_round_to_even): Now have
17040         values 2, 0, 1 rather than -1, 1, 0.
17041         (human_group_digits, human_suppress_point_zero, human_autoscale,
17042         human_base_1024, human_SI, human_B): New constants.
17043         (human_readable_inexact, human_block_size): Remove.
17044         (human_readable): Size args are now uintmax_t, not int.
17045         (human_options): New decl.
17046
17047         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
17048         unnecessary now that we assume C89 or better.  This change
17049         imported from coreutils.
17050
17051         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
17052         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
17053         in the 2003-05-30 sync from glibc.
17054
17055         .h files should stand alone, but we shouldn't include <sys/types.h>
17056         if we can get away with just <stddef.h>.
17057
17058         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
17059         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
17060         rather than <sys/types.h>, as we merely need size_t.
17061         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
17062         to get size_t.
17063         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
17064         Include <stdio.h>, to get FILE.
17065         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
17066         memcasecmp.h has included <stddef.h> and all we need is size_t.
17067         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
17068         our interface, instead of including <sys/types.h>
17069
17070 2003-06-04  Paul Eggert  <eggert@twinsun.com>
17071
17072         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
17073         now, as glibc mktime is buggy on non-glibc systems.
17074
17075 2003-06-03  Karl Berry  <karl@gnu.org>
17076
17077         * config/config.sub: update from prep.
17078
17079 2003-06-02  Paul Eggert  <eggert@twinsun.com>
17080
17081         [from coreutils]
17082         Fix some minor time-related bugs with POSIX time arguments.
17083         Some valid time stamps were being rejected (notably -1, and
17084         time stamps before 1900 on 64-bit hosts).  And some invalid
17085         time stamps were being accepted, e.g. September 31.
17086
17087         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
17088         that we can return (time_t) -1 successfully.
17089         * lib/posixtm.c: Likewise.
17090         [HAVE_STDBOOL_H]: Include <stdbool.h>.
17091         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
17092         (t): Remove static var.
17093         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
17094         of static var.  All uses changed.
17095         (year): Do not reject years before 1900; they can occur with
17096         64-bit time_t.
17097         (posix_time_parse): Do not check for out-of-range components;
17098         that is now the caller's responsibility, since our checks were
17099         only approximations.
17100         (posixtime): Use mktime to check for out-of-range components,
17101         since it knows them exactly.
17102         If mktime returns (time_t) -1, check whether an error actually occurred
17103         by invoking localtime on -1.
17104         (main) [TEST_POSIXTIME]: Check for input data errors, and report
17105         posixtime failures better.
17106         Improve the test data (in comments only).
17107
17108 2003-06-02  Karl Berry  <karl@gnu.org>
17109
17110         * config/mkinstalldirs (version): new variable.
17111         (--version): new option.
17112         (usage): improve message.
17113
17114 2003-05-30  Karl Berry  <karl@gnu.org>
17115
17116         * lib/mktime.c: update from libc.
17117
17118 2003-05-30  Bruno Haible  <bruno@clisp.org>
17119
17120         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
17121         * config/config.rpath: Upgrade to gettext-0.12.1.
17122
17123 2003-05-30  Bruno Haible  <bruno@clisp.org>
17124
17125         * m4/gettext.m4: Upgrade to gettext-0.12.1.
17126         * m4/nls.m4: New file, from gettext-0.12.1.
17127         * m4/po.m4: New file, from gettext-0.12.1.
17128         * m4/progtest.m4: Upgrade to gettext-0.12.1.
17129
17130 2003-05-30  Bruno Haible  <bruno@clisp.org>
17131
17132         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
17133         * lib/localcharset.h: Likewise.
17134         * lib/localcharset.c: Likewise.
17135
17136 2003-05-29  Karl Berry  <karl@gnu.org>
17137
17138         * config/config.rpath: update from gettext.
17139
17140 2003-05-28  Paul Eggert  <eggert@twinsun.com>
17141
17142         Assume the headers required for C89 freestanding compilers.
17143         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
17144         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
17145         * m4/human.m4 (gl_HUMAN): Likewise.
17146         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
17147         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
17148         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17149         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
17150         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17151         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
17152
17153 2003-05-28  Paul Eggert  <eggert@twinsun.com>
17154
17155         Assume the headers required for C89 freestanding compilers.
17156         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
17157         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
17158         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
17159         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
17160         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
17161         define, since <limits.h> is guaranteed to do that.
17162         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
17163         * lib/exclude.c: Include <stdbool.h> unconditionally.
17164         * lib/tempname.c: Include <stddef.h> unconditionally.
17165         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
17166         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
17167         <stddef.h> does that.
17168         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
17169         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
17170         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
17171         needed.
17172         * lib/xstrtol.c: Likewise.
17173         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
17174         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
17175
17176         * lib/addext.c (addext): Use assignment rather than cast, to avoid
17177         warnings on some platforms.
17178
17179         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
17180         arbitrarily.
17181
17182 2003-05-26  Jim Meyering  <jim@meyering.net>
17183
17184         Merge in a change from coreutils:
17185         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
17186         that is guaranteed to be `no'.  Use `no_such_member' to indicate
17187         that condition, rather than `-1' which is slightly misleading.
17188         Change the name of the cache variable to have the gl_ prefix.
17189         Prompted by a patch from Richard Dawe for DJGPP.
17190
17191 2003-05-24  Karl Berry  <karl@gnu.org>
17192
17193         * config/config.guess: update from prep.
17194
17195 2003-05-22  Karl Berry  <karl@gnu.org>
17196
17197         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
17198
17199 2003-05-20  Karl Berry  <karl@gnu.org>
17200
17201         * config/config.guess: update from prep.
17202
17203 2003-05-18  Karl Berry  <karl@gnu.org>
17204
17205         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
17206         might actually be set by the user.
17207
17208         * config/depcomp, install-sh, mdate-sh: update from automake.
17209
17210 2003-05-17  Bruno Haible  <bruno@clisp.org>
17211
17212         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
17213         invalid expansion for AC_EGREP_CPP.
17214         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
17215         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
17216         Suggested by Akim Demaille <akim@epita.fr> in
17217         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
17218
17219 2003-05-12  Jim Meyering  <jim@meyering.net>
17220
17221         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
17222         the space-padded-by-default conversion specifiers, %e, %k, %l.
17223
17224 2003-05-12  Bruno Haible  <bruno@clisp.org>
17225
17226         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
17227         the string is longer than 4 KB.
17228
17229 2003-05-11  Karl Berry  <karl@gnu.org>
17230
17231         * config/config.{guess,sub}: update from prep.
17232
17233 2003-05-09  Bruno Haible  <bruno@clisp.org>
17234
17235         * modules/error: Add m4/strerror_r.m4 to file list.
17236
17237 2003-05-03  Bruno Haible  <bruno@clisp.org>
17238
17239         Upgrade to Unicode-4.0.
17240         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
17241         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
17242         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
17243         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
17244         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
17245         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
17246         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
17247         Change width of U+E0100..U+E01EF from 1 to 0.
17248
17249 2003-04-25  Jim Meyering  <jim@meyering.net>
17250
17251         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
17252         of type size_t, not int.
17253
17254 2003-04-25  Bruno Haible  <bruno@clisp.org>
17255
17256         * lib/copy-file.c: Include <stddef.h>, for size_t.
17257
17258 2003-04-21  Paul Eggert  <eggert@twinsun.com>
17259
17260         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
17261         code which expansion is under static control.  Patch imported from
17262         Akim Demaille's patch to Bison; see
17263         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
17264
17265 2003-04-14  Bruno Haible  <bruno@clisp.org>
17266
17267         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
17268
17269 2003-04-11  Jim Meyering  <jim@meyering.net>
17270
17271         Merge changes from Coreutils.
17272
17273         2003-03-22  Jim Meyering  <jim@meyering.net>
17274
17275         * lib/strftime.c (widen): Cast alloca return value to proper type.
17276
17277         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
17278
17279         From GNU libc.
17280         * lib/strftime.c (my_strftime): Handle very large width
17281         specifications for numeric values correctly.  Improve checks for
17282         overflow.
17283
17284         2003-01-19  Jim Meyering  <jim@meyering.net>
17285
17286         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
17287         definitions.
17288         (nl_get_alt_digit) [! defined my_strftime]: Define.
17289         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
17290         _nl_get_alt_digit and _nl_get_walt_digit.
17291
17292         * lib/strftime.c (my_strftime): Merge in locale-related changes from
17293         libc. These changes have no effect outside of _LIBC.
17294
17295 2003-04-10  Bruno Haible  <bruno@clisp.org>
17296
17297         * modules/findprog: New file.
17298         * MODULES.html.sh (func_all_modules): Add it.
17299
17300 2003-04-10  Bruno Haible  <bruno@clisp.org>
17301
17302         * m4/findprog.m4: New file.
17303         * m4/eaccess.m4: New file.
17304
17305 2003-04-10  Bruno Haible  <bruno@clisp.org>
17306
17307         * lib/findprog.h: New file, from GNU gettext.
17308         * lib/findprog.c: New file, from GNU gettext.
17309
17310 2003-04-05  Jim Meyering  <jim@meyering.net>
17311
17312         Merge changes from Coreutils.
17313
17314         * lib/exclude.h (PARAMS): Remove definition and uses.
17315         * lib/exclude.c: Remove uses of `PARAMS'.
17316
17317         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
17318         Add test-cases for DOS filenames. Declare program_name.
17319         (main): Set up program_name.  Patch by Rich Dawe.
17320
17321         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
17322         error from mntctl.
17323         Use mntctl's return value to drive the entry-processing loop, since
17324         we can't rely on the value of the vmt_length member in the last
17325         entry.  On some systems doing so could result in exhausting
17326         virtual memory.  Based in part on a patch from Mike Jetzer.
17327
17328 2003-04-04  Bruno Haible  <bruno@clisp.org>
17329
17330         * modules/linebreak: New file.
17331         * MODULES.html.sh (func_all_modules): Add it.
17332
17333 2003-04-04  Bruno Haible  <bruno@clisp.org>
17334
17335         * m4/linebreak.m4: New file.
17336
17337 2003-04-04  Bruno Haible  <bruno@clisp.org>
17338
17339         * lib/linebreak.h: New file, from GNU gettext.
17340         * lib/linebreak.c: New file, from GNU gettext with slight
17341         modifications.
17342         * lib/lbrkprop.h: New file, from GNU gettext.
17343
17344 2003-04-03  Bruno Haible  <bruno@clisp.org>
17345
17346         * modules/utf8-ucs4: New file.
17347         * modules/utf16-ucs4: New file.
17348         * modules/ucs4-utf8: New file.
17349         * modules/ucs4-utf16: New file.
17350         * MODULES.html.sh (func_all_modules): Add them.
17351
17352 2003-04-03  Bruno Haible  <bruno@clisp.org>
17353
17354         * m4/utf-ucs4.m4: New file.
17355         * m4/ucs4-utf.m4: New file.
17356
17357 2003-04-03  Bruno Haible  <bruno@clisp.org>
17358
17359         * lib/utf8-ucs4.h: New file, from GNU gettext.
17360         * lib/utf16-ucs4.h: New file, from GNU gettext.
17361         * lib/ucs4-utf8.h: New file, from GNU gettext.
17362         * lib/ucs4-utf16.h: New file, from GNU gettext.
17363
17364 2003-04-02  Bruno Haible  <bruno@clisp.org>
17365
17366         * modules/binary-io: New file.
17367         * MODULES.html.sh (func_all_modules): Add it.
17368
17369 2003-04-02  Bruno Haible  <bruno@clisp.org>
17370
17371         * lib/binary-io.h: New file, from GNU gettext.
17372
17373 2003-04-01  Bruno Haible  <bruno@clisp.org>
17374
17375         * modules/pathname: New file.
17376         * MODULES.html.sh (func_all_modules): Add it.
17377
17378 2003-04-01  Bruno Haible  <bruno@clisp.org>
17379
17380         * lib/pathname.h: New file, from GNU gettext.
17381         * lib/concatpath.c: New file, from GNU gettext.
17382
17383 2003-03-30  Bruno Haible  <bruno@clisp.org>
17384
17385         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
17386
17387 2003-03-30  Bruno Haible  <bruno@clisp.org>
17388
17389         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
17390         function chown() doesn't exist.
17391
17392 2003-03-28  Bruno Haible  <bruno@clisp.org>
17393
17394         * modules/copy-file: New file.
17395         * MODULES.html.sh (func_all_modules): Add it.
17396
17397 2003-03-28  Bruno Haible  <bruno@clisp.org>
17398
17399         * m4/copy-file.m4: New file.
17400
17401 2003-03-28  Bruno Haible  <bruno@clisp.org>
17402
17403         * lib/copy-file.h: New file, from GNU gettext.
17404         * lib/copy-file.c: New file, from GNU gettext.
17405
17406 2003-03-18  Jim Meyering  <jim@meyering.net>
17407
17408         * lib/quote.c (quote_n): Fix typo in comment.
17409
17410 2003-03-18  Bruno Haible  <bruno@clisp.org>
17411
17412         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
17413         checking.
17414         * m4/onceonly_2_57.m4: Likewise.
17415
17416 2003-03-17  Bruno Haible  <bruno@clisp.org>
17417
17418         * m4/onceonly.m4: Require autoconf 2.54 or newer.
17419         (m4_quote): Remove macro.
17420         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
17421
17422 2003-03-14  Jim Meyering  <jim@meyering.net>
17423
17424         Merge changes from Coreutils.
17425         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
17426         to be const, in order to avoid warnings.
17427         (obstack_room): Likewise.
17428         (obstack_empty_p): Likewise.
17429
17430 2003-03-14  Bruno Haible  <bruno@clisp.org>
17431
17432         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
17433         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
17434
17435 2003-03-13  Paul Eggert  <eggert@twinsun.com>
17436
17437         Merge changes from Bison.
17438         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
17439         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
17440         when compiling Bison 1.875's `bitset bset = obstack_alloc
17441         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
17442         * lib/hash.c: Include <stdbool.h> unconditionally.
17443
17444 2003-03-13  Paul Eggert  <eggert@twinsun.com>
17445
17446         * m4/onceonly.m4 (m4_quote): New macro.
17447         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
17448         Quote AC_FOREACH variable-expansions properly.
17449
17450 2003-03-13  Paul Eggert  <eggert@twinsun.com>
17451
17452         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
17453
17454 2003-03-09  Paul Eggert  <eggert@twinsun.com>
17455
17456         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
17457         Reported by Bruce Becker; see:
17458         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
17459
17460 2003-03-03  Paul Eggert  <eggert@twinsun.com>
17461             Bruno Haible  <bruno@clisp.org>
17462
17463         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
17464         Reported by John Hughes, see
17465         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
17466
17467 2003-02-20  Bruno Haible  <bruno@clisp.org>
17468
17469         * MODULES.html.sh (func_all_modules): Add poll.
17470
17471 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
17472
17473         * modules/poll: New file.
17474
17475 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
17476
17477         * lib/poll_.h: New file.
17478         * lib/poll.c: New file.
17479
17480 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
17481
17482         * m4/poll.m4: New file.
17483
17484 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
17485
17486         * modules/mathl: New file.
17487
17488 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
17489
17490         * lib/mathl.h: New file.
17491         * lib/acosl.c: New file.
17492         * lib/asinl.c: New file.
17493         * lib/atanl.c: New file.
17494         * lib/ceill.c: New file.
17495         * lib/cosl.c: New file.
17496         * lib/expl.c: New file.
17497         * lib/floorl.c: New file.
17498         * lib/frexpl.c: New file.
17499         * lib/ldexpl.c: New file.
17500         * lib/logl.c: New file.
17501         * lib/sincosl.c: New file.
17502         * lib/sinl.c: New file.
17503         * lib/sqrtl.c: New file.
17504         * lib/tanl.c: New file.
17505         * lib/trigl.c: New file.
17506         * lib/trigl.h: New file.
17507
17508 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
17509
17510         * m4/mathl.m4: New file.
17511
17512 2003-02-18  Bruno Haible  <bruno@clisp.org>
17513
17514         * MODULES.html.sh (func_all_modules): Add mathl.
17515
17516 2003-02-17  Bruno Haible  <bruno@clisp.org>
17517
17518         * modules/mkdtemp: New module.
17519         * MODULES.html.sh (func_all_modules): Add it.
17520
17521 2003-02-17  Bruno Haible  <bruno@clisp.org>
17522
17523         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
17524
17525 2003-02-17  Bruno Haible  <bruno@clisp.org>
17526
17527         * lib/mkdtemp.h: New file, from GNU gettext.
17528         * lib/mkdtemp.c: New file, from GNU gettext.
17529
17530 2003-02-02  Jim Meyering  <jim@meyering.net>
17531
17532         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
17533         e.g. glibc-2.2.93.
17534
17535 2003-01-31  Bruno Haible  <bruno@clisp.org>
17536
17537         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
17538         'rpl_rename'.
17539         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
17540         'rpl_strnlen'.
17541         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
17542         'rpl_strtod'.
17543         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
17544         'rpl_utime'.
17545
17546 2003-01-31  Bruno Haible  <bruno@clisp.org>
17547
17548         * lib/rename.c: #undef rename before defining rpl_rename.
17549         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
17550
17551 2003-01-30  Bruno Haible  <bruno@clisp.org>
17552
17553         * modules/vasnprintf, modules/vasprintf: New modules.
17554         * MODULES.html.sh (func_all_modules): Add them.
17555
17556 2003-01-30  Bruno Haible  <bruno@clisp.org>
17557
17558         * m4/signed.m4: New file, from GNU gettext.
17559         * m4/longdouble.m4: New file, from GNU gettext.
17560         * m4/wchar_t.m4: New file, from GNU gettext.
17561         * m4/wint_t.m4: New file, from GNU gettext.
17562         * m4/vasnprintf.m4: New file.
17563         * m4/vasprintf.m4: New file.
17564
17565 2003-01-30  Bruno Haible  <bruno@clisp.org>
17566
17567         * lib/printf-args.h: New file, from GNU gettext.
17568         * lib/printf-args.c: New file, from GNU gettext.
17569         * lib/printf-parse.h: New file, from GNU gettext.
17570         * lib/printf-parse.c: New file, from GNU gettext.
17571         * lib/vasnprintf.h: New file, from GNU gettext.
17572         * lib/vasnprintf.c: New file, from GNU gettext.
17573         * lib/asnprintf.c: New file, from GNU gettext.
17574         * lib/vasprintf.h: New file, from GNU gettext with modifications.
17575         * lib/vasprintf.c: New file, from GNU gettext.
17576         * lib/asprintf.c: New file, from GNU gettext.
17577
17578 2003-01-29  Bruno Haible  <bruno@clisp.org>
17579
17580         * modules/stpncpy: New module.
17581         * MODULES.html.sh (func_all_modules): Add it.
17582
17583 2003-01-29  Bruno Haible  <bruno@clisp.org>
17584
17585         * m4/stpncpy.m4: New file.
17586
17587 2003-01-29  Bruno Haible  <bruno@clisp.org>
17588
17589         * lib/stpncpy.h: New file, from GNU gettext with modifications.
17590         * lib/stpncpy.c: New file, from GNU gettext with modifications.
17591
17592 2003-01-28  Bruno Haible  <bruno@clisp.org>
17593
17594         * modules/c-ctype: New module.
17595         * MODULES.html.sh (func_all_modules): Add it.
17596
17597 2003-01-28  Bruno Haible  <bruno@clisp.org>
17598
17599         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
17600         Paul Eggert.
17601         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
17602         Paul Eggert.
17603
17604 2003-01-27  Bruno Haible  <bruno@clisp.org>
17605
17606         * modules/xsetenv: New module.
17607         * MODULES.html.sh (func_all_modules): Add it.
17608
17609 2003-01-27  Bruno Haible  <bruno@clisp.org>
17610
17611         * lib/xsetenv.h: New file, from GNU gettext.
17612         * lib/xsetenv.c: New file, from GNU gettext.
17613
17614 2003-01-23  Jim Meyering  <jim@meyering.net>
17615
17616         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
17617         from working on systems without dirfd (at least Irix and OSF1/Tru64).
17618
17619 2003-01-23  Bruno Haible  <bruno@clisp.org>
17620
17621         * modules/minmax: New module.
17622         * MODULES.html.sh (func_all_modules): Add it.
17623
17624 2003-01-23  Bruno Haible  <bruno@clisp.org>
17625
17626         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
17627         Eggert.
17628
17629 2003-01-22  Bruno Haible  <bruno@clisp.org>
17630
17631         * modules/exit: New module.
17632         * MODULES.html.sh (func_all_modules): Add it.
17633
17634 2003-01-22  Bruno Haible  <bruno@clisp.org>
17635
17636         * lib/exit.h: New file, from GNU gettext.
17637
17638 2003-01-19  Bruno Haible  <bruno@clisp.org>
17639
17640         * gnulib-tool: Recognize option --extract-maintainer.
17641         (func_get_maintainer): New function.
17642         * modules/*: Add Maintainer entry.
17643
17644 2003-01-16  Jim Meyering  <jim@meyering.net>
17645
17646         * m4/regex.m4: The `regex' struct is both input and output.
17647         Initialize it before each use.  Patch by Tim Waugh.
17648
17649 2003-01-16  Bruno Haible  <bruno@clisp.org>
17650
17651         * MODULES.html.sh: Add a table of contents. Add the module name as
17652         leftmost column. Add hyperlinks.
17653
17654 2003-01-15  Bruno Haible  <bruno@clisp.org>
17655
17656         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
17657
17658 2003-01-15  Bruno Haible  <bruno@clisp.org>
17659
17660         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
17661         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
17662         suffix.
17663
17664 2003-01-15  Bruno Haible  <bruno@clisp.org>
17665
17666         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
17667
17668 2003-01-15  Bruno Haible  <bruno@clisp.org>
17669
17670         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
17671         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
17672
17673 2003-01-14  Jim Meyering  <jim@meyering.net>
17674
17675         * lib/same.c (same_name): Tweak a comment.
17676
17677 2003-01-14  Bruno Haible  <bruno@clisp.org>
17678
17679         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
17680         when a string comparison is sufficient.
17681
17682 2003-01-14  Bruno Haible  <bruno@clisp.org>
17683
17684         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
17685         'unsigned int'.
17686
17687 2003-01-14  Bruno Haible  <bruno@clisp.org>
17688
17689         * lib/hash-pjw.c: Add comment about low quality of this function.
17690
17691 2003-01-13  Bruno Haible  <bruno@clisp.org>
17692
17693         * modules/stpcpy: Distribute lib/stpcpy.h.
17694         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
17695
17696 2003-01-13  Bruno Haible  <bruno@clisp.org>
17697
17698         * modules/*: Add a description.
17699         * modules/strpbrk: Fix Makefile.am snippet.
17700         * modules/strtoimax: Fix dependencies.
17701         * modules/strtoumax: Likewise.
17702
17703 2003-01-13  Bruno Haible  <bruno@clisp.org>
17704
17705         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
17706         * modules/alloca (Makefile.am): All object files depend on alloca.h.
17707         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
17708
17709 2003-01-13  Bruno Haible  <bruno@clisp.org>
17710
17711         * gnulib-tool (func_create_testdir): Store config/* files in the main
17712         directory.
17713         * config.rpath: Move to ...
17714         * config/config.rpath: ... here.
17715         * modules/gettext: Contains config/config.rpath, not config.rpath.
17716         * modules/iconv: Likewise.
17717
17718 2003-01-12  Paul Eggert  <eggert@twinsun.com>
17719
17720         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
17721         to avoid collisions with libcurses and libreadline.
17722
17723         * m4/getstr.m4: Remove.
17724         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
17725
17726 2003-01-12  Paul Eggert  <eggert@twinsun.com>
17727
17728         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
17729         to avoid collisions with libcurses and libreadline.
17730
17731         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
17732         * lib/getstr.h, getstr.c: Remove.
17733         * lib/getline.c: Include "getline.h", to check interface.
17734         Move body of old getstr.c here: this defines MIN_CHUNK and
17735         declares getdelim2, which is renamed from getstr.
17736         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
17737
17738         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
17739         All uses changed.
17740         * lib/linebuffer.h: Likewise.
17741         (readline): Remove backward-compatibility macro.
17742
17743 2003-01-12  Paul Eggert  <eggert@twinsun.com>
17744
17745         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
17746         to avoid collisions with libcurses and libreadline.
17747         * getstr: Remove.
17748         * MODULES.html.sh: Remove getstr.
17749         * modules/getline: Depend on unlocked-io, not getstr.
17750
17751 2003-01-12  Jim Meyering  <jim@meyering.net>
17752
17753         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
17754
17755 2003-01-10  Bruno Haible  <bruno@clisp.org>
17756
17757         * modules/alloca: Change Makefile.am requirements. Simplify Include
17758         requirements. Add lib/alloca_.h to file list.
17759
17760 2003-01-10  Bruno Haible  <bruno@clisp.org>
17761
17762         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
17763
17764 2003-01-10  Bruno Haible  <bruno@clisp.org>
17765
17766         * lib/alloca_.h: New file.
17767         * lib/getdate.y: Unconditionally include alloca.h.
17768         * lib/makepath.c: Likewise.
17769         * lib/setenv.c: Likewise.
17770         * lib/userspec.c: Likewise.
17771
17772 2003-01-09  Karl Berry  <karl@gnu.org>
17773
17774         * MODULES.html.sh: include `dirname $0` in PATH, to find
17775         gnulib-tool.
17776
17777 2003-01-09  Bruno Haible  <bruno@clisp.org>
17778
17779         * modules/stdbool: Change configure.ac, Makefile.am requirements.
17780         Simplify Include requirements. Add lib/stdbool.h.in to file list.
17781
17782 2003-01-09  Bruno Haible  <bruno@clisp.org>
17783
17784         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
17785
17786 2003-01-09  Bruno Haible  <bruno@clisp.org>
17787
17788         * lib/stdbool.h.in: New file.
17789
17790 2003-01-09  Bruno Haible  <bruno@clisp.org>
17791
17792         * gnulib-tool (func_all_modules): Ignore files ending in ~.
17793         * MODULES.html.sh: Likewise.
17794
17795 2003-01-08  Jim Meyering  <jim@meyering.net>
17796
17797         * lib/full-write.c: Undefine and define-away `const' after inclusion
17798         of errno.h, not before.  Suggestion from Bruno Haible.
17799
17800 2003-01-08  Bruno Haible  <bruno@clisp.org>
17801
17802         * modules/full-read: Depend on full-write.
17803
17804 2003-01-08  Bruno Haible  <bruno@clisp.org>
17805
17806         * lib/safe-read.c: Include specification header first, to ensure its
17807         selfcontainedness.
17808         * lib/full-write.c: Likewise.
17809
17810 2003-01-07  Jim Meyering  <jim@meyering.net>
17811
17812         * lib/full-write.c: Rework so that it may serve to define full_read,
17813         too.
17814         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
17815
17816 2003-01-07  Bruno Haible  <bruno@clisp.org>
17817
17818         * lib/strtoimax.c: Include <stdint.h> as an alternative to
17819         <inttypes.h>.
17820         * lib/xstrtol.h: Likewise.
17821         * lib/xstrtoimax.c: Likewise.
17822         * lib/xstrtoumax.c: Likewise.
17823         * lib/human.h: Likewise.
17824
17825         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
17826         on systems that have <inttypes.h> but not <stdint.h>.
17827
17828 2003-01-07  Bruno Haible  <bruno@clisp.org>
17829
17830         * MODULES.html.sh: Add copyright notice.
17831         (missed_files): Omit CVS directory entries.
17832         (func_module): Make it work with sed-3.02.
17833         * MODULES.txt: Remove file.
17834
17835 2003-01-06  Jim Meyering  <jim@meyering.net>
17836
17837         * lib/version-etc.c: Update year in translatable copyright string.
17838
17839 2003-01-03  Karl Berry  <karl@gnu.org>
17840
17841         * config/config.{guess,sub}: update from prep.
17842
17843 2003-01-02  Karl Berry  <karl@gnu.org>
17844
17845         * doc/COPYING.DOC: belatedly updated to 1.2.
17846
17847 2003-01-01  Karl Berry  <karl@gnu.org>
17848
17849         * gnulib-tool (func_verify_module): report module name $module in
17850         error message, not $1.
17851         * gnulib-tool (create-testdir): don't complain if destdir couldn't
17852         be created, only if it doesn't exist.
17853         * gnulib-tool (last_checkin_date): don't expand the $Date here.
17854
17855 2002-12-31  Paul Eggert  <eggert@twinsun.com>
17856
17857         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
17858
17859 2002-12-31  Paul Eggert  <eggert@twinsun.com>
17860
17861         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
17862         memcmp if strcoll doesn't work.
17863
17864 2002-12-31  Bruno Haible  <bruno@clisp.org>
17865
17866         * lib/utime.c (utime_null): No need to call ftruncate if the file was
17867         nonempty.
17868
17869 2002-12-31  Bruno Haible  <bruno@clisp.org>
17870
17871         * lib/memcoll.c (STRCOLL): New macro.
17872         (memcoll): Use it.
17873
17874 2002-12-31  Bruno Haible  <bruno@clisp.org>
17875
17876         * lib/localcharset.h: New file.
17877         * lib/localcharset.c: Include it.
17878         * lib/unicodeio.c: Likewise.
17879
17880 2002-12-31  Bruno Haible  <bruno@clisp.org>
17881
17882         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
17883         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
17884
17885 2002-12-31  Bruno Haible  <bruno@clisp.org>
17886
17887         * lib/getline.h: Include <stddef.h>, for size_t.
17888
17889         * lib/unicodeio.h: Include <stddef.h>, for size_t.
17890         * lib/unicodeio.c: Don't include <stddef.h>.
17891
17892 2002-12-31  Bruno Haible  <bruno@clisp.org>
17893
17894         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
17895         HAVE_TM_ZONE.
17896
17897 2002-12-24  Karl Berry  <karl@gnu.org>
17898
17899         * config/config.guess: update from prep.
17900
17901 2002-12-24  Bruno Haible  <bruno@clisp.org>
17902
17903         General infrasructure.
17904         * m4/README: Rewritten.
17905         * m4/onceonly.m4: New file.
17906         * m4/onceonly_2_57.m4: New file.
17907
17908         Module atexit.
17909         * m4/atexit.m4: New file.
17910
17911         Module strtod.
17912         * m4/strtod.m4: New file.
17913
17914         Module strtol.
17915         * m4/strtol.m4: New file.
17916
17917         Module strtoul.
17918         * m4/strtoul.m4: New file.
17919
17920         Module memchr.
17921         * m4/memchr.m4: New file.
17922
17923         Module memcmp.
17924         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
17925         (jm_FUNC_MEMCMP): Invoke it.
17926
17927         Module memcpy.
17928         * m4/memcpy.m4: New file.
17929
17930         Module memmove.
17931         * m4/memmove.m4: New file.
17932
17933         Module memset.
17934         * m4/memset.m4: New file.
17935
17936         Module strcspn.
17937         * m4/strcspn.m4: New file.
17938
17939         Module strpbrk.
17940         * m4/strpbrk.m4: New file.
17941
17942         Module strstr.
17943         * m4/strstr.m4: New file.
17944
17945         Module strerror.
17946         * m4/strerror.m4: New file.
17947
17948         Module mktime.
17949         * m4/mktime.m4: Renamed from jm-mktime.m4.
17950         (gl_PREREQ_MKTIME): New macro.
17951         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
17952
17953         Module malloc.
17954         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
17955         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
17956         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
17957
17958         Module realloc.
17959         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
17960         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
17961         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
17962
17963         Module strftime.
17964         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
17965         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
17966         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
17967         gl_TM_GMTOFF.
17968         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
17969
17970         Module xalloc.
17971         * m4/xalloc.m4: New file.
17972
17973         Module alloca.
17974         * m4/alloca.m4: New file.
17975
17976         Module putenv.
17977         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
17978         (jm_FUNC_PUTENV): Invoke it.
17979
17980         Module setenv.
17981         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
17982         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
17983         when invoked twice.
17984         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
17985         gt_FUNC_SETENV.
17986
17987         Module memrchr.
17988         * m4/memrchr.m4: New file.
17989
17990         Module stpcpy.
17991         * m4/stpcpy.m4: New file.
17992
17993         Module strcase.
17994         * m4/strcase.m4: New file.
17995
17996         Module strdup.
17997         * m4/strdup.m4: New file.
17998
17999         Module strnlen.
18000         * m4/strnlen.m4: New file.
18001
18002         Module strndup.
18003         * m4/strndup.m4: New file.
18004
18005         Module xstrtod.
18006         * m4/xstrtod.m4: New file.
18007
18008         Module xstrtol.
18009         * m4/xstrtol.m4: New file.
18010
18011         Module getdate.
18012         * m4/getdate.m4: New file.
18013
18014         Module unlocked-io.
18015         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
18016         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
18017         * m4/jm-glibc-io.m4n: Remove file.
18018
18019         Module long-options.
18020         * m4/long-options.m4: New file.
18021
18022         Module md5.
18023         * m4/md5.m4: New file.
18024
18025         Module sha.
18026         * m4/sha.m4: New file.
18027
18028         Module getstr.
18029         * m4/getstr.m4: New file.
18030
18031         Module getline.
18032         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
18033         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
18034         <sys/types.h>, for size_t. Use the function name gnu_getline, not
18035         simply getline. Infoke gl_PREREQ_GETLINE.
18036
18037         Module obstack.
18038         * m4/obstack.m4: New file.
18039
18040         Module hash.
18041         * m4/hash.m4: New file.
18042
18043         Module readtokens.
18044         * m4/readtokens.m4: New file.
18045
18046         Module strverscmp.
18047         * m4/strverscmp.m4: New file.
18048
18049         Module stdbool.
18050         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
18051         OSF/1.
18052
18053         Module strtoll.
18054         * m4/strtoll.m4: New file.
18055
18056         Module strtoull.
18057         * m4/strtoull.m4: New file.
18058
18059         Module strtoimax.
18060         * m4/strtoimax.m4: New file.
18061
18062         Module strtoumax.
18063         * m4/strtoumax.m4: New file.
18064
18065         Module xstrtoimax.
18066         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
18067         jm_AC_PREREQ_XSTRTOIMAX.
18068         Moved the strtol prerequisites to strtol.m4.
18069         Moved the strtoll prerequisites to strtoll.m4.
18070         Moved the strtoimax prerequisites to strtoimax.m4.
18071
18072         Module xstrtoumax.
18073         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
18074         jm_AC_PREREQ_XSTRTOUMAX.
18075         Moved the strtoul prerequisites to strtoul.m4.
18076         Moved the strtoull prerequisites to strtoull.m4.
18077         Moved the strtoumax prerequisites to strtoumax.m4.
18078
18079         Module chown.
18080         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
18081         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
18082
18083         Module dup2.
18084         * m4/dup2.m4: New file.
18085
18086         Module ftruncate.
18087         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
18088         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
18089
18090         Module getgroups.
18091         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
18092         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
18093
18094         Module gettimeofday.
18095         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
18096         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
18097         gl_PREREQ_GETTIMEOFDAY.
18098
18099         Module mkdir.
18100         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
18101         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
18102
18103         Module mkstemp.
18104         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
18105         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
18106         jm_AC_TYPE_UINTMAX_T.
18107         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
18108
18109         Module stat.
18110         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
18111         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
18112
18113         Module lstat.
18114         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
18115         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
18116
18117         Module timespec.
18118         * m4/timespec.m4 (gl_TIMESPEC): New macro.
18119         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
18120         * m4/st_mtim.m4: Indentation.
18121
18122         Module nanosleep.
18123         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
18124         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
18125         gl_PREREQ_NANOSLEEP.
18126
18127         Module regex.
18128         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
18129         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
18130         (gl_REGEX): New macro.
18131
18132         Module rename.
18133         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
18134         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
18135
18136         Module rmdir.
18137         * m4/rmdir.m4: New file.
18138
18139         Module utime.
18140         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
18141         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
18142         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
18143
18144         Module dirname.
18145         * m4/dirname.m4: New file.
18146
18147         Module getopt.
18148         * m4/getopt.m4: New file.
18149
18150         Module unistd-safer.
18151         * m4/unistd-safer.m4: New file.
18152
18153         Module fnmatch.
18154         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
18155         declaration.
18156         (gl_PREREQ_FNMATCH_EXTRA): New macro.
18157         (gl_FUNC_FNMATCH_POSIX): New macro.
18158         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
18159         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
18160         simply fnmatch.
18161
18162         Module exclude.
18163         * m4/exclude.m4: New file.
18164
18165         Module human.
18166         * m4/human.m4: New file.
18167
18168         Module acl.
18169         * m4/acl.m4: Nop.
18170
18171         Module backupfile.
18172         * m4/backupfile.m4: New file.
18173         * m4/d-ino.m4: Indentation.
18174
18175         Module fsusage.
18176         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
18177         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
18178         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
18179
18180         Module dirfd.
18181         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
18182         requirements.
18183
18184         Module euidaccess.
18185         * m4/euidaccess.m4: New file.
18186
18187         Module file-type.
18188         * m4/file-type.m4: New file.
18189
18190         Module fileblocks.
18191         * m4/fileblocks.m4: New file.
18192
18193         Module filemode.
18194         * m4/filemode.m4: New file.
18195
18196         Module isdir.
18197         * m4/isdir.m4: New file.
18198
18199         Module lchown.
18200         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
18201         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
18202
18203         Module makepath.
18204         * m4/makepath.m4: New file.
18205
18206         Module modechange.
18207         * m4/modechange.m4: New file.
18208
18209         Module mountlist.
18210         * m4/mountlist.m4: New file.
18211         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
18212         Indentation.
18213
18214         Module path-concat.
18215         * m4/path-concat.m4: New file.
18216
18217         Module pathmax.
18218         * m4/pathmax.m4: New file.
18219
18220         Module same.
18221         * m4/same.m4: New file.
18222
18223         Module save-cwd.
18224         * m4/save-cwd.m4: New file.
18225
18226         Module savedir.
18227         * m4/savedir.m4: New file.
18228
18229         Module xgetcwd.
18230         * m4/xgetcwd.m4: New file.
18231         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
18232
18233         Module xreadlink.
18234         * m4/xreadlink.m4: New file.
18235
18236         Module safe-read.
18237         * m4/safe-read.m4: New file.
18238
18239         Module safe-write.
18240         * m4/safe-write.m4: New file.
18241
18242         Module closeout.
18243         * m4/closeout.m4: New file.
18244
18245         Module stdio-safer.
18246         * m4/stdio-safer.m4: New file.
18247
18248         Module getpass.
18249         * m4/getpass.m4: New file.
18250
18251         Module getugroups.
18252         * m4/getugroups.m4: New file.
18253
18254         Module group-member.
18255         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
18256         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
18257
18258         Module idcache.
18259         * m4/idcache.m4: New file.
18260
18261         Module userspec.
18262         * m4/userspec.m4: New file.
18263
18264         Module gettime.
18265         * m4/clock_time.m4: New file.
18266         * m4/gettime.m4: New file.
18267
18268         Module settime.
18269         * m4/settime.m4: New file.
18270
18271         Module posixtm.
18272         * m4/posixtm.m4: New file.
18273
18274         Module gethostname.
18275         * m4/gethostname.m4: New file.
18276
18277         Module canon-host.
18278         * m4/canon-host.m4: New file.
18279
18280         Module gettext.
18281         * m4/codeset.m4: New file, from gettext-0.11.5.
18282         * m4/gettext.m4: New file, from gettext-0.11.5.
18283         * m4/glibc21.m4: New file, from gettext-0.11.5.
18284         * m4/iconv.m4: New file, from gettext-0.11.5.
18285         * m4/intdiv0.m4: New file, from gettext-0.11.5.
18286         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
18287         * m4/inttypes.m4: New file, from gettext-0.11.5.
18288         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
18289         * m4/isc-posix.m4: New file, from gettext-0.11.5.
18290         * m4/lcmessage.m4: New file, from gettext-0.11.5.
18291         * m4/lib-ld.m4: New file, from gettext-0.11.5.
18292         * m4/lib-link.m4: New file, from gettext-0.11.5.
18293         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
18294         * m4/progtest.m4: New file, from gettext-0.11.5.
18295         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
18296         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
18297         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
18298
18299         Module localcharset.
18300         * m4/localcharset.m4: New file.
18301
18302         Module hard-locale.
18303         * m4/hard-locale.m4: New file.
18304
18305         Module mbswidth.
18306         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
18307         onceonly macros.
18308         * m4/mbrtowc.m4: Add comment.
18309
18310         Module memcasecmp.
18311         * m4/memcasecmp.m4: New file.
18312
18313         Module memcoll.
18314         * m4/memcoll.m4: New file.
18315
18316         Module unicodeio.
18317         * m4/unicodeio.m4: New file.
18318
18319         Module rpmatch.
18320         * m4/rpmatch.m4: New file.
18321
18322         Module yesno.
18323         * m4/yesno.m4: New file.
18324
18325         Module exitfail.
18326         * m4/exitfail.m4: New file.
18327
18328         Module c-stack.
18329         * m4/c-stack.m4 (gl_C_STACK): New macro.
18330         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
18331
18332         Module error.
18333         * m4/error.m4 (gl_ERROR): New macro.
18334         (jm_PREREQ_ERROR): Use onceonly macros.
18335
18336         Module fatal.
18337         * m4/fatal.m4: New file.
18338
18339         Module getloadavg.
18340         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
18341         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
18342
18343         Module getpagesize.
18344         * m4/getpagesize.m4: New file.
18345
18346         Module getusershell.
18347         * m4/getusershell.m4: New file.
18348
18349         Module physmem.
18350         * m4/physmem.m4: New file.
18351
18352         Module posixver.
18353         * m4/posixver.m4: New file.
18354
18355         Module quotearg.
18356         * m4/quotearg.m4: New file.
18357
18358         Module quote.
18359         * m4/quote.m4: New file.
18360
18361         Module readutmp.
18362         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
18363
18364         Module sig2str.
18365         * m4/sig2str.m4: New file.
18366
18367         Other.
18368         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
18369         ulonglong.m4.
18370         * m4/intmax_t.m4: New file.
18371         * m4/d-type.m4: Indentation.
18372         * m4/jm-macros.m4: Update.
18373         * m4/prereq.m4 (jm_PREREQ): Update.
18374         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
18375         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
18376         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
18377         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
18378         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
18379         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
18380         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
18381         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
18382         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
18383         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
18384         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
18385         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
18386         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
18387         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
18388         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
18389         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
18390         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
18391         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
18392         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
18393
18394 2002-12-24  Bruno Haible  <bruno@clisp.org>
18395
18396         * MODULES.txt: Update according to m4/ changes.
18397
18398         Module gettext.
18399         * config.rpath: New file, from gettext-0.11.5.
18400
18401         * modules/*: New module descriptions.
18402         * gnulib-tool: New file.
18403         * MODULES.html.sh: New file.
18404
18405 2002-12-21  Karl Berry  <karl@gnu.org>
18406
18407         * doc/fdl.texi: update to version 1.2.
18408
18409 2002-12-19  Karl Berry  <karl@gnu.org>
18410
18411         * config/config.guess: update from prep.
18412
18413 2002-12-18  Bruno Haible  <bruno@clisp.org>
18414
18415         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
18416         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
18417
18418 2002-12-17  Bruno Haible  <bruno@clisp.org>
18419
18420         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
18421         stdlib.h, string.h.
18422
18423 2002-12-17  Bruno Haible  <bruno@clisp.org>
18424
18425         * lib/canon-host.c (strdup): Remove unused declaration.
18426
18427         * lib/fsusage.c: Include full_read.h.
18428         (get_fs_usage): Use full_read instead of safe_read.
18429
18430         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
18431
18432 2002-12-12  Karl Berry  <karl@gnu.org>
18433
18434         * config/config.guess: update from prep.
18435
18436 2002-12-11  Bruno Haible  <bruno@clisp.org>
18437
18438         * m4/setenv.m4: New file, from gettext-0.11.5.
18439
18440 2002-12-11  Bruno Haible  <bruno@clisp.org>
18441
18442         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
18443         not unsetenv().
18444         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
18445         modifications:
18446
18447         2002-12-11  Bruno Haible  <bruno@clisp.org>
18448
18449                 * setenv.c (alloca): Fall back to malloc.
18450                 (freea): New macro.
18451                 (setenv): Use freea() to free memory allocated with alloca().
18452
18453         2002-11-13  Bruno Haible  <bruno@clisp.org>
18454
18455                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
18456                 function declarations.
18457                 * unsetenv.c (unsetenv): Likewise.
18458
18459         2002-03-04  Bruno Haible  <bruno@clisp.org>
18460
18461                 Portability to AIX 4.3.3.
18462                 * unsetenv.c: New file, extracted from setenv.c.
18463                 * setenv.c: Move the unsetenv() function to unsetenv.c.
18464
18465         2001-12-20  Bruno Haible  <bruno@clisp.org>
18466
18467                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
18468                 use malloc instead. For SunOS 4.
18469
18470         2001-12-11  Bruno Haible  <bruno@clisp.org>
18471
18472                 * setenv.c: Declare alloca.
18473                 (compar_fn_t): New typedef.
18474                 (KNOWN_VALUE, STORE_VALUE): Use it.
18475
18476         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
18477         setenv.h.
18478
18479 2002-12-10  Paul Eggert  <eggert@twinsun.com>
18480
18481         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
18482         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
18483         Choose values that are less likely to collide with system fnmatch
18484         options.
18485         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
18486         defined (e.g., a pure POSIX system).
18487         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
18488         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
18489
18490 2002-12-06  Paul Eggert  <eggert@twinsun.com>
18491
18492         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
18493         a pain in practice to deal with generated m4 files.  This change
18494         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
18495
18496         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
18497         and jm-glibc-io.m4, as they are no longer a special case.
18498         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
18499         kludge and the auto-generation stuff.  Check only whether the
18500         functions are declared, not whether they exist, since older hosts
18501         that don't declare the functions can't use the optimization anyway.
18502
18503 2002-12-06  Jim Meyering  <jim@meyering.net>
18504
18505         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
18506
18507         Merge in changes from libc's misc/error.c, in preparation
18508         for the merge of gnulib's changes back into libc.
18509
18510         * lib/error.c (_): Define only if not already defined.
18511         Move definition to follow all #include directives.
18512         Include unlocked-io.h only if !_LIBC.
18513         [_LIBC]: Include <libio/libioP.h>.
18514         [USE_IN_LIBIO]: Include <libio/iolibio.h>
18515         (fflush): Tweak definition to use INTUSE.
18516         (putc): Define.
18517
18518 2002-12-05  Paul Eggert  <eggert@twinsun.com>
18519
18520         * lib/alloca.c [defined emacs]: Include "lisp.h".
18521         (xalloc_die) [defined emacs]: New macro.
18522         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
18523         [! defined emacs]: Include <xalloc.h>.
18524         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
18525         (pointer): Typedef to POINTER_TYPE *.
18526         (malloc): Remove decl; we now always use xmalloc.
18527         (alloca): Use old-style definition, since Emacs needs this.
18528         Check for arithmetic overflow when computing combined size.
18529
18530 2002-12-04  Paul Eggert  <eggert@twinsun.com>
18531
18532         Do not generate unlocked-io.h automatically, since it's easier to
18533         maintain it by hand.
18534
18535         * lib/unlocked-io.h: New file, from GNU diffutils,
18536         but with proper copyright notice and attribution.
18537         * lib/gen-uio: Remove.
18538         * lib/Makefile.am: Add copyright notice.
18539         (libfetish_a_SOURCES): Add unlocked-io.h.
18540         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
18541         (DISTCLEANFILES, io_functions): Remove macros.
18542         (EXTRA_DIST): Remove gen_uio.
18543         (unlocked-io.h): Remove rule.
18544
18545 2002-12-04  Jim Meyering  <jim@meyering.net>
18546
18547         Reflect the fact that stat.c and lstat.c are no longer generated.
18548         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
18549         (DISTCLEANFILES): Likewise.
18550         (EXTRA_DIST): Likewise.
18551         (all_local): Don't depend on stat.c or lstat.c.
18552         (stat.c, lstat.c): Remove rules.
18553         (EXTRA_DIST): Remove xstat.in.
18554
18555         * lib/xstat.in: Remove file.  Contents moved into stat.c.
18556         * lib/stat.c: New file.  Contents mostly from xstat.in.
18557         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
18558         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
18559
18560         * lib/safe-read.c: Rework so that it may serve to define safe_write,
18561         too.
18562         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
18563
18564 2002-12-03  Jim Meyering  <jim@meyering.net>
18565
18566         * lib/safe-read.c, safe-write.c: Change variable names and comments,
18567         but not semantics, to minimize the differences between these two files.
18568         (safe_read): Change comment to mention SAFE_READ_ERROR.
18569
18570         * lib/safe-read.c (IS_EINTR): Define.
18571         (safe_read): Use IS_EINTR in place of in-function cpp directives.
18572
18573 2002-12-02  Jim Meyering  <jim@meyering.net>
18574
18575         * lib/safe-read.c (EINTR): Define.
18576         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
18577         (INT_MAX): Provide fallback.
18578         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
18579
18580         * lib/safe-read.h (SAFE_READ_ERROR): Define.
18581
18582 2002-12-02  Bruno Haible  <bruno@clisp.org>
18583
18584         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
18585         Define, taken from safe-read.c.
18586         (INT_MAX): Provide fallback.
18587         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
18588         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
18589
18590         * lib/safe-read.c (EINTR): Remove definition.
18591         (safe_read): Don't use EINTR if it is absent.
18592
18593 2002-12-01  Jim Meyering  <jim@meyering.net>
18594
18595         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
18596         zero.
18597         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
18598
18599 2002-11-27  Paul Eggert  <eggert@twinsun.com>
18600
18601         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
18602         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
18603         with `if (! (value < limit)) abort ();', for readability.
18604
18605 2002-11-26  Karl Berry  <karl@gnu.org>
18606
18607         * lib/strdup.c: copy from libc again, with jim's ok.
18608         * lib/.cppi-disable: re-add strdup.c
18609
18610 2002-11-25  Karl Berry  <karl@gnu.org>
18611
18612         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
18613         instead of "strtol.c".
18614
18615 2002-11-25  Karl Berry  <karl@gnu.org>
18616
18617         * config/install-sh: update from automake for variable quoting, $0 in
18618         error msgs, etc.
18619
18620         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
18621         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
18622         entry.
18623
18624 2002-11-25  Jim Meyering  <jim@meyering.net>
18625
18626         * lib/mktime.c: Sync from libc, now that it has the latest fix.
18627
18628 2002-11-24  Karl Berry  <karl@gnu.org>
18629
18630         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
18631         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
18632
18633 2002-11-24  Jim Meyering  <jim@meyering.net>
18634
18635         Update from coreutils:
18636
18637         * lib/mktime.c: Merge in changes from libc.
18638
18639         Avoid a link-time failure on some Linux systems.
18640         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
18641         (otherwise).
18642         (__mon_yday): Declare with the STATIC attribute.
18643         (__mktime_internal): Likewise.
18644         Based on a report from Greg Schafer.
18645
18646 2002-11-23  Jim Meyering  <jim@meyering.net>
18647
18648         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
18649         Use `unsigned', not `int', as type of index.
18650
18651         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
18652
18653         * lib/fsusage.c: Remove unneeded parentheses around operands of
18654         `defined'.
18655
18656 2002-11-22  Paul Eggert  <eggert@twinsun.com>
18657
18658         * lib/quotearg.h: Allow multiple inclusion by surrounding with
18659         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
18660         so that we can be included first.
18661         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
18662         * lib/quotearg.c: Include quotearg.h immediately after config.h.
18663         No need to include stddef.h or sys/types.h any more.
18664         Surround local include files with "", not "<>".
18665         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
18666         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
18667         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
18668         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
18669         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
18670         (ISPRINT): Remove; no longer needed now that we assume C89.
18671
18672         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
18673         Preserve errno.
18674
18675         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
18676         quotearg_char): Use SIZE_MAX rather than
18677         (size_t) -1 when we are talking about "infinity".
18678
18679         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
18680
18681 2002-11-22  Paul Eggert  <eggert@twinsun.com>
18682
18683         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
18684         hint that one should use `if (! x) abort ();' rather than `assert
18685         (x);', and anyway it's one less thing to worry about configuring.
18686         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
18687         hash_rehash, hash_insert): Use abort rather than assert.
18688
18689 2002-11-22  Bruno Haible  <bruno@clisp.org>
18690
18691         * lib/safe-read.h: Assume C89. Add comments.
18692         (safe_read): Change return type to size_t.
18693         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
18694         byte counts > SSIZE_MAX correctly.
18695         * lib/safe-write.h: New file.
18696         * lib/safe-write.c: New file.
18697         * lib/full-read.h: New file.
18698         * lib/full-read.c: New file.
18699         * lib/full-write.h: Assume C89. Add comments.
18700         * lib/full-write.c: Include safe-write.h.
18701         (full_write): Rewritten to use safe_write.
18702         Suggested by Jim Meyering and Paul Eggert.
18703
18704 2002-11-21  Jim Meyering  <jim@meyering.net>
18705
18706         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
18707
18708         Merge in changes from the coreutils.
18709
18710         2002-09-25  Paul Eggert  <eggert@twinsun.com>
18711         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
18712         <stdint.h>.
18713         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
18714         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
18715         int.  Work more efficiently if X is the same width as uintmax_t.
18716         Do not compare X to -1, to avoid bogus compiler warning.
18717         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
18718         Don't assume that f_frsize and f_bsize are the same type.
18719
18720         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
18721         warning on FreeBSD.
18722
18723         * lib/makepath.c (make_path): Restore umask *before* creating the final
18724         component.
18725         (make_path): Minor reformatting.
18726
18727         * lib/xmalloc.c: Adjust to work with new autoconf macros,
18728         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
18729         HAVE_MALLOC/HAVE_REALLOC.
18730
18731         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
18732         dummy ones.  At least on GNU/Linux systems, `auto' means something
18733         else.
18734         From Michael Stone.
18735
18736 2002-11-21  Bruno Haible  <bruno@clisp.org>
18737
18738         Remove case insensitive option matching.
18739         * lib/argmatch.h (argcasematch): Remove declaration.
18740         (ARGCASEMATCH): Remove macro.
18741         (__xargmatch_internal): Remove case_sensitive argument.
18742         (XARGMATCH): Update.
18743         (XARGCASEMATCH): Remove macro.
18744         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
18745         case_sensitive argument.
18746         (argcasematch): Remove function.
18747         (__xargmatch_internal): Remove case_sensitive argument.
18748         (main): Use XARGMATCH instead of XARGCASEMATCH.
18749
18750         * lib/xmalloc.c: Change compile-time error message. Add comment about
18751         required autoconf version.
18752
18753 2002-11-20  Paul Eggert  <eggert@twinsun.com>
18754
18755         Merge argmatch cleanups from Bison.  Assume C89.
18756
18757         * lib/argmatch.c: Include config.h here, not in argmatch.h.
18758         Include stdlib.h, for EXIT_FAILURE.
18759         Always include <string.h>, since we assume C89.
18760         (EXIT_FAILURE): Remove pre-C89 bug workaround.
18761         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
18762         Include <stddef.h> instead, since it's all we need for size_t.
18763         (PARAMS): Remove.  All uses removed.
18764         (ARRAY_CARDINALITY): Do not bother to #undef.
18765         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
18766         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
18767         Remove unnecessary parentheses.
18768         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
18769         Insert necessary parentheses.
18770         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
18771         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
18772
18773 2002-11-19  Bruno Haible  <bruno@clisp.org>
18774
18775         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
18776         * lib/mbswidth.h: Include <stddef.h>, for size_t.
18777
18778         * lib/mbswidth.h (PARAMS): Remove macro.
18779         (mbswidth, mbsnwidth): Use ANSI C function declarations.
18780         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
18781
18782         * lib/gcd.h (PARAMS): Remove macro.
18783         (gcd): Use ANSI C function declarations.
18784         * lib/gcd.c (gcd): Likewise.
18785
18786 2002-11-15  Bruno Haible  <bruno@clisp.org>
18787
18788         * lib/strcspn.c: Include <stddef.h>.
18789         (strcspn): Use ANSI C function declaration. Change return type to
18790         size_t. Use NULL.
18791         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
18792         (strpbrk): Use NULL.
18793         * lib/strpbrk.h (PARAMS): Remove macro.
18794         (strpbrk): Use ANSI C function declaration.
18795         * lib/strstr.c: Don't include <sys/types.h>.
18796         * lib/strstr.h (PARAMS): Remove macro.
18797         (strstr): Use ANSI C function declarations.
18798
18799 2002-11-14  Karl Berry  <karl@gnu.org>
18800
18801         * config/mkinstalldirs: `do' on separate line, instead of
18802         `for var; do'.
18803
18804 2002-11-06  Bruno Haible  <bruno@clisp.org>
18805
18806         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
18807         * lib/gcd.c (gcd): Likewise.
18808
18809 2002-11-05  Bruno Haible  <bruno@clisp.org>
18810
18811         * lib/gcd.h: New file, from gettext-0.11.5.
18812         * lib/gcd.c: New file, from gettext-0.11.5.
18813
18814 2002-11-05  Bruno Haible  <bruno@clisp.org>
18815
18816         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
18817         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
18818         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
18819         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
18820
18821         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
18822         <libintl.h>.
18823         * lib/makepath.c: Include gettext.h instead of <locale.h> and
18824         <libintl.h>.
18825
18826         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
18827         * lib/human.c: Include gettext.h instead of <libintl.h>.
18828         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
18829         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
18830         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
18831         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
18832         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
18833         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
18834         (textdomain): Remove definition.
18835         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
18836
18837         * lib/long-options.c: Remove include of <libintl.h> and definition of
18838         _.
18839         * lib/same.c: Remove include of <libintl.h> and definition of _.
18840
18841 2002-11-04  Owen Taylor  <otaylor@redhat.com>
18842
18843         * lib/config.charset: A few additions for Solaris.
18844
18845 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
18846
18847         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
18848         * lib/localcharset.c (locale_charset): Declare as extern "C".
18849
18850 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
18851
18852         * lib/config.charset: msdos in uk_UA uses CP1125.
18853
18854 2002-11-04  Bruno Haible  <bruno@clisp.org>
18855
18856         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
18857         * lib/strcase.h: New file, from GNU gettext-0.11.5.
18858         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
18859         * lib/strstr.h: New file, from GNU gettext-0.11.5.
18860         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
18861
18862 2002-11-04  Bruno Haible  <bruno@clisp.org>
18863
18864         * lib/localcharset.c (locale_charset): Don't return an empty string.
18865
18866 2002-11-04  Bruno Haible  <bruno@clisp.org>
18867
18868         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
18869         aliases.
18870
18871 2002-11-04  Bruno Haible  <bruno@clisp.org>
18872
18873         * lib/config.charset: Update for newest glibc. Add canonical names
18874         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
18875
18876 2002-11-04  Bruno Haible  <bruno@clisp.org>
18877
18878         * lib/config.charset: Add support for NetBSD.
18879
18880 2002-11-04  Bruno Haible  <bruno@clisp.org>
18881
18882         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
18883
18884 2002-11-01  Bruno Haible  <bruno@clisp.org>
18885
18886         * configure.in: Add AC_CONFIG_AUX_DIR call.
18887         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
18888         test/Makefile.
18889         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
18890
18891 2002-09-28  Karl Berry  <karl@gnu.org>
18892
18893         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
18894         installed automake until the next release, since changes have been
18895         made.
18896
18897 2002-09-25  Karl Berry  <karl@gnu.org>
18898
18899         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
18900         * lib/getopt*: copy from libc/posix.
18901         * lib/gettext.h: copy from gettext.
18902         * lib/.cppi-disable: add strdup.c, gettext.h.
18903
18904 2002-09-25  Karl Berry  <karl@gnu.org>
18905
18906         * config/srclist.txt: enable gettext.h check.
18907         * config/config.{guess,sub}: update from prep.
18908         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
18909                 from automake 1.6.3.
18910         See srclist*.
18911
18912 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
18913
18914         * regex.c (PATFETCH): Remove the translating fetch.
18915         (PATFETCH_RAW): Rename to PATFETCH.
18916         (set_image_of_range): New fun.
18917         (SET_RANGE_TABLE_WORK_AREA): Use it.
18918         (regex_compile): Don't translate the pattern chars so eagerly.
18919         Only do it when inserting an `exactn' bytecode or when handling
18920         a char-range.
18921         (mutually_exclusive_p): Avoid empty statement.
18922
18923 2002-07-06  Jim Meyering  <meyering@lucent.com>
18924
18925         * m4/README: Don't mention Makefile.am.in.
18926         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
18927
18928 2002-07-01  Jim Meyering  <meyering@lucent.com>
18929
18930         * lib/c-stack.c: Include sys/time.h.
18931         From Volker Borchert.
18932
18933 2002-06-26  Paul Eggert  <eggert@twinsun.com>
18934
18935         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
18936
18937 2002-06-26  Paul Eggert  <eggert@twinsun.com>
18938
18939         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
18940         New macro.  Use it uniformly instead of
18941         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
18942         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
18943         reported by Vin Shelton.
18944
18945 2002-06-22  Paul Eggert  <eggert@twinsun.com>
18946
18947         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
18948         Do not assume SA_SIGINFO behavior.
18949         Bug reported by Jim Meyering on NetBSD 1.5.2.
18950
18951 2002-06-22  Jim Meyering  <meyering@lucent.com>
18952
18953         * m4/c-stack.m4: New file, from diffutils-2.8.2.
18954         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
18955
18956         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
18957         now that configure.ac uses AC_GNU_SOURCE.
18958         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
18959         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
18960
18961         Update to latest tools.  Suggestions from Paul Eggert.
18962         * m4/stdbool.m4: New file, from diffutils-2.8.2.
18963         * m4/gnu-source.m4: Update from diffutils-2.8.2.
18964         * m4/fnmatch.m4: Likewise.
18965         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
18966         to AC_HEADER_STDBOOL
18967
18968 2002-06-22  Jim Meyering  <meyering@lucent.com>
18969
18970         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
18971         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
18972
18973 2002-06-22  Jim Meyering  <meyering@lucent.com>
18974
18975         * lib/c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
18976
18977         * lib/exitfail.c, exitfail.h: Likewise.
18978         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
18979
18980         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
18981         of fnmatch.h.
18982         (EXTRA_DIST): Add fnmatch_loop.c.
18983         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
18984
18985         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
18986         * lib/fnmatch.c: Update from diffutils-2.8.2.
18987         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
18988         * lib/fnmatch.h: Remove file.
18989
18990 2002-06-21  Jim Meyering  <meyering@lucent.com>
18991
18992         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
18993         * m4/mbrtowc.m4: Likewise.
18994
18995         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
18996         * m4/mbswidth.m4: Reflect name change:
18997         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
18998         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
18999
19000         * m4/lib-link.m4: Update from gettext-0.11.2.
19001         * m4/gettext.m4: Likewise.
19002
19003         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
19004         From Alfred M. Szmidt.
19005
19006 2002-06-18  Paul Eggert  <eggert@twinsun.com>
19007
19008         * lib/file-type.h: Report an error if neither S_ISREG nor
19009         S_IFREG is defined, instead of using a test specific to glibc
19010         2.2.  This should be safe, since POSIX requires S_ISREG and
19011         Unix Version 7 had S_IFREG.  We don't need to check for
19012         <sys/types.h> since we don't use any symbols that it defines.
19013
19014 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
19015
19016         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
19017         $@-t, so that each temporary file name is unique and valid in the first
19018         8 characters, for operation under DOS.
19019
19020 2002-06-15  Paul Eggert  <eggert@twinsun.com>
19021
19022         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
19023
19024 2002-06-15  Jim Meyering  <meyering@lucent.com>
19025
19026         Work even with DJGPP 2.03, which lacks support for symlinks.
19027         From Richard Dawe.
19028         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
19029         is defined.
19030         * lib/lchown.c (S_ISLNK): Likewise.
19031
19032 2002-06-15  Jim Meyering  <meyering@lucent.com>
19033
19034         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
19035         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
19036         have been included before this file.
19037
19038 2002-06-14  Jim Meyering  <meyering@lucent.com>
19039
19040         * lib/file-type.h: Use the version from diffutils-2.8.2.
19041         * lib/file-type.c: Likewise.
19042
19043 2002-06-07  Jim Meyering  <meyering@lucent.com>
19044
19045         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
19046         They're needed at least for NetBSD 1.5.2.
19047         ($statxfs_includes): Include those same headers.
19048         ($statxfs_includes): Include sys/vfs.h if available.
19049         ($statxfs_includes): Likewise for sys/statvfs.h.
19050         Check for the following members in both structs statfs and statvfs:
19051         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
19052
19053 2002-06-01  Jim Meyering  <meyering@lucent.com>
19054
19055         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
19056         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
19057
19058 2002-05-28  Jim Meyering  <meyering@lucent.com>
19059
19060         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
19061         Reported by Volker Borchert.
19062
19063 2002-05-27  Jim Meyering  <meyering@lucent.com>
19064
19065         Fix a problem seen only on nonconforming systems whereby ls.c's
19066         use of localtime, and then of gettimeofday would cause trouble:
19067         the localtime call used to initialize rpl_gettimeofday's save
19068         mechanism would clobber ls's current local time information so
19069         that in any long listing the first file would always be listed
19070         with date 1970-01-01.  Analysis by Volker Borchert.
19071
19072         * lib/gettimeofday.c (localtime): Undefine.
19073         (rpl_localtime): New function.
19074
19075 2002-05-27  Jim Meyering  <meyering@lucent.com>
19076
19077         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
19078         localtime.
19079
19080         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
19081         use the replacement function; it wouldn't resolve at link time.
19082         Reported by Volker Borchert.
19083
19084 2002-05-22  Jim Meyering  <meyering@lucent.com>
19085
19086         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
19087         file-type.h.
19088         * lib/file-type.h: New file.
19089         * lib/file-type.c (file_type): New file/function.  Extracted from
19090         diffutils.
19091
19092 2002-04-30  Jim Meyering  <meyering@lucent.com>
19093
19094         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
19095
19096 2002-04-29  Paul Eggert  <eggert@twinsun.com>
19097
19098         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
19099
19100 2002-04-29  Paul Eggert  <eggert@twinsun.com>
19101
19102         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
19103         Do not check for alloca.h (no longer used) or stdbool.h (was never
19104         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
19105
19106 2002-04-29  Paul Eggert  <eggert@twinsun.com>
19107
19108         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
19109
19110 2002-04-29  Jim Meyering  <meyering@lucent.com>
19111
19112         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
19113         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
19114         Use AC_FUNC_STRNLEN here instead.
19115
19116         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
19117         With autoconf-2.53a, it's part of AC_PROG_CC.
19118
19119 2002-04-28  Paul Eggert  <eggert@twinsun.com>
19120
19121         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
19122         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
19123
19124 2002-04-28  Paul Eggert  <eggert@twinsun.com>
19125
19126         * lib/sig2str.h, sig2str.c: New files.
19127         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
19128
19129 2002-04-28  Paul Eggert  <eggert@twinsun.com>
19130
19131         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
19132         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
19133         of 127, since 64 is the largest conceivable number for ancient
19134         nonstandard hosts.
19135         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
19136
19137 2002-04-28  Jim Meyering  <meyering@lucent.com>
19138
19139         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
19140
19141 2002-04-24  Jim Meyering  <meyering@lucent.com>
19142
19143         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
19144         (jm_PREREQ): Use it.
19145
19146         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
19147         mach/mach.h fcntl.h.
19148         Check for this function: setlocale.
19149
19150 2002-04-24  Jim Meyering  <meyering@lucent.com>
19151
19152         * lib/gettext.h: New file, from Gettext.
19153         * lib/Makefile.am (INCLUDES): Remove -I../intl.
19154         (libfetish_a_SOURCES): Add gettext.h.
19155
19156 2002-04-16  Jim Meyering  <meyering@lucent.com>
19157
19158         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
19159         ut_pid, ut_id, ut_exit.
19160
19161 2002-04-16  Jim Meyering  <meyering@lucent.com>
19162
19163         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
19164         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
19165         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
19166
19167 2002-04-12  Jim Meyering  <meyering@lucent.com>
19168
19169         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
19170         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
19171         existence of the getmntinfo function.  Needed for Darwin 5.3.
19172
19173         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
19174         This is necessary at least on Darwin 5.3.
19175
19176         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
19177         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
19178         strnlen.o in the library, and that makes some versions of ranlib
19179         object.
19180
19181 2002-04-12  Jim Meyering  <meyering@lucent.com>
19182
19183         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
19184
19185 2002-04-09  Jim Meyering  <meyering@lucent.com>
19186
19187         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
19188         to be more precise.  Rather than saying we're checking whether the
19189         function `works', say what we're testing.
19190         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
19191         Reported by Bruno Haible.
19192
19193 2002-03-10  Jim Meyering  <meyering@lucent.com>
19194
19195         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
19196         Suggestion from Santiago Vila.
19197
19198 2002-03-08  Jim Meyering  <meyering@lucent.com>
19199
19200         * lib/rename.c: Mention that this wrapper is needed also on
19201         mips-dec-ultrix4.4 systems.
19202
19203 2002-03-02  Jim Meyering  <meyering@lucent.com>
19204
19205         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
19206         not HAVE_CLOCK_SETTIME.
19207
19208 2002-02-27  Paul Eggert  <eggert@twinsun.com>
19209
19210         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
19211         Check for clock_settime.
19212
19213 2002-02-27  Paul Eggert  <eggert@twinsun.com>
19214
19215         * lib/nanosleep.h: Rename to....
19216         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
19217
19218         * lib/gettime.c: New file.
19219         * lib/settime.c: New file.
19220         * lib/stime.c: Remove.
19221
19222         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
19223         timespec.h.  Remove nanosleep.h.
19224
19225 2002-02-25  Paul Eggert  <eggert@twinsun.com>
19226
19227         * m4/acl.m4: New file.
19228         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
19229         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
19230
19231 2002-02-25  Paul Eggert  <eggert@twinsun.com>
19232
19233         * lib/acl.c, acl.h: New files.
19234         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
19235
19236 2002-02-24  Jim Meyering  <meyering@lucent.com>
19237
19238         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
19239         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
19240         cause trouble.  Reported by Nelson Beebe.
19241
19242 2002-02-23  Paul Eggert  <eggert@twinsun.com>
19243
19244         * lib/path-concat.c (xpath_concat): Reorder code to pacify
19245         compilers that don't know that xalloc_die never returns.
19246
19247 2002-02-20  Jim Meyering  <meyering@lucent.com>
19248
19249         * lib/getdate.c: Regenerate using bison-1.33.
19250
19251 2002-02-17  Jim Meyering  <meyering@lucent.com>
19252
19253         * config/config.guess (main): Don't use `head -1'; it's no longer
19254         portable. Use `sed 1q' instead.
19255
19256 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
19257
19258         * m4/codeset.m4: Upgrade to gettext-0.11.
19259         * m4/gettext.m4: Upgrade to gettext-0.11.
19260         * m4/glibc21.m4: Upgrade to gettext-0.11.
19261         * m4/iconv.m4: Upgrade to gettext-0.11.
19262         * m4/isc-posix.m4: Upgrade to gettext-0.11.
19263         * m4/lcmessage.m4: Upgrade to gettext-0.11.
19264         * m4/lib-ld.m4: New file, from gettext-0.11.
19265         * m4/lib-link.m4: New file, from gettext-0.11.
19266         * m4/lib-prefix.m4: New file, from gettext-0.11.
19267         * m4/progtest.m4: Upgrade to gettext-0.11.
19268
19269 2002-02-15  Paul Eggert  <eggert@twinsun.com>
19270
19271         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
19272         (jm_PREREQ): Use it.
19273
19274 2002-02-15  Paul Eggert  <eggert@twinsun.com>
19275
19276         * lib/posixver.c, posixver.h: New files.
19277         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
19278
19279 2002-02-02  Paul Eggert  <eggert@twinsun.com>
19280             Bruno Haible  <bruno@clisp.org>
19281
19282         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
19283         (fwrite_success_callback): New declaration.
19284         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
19285         print_unicode_char. Call failure callback instead of error.
19286         (fwrite_success_callback): New function.
19287         (exit_failure_callback): New function.
19288         (fallback_failure_callback): New function.
19289         (print_unicode_char): Call unicode_to_mb.
19290
19291 2002-01-26  Jim Meyering  <meyering@lucent.com>
19292
19293         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
19294         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
19295
19296 2002-01-26  Jim Meyering  <meyering@lucent.com>
19297
19298         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
19299
19300 2002-01-22  Paul Eggert  <eggert@twinsun.com>
19301
19302         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
19303
19304 2002-01-22  Jim Meyering  <meyering@lucent.com>
19305
19306         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
19307         Otherwise, some versions of automake would omit the rule that makes
19308         Makefile from Makefile.in.
19309
19310 2002-01-21  Paul Eggert  <eggert@twinsun.com>
19311
19312         * lib/xmemcoll.h, xmemcoll.c: New files.
19313         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
19314         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
19315         (memcoll): Set errno to zero if there is no error.
19316
19317         * lib/quotearg.c (quotearg_buffer_restyled):
19318         Fix bug with quoting buffers containing NUL when backslashing escapes.
19319         This bug was exposed by the other changes in this patch.
19320         (quotearg_n_options): New arg ARGSIZE.
19321         All callers changed.
19322         (quoting_options_from_style): New function.
19323         (quotearg_n_style): Use it.
19324         (quotearg_n_style_mem): New function.
19325
19326         * lib/quotearg.h (quotearg_n_style_mem): New function.
19327
19328 2002-01-19  Jim Meyering  <meyering@lucent.com>
19329
19330         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
19331         Remove useless quotes: DF_PROG="df".
19332         * m4/strnlen.m4: New file.
19333
19334 2002-01-16  Paul Eggert  <eggert@twinsun.com>
19335
19336         * lib/backupfile.c (ISDIGIT): Comment fix.
19337         * lib/getdate.y (ISDIGIT): Likewise.
19338         * lib/posixtm.c (ISDIGIT, year): Likewise.
19339         * lib/strverscmp.c (ISDIGIT): Likewise.
19340         * lib/userspec.c (ISDIGIT): Likewise.
19341
19342 2002-01-16  Jim Meyering  <meyering@lucent.com>
19343
19344         * lib/getdate.y: Add three semicolons, each just before a closing
19345         brace. Bison (as of version 1.31) no longer papers over that mistake.
19346
19347 2002-01-05  Jim Meyering  <meyering@lucent.com>
19348
19349         * lib/version-etc.c (version_etc_copyright): Update copyright year.
19350
19351 2001-12-19  Paul Eggert  <eggert@twinsun.com>
19352
19353         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
19354         not silently exit merely because the output buffer happens to
19355         have nothing pending.
19356
19357 2001-12-18  Paul Eggert  <eggert@twinsun.com>
19358
19359         See the big note in ../ChangeLog.
19360         * lib/human.c (suffixes): Prefer K to k for 1024.
19361         (generate_suffix_backwards): New function.
19362         (human_readable_inexact): Use it.
19363         * lib/xstrtol.c (__xstrtol): If there is no number but there
19364         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
19365         Accept 'K' as well as 'k'.
19366
19367 2001-12-15  Jim Meyering  <meyering@lucent.com>
19368
19369         * lib/regex.h (__restrict_arr): Update from libc.
19370
19371         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
19372         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
19373         (STREQ): Define.
19374
19375 2001-12-14  Jim Meyering  <meyering@lucent.com>
19376
19377         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
19378         Suggestion from Bruno Haible.
19379
19380 2001-12-10  Jim Meyering  <meyering@lucent.com>
19381
19382         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
19383         xrealloc, Instead, include "xalloc.h".
19384         (initbuffer): Don't cast xmalloc return value to char*.
19385         (readline): Reword comment.
19386         Don't cast xrealloc return value to char*
19387         Return NULL, not 0.
19388
19389 2001-12-09  Jim Meyering  <meyering@lucent.com>
19390
19391         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
19392         about `signed and unsigned type in conditional expression'.
19393         * lib/posixtm.c (posix_time_parse): Likewise.
19394
19395         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
19396
19397         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
19398         to avoid a pedantic warning.
19399
19400         * lib/getstr.c: Don't include assert.h.
19401         (getstr): Remove warning-evoking assertions.
19402         Return -1 if offset parameter is out of bounds.
19403         Change the type of a local from int to size_t.
19404
19405         * lib/strftime.c (my_strftime_localtime_r): Include this function
19406         definition in the `#if ! HAVE_TM_GMTOFF' block.
19407
19408         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
19409         Include xalloc.h instead.
19410
19411 2001-12-02  Jim Meyering  <meyering@lucent.com>
19412
19413         * lib/tempname.c: Don't declare getenv, thus reverting the change of
19414         2001-11-18.  It's no longer necessary, now that stdlib.h is always
19415         included.
19416
19417         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
19418         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
19419
19420 2001-11-30  Akim Demaille  <akim@epita.fr>
19421
19422         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
19423         before being defined.
19424
19425 2001-11-27  Paul Eggert  <eggert@twinsun.com>
19426
19427         * lib/quotearg.h (quotearg_n, quotearg_n_style):
19428         First arg is int, not unsigned.
19429         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19430         (SIZE_MAX, UINT_MAX): New macros.
19431         (quotearg_n_options): Abort if N is negative.
19432         Avoid overflow check on hosts where size_t is 64 bits and int
19433         is 32 bits, as overflow is impossible there.
19434         Fix off-by-one typo that caused unnecessary reallocation.
19435
19436 2001-11-27  Jim Meyering  <meyering@lucent.com>
19437
19438         * lib/tempname.c: Merge with version from libc.
19439         * lib/regex.c: Likewise.
19440
19441         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
19442         systems for which STDC_HEADERS is 0, it was not included, resulting in
19443         a warning about an integer-to-pointer conversion problem with getenv.
19444         Reported by Volker Borchert.
19445
19446 2001-11-26  Jim Meyering  <meyering@lucent.com>
19447
19448         * lib/gtod.h: Remove file.
19449         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
19450         * lib/gettimeofday.c: Don't include gtod.h.
19451         (GTOD_init): Remove function.
19452         (rpl_gettimeofday): Do its job here instead, rather than aborting.
19453         Suggestion from Volker Borchert.
19454
19455 2001-11-23  Jim Meyering  <meyering@lucent.com>
19456
19457         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
19458         it.
19459         * lib/hash.c (struct hash_table): Define it here instead.
19460
19461 2001-11-22  Jim Meyering  <meyering@lucent.com>
19462
19463         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
19464
19465 2001-11-20  Jim Meyering  <meyering@lucent.com>
19466
19467         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
19468         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
19469
19470 2001-11-19  Jim Meyering  <meyering@lucent.com>
19471
19472         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
19473         directory.  Use "conftestXXXXXX" as the template.
19474         Suggestion from Paul Eggert.
19475
19476         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
19477         immediately, so the test doesn't mistakenly hit the max-open-files
19478         limit.
19479
19480 2001-11-18  Paul Eggert  <eggert@twinsun.com>
19481
19482         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
19483         (TEMPORARIES): New macro.
19484         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
19485         removes an artificial limitation (e.g. HP-UX 10.20, where
19486         TMP_MAX is 17576).
19487
19488 2001-11-18  Jim Meyering  <meyering@lucent.com>
19489
19490         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
19491
19492 2001-11-18  Jim Meyering  <meyering@lucent.com>
19493
19494         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
19495         on SunOS 4.
19496
19497         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
19498         files will be created before anything else.
19499
19500 2001-11-17 Paul Eggert  <eggert@twinsun.com>
19501
19502         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
19503         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
19504
19505 2001-11-17  Jim Meyering  <meyering@lucent.com>
19506
19507         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
19508         Prompted by a report from Bob Proulx.
19509
19510         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
19511         Instead, require UTILS_FUNC_MKSTEMP.
19512
19513 2001-11-17  Jim Meyering  <meyering@lucent.com>
19514
19515         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
19516         Now, that's done as part of AC_FUNC_STRTOD.
19517
19518 2001-11-17  Jim Meyering  <meyering@lucent.com>
19519
19520         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
19521         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
19522         rather than group writable.  Patch by Juan F. Codagnone.
19523
19524         * lib/readtokens.c: Remove explicit declarations of xmalloc and
19525         xrealloc, Instead, include "xalloc.h".
19526
19527         * lib/mountlist.c: Include unlocked-io.h after all system headers.
19528         Remove explicit declarations of xmalloc, xrealloc,
19529         and xstrdup.  Instead, include "xalloc.h".
19530
19531         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
19532         unlocked-io.h.
19533         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
19534         Likewise.
19535         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
19536
19537         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
19538         Reported by Padraig Brady.
19539
19540         * lib/mkstemp.c: #undef mkstemp.
19541         Include config.h.
19542         (rpl_mkstemp): Rename from mkstemp.
19543         Protoize.
19544
19545 2001-11-16  Jim Meyering  <meyering@lucent.com>
19546
19547         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
19548         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
19549         determine the amount of total physical memory, use pstat_getstatic.
19550         HPUX-11 doesn't define _SC_PHYS_PAGES.
19551         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
19552         If sysconf couldn't be used to determine the amount of available
19553         physical memory, use both pstat_getstatic and pstat_getdynamic.
19554         Based on a patch from Bob Proulx.
19555
19556 2001-11-10  Jim Meyering  <meyering@lucent.com>
19557
19558         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
19559         (jm_PREREQ): Use it.
19560
19561 2001-11-09  Jim Meyering  <meyering@lucent.com>
19562
19563         * m4/jm-macros.m4: Require autoconf-2.52f.
19564         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
19565         Use these AC_-prefixed names, not the AM_-prefixed ones.
19566
19567         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
19568
19569 2001-11-05  Jim Meyering  <meyering@lucent.com>
19570
19571         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
19572
19573 2001-11-04  Jim Meyering  <meyering@lucent.com>
19574
19575         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
19576         $DEFS.
19577
19578 2001-11-03  Jim Meyering  <meyering@lucent.com>
19579
19580         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
19581         of AC_DEFUN.
19582
19583         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
19584         know the name of the variable in the macro definition.
19585
19586 2001-11-03  Jim Meyering  <meyering@lucent.com>
19587
19588         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
19589         in argmatch_to_argument call.
19590
19591         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
19592         argument.
19593
19594         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
19595         e.g., a fault due to an attempt to free a NULL pointer.
19596
19597 2001-11-01  Jim Meyering  <meyering@lucent.com>
19598
19599         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
19600         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
19601
19602 2001-11-01  Jim Meyering  <meyering@lucent.com>
19603
19604         * lib/dirfd.c, dirfd.h: New files.
19605         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
19606
19607         * lib/hash.c (hash_print) [TESTING]: Clean up.
19608
19609 2001-10-22  Paul Eggert  <eggert@twinsun.com>
19610
19611         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
19612         to avoid a warning if -Wall.
19613
19614 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
19615
19616         * README: New file
19617         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
19618         (per RMS's instructions, this is now the canonical source)
19619         * lgpl/, gpl/: New directories.
19620
19621 2001-10-21  Paul Eggert  <eggert@twinsun.com>
19622
19623         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
19624
19625 2001-10-21  Jim Meyering  <meyering@lucent.com>
19626
19627         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
19628         this code would end up calling gettext even in packages built
19629         with --disable-nls.
19630         * lib/getopt.c (_): Likewise.
19631         * lib/regex.c (_): Likewise.
19632
19633 2001-10-20  Paul Eggert  <eggert@twinsun.com>
19634
19635         * m4/error.m4 (jm_PREREQ_ERROR):
19636         Do not invoke AC_CHECK_FUNCS with strerror_r, as
19637         AC_FUNC_STRERROR_R does that.
19638         Check for strerror declaration.
19639
19640         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
19641         are supposed to have them these days.
19642         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
19643         Merge changes from latest Autoconf CVS.
19644         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
19645         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
19646         POSIX decided to standardize on the int flavor of strerror_r.
19647
19648 2001-10-20  Paul Eggert  <eggert@twinsun.com>
19649
19650         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
19651         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
19652         Use strerror_r that is only a macro, even if it is not a function.
19653         (strerror): Check for HAVE_DECL_STRERROR before declaring.
19654         (private_strerror): Use prototypes, not old-style function definition.
19655         (print_errno_message): New function.
19656         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
19657         char*-flavored one.
19658         (error_tail, error, error_at_line): Use it.
19659
19660 2001-10-11  Jim Meyering  <meyering@lucent.com>
19661
19662         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
19663         and quote_n (1, ... to avoid clobbering a buffer.
19664
19665 2001-10-05  Jim Meyering  <meyering@lucent.com>
19666
19667         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
19668         hash-pjw.h.
19669         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
19670         * lib/hash-pjw.h: New file.
19671
19672 2001-09-30  Jim Meyering  <meyering@lucent.com>
19673
19674         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
19675         `struct fsstat' has the `f_fstypename' member.
19676         Use that to define FS_TYPE, which is now used to make
19677         the getfsstat link test tighter.
19678
19679 2001-09-30  Jim Meyering  <meyering@lucent.com>
19680
19681         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
19682         Include <sys/ucred.h>, for Apple Darwin.
19683         Include sys/mount.h and sys/fs_types.h only if available.
19684         (FS_TYPE): Define.
19685         (read_filesystem_list): Use FS_TYPE.
19686
19687 2001-09-29  Paul Eggert  <eggert@twinsun.com>
19688
19689         * lib/exclude.c (excluded_filename): 0 -> false, since it's
19690         a boolean context.
19691
19692 2001-09-29  Jim Meyering  <meyering@lucent.com>
19693
19694         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
19695         [one-argument getmntent function]): Include stdio.h before mntent.h.
19696         SunOS 4.1.x needs it for the declaration of `FILE'.
19697         Patch by Volker Borchert.
19698
19699         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
19700         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
19701         sys/fs_types.h, and make the link-test for getfsstat guard #include
19702         directives with appropriate #if HAVE_*_H tests so that we can
19703         detect getfsstat on Apple Darwin1.3.7 systems.
19704         Reported by Nelson Beebe.
19705         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
19706
19707 2001-09-28  Paul Eggert  <eggert@twinsun.com>
19708
19709         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
19710         #defines strtoimax.  Also treat the other strto* functions
19711         like strtoimax.
19712
19713         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
19714         Check for strtoul and strtoumax,
19715         as those declarations are made even in the signed case.
19716         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
19717         Likewise, for strtol and strtoimax.
19718
19719 2001-09-28  Paul Eggert  <eggert@twinsun.com>
19720
19721         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
19722         #defines strtoimax.  Also treat the other strto* functions
19723         like strtoimax.
19724
19725         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
19726         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
19727         (strtoimax, strtoumax): Do not declare if already defined as a macro.
19728
19729 2001-09-26  Jim Meyering  <meyering@lucent.com>
19730
19731         Most macros in unlocked-io.h had the wrong number of arguments.
19732         * lib/gen-uio: New script.
19733         (USE_UNLOCKED_IO): Define to 1 if not already defined.
19734         * lib/unlocked-io.hin: Remove file.
19735         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
19736         rather than trying to embed it here.
19737         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
19738         Reported by Padraig Brady.
19739
19740 2001-09-25  Volker Borchert  <bt@teknon.de>
19741
19742         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
19743         `result'.
19744
19745 2001-09-24  Jim Meyering  <meyering@lucent.com>
19746
19747         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
19748
19749 2001-09-23  Jim Meyering  <meyering@lucent.com>
19750
19751         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
19752         instead of the mere test for existence of mntent.h.  The latter
19753         would get a false-positive on AIX 3.4 systems.
19754         In the outer getmntent if-block, don't die if neither of the getmntent
19755         tests succeeds.  Instead, just fall through and continue with the
19756         remaining tests.
19757
19758 2001-09-23  Jim Meyering  <meyering@lucent.com>
19759
19760         * lib/mountlist.c: Remove useless parentheses in #if directives.
19761         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
19762         the deprecated MOUNTED symbol is no longer defined in mntent.h.
19763
19764 2001-09-22  Jim Meyering  <meyering@lucent.com>
19765
19766         * m4/gettext.m4: New file.  From gettext.
19767         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
19768         * m4/progtest.m4: Likewise
19769         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
19770         * m4/glibc21.m4: Likewise.
19771
19772         * m4/libintl.m4: Remove.  No longer used.
19773
19774 2001-09-22  Jim Meyering  <meyering@lucent.com>
19775
19776         * lib/localcharset.c: Update from latest gettext.
19777         * lib/config.charset: Likewise.
19778
19779 2001-09-20  Jim Meyering  <meyering@lucent.com>
19780
19781         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
19782         strtoimax.
19783         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
19784         strtoumax.
19785
19786 2001-09-20  Jim Meyering  <meyering@lucent.com>
19787
19788         * lib/xstrtol.c (strtoimax): Guard declaration with
19789         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
19790         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
19791         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
19792         (strtoumax): Likewise, for completeness (it wasn't necessary).
19793
19794 2001-09-17  Paul Eggert  <eggert@twinsun.com>
19795
19796         * lib/strtoimax.c (HAVE_LONG_LONG):
19797         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
19798         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
19799         to work around bug in IBM C compiler.
19800
19801 2001-09-17  Jim Meyering  <meyering@lucent.com>
19802
19803         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
19804         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
19805         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
19806         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
19807         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
19808         whenever the right hand side need not be expanded by the shell.
19809
19810 2001-09-16  Paul Eggert  <eggert@twinsun.com>
19811
19812         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
19813         library.  It's not correct, as some older glibcs are buggy.
19814         fnmatch wasn't fixed until glibc 2.2.
19815
19816         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
19817         special shell magic here.
19818
19819 2001-09-16  Jim Meyering  <meyering@lucent.com>
19820
19821         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
19822         * m4/jm-macros.m4: Require it.
19823
19824 2001-09-16  Jim Meyering  <meyering@lucent.com>
19825
19826         * lib/mkdir.c: New file.
19827
19828 2001-09-15  Jim Meyering  <meyering@lucent.com>
19829
19830         * m4/jm-macros.m4: Check for help2man.
19831
19832 2001-09-11  Jim Meyering  <meyering@lucent.com>
19833
19834         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
19835         The body, by Paul Eggert, was moved here from configure.in.
19836         * m4/jm-macros.m4: Require UTILS_HOST_OS.
19837
19838 2001-09-04  Paul Eggert  <eggert@twinsun.com>
19839
19840         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
19841         (jm_PREREQ): Use it.
19842
19843 2001-09-04  Paul Eggert  <eggert@twinsun.com>
19844
19845         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
19846         Use ssize_t, not int, to store result of readlink.
19847         Check for ssize_t overflow as well as size_t overflow,
19848         as POSIX says the result of readlink is implementation-defined
19849         when ssize_t overflows.
19850         Remove unnecessary cast to char*.
19851         Use free+malloc instead of realloc, as the storage doesn't need
19852         to be preserved and it's clearer and can be more efficient that way.
19853         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
19854         * lib/xreadlink.h (xreadlink): Update prototype.
19855
19856 2001-09-04  Paul Eggert  <eggert@twinsun.com>
19857
19858         * lib/xgetcwd.c: Revert some of the previous change; intead,
19859         fix the HAVE_GETCWD_NULL code to behave more like the
19860         !HAVE_GETCWD_NULL code used to.
19861
19862         Include "xalloc.h".
19863         (xgetcwd): Do not return NULL when memory is exhausted; instead,
19864         invoke xalloc_die.
19865
19866 2001-09-03  Paul Eggert  <eggert@twinsun.com>
19867
19868         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
19869         sys/param.h, as pathmax.h includes them.
19870
19871 2001-09-03  Paul Eggert  <eggert@twinsun.com>
19872
19873         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
19874         (jm_PREREQ_XGETCWD): New macro.
19875
19876         * m4/getcwd.m4: New file.
19877
19878 2001-09-03  Paul Eggert  <eggert@twinsun.com>
19879
19880         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
19881         like the HAVE_GETCWD_NULL code.
19882         Include pathmax.h if not HAVE_GETCWD.
19883         Do not include xalloc.h.
19884         (INITIAL_BUFFER_SIZE): New symbol.
19885         Do not use xmalloc / xrealloc, since the caller is responsible for
19886         handling errors.  Preserve errno around `free' during failure.
19887         Do not overrun buffer when using getwd.
19888
19889 2001-09-03  Paul Eggert  <eggert@twinsun.com>
19890
19891         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
19892         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
19893         getcwd (NULL, 0).
19894
19895 2001-09-03  Paul Eggert  <eggert@twinsun.com>
19896
19897         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
19898         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
19899         spotted by Jim Meyering.
19900
19901 2001-09-03  Jim Meyering  <meyering@lucent.com>
19902
19903         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
19904         failure.
19905
19906 2001-09-02  Jim Meyering  <meyering@lucent.com>
19907
19908         * lib/error.c: Update from GNU libc.
19909
19910 2001-09-01  Jim Meyering  <meyering@lucent.com>
19911
19912         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
19913         Used by df.
19914
19915 2001-09-01  Jim Meyering  <meyering@lucent.com>
19916
19917         * lib/xreadlink.c: New file.
19918         * lib/xreadlink.h: New file.
19919         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
19920         xreadlink.h.
19921
19922         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
19923         doesn't conflict with sparc Solaris 7's definition in
19924         /usr/include/sys/int_types.h.
19925
19926         * lib/exclude.c: Use `""', not `<>' to #include non-system header
19927         files.
19928         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
19929         and strncasecmp as r-values.  Unixware didn't have declarations.
19930
19931 2001-08-31  Paul Eggert  <eggert@twinsun.com>
19932
19933         * lib/xstrtol.h: Add copyright notice.
19934         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
19935         LONGINT_INVALID_SUFFIX_CHAR.
19936
19937 2001-08-31  Paul Eggert  <eggert@twinsun.com>
19938
19939         * lib/xstrtol.c (strtoimax): New decl.
19940
19941 2001-08-31  Paul Eggert  <eggert@twinsun.com>
19942
19943         * lib/xgetcwd.c: Don't include pathmax.h.
19944         Include stdlib.h and unistd.h if available.
19945         Include xalloc.h.
19946         (xmalloc, xstrdup, free): Remove decls.
19947         (xgetcwd): Don't assume sizes fit in unsigned.
19948         Check for overflow when computing sizes.
19949         Simplify reallocation code.
19950
19951 2001-08-31  Paul Eggert  <eggert@twinsun.com>
19952
19953         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
19954         a directory's st_size can have an arbitrary value, so the old
19955         usage could waste an arbitrary amount of memory.  All uses
19956         changed.
19957         * lib/savedir.h: Update prototype.
19958
19959 2001-08-31  Paul Eggert  <eggert@twinsun.com>
19960
19961         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
19962
19963         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
19964         old strtoimax.c.
19965
19966         Also, make the following further changes to make this file's
19967         configuration more similar to that of strtol.c:
19968         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
19969         (strtoumax, uintmax_t, strtoull, strtol): Remove.
19970         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
19971         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
19972         changed to signed values.
19973
19974         And make the following changes as well:
19975         Fix copyright notice, as 1999 was missing.
19976         (verify): New macro.
19977         (strtoimax): Check sizes at compile-time, not run-time.
19978         Prefer strtol to strtoll if both work.
19979         (main): Remove; it was not that useful and was a pain to maintain.
19980
19981         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
19982
19983 2001-08-31  Jim Meyering  <meyering@lucent.com>
19984
19985         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
19986         Use an initial, malloc'd, buffer of length 128 rather than
19987         a statically allocated one of length 1024.
19988
19989 2001-08-30  Paul Eggert  <eggert@twinsun.com>
19990
19991         Simplify code, partly by assuming autoconf 2.52 semantics.
19992
19993         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
19994
19995         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
19996         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
19997         All uses removed.
19998         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
19999         Move AC_REQUIRE to next-to-top level, to avoid confusion.
20000         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
20001         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
20002         jm_AC_HEADER_INTTYPES_H.
20003         * m4/jm-macros.m4 (jm_MACROS): Likewise.
20004
20005         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
20006
20007         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
20008         Quote first arg of AC_DEFUN.
20009         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
20010         since they are needed to parse the include file even if we need
20011         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
20012         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
20013         but with opposite signedness.
20014
20015 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20016
20017         Merge 'exclude' changes from tar 1.13.22.
20018         This fixes one or two unlikely storage allocation overflow bugs,
20019         but doesn't change user-visible behavior otherwise.
20020
20021 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20022
20023         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
20024         (jm_PREREQ_EXCLUDE): New macro.
20025
20026 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20027
20028         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20029         tm to be declared.
20030
20031 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20032
20033         * lib/hash.c: Remove '2001' from copyright notice.
20034
20035 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20036
20037         * lib/full-write.h: New file.
20038         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
20039         * lib/full-write.c: Correct credits, as cccp.c no longer
20040         exists and anyway it was so heavily changed from the old cccp
20041         code as to be unrecognizable.  Include full-write.h.
20042         (full_write) Return size_t, with short writes meaning failure.
20043         All callers changed.  This fixes a bug with large buffers
20044         on 64-bit hosts.
20045         * lib/utime.c: Include full-write.h.
20046
20047 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20048
20049         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
20050         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
20051         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
20052         Include if available.
20053         (<xalloc.h>): Include
20054         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
20055         (verify): New macro.  Use it to verify that EXCLUDE macros do not
20056         collide with FNM macros.
20057         (struct patopts): New struct.
20058         (struct exclude): Use it, as exclude patterns now come with options.
20059         (new_exclude): Support above changes.
20060         (new_exclude, add_exclude_file):
20061         Initial size must now be a power of two to simplify overflow checking.
20062         (free_exclude, fnmatch_no_wildcards): New function.
20063         (excluded_filename): No longer requires options arg, as the options
20064         are determined by add_exclude.  Now returns bool, not int.
20065         (excluded_filename, add_exclude):
20066         Add support for the fancy new exclusion options.
20067         (add_exclude, add_exclude_file): Now takes int options arg.
20068         Check for arithmetic overflow when computing sizes.
20069         (add_exclude_file): xrealloc might modify errno, so don't
20070         realloc until after errno might be used.
20071
20072         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
20073         New macros.
20074         (free_exclude): New decl.
20075         (add_exclude, add_exclude_file): Now takes int options arg.
20076         (excluded_filename): No longer requires options arg, as the options
20077         are determined by add_exclude.  Now returns bool, not int.
20078
20079 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20080
20081         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
20082
20083 2001-08-27  Jim Meyering  <meyering@lucent.com>
20084
20085         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
20086
20087         * lib/version-etc.c (N_): Remove definition.
20088         Revert most of last change.
20089         Instead, simply don't mark the `Copyright...' string for translation.
20090         Based on advice from Paul Eggert.
20091
20092         * lib/strtoxmax.c: Tweak comment.
20093
20094 2001-08-26  Jim Meyering  <meyering@lucent.com>
20095
20096         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
20097
20098         * m4/xstrtoimax.m4: New file.
20099         * m4/xstrtoumax.m4: Add comments explaining why we
20100         AC_REPLACE_FUNCS(strtol).
20101
20102 2001-08-26  Jim Meyering  <meyering@lucent.com>
20103
20104         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
20105         of copyright with `%s' so translators don't get an untranslated
20106         message in 2002.
20107         (COPYRIGHT_YEAR): Define.
20108         (version_etc): Use fprintf rather than fputs.
20109         Suggestion from Ulrich Drepper.
20110
20111         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
20112
20113         * lib/strtoll.c: New file, from GNU libc.
20114         * lib/xstrtoimax.c: New file.
20115
20116         * lib/xstrtol.h: Add xstrtoimax.
20117         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
20118         * lib/strtoimax.c: New file.  Likewise, but first define
20119         STRTOUXMAX_SIGNED.
20120
20121         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
20122         ...
20123         * lib/strtoxmax.c: ... then renamed to this.
20124
20125 2001-08-18  Paul Eggert  <eggert@twinsun.com>
20126
20127         * m4/inttypes.m4: Add AC_PREREQ(2.13).
20128         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
20129         (jm_AC_TYPE_INTMAX_T): New macro.
20130         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
20131
20132         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
20133
20134         * m4/longlong.m4: Renamed from ulonglong.m4.
20135         * m4/inttypes.m4: Renamed from inttypes_h.m4.
20136         * m4/uintmax_t.m4: Removed.
20137
20138 2001-08-13  Paul Eggert  <eggert@twinsun.com>
20139
20140         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
20141         Port to Solaris 8, where 'sed' requires a space after the 'r'
20142         command, and where sh dislikes "$/".  Clean up the spacing a bit.
20143         Redirect output to $tmp just once.
20144
20145 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
20146
20147         * lib/addext.c (<errno.h>): Include.
20148         (errno): Declare if not defined.
20149         (addext): Work correctly when pathconf returns -1 and leaves
20150         errno alone because there is no limit.  Also, work even if
20151         pathconf returns a value greater than SIZE_MAX.
20152
20153 2001-08-12  Jim Meyering  <meyering@lucent.com>
20154
20155         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
20156         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
20157         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
20158         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
20159         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
20160         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
20161         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
20162         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
20163         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
20164         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
20165         utime.m4, utimes.m4, xstrtoumax.m4:
20166         Quote the first argument in each use of AC_DEFUN.
20167
20168 2001-08-12  Jim Meyering  <meyering@lucent.com>
20169
20170         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
20171         Simply `return getcwd (NULL, 0);'.
20172         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
20173         Use 1300 as initial value for length, not PATH_MAX.
20174
20175         * lib/pathmax.h: Clean up cpp syntax.
20176
20177 2001-08-12  Jim Meyering  <meyering@lucent.com>
20178
20179         * lib/gettimeofday.c: New file.
20180         * lib/gtod.h: New file.
20181         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
20182
20183 2001-08-05  Jim Meyering  <meyering@lucent.com>
20184
20185         * m4/jm-macros.m4: Require autoconf-2.52.
20186
20187 2001-08-04  Jim Meyering  <meyering@lucent.com>
20188
20189         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
20190         stmt, to get in sync with glibc.
20191
20192 2001-08-03  Paul Eggert  <eggert@twinsun.com>
20193
20194         The following changes are from gettext 0.10.39 as maintained by
20195         Bruno Haible.
20196
20197         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
20198         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
20199         with inverted sense.  All uses changed.
20200
20201         * lib/mbswidth.c: Don't include <limits.h>.
20202         Include <stdlib.h> and <string.h> unconditionally.
20203         (iswcntrl, mbsinit, ISCNTRL): New macros.
20204         (mbsnwidth): Use K&R style function declarations.
20205         Don't bother checking for MB_LEN_MAX == 1, since the compiler
20206         can optimize it when MB_CUR_MAX == 1.
20207         The width of control characters is zero, not 1.
20208
20209 2001-08-03  Paul Eggert  <eggert@twinsun.com>
20210
20211         The following changes are from gettext 0.10.39 as maintained by
20212         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
20213
20214         * m4/codeset.m4: Upgrade to serial AM1.
20215         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
20216         all uses changed.  Quote first arg of AC_DEFUN.
20217         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
20218
20219         * m4/iconv.m4: Upgrade to serial AM2.
20220         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
20221         Add --with-libconv-prefix.
20222         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
20223         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
20224         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
20225         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
20226         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
20227
20228         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
20229         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
20230         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
20231         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
20232         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
20233         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
20234         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
20235         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
20236         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
20237
20238         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
20239         string.h any more.
20240
20241         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
20242         not the default value.
20243
20244         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
20245         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
20246         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
20247         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
20248         Also check for iswcntrl, used for wcwidth fallback.
20249         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
20250         to Autoconf 2.13.
20251
20252 2001-08-03  Jim Meyering  <meyering@lucent.com>
20253
20254         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
20255         as it was in the original.  Reported by Paul Eggert.
20256
20257 2001-07-16  Jim Meyering  <meyering@lucent.com>
20258
20259         * m4/gettimeofday.m4: New file.
20260         Prompted by a report from Bernhard Baehr.
20261
20262 2001-07-15  Jim Meyering  <meyering@lucent.com>
20263
20264         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
20265         stuff. Now it's in ../Makefile.cfg.
20266
20267 2001-07-15  Jim Meyering  <meyering@lucent.com>
20268
20269         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
20270         (BUILT_SOURCES): Add unlocked-io.h.
20271         (io_functions): Define.
20272         (unlocked-io.h): New rule.
20273         (DISTCLEANFILES): Add unlocked-io.h.
20274         (all-local): Depend on unlocked-io.h, to ensure it is created.
20275
20276         * lib/unlocked-io.hin: New file
20277
20278         * lib/regex.c: Update from glibc.
20279
20280 2001-07-05  Jim Meyering  <meyering@lucent.com>
20281
20282         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
20283         recommendation.
20284         (libfetish_a_SOURCES): Put all .h files here instead.
20285         Remove a thus-exposed (better checks in automake) duplicate and
20286         two unnecessary .h files.
20287
20288 2001-07-04  Jim Meyering  <meyering@lucent.com>
20289
20290         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
20291         that generates jm-glibc-io.m4 so that it doesn't trigger any make
20292         distcheck failure.
20293
20294 2001-07-02  Jim Meyering  <meyering@lucent.com>
20295
20296         The following changes were prompted by suggestions from Bruno Haible.
20297
20298         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
20299         is now generated.
20300         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
20301         definition of EXTRA_DIST.
20302         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
20303         ensure that the generated file is created/updated whenever the list
20304         of $(unlocked_functions) is changed.
20305         (jm-glibc-io.m4): New rule.
20306         (unlocked-io.h): New rule -- currently unused.
20307
20308 2001-06-24  Jim Meyering  <meyering@lucent.com>
20309
20310         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
20311         unmatched right bracket, rather than kludging it with an extra,
20312         falsely-matching quote in a comment.  Patch by Akim Demaille.
20313
20314 2001-06-11  Jim Meyering  <meyering@lucent.com>
20315
20316         * lib/regex.c: Update from GNU libc.
20317
20318 2001-05-27  Jim Meyering  <meyering@lucent.com>
20319
20320         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
20321         Check for ut_type in struct utmp.
20322
20323 2001-05-27  Jim Meyering  <meyering@lucent.com>
20324
20325         * lib/readutmp.h (UT_TYPE): Define.
20326
20327 2001-05-24  Jim Meyering  <meyering@lucent.com>
20328
20329         * lib/argmatch.c: Include "quote.h".
20330         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
20331         quote function.  Reported by Göran Uddeborg.
20332
20333 2001-05-22  Jim Meyering  <meyering@lucent.com>
20334
20335         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
20336         now that we use the package-supplied version unconditionally.
20337         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
20338
20339 2001-05-21  Jim Meyering  <meyering@lucent.com>
20340
20341         * m4/regex.m4: Change a couple backticks to single quotes to avoid
20342         shell syntax errors.
20343
20344 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
20345
20346         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
20347
20348 2001-05-20  Paul Eggert  <eggert@twinsun.com>
20349
20350         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
20351         Don't bother to check library strftime, since
20352         we'll be using our own my_strftime function anyway.
20353         Define my_strftime instead of strftime.
20354
20355 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
20356
20357         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
20358         which is not yet declared.
20359
20360 2001-05-15  Jim Meyering  <meyering@lucent.com>
20361
20362         * m4/regex.m4: Use proper quoting so brackets appear in the test
20363         program.
20364         Reported by, and with help from, Bruno Haible.
20365
20366 2001-05-13  Jim Meyering  <meyering@lucent.com>
20367
20368         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
20369         undefined.
20370
20371 2001-05-11  Paul Eggert  <eggert@twinsun.com>
20372
20373         dirname code cleanup.  base_name now behaves more compatibly
20374         with POSIX basename when given file names that have trailing
20375         slashes, and similarly for dir_name.  Add new primitives
20376         base_len and dir_len.  Put the directory-name-related decls
20377         into dirname.h.
20378
20379         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
20380         * lib/backupfile.c (base_name): Likewise.
20381         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
20382         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
20383         * lib/makepath.c (strip_trailing_slashes): Likewise.
20384         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
20385         ISSLASH): Likewise.
20386         * lib/rename.c (strip_trailing_slashes): Likewise.
20387         * lib/same.c (base_name): Likewise.
20388         * lib/stripslash.c (ISSLASH): Likewise.
20389
20390         * lib/addext.c: Include <dirname.h> after size_t is defined.
20391         * lib/backupfile.c: Likewise.
20392
20393         * lib/addext.c (addext): Use base_len to trim redundant
20394         trailing slashes instead of doing it ourselves.
20395         But do not trim the last slash if it is not redundant.
20396
20397         * lib/backupfile.c (find_backup_file_name,
20398         max_backup_version): Use base_len instead of rolling it ourselves.
20399         Handle the case of "" and (on DOS) "C:" correctly.
20400
20401         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
20402         needed. Include <string.h>, <dirname.h>.
20403         (base_name): Allow file names ending in slashes, other than names
20404         that are all slashes.  In this case, return the basename followed
20405         by the slashes.  This is more general, and can be used in places
20406         where the original base_name purposely had an assertion failure.
20407         (base_len): New function.
20408
20409         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
20410         Do not include <assert.h>; no longer needed.
20411         Include xalloc.h.
20412         (memrchr): Remove decl.
20413         (dir_name_r): Remove.
20414         (dir_len): Renamed from dirlen.  All callers changed.
20415         Rewrite in terms of base_name, for simplicity and consistency.
20416         (dir_name): Never return NULL.  All callers changed.
20417         Do not include <stdlib.h> in test program; no longer needed.
20418         return 0; is fine for test program.
20419
20420         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
20421         New macros.
20422         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
20423
20424         * lib/path-concat.c (path_concat): Use base_len to compute
20425         base length, not strlen; this means we cannot rely on memcpy
20426         to null-terminate.
20427
20428         * lib/same.c (STREQ): Remove.
20429         (same_name): Handle the case where the basename ends in trailing '/'.
20430
20431         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
20432         a slash was stripped.  Do not strip the last slash after a
20433         file system prefix.
20434
20435 2001-05-11  Paul Eggert  <eggert@twinsun.com>
20436
20437         * lib/Makefile.am (libfetish_a_SOURCES):
20438         Add strftime.c, since we now compile it on all hosts.
20439
20440         * lib/strftime.c (my_strftime):
20441         Define to nstrftime if emacs, but only if my_strftime is not defined.
20442         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
20443         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
20444         Add one more extra argument: a nanoseconds value.
20445         All uses changed.
20446         (ns): New macro.
20447         (my_strftime function): Add %N format.
20448         (emacs_strftimeu): Renamed from emacs_strftime,
20449         with extra ut argument.
20450
20451 2001-05-09  Paul Eggert  <eggert@twinsun.com>
20452
20453         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
20454
20455 2001-04-21  Jim Meyering  <meyering@lucent.com>
20456
20457         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
20458         doesn't interfere.
20459
20460 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
20461
20462         * m4/ftruncate.m4: Check for chsize.
20463         Link with ftruncate.o unconditionally if ftruncate is missing.
20464         This was required when cross-compiling to i586-mingw32msvc.
20465
20466 2001-04-08  Jim Meyering  <meyering@lucent.com>
20467
20468         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
20469         recomputed; that's necessary when the offset spans a DST transition.
20470         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
20471
20472 2001-04-02  Jim Meyering  <meyering@lucent.com>
20473
20474         * lib/regex.h, regex.c: Update from GNU libc.
20475
20476 2001-03-24  Jim Meyering  <meyering@lucent.com>
20477
20478         * m4/jm-macros.m4: Require autoconf-2.49d.
20479
20480 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
20481
20482         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
20483
20484 2001-03-19  Paul Eggert  <eggert@twinsun.com>
20485
20486         * lib/version-etc.c (version_etc_copyright): Update to 2001.
20487
20488 2001-03-17  Jim Meyering  <meyering@lucent.com>
20489
20490         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
20491         now that the version in autoconf is equivalent.
20492         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
20493
20494         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
20495         Suggestion from Akim Demaille.
20496
20497         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
20498         (jm_PREREQ_TEMPNAME): New function.
20499
20500 2001-03-16  Paul Eggert  <eggert@twinsun.com>
20501
20502         * lib/tempname.c (uint64_t): Define to uintmax_t if
20503         not defined, and if UINT64_MAX is not defined.
20504         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
20505         Reported by John David Anglin.
20506
20507 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
20508
20509         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
20510         resolve alias if codeset is empty.
20511         * lib/config.charset (BeOS): Use wildcard syntax.
20512
20513 2001-03-13  Jim Meyering  <meyering@lucent.com>
20514
20515         * lib/path-concat.c (path_concat)
20516         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
20517         concatenating e.g., `C:' and `foo'.
20518         From Bruno Haible.
20519
20520 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
20521
20522         * lib/localcharset.c (locale_charset): Don't use
20523         setlocale(LC_CTYPE,NULL). Don't return NULL.
20524         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
20525
20526 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
20527
20528         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
20529         support for DOS/DJGPP.
20530
20531 2001-03-01  Paul Eggert  <eggert@twinsun.com>
20532
20533         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
20534         lacks mkstemp.  Compile our own tempname.c if we compile our own
20535         mkstemp.c, as mkstemp relies on tempname.
20536
20537 2001-03-01  Jim Meyering  <meyering@lucent.com>
20538
20539         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
20540         AH_VERBATIM really does output its argument verbatim.
20541
20542 2001-02-28  Paul Eggert  <eggert@twinsun.com>
20543
20544         * lib/Makefile.am (libfetish_a_SOURCES):
20545         Add dup-safer.c, fopen-safer.c.
20546         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
20547
20548         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h,
20549         lib/unistd-safer.h: New files.
20550
20551 2001-02-25  Paul Eggert  <eggert@twinsun.com>
20552
20553         The mkstemp replacement is taken from glibc 2.2.2, with some
20554         portability fixes for use outside glibc, as follows:
20555
20556         * lib/tempname.c (struct_stat64): New macro.
20557         (direxists, __gen_tempname): Use it.
20558         This avoids a portability problem with Solaris 8.
20559
20560         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
20561         (<stddef.h>, <stdint.h>, <string.h>):
20562         Include only if STDC_HEADERS || _LIBC.
20563         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
20564         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
20565         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
20566         (__set_errno): Define this macro if <errno.h> doesn't.
20567         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
20568         Define these macros if <stdio.h> doesn't.
20569         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
20570         Define these macros if <sys/stat.h>
20571         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
20572         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
20573         __xstat64): Define if not _LIBC.
20574         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
20575         (__gen_tempname): Invoke gettimeofday only if
20576         HAVE_GETTIMEOFDAY || _LIBC;
20577         otherwise, fall back on plain "time".
20578         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
20579
20580         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
20581
20582         * lib/mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
20583
20584 2001-02-18  Paul Eggert  <eggert@twinsun.com>
20585
20586         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
20587
20588 2001-02-17  Paul Eggert  <eggert@twinsun.com>
20589
20590         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
20591         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
20592         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
20593         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
20594
20595 2001-02-17  Paul Eggert  <eggert@twinsun.com>
20596
20597         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
20598         Remove workaround macros for hosts that have mbrtowc but not
20599         mbstate_t, as we now insist on proper declarations for both
20600         before using mbrtowc.
20601
20602 2001-02-17  Jim Meyering  <meyering@lucent.com>
20603
20604         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
20605         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
20606         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
20607         UnixWare 7.1.1.
20608
20609         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
20610         rather than AC_CACHE_VAL.
20611
20612 2001-02-17  Jim Meyering  <meyering@lucent.com>
20613
20614         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
20615         around included file name.
20616
20617         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
20618
20619         * lib/strftime.c: Update from GNU libc (the only changes were to
20620         comments).
20621
20622 2001-02-17  Jim Meyering  <meyering@lucent.com>
20623
20624         * lib/regex.c: Update from libc.
20625
20626 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
20627
20628         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
20629         clash.
20630
20631 2001-02-16  Paul Eggert  <eggert@twinsun.com>
20632
20633         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
20634         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
20635         Reported by Mark Hounschell via Paul Eggert.
20636
20637 2001-02-07  Jim Meyering  <meyering@lucent.com>
20638
20639         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
20640
20641 2001-02-05  Jim Meyering  <meyering@lucent.com>
20642
20643         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
20644         it includes the patch required for `large file' support with at least
20645         HP-UX's 10.20 /bin/cc.
20646
20647 2001-02-03  Jim Meyering  <meyering@lucent.com>
20648
20649         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
20650         AS_IF, now that it works once again (mysteriously).
20651         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
20652
20653 2001-01-30  Jim Meyering  <meyering@lucent.com>
20654
20655         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
20656         * m4/chown.m4: Rename conftestchown to conftest.chown.
20657         * m4/rename.m4: s/conftestdir/conftest.d1/ and
20658         s/conftestdir2/conftest.d2/.
20659         * m4/utimes.m4: s/conftestdata/conftest.data/
20660         Inspired by Pavel Roskin's change in autoconf.
20661
20662 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
20663
20664         * lib/config.charset: Update for FreeBSD 4.2.
20665
20666 2001-01-27  Jim Meyering  <meyering@lucent.com>
20667
20668         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
20669         a use of AS_IF.
20670         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
20671
20672 2001-01-26  Jim Meyering  <meyering@lucent.com>
20673
20674         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
20675         quotearg.c includes it.
20676
20677 2001-01-26  Jim Meyering  <meyering@lucent.com>
20678
20679         * lib/quotearg.c: Include stddef.h.
20680         * lib/quote.c: Include stddef.h.
20681         Reported by Axel Kittenberger.
20682
20683         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
20684         line in double quotes so that it evokes a better diagnostic.
20685         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
20686         Reported by Axel Kittenberger.
20687
20688 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
20689
20690         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
20691         as if it was a `charset'.
20692
20693 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
20694
20695         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
20696         has const.
20697
20698 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
20699
20700         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
20701         to avoid a warning.  Add back 'const' to inptr.
20702
20703 2001-01-20  Jim Meyering  <meyering@lucent.com>
20704
20705         Be sure that headers are checked before used in code compiled
20706         for the type checks.
20707         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
20708         In place of that, invoke jm_CHECK_ALL_TYPES.
20709         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
20710         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
20711         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
20712         The check for ssize_t was mistakenly run before the test for unistd.h.
20713
20714         The configure-time check for stdbool.h was missing.
20715         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
20716         (jm_PREREQ_HASH): New function.
20717
20718 2001-01-17  Jim Meyering  <meyering@lucent.com>
20719
20720         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
20721         for autoconf-2.49c.
20722         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
20723
20724 2001-01-16  Jim Meyering  <meyering@lucent.com>
20725
20726         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
20727         From Bruno Haible.
20728
20729 2001-01-14  Jim Meyering  <meyering@lucent.com>
20730
20731         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
20732         foo and bar.  Create conftestdir/ in the script, not in the C code.
20733         Remove directories in the script, not in the C code.
20734         Remove conftestdir{,2} before trying to create the directory.
20735         Make the entire configure script fail if the mkdir fails.
20736
20737 2001-01-14  Jim Meyering  <meyering@lucent.com>
20738
20739         * lib/rename.c: New file.  From Volker Borchert.
20740         Include stdlib.h, string.h or strings.h, and xalloc.h.
20741         Use strip_trailing_slashes rather than open-coding it.
20742
20743 2001-01-03  Paul Eggert  <eggert@twinsun.com>
20744
20745         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
20746
20747 2001-01-03  Jim Meyering  <meyering@lucent.com>
20748
20749         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
20750         of local `inptr' to avoid warning with some system declarations of
20751         iconv.
20752
20753 2001-01-02  Volker Borchert  <bt@teknon.de>
20754
20755         * m4/rename.m4: New file.
20756         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
20757
20758 2001-01-01  Jim Meyering  <meyering@lucent.com>
20759
20760         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
20761         even on systems with utmpx.h.  It's necessary for the declaration of
20762         utmp's ut_user member.  Reported by Andreas Jaeger.
20763
20764         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
20765         available. They are required for the declarations of getgrgid and
20766         getpwuid resp.
20767         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
20768         Reported by Andreas Jaeger.
20769
20770 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
20771
20772         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
20773         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
20774         so `make install' also works in VPATH builds.
20775
20776 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
20777
20778         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
20779         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
20780         can be used in subdirectories.
20781
20782 2000-12-29  Paul Eggert  <eggert@twinsun.com>
20783
20784         * lib/modechange.c: Do not assume that mode_t uses the
20785         traditional octal encoding.  E.g. "chmod 1 FOO" should set
20786         the other-execute bit of FOO even if S_IXOTH != 1.
20787
20788         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
20789         WOTH, XOTH, ALLM): New macros.
20790         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
20791          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
20792         Use them.
20793         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
20794         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
20795         (mode_compile):
20796         No need to use uintmax_t; unsigned long is long enough.
20797         Don't bother to get suffix since we don't use it.
20798
20799 2000-12-26  Jim Meyering  <meyering@lucent.com>
20800
20801         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
20802         better with autoheader.
20803
20804 2000-12-24  Jim Meyering  <meyering@lucent.com>
20805
20806         * lib/hash.c (is_prime): Return explicit boolean values.
20807         (hash_get_first): Return NULL to appease Irix5.6's 89.
20808         Reported by Nelson Beebe.
20809
20810 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
20811
20812         * lib/localcharset.c (locale_charset): Add support for Win32.
20813
20814 2000-12-18  Paul Eggert  <eggert@twinsun.com>
20815
20816         * lib/physmem.h, physmem.c: New files.
20817
20818         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
20819         (noinst_HEADERS): Add physmem.h.
20820
20821         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
20822         't' for compatibility with Solaris 8 sort.
20823
20824 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
20825
20826         * lib/config.charset: Add support for BeOS.
20827
20828 2000-12-17  Jim Meyering  <meyering@lucent.com>
20829
20830         * m4/dos.m4 (jm_AC_DOS): New file and macro.
20831         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
20832
20833 2000-12-16  Jim Meyering  <meyering@lucent.com>
20834
20835         This bug had a serious impact on chown: `chown N:M FILE' (for integer
20836         N and M) would have treated it like `chown N:N FILE'.
20837
20838         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
20839
20840 2000-12-16  Jim Meyering  <meyering@lucent.com>
20841
20842         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
20843         SHELLS_FILE to a file name that's useful on djgpp systems.
20844         Include stdlib.h.
20845         (ADDITIONAL_DEFAULT_SHELLS): Define.
20846         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
20847         Based mostly on a patch from Prashant TR.
20848
20849 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
20850
20851         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
20852         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
20853         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
20854
20855 2000-12-08  Andreas Schwab  <schwab@suse.de>
20856
20857         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
20858         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
20859
20860 2000-12-07  Jim Meyering  <meyering@lucent.com>
20861
20862         * lib/stripslash.c (ISSLASH): Define.
20863         (strip_trailing_slashes): Use ISSLASH rather than comparing against
20864         `/'.
20865         From Prashant TR.
20866
20867         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
20868         (dir_name_r): Declare this function as static.
20869         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
20870         manifest itself on a name containing a mix of slashes and
20871         backslashes.
20872         Make this function work with names starting with a DOS-style
20873         drive letter and colon prefix.
20874         (dir_name): Append `.' if necessary.
20875         Based mostly on patches from Prashant TR and Eli Zaretskii.
20876
20877         * lib/dirname.h (dir_name_r): Remove prototype.
20878
20879 2000-12-06  Paul Eggert  <eggert@twinsun.com>
20880
20881         * m4/off_t-format.m4: Remove this file.
20882         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
20883
20884 2000-12-06  Jim Meyering  <meyering@lucent.com>
20885
20886         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
20887         replacement strtoull, we may well need the replacement strtoul, too.
20888         Check for declarations of strtoul and strtoull.
20889         Check for strtol.  Mainly as a cue to cause automake to include
20890         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
20891         Check for limits.h -- strtol.c needs it.
20892
20893 2000-12-05  Jim Meyering  <meyering@lucent.com>
20894
20895         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
20896
20897 2000-12-04  Jim Meyering  <meyering@lucent.com>
20898
20899         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
20900         Also include memory.h, stdlib.h, unistd.h if appropriate.
20901         Reported by Andreas Jaeger (conflicting declaration of malloc).
20902
20903 2000-12-02  Jim Meyering  <meyering@lucent.com>
20904
20905         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
20906         * m4/jm-macros.m4 (jm_MACROS): require it.
20907
20908 2000-12-02  Jim Meyering  <meyering@lucent.com>
20909
20910         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
20911
20912 2000-12-01  Paul Eggert  <eggert@twinsun.com>
20913
20914         * lib/memrchr.c: Include <config.h> before any system include file.
20915
20916 2000-11-30  Jim Meyering  <meyering@lucent.com>
20917
20918         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
20919
20920 2000-11-30  Jim Meyering  <meyering@lucent.com>
20921
20922         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
20923
20924 2000-11-29  Paul Eggert  <eggert@twinsun.com>
20925
20926         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
20927
20928 2000-11-26  Jim Meyering  <meyering@lucent.com>
20929
20930         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
20931
20932 2000-11-22  Paul Eggert  <eggert@twinsun.com>
20933
20934         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
20935         size of (size_t) -1; it's not portable.
20936
20937 2000-11-17  Jim Meyering  <meyering@lucent.com>
20938
20939         * lib/strstr.c: Update from GNU libc.
20940
20941 2000-11-17  Akim Demaille  <akim@epita.fr>
20942
20943         * lib/obstack.h: Formatting changes.
20944         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
20945         prevent type checking.
20946         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
20947         cast the value to (void *): assigning a `foo *' to a `void *'
20948         variable is valid.
20949         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
20950
20951 2000-11-16  Jim Meyering  <meyering@lucent.com>
20952
20953         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
20954
20955 2000-11-11  Jim Meyering  <meyering@lucent.com>
20956
20957         * lib/error.c: Add a couple #includes, merging from GNU libc version.
20958
20959 2000-11-10  Jim Meyering  <meyering@lucent.com>
20960
20961         * lib/obstack.h: Update from GNU libc.
20962         * lib/obstack.c: Likewise.
20963
20964 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
20965
20966         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
20967
20968 2000-11-06  Paul Eggert  <eggert@twinsun.com>
20969
20970         * lib/getusershell.c (setusershell): Use rewind rather than
20971         fseek/fseeko, to avoid configuration hassles with fseeko.
20972         Don't bother opening SHELLS_FILE if shellstream is NULL;
20973         it's not necessary.
20974
20975 2000-11-05  Jim Meyering  <meyering@lucent.com>
20976
20977         * lib/makepath.h (make_dir): Declare.
20978         * lib/makepath.c (make_dir): Remove `static' attribute.
20979         Tweak a comment.
20980
20981 2000-11-04  Jim Meyering  <meyering@lucent.com>
20982
20983         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
20984
20985 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
20986
20987         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
20988         last one in a bucket, advance to the next bucket.
20989
20990 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
20991
20992         * lib/fnmatch.c: Do not comment out all the code if we are using
20993         the GNU C library, because in some cases we are replacing buggy
20994         code in the GNU C library itself.
20995
20996 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
20997
20998         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
20999         (regex_compile): Catch bogus \(\1\).
21000
21001 2000-10-30  Paul Eggert  <eggert@twinsun.com>
21002
21003         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
21004         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
21005         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
21006
21007 2000-10-30  Paul Eggert  <eggert@twinsun.com>
21008
21009         * lib/error.h, getline.h, modechange.h:
21010         Remove "2000" from Copyright line, as the file hasn't been
21011         changed this year other than in the copyright notice.
21012
21013         * lib/xalloc.h: Add "2000" to Copyright line, as this file
21014         was changed this year.
21015
21016 2000-10-29  Jim Meyering  <meyering@lucent.com>
21017
21018         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
21019         renaming.
21020         * m4/ls-mntd-fs.m4: Likewise
21021
21022 2000-10-29  Jim Meyering  <meyering@lucent.com>
21023
21024         * lib/xstat.in: Fix grammar in comment.
21025
21026 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
21027
21028         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
21029         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
21030         doesn't define __restrict_arr.
21031
21032 2000-10-28  Jim Meyering  <meyering@lucent.com>
21033
21034         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
21035         (jm_PREREQ_MEMCHR): New function.
21036
21037 2000-10-28  Jim Meyering  <meyering@lucent.com>
21038
21039         * lib/memchr.c: Update from libc.
21040         Adjust for portability:
21041         [HAVE_STDLIB_H]: Include stdlib.h.
21042         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
21043         Undef __memchr, too.
21044         [!weak_alias]: Define __memchr to memchr.
21045
21046         * lib/regex.c: Update from libc.
21047         * lib/regex.h: Likewise.
21048         * lib/getopt1.c: Likewise.
21049         * lib/memcmp.c: Likewise.
21050
21051         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
21052         Avoid using fseek, when possible -- it's broken by design.
21053         Patch by Ulrich Drepper.
21054
21055 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
21056
21057         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
21058         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
21059         Giving in to popular pressure to shut up the compiler with casts.
21060
21061 2000-10-26  Jim Meyering  <meyering@lucent.com>
21062
21063         * lib/strftime.c: Update from libc.
21064
21065 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
21066
21067         * regex.c: More `unsigned char' -> `re_char' changes.
21068         Also change several `int' into `re_wchar_t'.
21069         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
21070         (PUSH_FAILURE_POINTER): Don't cast any more.
21071         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
21072         We want GCC to complain, since this piece of code makes
21073         re_match non-reentrant, which *should* be fixed.
21074         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
21075         (EXTEND_BUFFER): Use RETALLOC.
21076         (SET_LIST_BIT): Don't cast.
21077         (re_wchar_t): New type.
21078         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
21079         that those two functions will always properly return.
21080         (IMMEDIATE_QUIT_CHECK): Cast to void.
21081         (analyse_first): Use recursion rather than an explicit stack.
21082         (re_compile_fastmap): Can't fail anymore.
21083         (re_search_2): Don't check re_compile_fastmap for failure.
21084         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
21085         Now also sets the new value (passed in a new argument).
21086         (re_match_2_internal): Use it.
21087         Also, use a new var `reg' of type size_t when looping through regs
21088         rather than reuse the inappropriate `mcnt'.
21089
21090 2000-10-25  Jim Meyering  <meyering@lucent.com>
21091
21092         * lib/obstack.c: Update from libc.
21093
21094 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
21095
21096         * regex.c (regex_compile): Change the way of handling a range from
21097         a char less than 256 to a char not less than 256.
21098
21099 2000-10-24  Andrew Innes  <andrewi@gnu.org>
21100
21101         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
21102         NT-Emacs only.
21103         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
21104         so that re_search functions only quit when callers expect them to.
21105
21106 2000-10-23  Jim Meyering  <meyering@lucent.com>
21107
21108         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
21109         wrong.  That set_locale call must not have any side effects.
21110         From Paul Eggert.
21111
21112 2000-10-22  Jim Meyering  <meyering@lucent.com>
21113
21114         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
21115         [CYCLIC]: Remove now-unused definition.
21116
21117         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
21118         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
21119         Suggestion from Ulrich Drepper.
21120
21121 2000-10-21  Jim Meyering  <meyering@lucent.com>
21122
21123         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
21124         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
21125         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
21126
21127 2000-10-21  Jim Meyering  <meyering@lucent.com>
21128
21129         * lib/dirname.c (memrchr): Declare if necessary.
21130         (dir_name): Remove the restriction that there be no
21131         trailing slashes.  Now, this code skips past them, effectively
21132         ignoring them.
21133         [TEST_DIRNAME] (main): New unit tests.
21134
21135         * lib/memrchr.c: New file from GNU libc.
21136         Undef __memrchr, too.
21137         [!weak_alias]: Define __memrchr to memrchr.
21138         Guard weak_alias use with `#ifdef weak_alias'.
21139
21140 2000-10-21  Jim Meyering  <meyering@lucent.com>
21141
21142         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
21143         (dir_name): Use dir_name_r.
21144         * lib/dirname.h (dir_name_r): Declare it.
21145
21146 2000-10-17  Jim Meyering  <meyering@lucent.com>
21147
21148         * lib/quote.h (PARAMS): Define and use.
21149         Reported by Akim Demaille.
21150
21151         * lib/getopt.c: Update from libc.
21152
21153 2000-10-16  Jim Meyering  <meyering@lucent.com>
21154
21155         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
21156         setlocale.
21157         From Jan Fedak.
21158
21159 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
21160
21161         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
21162
21163 2000-09-25  Jim Meyering  <meyering@lucent.com>
21164
21165         * lib/md5.h (rol): Define (from GnuPG).
21166
21167         * lib/sha.c: Give credit (GnuPG) where due.
21168         (M): Use rol rather than open-coding it.
21169         Add a FIXME comment.
21170
21171 2000-09-21  Jim Meyering  <meyering@lucent.com>
21172
21173         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
21174         Reported by Michael Stone.
21175
21176 2000-09-20  Jim Meyering  <meyering@lucent.com>
21177
21178         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
21179         (noinst_HEADERS): Add sha.h.
21180         Based on code from Scott G. Miller and from GnuPG.
21181
21182 2000-09-18  Jim Meyering  <meyering@lucent.com>
21183
21184         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
21185         LIBS. Otherwise, everyone ends up linking with -lelf for some
21186         configurations.
21187         Reported by Mike Stone.
21188
21189 2000-09-15  Jim Meyering  <meyering@lucent.com>
21190
21191         * lib/regex.c: Update from libc.
21192
21193 2000-09-10  Jim Meyering  <meyering@lucent.com>
21194
21195         * lib/getopt.c (_getopt_internal): Update from glibc.
21196
21197 2000-09-09  Jim Meyering  <meyering@lucent.com>
21198
21199         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
21200         think it should be used as a general replacement for isascii.
21201         * lib/fnmatch.c: Likewise.
21202         * lib/mbswidth.c: Likewise
21203         * lib/regex.c: Likewise.
21204
21205         Don't use atoi.
21206         * lib/userspec.c: Include sys/param.h and limits.h.
21207         Include xstrtol.h.
21208         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21209         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
21210         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
21211         UID, GID.  Check range.
21212
21213 2000-09-06  Jim Meyering  <meyering@lucent.com>
21214
21215         * lib/getopt.c (_getopt_internal): Update from glibc.
21216
21217 2000-08-30  Jim Meyering  <meyering@lucent.com>
21218
21219         * lib/strftime.c: Merge in changes from GNU libc.
21220
21221 2000-08-26  Jim Meyering  <meyering@lucent.com>
21222
21223         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
21224         * m4/fpending.m4: New file.
21225
21226 2000-08-26  Jim Meyering  <meyering@lucent.com>
21227
21228         * lib/closeout.c: Include "__fpending.h".
21229         (close_stdout_status): Return right away if there's nothing to flush.
21230
21231         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
21232         * lib/__fpending.c: New file.
21233         * lib/__fpending.h: New file.
21234
21235 2000-08-20  Jim Meyering  <meyering@lucent.com>
21236
21237         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
21238         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
21239         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
21240
21241 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
21242
21243         Improve fileutils installation on systems where running
21244         programs (like install) can't be unlinked.
21245         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
21246         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
21247
21248 2000-08-07  Paul Eggert  <eggert@twinsun.com>
21249
21250         Standardize on "memory exhausted" instead of "Memory exhausted"
21251         or "virtual memory exhausted".
21252         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
21253         "virtual memory exhausted".
21254         * lib/same.c (same_name): Invoke xalloc_die instead of printing
21255         our own message.
21256         * lib/userspec.c (parse_user_spec): Likewise.
21257         * lib/bumpalloc.h: comment fix
21258         * lib/same.c, userspec.c: Include xalloc.h.
21259
21260         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
21261         not char *const and pointing to a constant array.
21262         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
21263         (xrealloc): Comment fix.
21264
21265         * lib/userspec.c (parse_user_spec):
21266         Don't translate a message until just before returning,
21267         to avoid unnecessary translation.
21268
21269 2000-08-07  Jim Meyering  <meyering@lucent.com>
21270
21271         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
21272         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
21273         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
21274         getgroups.c, gethostname.c, getopt.h, group-member.c,
21275         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
21276         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
21277         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
21278         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
21279         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
21280         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
21281         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
21282         yesno.c: Back out Copyright date changes for each file with no change
21283         this year.  This eases coordination with other programs using the same
21284         source code modules.  From Paul Eggert.
21285
21286 2000-08-06  Paul Eggert  <eggert@twinsun.com>
21287
21288         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
21289         not char, for compatibility with glibc 2.1.3 strftime.c.
21290
21291 2000-08-03  Greg McGary  <greg@mcgary.org>
21292
21293         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
21294         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
21295         (EXTEND_BUFFER): Use them.
21296
21297 2000-08-01  Jim Meyering  <meyering@lucent.com>
21298
21299         * lib/dirname.c (ISSLASH): Define.
21300         (BACKSLASH_IS_PATH_SEPARATOR): Define.
21301         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
21302         both `\' and `/' may be use as path separators.
21303         Based on a patch from Prashant TR.
21304
21305 2000-07-31  Paul Eggert  <eggert@twinsun.com>
21306
21307         * lib/quotearg.c (quotearg_n_options): Don't make the initial
21308         slot vector a constant, since it might get modified.
21309
21310 2000-07-31  Jim Meyering  <meyering@lucent.com>
21311
21312         * lib/xmalloc.c: Use `virtual memory exhausted', not
21313         `Memory exhausted'.
21314         * lib/obstack.c (print_and_abort): Likewise.
21315
21316 2000-07-30  Paul Eggert  <eggert@twinsun.com>
21317
21318         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
21319         buffer, so that the caller can always quote one small
21320         component of a "memory exhausted" message in slot 0.
21321         From a suggestion by Jim Meyering.
21322
21323 2000-07-30  Jim Meyering  <meyering@lucent.com>
21324
21325         * lib/makepath.c (make_path): Quote the other instance, too.
21326
21327         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
21328         (STATIC_BUF_SIZE): Define.
21329         (quotearg_n_options): Use only statically allocated storage when
21330         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
21331         than STATIC_BUF_SIZE.
21332
21333 2000-07-29  Jim Meyering  <meyering@lucent.com>
21334
21335         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
21336         * lib/dirname.c (dir_name): Likewise.
21337
21338         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
21339         `/'.
21340
21341         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
21342         (dir_name): Assert that there are no trailing slashes.
21343
21344 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
21345
21346         * lib/mbswidth.h (mbswidth): Add a flags argument.
21347         (mbswidth): New declaration.
21348         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
21349         * lib/mbswidth.c (mbswidth): Add a flags argument.
21350         (mbsnwidth): New function.
21351
21352 2000-07-24  Jim Meyering  <meyering@lucent.com>
21353
21354         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
21355
21356 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21357
21358         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
21359
21360 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21361
21362         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
21363         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
21364         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
21365         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
21366         invoke multibyte primitives.
21367
21368 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21369
21370         * lib/quotearg.c:
21371         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
21372         so that mbstate_t is always defined.
21373
21374         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
21375         be 1 in at least one GCC installation, and this configuration
21376         error is likely to be common.  Ignoring MB_LEN_MAX hurts
21377         performance on hosts that have mbrtowc but have only unibyte
21378         locales, but I assume these hosts are rare.
21379
21380 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21381
21382         * lib/mbswidth.c (_XOPEN_SOURCE):
21383         Don't define; this causes problems on Solaris 7.
21384         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
21385
21386 2000-07-23  Jim Meyering  <meyering@lucent.com>
21387
21388         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
21389         too: getgrgid, getpwuid, getuid.
21390
21391 2000-07-23  Jim Meyering  <meyering@lucent.com>
21392
21393         * lib/basename.c (base_name): Add an assertion.
21394
21395 2000-07-23  Bruno Haible  <clisp.cons.org>
21396
21397         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
21398         shadow its mbsinit function.
21399
21400 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
21401
21402         * lib/mbswidth.h: New file.
21403         * lib/mbswidth.c: New file.
21404         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
21405         (noinst_HEADERS): Add mbswidth.h.
21406
21407 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
21408
21409         * lib/config.charset: Add support for FreeBSD. Improve support for
21410         HP-UX and IRIX 6.
21411
21412 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
21413
21414         * m4/mbswidth.m4: New file.
21415         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
21416
21417 2000-07-15  Jim Meyering  <meyering@lucent.com>
21418
21419         * lib/makepath.c: Include quote.h.
21420         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
21421         corresponding argument in a `quote (...)' call.
21422         Give better diagnostics.
21423
21424         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
21425         (noinst_HEADERS): Add quote.h.
21426
21427         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
21428         from tar's src/misc.c.
21429         * lib/quote.h: New file.  Prototypes for same.
21430
21431 2000-07-14  Paul Eggert  <eggert@twinsun.com>
21432
21433         From a suggestion by Bruno Haible.
21434         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
21435         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
21436         to decide whether to define the BeOS workaround macro;
21437         this adjusts to the change to AC_MBSTATE_T.
21438
21439 2000-07-14  Jim Meyering  <meyering@lucent.com>
21440
21441         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
21442         jm_AC_TYPE_UINTMAX_T.
21443
21444 2000-07-13  Paul Eggert  <eggert@twinsun.com>
21445
21446         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
21447
21448         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
21449         quotearg_buffer_restyled): Add support for
21450         clocale_quoting_style.  Undo previous change to
21451         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
21452         and "{RIGHT QUOTATION MARK}" msgids.
21453
21454 2000-07-10  Paul Eggert  <eggert@twinsun.com>
21455
21456         From a suggestion by Bruno Haible.
21457         * m4/mbstate_t.m4 (AC_MBSTATE_T):
21458         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
21459         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
21460         and mbstate_t, to a single-part test that simply defines mbstate_t.
21461         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
21462         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
21463
21464 2000-07-10  Jim Meyering  <meyering@lucent.com>
21465
21466         * m4/strerror_r.m4: Mirror the correction made in autoconf.
21467
21468         * m4/gnu-source.m4: Output to confdefs.h directly.
21469         Suggestion from Akim Demaille.
21470
21471 2000-07-09  Paul Eggert  <eggert@twinsun.com>
21472
21473         The old behavior of quoting `like this' doesn't look good with
21474         newer, ISO-style fonts.  See:
21475         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
21476
21477         Instead, quote "like this" by default.  Let the translator
21478         tailor the locale-specific quoting behavior by providing
21479         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
21480
21481         * lib/quotearg.c (N_): New macro.
21482         (gettext_default): New function.
21483         (quotearg_buffer_restyled): Use
21484         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
21485         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
21486
21487 2000-07-09  Jim Meyering  <meyering@lucent.com>
21488
21489         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
21490         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
21491
21492         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
21493         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
21494
21495 2000-07-09  Jim Meyering  <meyering@lucent.com>
21496
21497         * lib/Most files: Update copyright dates to include 2000.
21498
21499 2000-07-08  Jim Meyering  <meyering@lucent.com>
21500
21501         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
21502         if not defined.
21503         (xgethostname): Remove now-unnecessary #ifdef.
21504         Move declaration of `err' into loop where it's used.
21505
21506 2000-07-05  Paul Eggert  <eggert@twinsun.com>
21507         and Bruno Haible  <haible@clisp.cons.org>
21508
21509         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
21510         only if the test for an object-type mbstate_t fails.  This
21511         prevents us from mistakenly reporting that mbstate_t is a
21512         system object type after we "#define mbstate_t int" to work
21513         around its lack.
21514
21515 2000-07-05  Paul Eggert  <eggert@twinsun.com>
21516         and Bruno Haible  <haible@clisp.cons.org>
21517
21518         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
21519
21520 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
21521
21522         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
21523         to strerror_r.
21524         Include <ctype.h> for use of isalpha.
21525
21526 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
21527
21528         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
21529         by allocating a larger buffer. Test the gethostname return value for
21530         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
21531         returns an error and ENAMETOOLONG isn't defined.
21532
21533 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
21534
21535         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
21536         dimension.
21537
21538 2000-07-04  Jim Meyering  <meyering@lucent.com>
21539
21540         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
21541         of the deprecated AC_CHECKING.
21542
21543 2000-07-04  Jim Meyering  <meyering@lucent.com>
21544
21545         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
21546         Reported by Bruno Haible.
21547
21548 2000-07-04  Jim Meyering  <meyering@lucent.com>
21549
21550         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
21551         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
21552         lacks mbrtowc.
21553
21554 2000-07-03  Paul Eggert  <eggert@twinsun.com>
21555
21556         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
21557         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
21558
21559 2000-07-03  Paul Eggert  <eggert@twinsun.com>
21560         and Bruno Haible  <haible@clisp.cons.org>
21561
21562         * lib/quotearg.c (mbrtowc):
21563         Assign to *pwc, and return 1 only if result is nonzero.
21564         (iswprint): Use ISPRINT when substituting our own mbrtowc.
21565
21566 2000-07-03  Jim Meyering  <meyering@lucent.com>
21567
21568         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
21569
21570 2000-07-03  Jim Meyering  <meyering@lucent.com>
21571
21572         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
21573         This is necessary to get a definition of e.g., UTMP_FILE on
21574         HP-UX 10.20.
21575         From Bob Proulx.
21576
21577 2000-07-02  Jim Meyering  <meyering@lucent.com>
21578
21579         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
21580
21581         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
21582         AC_LIBOBJ(function_name).
21583         * m4/chown.m4: Likewise.
21584         * m4/fnmatch.m4: Likewise.
21585         * m4/ftruncate.m4: Likewise.
21586         * m4/getgroups.m4: Likewise.
21587         * m4/getline.m4: Likewise.
21588         * m4/group-member.m4: Likewise.
21589         * m4/jm-macros.m4: Likewise.
21590         * m4/lstat.m4: Likewise.
21591         * m4/malloc.m4: Likewise.
21592         * m4/memcmp.m4: Likewise.
21593         * m4/nanosleep.m4: Likewise.
21594         * m4/putenv.m4: Likewise.
21595         * m4/realloc.m4: Likewise.
21596         * m4/regex.m4: Likewise.
21597         * m4/stat.m4: Likewise.
21598         * m4/strftime.m4: Likewise.
21599
21600 2000-07-02  Jim Meyering  <meyering@lucent.com>
21601
21602         * lib/quotearg.c (mbstate_t): Don't define here.
21603
21604 2000-07-02  Jim Meyering  <meyering@lucent.com>
21605
21606         * lib/nanosleep.c (SIGCONT): Define if not already defined.
21607
21608 2000-07-01  Jim Meyering  <meyering@lucent.com>
21609
21610         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
21611
21612 2000-07-01  Jim Meyering  <meyering@lucent.com>
21613
21614         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
21615         problem.
21616
21617 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
21618
21619         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
21620         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
21621
21622 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
21623
21624         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
21625         per change in ../m4/ls-mntd-fs.m4.
21626         (read_filesystem_list): Ignore symbolic links.
21627
21628 2000-06-29  Jim Meyering  <meyering@lucent.com>
21629
21630         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
21631         for declaration of strcmp.
21632
21633         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
21634
21635         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
21636         Avoid warning by casting result to `char *' to remove `const'.
21637
21638 2000-06-28  Jim Meyering  <meyering@lucent.com>
21639
21640         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
21641         included by quotearg.c, for which we perform this test.  From
21642         Bruno Haible.
21643
21644 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
21645
21646         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
21647         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
21648         <utmpx.h> exists, put readutmp.o into LIBOBJS.
21649
21650 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
21651
21652         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
21653
21654 2000-06-26  Paul Eggert  <eggert@twinsun.com>
21655
21656         savedir now sets errno on failure and invokes xmalloc to get memory.
21657         Fix a couple of other minor bugs while we're at it.
21658
21659         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
21660         (NAMLEN): Remove macro.
21661         (malloc, realloc): Remove decls.
21662         (stpcpy): Likewise.
21663         ("xalloc.h"): Include.
21664         (NAME_SIZE_DEFAULT): New macro.
21665         (savedir): Use xmalloc / xrealloc to allocate memory.
21666         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
21667         Skip "" directory entries.
21668         Use strlen to calculate directory entry length, since the old method
21669         is rarely used these days and isn't worth supporting.
21670         Don't use a pointer after freeing it.
21671         Check for integer overflow when calculating allocation size.
21672         Use memcpy to copy entries, instead of stpcpy.
21673         Set errno properly when returning NULL.
21674         Check for readdir error.
21675
21676 2000-06-26  Jim Meyering  <meyering@lucent.com>
21677
21678         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
21679
21680 2000-06-25  Jim Meyering  <meyering@lucent.com>
21681
21682         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
21683         Linux header bug when _XOPEN_SOURCE is defined to 500.
21684
21685 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
21686
21687         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
21688         deficiency.
21689
21690 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
21691
21692         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
21693         Include xalloc.h.
21694         Don't include <stdlib.h>.  Don't declare malloc, realloc.
21695
21696 2000-06-24  Jim Meyering  <meyering@lucent.com>
21697
21698         * m4/strerror_r.m4: Revive this file -- to try out an experimental
21699         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
21700         for which strerror does return char*, but which lacks a conveniently
21701         accessible declaration of the function.  If the compile-test says
21702         strerror_r doesn't work, then resort to a `run'-test that works on
21703         BeOS and segfaults on DEC Unix.
21704
21705 2000-06-24  Jim Meyering  <meyering@lucent.com>
21706
21707         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
21708
21709 2000-06-23  Paul Eggert  <eggert@twinsun.com>
21710
21711         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
21712         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
21713
21714 2000-06-23  Paul Eggert  <eggert@twinsun.com>
21715
21716         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
21717         (mbrtowc, mbstate_t): Define substitutes if
21718         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
21719         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
21720         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
21721
21722 2000-06-23  Jim Meyering  <meyering@lucent.com>
21723
21724         * m4/afs.m4: Add missing AC_MSG_RESULT.
21725         Reported by Bruno Haible.
21726
21727         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
21728         Suggestion from Bruno Haible.
21729
21730 2000-06-23  Jim Meyering  <meyering@lucent.com>
21731
21732         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
21733
21734 2000-06-21  Jim Meyering  <meyering@lucent.com>
21735
21736         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
21737
21738 2000-06-21  Jim Meyering  <meyering@lucent.com>
21739
21740         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
21741         (noinst_HEADERS): Add getstr.h.
21742
21743         * lib/getline.c (getstr): Move into a separate file.
21744         * lib/getstr.c (getstr): New file, extracted from getline.c, with
21745         the following changes: new parameter, delim2; both delim[12]
21746         parameters have type `int', not `char'.  The latter would lose
21747         with 8-bit delimiters.
21748         * lib/getstr.h: New file.
21749
21750 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
21751
21752         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
21753         than 1024, return a memory chunk of least possible size, instead
21754         of size PATH_MAX + 2. In the loop, increment the size proportionally.
21755         Use free/xmalloc instead of xrealloc to avoid copying for very long
21756         paths.
21757
21758 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
21759
21760         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
21761         the empty string.
21762
21763 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
21764
21765         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
21766         address, not strdup.  Include <stdlib.h> and don't declare free().
21767
21768 2000-06-19  Jim Meyering  <meyering@lucent.com>
21769
21770         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
21771
21772 2000-06-18  Jim Meyering  <meyering@lucent.com>
21773
21774         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
21775
21776         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
21777         `checking whether...' message to be consistent with that of the
21778         lstat test.
21779
21780 2000-06-18  Jim Meyering  <meyering@lucent.com>
21781
21782         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
21783         Besides, these days every porting target provides a mkdir function.
21784
21785         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
21786         needed. (this snippet comes from src/system.h).
21787
21788 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
21789
21790         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
21791
21792 2000-06-15  Paul Eggert  <eggert@twinsun.com>
21793
21794         * lib/human.c (adjust_value): New function.
21795         (human_readable_inexact): Apply rounding style even when
21796         printing approximate values.
21797
21798 2000-06-14  Paul Eggert  <eggert@twinsun.com>
21799
21800         * lib/human.c (human_readable_inexact): Allow an input block
21801         size that is not a multiple of the output block size, and vice versa.
21802         Reported by Piergiorgio Sartor.
21803
21804 2000-06-14  Paul Eggert  <eggert@twinsun.com>
21805
21806         * lib/getdate.y (get_date): Apply relative times after time
21807         zone indicator, not before.  Reported by Todd A. Jacobs.
21808
21809 2000-06-13  Jim Meyering  <meyering@lucent.com>
21810
21811         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
21812
21813         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
21814
21815 2000-06-12  Paul Eggert  <eggert@twinsun.com>
21816
21817         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
21818
21819 2000-06-12  Jim Meyering  <meyering@lucent.com>
21820
21821         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
21822         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
21823         optional argument.
21824         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
21825         the optional argument, `lib'.
21826
21827 2000-06-08  Jim Meyering  <meyering@lucent.com>
21828
21829         * m4/largefile.m4: Remove file (now that it's part of autoconf).
21830
21831 2000-06-04  Paul Eggert  <eggert@twinsun.com>
21832
21833         Rewrite largefile configuration so that we don't need to run
21834         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
21835         AC_CANONICAL_HOST in configure.in -- jmm]
21836
21837         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
21838         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
21839         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
21840         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
21841         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
21842         All uses changed.
21843         Instead of inspecting the output of getconf, try to compile the
21844         test program without and with the macro definition.
21845         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
21846         for getconf.  Instead, check for the needed flags by compiling
21847         test programs.
21848
21849 2000-06-04  Paul Eggert  <eggert@twinsun.com>
21850
21851         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
21852
21853 2000-06-04  Jim Meyering  <meyering@lucent.com>
21854
21855         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
21856         SunOS 4.1.4 for which gid_t is an unsigned type.
21857
21858 2000-06-03  Jim Meyering  <meyering@lucent.com>
21859
21860         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
21861         now that autoconf requires that.
21862
21863         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
21864         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
21865         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
21866
21867 2000-06-03  Jim Meyering  <meyering@lucent.com>
21868
21869         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
21870
21871 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
21872
21873         * m4/glibc21.m4: New file.
21874         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
21875
21876 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
21877
21878         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
21879         newer, don't install charset.alias.
21880         * lib/config.charset: Change the Linux/glibc rules so they become empty
21881         on glibc-2.1 or newer.
21882
21883 2000-06-02  Jim Meyering  <meyering@lucent.com>
21884
21885         * lib/mountlist.c: Back out last change.  Instead, do this...
21886         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
21887         me_dummy member using the same `ignore'-testing code.
21888         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
21889         fs_type strings.
21890         From Mark D. Roth.
21891
21892 2000-05-29  Jim Meyering  <meyering@lucent.com>
21893
21894         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
21895         mounts with the `ignore' attribute.  Based on a patch from
21896         Mark D. Roth.
21897
21898 2000-05-28  Jim Meyering  <meyering@lucent.com>
21899
21900         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
21901         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
21902         * m4/stat.m4: Likewise.
21903         * m4/lstat.m4: Likewise.
21904         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
21905
21906         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
21907         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
21908
21909 2000-05-26  Jim Meyering  <meyering@lucent.com>
21910
21911         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
21912
21913 2000-05-24  Jim Meyering  <meyering@lucent.com>
21914
21915         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
21916         autoconf requires that.
21917         * m4/lib-check.m4: Likewise.
21918         * m4/jm-macros.m4: Likewise.
21919         * m4/strftime.m4: Likewise.
21920
21921         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
21922         AC_CHECK_DECLS, now that autoconf requires that.
21923
21924 2000-05-22  Jim Meyering  <meyering@lucent.com>
21925
21926         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
21927         * m4/lstat.m4: Likewise.
21928
21929 2000-05-22  Jim Meyering  <meyering@lucent.com>
21930
21931         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
21932
21933 2000-05-20  Jim Meyering  <meyering@lucent.com>
21934
21935         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
21936         (jm_PREREQ): Use it.
21937
21938 2000-05-18  Jim Meyering  <meyering@lucent.com>
21939
21940         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
21941         back, too, since it may have been modified by allocate_entry.
21942         (hash_delete): Rewrite to use neither the assignment operator
21943         nor the comma operator in an if-expression.
21944
21945 2000-05-15  Paul Eggert  <eggert@twinsun.com>
21946
21947         * lib/closeout.c:
21948         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
21949         Remove; no longer needed.
21950         "quotearg.h": Add include.
21951         (file_name): Do not bother to explicitly initialize to NULL; it's less
21952         efficient on some hosts.
21953         (close_stdout_status): Remove test as to whether stdout was already
21954         closed; it breaks for the case "echo x | sort >&-".
21955         Quote file name colons.
21956         Do not assume that _("write error") lacks format strings.
21957
21958 2000-05-15  Jim Meyering  <meyering@lucent.com>
21959
21960         * lib/version-etc.c (version_etc_copyright): Update the copyright
21961         string used in all --version output.
21962
21963 2000-05-14  Jim Meyering  <meyering@lucent.com>
21964
21965         * lib/closeout.c (close_stdout_set_file_name): New function.
21966         (close_stdout_status): Use new file-scoped global.
21967         Return right away if fstat says the stdout file descriptor is invalid.
21968         * lib/closeout.h (close_stdout_set_file_name): Declare.
21969
21970 2000-05-10  Jim Meyering  <meyering@lucent.com>
21971
21972         * lib/closeout.c [default_exit_status]: New file-scoped variable.
21973         (close_stdout_set_status): New function.
21974         * lib/closeout.h (close_stdout_set_status): Declare.
21975
21976 2000-05-09  Jim Meyering  <meyering@lucent.com>
21977
21978         * m4/gettext.m4: Rename this...
21979         * m4/libintl.m4: ...to this.
21980
21981 2000-05-08  Jim Meyering  <meyering@lucent.com>
21982
21983         * lib/long-options.c: Don't include closeout.h.
21984         (parse_long_options): Don't call close_stdout for --version.
21985
21986 2000-05-06  Paul Eggert  <eggert@twinsun.com>
21987
21988         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
21989         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
21990         2.1.3 bug.  This avoids a clash when files like regex.c define
21991         _GNU_SOURCE.
21992
21993 2000-05-06  Jim Meyering  <meyering@lucent.com>
21994
21995         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
21996         (AC_REPLACE_FUNCS): Add strnlen.
21997
21998         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
21999         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
22000
22001         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
22002         AC_SEARCH_LIBS call for nanosleep.
22003         (LIB_NANOSLEEP): Set and AC_SUBST.
22004
22005 2000-05-06  Jim Meyering  <meyering@lucent.com>
22006
22007         * lib/strnlen.c: Undefine __strnlen and strnlen.
22008         [!weak_alias]: Define __strnlen to strnlen.
22009
22010         * lib/atexit.c: New file, from libiberty.
22011
22012 2000-05-06  Jim Meyering  <meyering@lucent.com>
22013
22014         * lib/closeout.c (close_stdout_status): Also check for errors on the
22015         stderr stream.
22016
22017 2000-05-05  Jim Meyering  <meyering@lucent.com>
22018
22019         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
22020         AC_SEARCH_LIBS call for clock_gettime.
22021         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
22022
22023         * m4/search-libs.m4: Update from autoconf.
22024
22025         su doesn't work on Solaris 2.6.
22026         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
22027         <shadow.h>.  Reported by Dragos Harabor.
22028
22029 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
22030
22031         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
22032         memcpy instead of xmalloc, xrealloc, path_concat.
22033         (locale_charset): Treat empty environment variables as absent.
22034         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
22035
22036 2000-05-04  Jim Meyering  <meyering@lucent.com>
22037
22038         * lib/getopt.c: Update from glibc.
22039         * lib/obstack.c: Likewise.
22040         * lib/obstack.h: Likewise.
22041         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
22042         file
22043
22044         * lib/regex.h: Likewise.
22045         * lib/strndup.c: Likewise.
22046         * lib/strnlen.c: New file, from glibc.
22047
22048 2000-05-03  Jim Meyering  <meyering@lucent.com>
22049
22050         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
22051
22052 2000-05-02  Paul Eggert  <eggert@twinsun.com>
22053
22054         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
22055         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
22056         compile-time test, rather than inspecting host and OS, to
22057         decide whether to define _LARGEFILE_SOURCE.
22058
22059 2000-05-01  Jim Meyering  <meyering@lucent.com>
22060
22061         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
22062
22063         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
22064         Based on a patch from Bruno Haible.
22065
22066 2000-05-01  Jim Meyering  <meyering@lucent.com>
22067
22068         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
22069
22070 2000-04-29  Jim Meyering  <meyering@lucent.com>
22071
22072         * lib/path-concat.c: Declare strdup only if it's not defined.
22073         * lib/canon-host.c: Likewise.
22074
22075 2000-04-28  Jim Meyering  <meyering@lucent.com>
22076
22077         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
22078         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
22079         is included first, then limits.h is included by locale.h by libintl.h.
22080         From John David Anglin.
22081
22082 2000-04-25  Jim Meyering  <meyering@lucent.com>
22083
22084         * lib/makepath.c (S_IRWXUGO): Define.
22085         (make_path): Always perform explicit chmod if MODE specifies any
22086         of the `special' permission bits.  Prompted by a bug report against
22087         install from Mate Wierdl and Joost van Baal.
22088
22089 2000-04-18  Jim Meyering  <meyering@lucent.com>
22090
22091         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
22092         (jm_PREREQ): Use it.
22093
22094 2000-04-18  Jim Meyering  <meyering@lucent.com>
22095
22096         * lib/README: New file.
22097
22098         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
22099         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
22100
22101 2000-04-17  Jim Meyering  <meyering@lucent.com>
22102
22103         Get it right :-)
22104         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
22105         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
22106         Suggestion from Akim Demaille.
22107
22108 2000-04-17  Jim Meyering  <meyering@lucent.com>
22109
22110         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
22111         the definition of it to rpl_strftime also defined-away the system's
22112         declaration.
22113
22114 2000-04-15  Jim Meyering  <meyering@lucent.com>
22115
22116         Use `C' to denote so-called `contiguous' files, the same way
22117         that tar does.
22118         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
22119         (ftypelet): Use S_ISCTG.
22120         From Michael Deutschmann.
22121
22122 2000-04-14  Jim Meyering  <meyering@lucent.com>
22123
22124         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
22125         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
22126         clobbered.
22127
22128 2000-04-14  Jim Meyering  <meyering@lucent.com>
22129
22130         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
22131
22132 2000-04-13  Jim Meyering  <meyering@lucent.com>
22133
22134         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
22135         AH_VERBATIM to insert required #ifndef into config.h.in.
22136         Suggestion from Akim Demaille.
22137
22138 2000-04-12  Jim Meyering  <meyering@lucent.com>
22139
22140         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
22141         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
22142         Christian Krackowizer.
22143
22144         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
22145         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
22146         (AC_SYS_LARGEFILE): Require.
22147         (AM_C_PROTOTYPES): Require.
22148
22149 2000-04-08  Jim Meyering  <meyering@lucent.com>
22150
22151         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
22152         names don't conflict.  Reported by Eli Zaretskii.
22153
22154 2000-04-07  Jim Meyering  <meyering@lucent.com>
22155
22156         * lib/putenv.c: Move inclusion of errno.h so it follows that of
22157         sys/types.h, to work around system header problems on AIX 3.2.5.
22158         From Bruno Haible.
22159
22160 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
22161
22162         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
22163         bug.  Deal with the different error behavior of Irix iconv.
22164
22165 2000-04-05  Paul Eggert  <eggert@twinsun.com>
22166
22167         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
22168         IRIX if the installer said otherwise.
22169
22170 2000-04-05  Jim Meyering  <meyering@lucent.com>
22171
22172         Portability tweaks required for ultrix4.3.
22173         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
22174         (jm_CHECK_DECLS): Add getutent to the list of functions.
22175         (_jm_DECL_HEADERS): Add utmpx.h.
22176         From John David Anglin.
22177
22178         * m4/strftime.m4: Back out the 2000-04-02 change.
22179         Instead of that change, simply undefine putenv in the test program.
22180
22181 2000-04-05  Jim Meyering  <meyering@lucent.com>
22182
22183         Portability tweaks required for ultrix4.3.
22184         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
22185         getutent.
22186         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
22187         * lib/canon-host.c: Declare strdup.
22188         * lib/path-concat.c: Likewise.
22189         From John David Anglin.
22190
22191 2000-04-04  Jim Meyering  <meyering@lucent.com>
22192
22193         Be more DOS 8.3-friendly.
22194         * lib/ref-add.sin: Renamed from ref-add.sed.in.
22195         * lib/ref-del.sin: Renamed from ref-del.sed.in.
22196         * lib/Makefile.am: Reflect renaming.
22197         Reported by Eli Zaretskii.
22198
22199         Use a temporary file name that won't clash with `charset.alias'
22200         in the DOS 8.3 name space.
22201         * lib/Makefile.am (charset_tmp): Define.
22202         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
22203         (uninstall-local): Likewise.
22204         Reported by Eli Zaretskii.
22205
22206 2000-04-03  Jim Meyering  <meyering@lucent.com>
22207
22208         * m4/gettext.m4: Fix typo in comment.
22209
22210         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
22211         textutils/configure.in).  Suggestion from Paul Eggert.
22212         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
22213
22214 2000-04-02  Paul Eggert  <eggert@twinsun.com>
22215
22216         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
22217         variable in the shell rather than using putenv, which isn't
22218         portable.  This avoids the configure-time inter-test dependency
22219         on the potentially-renamed putenv function.
22220
22221 2000-03-30  Paul Eggert  <eggert@twinsun.com>
22222
22223         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
22224         before checking struct stat.st_blksize, so that
22225         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
22226
22227 2000-03-29  Paul Eggert  <eggert@twinsun.com>
22228
22229         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
22230         since strftime.c uses HAVE_STRFTIME to decide whether to use
22231         the underlying strftime.
22232
22233 2000-03-29  Paul Eggert  <eggert@twinsun.com>
22234
22235         * lib/time/strftime.c (my_strftime): Make sure we call the system
22236         strftime, not ourselves, when invoking the underlying strftime.
22237
22238 2000-03-24  Jim Meyering  <meyering@lucent.com>
22239
22240         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
22241         (charset_alias): Define.
22242         (install-exec-local): Factor out common code.
22243         (uninstall-local): Split lines longer than 80.
22244         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
22245         (SUFFIXES): Define.
22246         (.sed.in.sed): New rule.  Don't redirect directly to $@.
22247         (CLEANFILES): Add ref-add.sed and ref-del.sed.
22248
22249 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
22250
22251         * lib/config.charset: Output a line containing "Packages using this
22252         file".
22253         * lib/ref-add.sed.in, ref-del.sed.in: New files.
22254         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
22255         ref-del.sed): New rules.
22256
22257 2000-03-17  Jim Meyering  <meyering@lucent.com>
22258
22259         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
22260         Otherwise, include <strings.h>
22261
22262 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
22263
22264         * lib/unicodeio.c (utf8_wctomb): New function.
22265         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
22266         format instead of in UCS-4 with platform dependent endianness.
22267
22268 2000-03-10  Jim Meyering  <meyering@lucent.com>
22269
22270         * m4/lib-check.m4: Look for getspnam in -lgen, too.
22271         From Marco Franzen.
22272
22273 2000-03-07  Paul Eggert  <eggert@twinsun.com>
22274
22275         * lib/savedir.c (savedir): Work even if directory size is
22276         negative; this can happen with some screwy NFS configurations.
22277
22278 2000-03-06  Jim Meyering  <meyering@lucent.com>
22279
22280         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
22281         if it's NULL (because we ran out of memory).  From Bruno Haible.
22282
22283 2000-03-05  Jim Meyering  <meyering@lucent.com>
22284
22285         * lib/localcharset.c ("path-concat.h"): Include.
22286         (get_charset_aliases): Use path_concat instead of ANSI string
22287         concatenation.
22288
22289         * lib/unicodeio.h (PARAMS): Define.
22290         Use it to guard prototype.
22291
22292 2000-03-04  Jim Meyering  <meyering@lucent.com>
22293
22294         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
22295         for lib/localcharset.c.
22296
22297 2000-03-04  Jim Meyering  <meyering@lucent.com>
22298
22299         * lib/Makefile.am (install-exec-local): Create $(libdir) before
22300         installing into it.
22301         (uninstall-local): Uncomment this rule so `make distcheck' works
22302         once again.
22303
22304         * lib/unicodeio.c (<errno.h>): Include it.
22305         (errno): Declare if not defined.
22306
22307         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
22308
22309         * lib/config.charset: New version, incorporating remarks from a linux
22310         i18n mailing list.  From Bruno Haible.
22311
22312 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
22313
22314         * m4/codeset.m4: New file.
22315         * m4/iconv.m4: New file.
22316         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
22317
22318 2000-03-03  Jim Meyering  <meyering@lucent.com>
22319
22320         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
22321
22322 2000-03-02  Jim Meyering  <meyering@lucent.com>
22323
22324         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
22325         the messages come out on separate lines.
22326
22327         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
22328         rather than jm_CHECK_DECLARATIONS.
22329         * m4/decl.m4: Remove now-unused file.
22330
22331         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
22332         geteuid.
22333
22334 2000-03-02  Jim Meyering  <meyering@lucent.com>
22335
22336         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
22337
22338 2000-03-01  Jim Meyering  <meyering@lucent.com>
22339
22340         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
22341         * lib/unicodeio.c: Likewise.
22342
22343 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
22344
22345         * lib/config.charset: New file.
22346         * lib/localcharset.c: New file.
22347         * lib/unicodeio.h, unicodeio.c: New files.
22348         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
22349         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
22350         (noinst_HEADERS): Add unicodeio.h.
22351         (all-local, install-exec-local, charset.alias): New targets.
22352
22353 2000-02-28  Paul Eggert  <eggert@twinsun.com>
22354
22355         * lib/quotearg.c (ALERT_CHAR): New macro.
22356         (quotearg_buffer_restyled): Use it.
22357
22358 2000-02-27  Jim Meyering  <meyering@lucent.com>
22359
22360         * m4/check-decl.m4: Add getenv to the list.
22361
22362 2000-02-27  Jim Meyering  <meyering@lucent.com>
22363
22364         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
22365         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
22366
22367         * lib/backupfile.c: Guard inclusion of stdlib.h with
22368         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
22369         Declare malloc if needed.
22370
22371         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
22372         `#ifndef HAVE_DECL..'
22373         now that autoconf always defines the HAVE_DECL_ symbols.
22374         * lib/human.c: Likewise.
22375         * lib/same.c: Likewise.
22376         * lib/strtoumax.c: Likewise.
22377
22378         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
22379         declaration check was not run.
22380         * lib/hash.c: Likewise.
22381         * lib/human.c: Likewise.
22382         * lib/same.c: Likewise.
22383         * lib/strtoumax.c: Likewise.
22384
22385         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
22386         `.', then first look up the entire `.'-containing string as a login
22387         name.
22388
22389 2000-02-23  Jim Meyering  <meyering@lucent.com>
22390
22391         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
22392         in place of my hack.
22393
22394 2000-02-18  Paul Eggert  <eggert@twinsun.com>
22395
22396         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
22397         (textint): New typedef.
22398         (parser_control): Member year changed from int to textint.
22399         All uses changed.
22400         (YYSTYPE): Removed; replaced by %union with int and textint members.
22401         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
22402         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
22403         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
22404         (tSNUMBER, tUNUMBER): Now of type <textintval>.
22405         (date, number, to_year): Use width of number in digits, not its value,
22406         to determine whether it's a 2-digit year, or a 2-digit time.
22407         (yylex): Store number of digits of numeric tokens.
22408         Reported by John Kendall.
22409
22410         (parser_control): Changed from struct parser_control to typedef (for
22411         consistency).  All uses changed.
22412
22413         (tID): Removed; not used.
22414         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
22415
22416 2000-02-14  Paul Eggert  <eggert@twinsun.com>
22417
22418         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
22419         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
22420
22421 2000-02-12  Jim Meyering  <meyering@lucent.com>
22422
22423         * lib/userspec.c (ISDIGIT): Define it.
22424         (isdigit): Remove definition.
22425         (is_number): Use ISDIGIT, not isdigit.
22426         <libintl.h>: Include.
22427         (_ and N_): Define.
22428         (parse_user_spec): Mark translatable strings.
22429
22430 2000-02-10  Jim Meyering  <meyering@lucent.com>
22431
22432         With these changes, nanosleep.[ch] are finally enough like the other
22433         lib/* replacement files to compile on a few more losing systems.
22434
22435         * lib/nanosleep.h: Don't include config.h.
22436         Remove prototype from declaration of nanosleep.
22437         (PARAMS): Remove now-unneeded definition.
22438         * lib/nanosleep.c: #undef nanosleep.
22439         (rpl_nanosleep): Rename from nanosleep.
22440
22441 2000-02-10  Jim Meyering  <meyering@lucent.com>
22442
22443         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
22444         gnu_nanosleep to rpl_nanosleep.
22445
22446 2000-02-09  Jim Meyering  <meyering@lucent.com>
22447
22448         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
22449         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
22450
22451 2000-02-08  Akim Demaille  <akim@epita.fr>
22452
22453         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
22454         `[' and `]' and remove uses of `changequote'.
22455         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
22456         (AC_SYS_LARGEFILE): Likewise.
22457         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
22458         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
22459         of changequote.
22460         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
22461         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
22462         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
22463         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
22464
22465 2000-02-05  Jim Meyering  <meyering@lucent.com>
22466
22467         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
22468         Remove explicit use of AC_HEADER_TIME.  It is required by
22469         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
22470         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
22471         in autoconf whereby the expansion of the latter ended up preceding
22472         the expansion of its prerequisite, AC_HEADER_TIME.
22473         Reported by Volker Borchert.
22474
22475 2000-02-03  Jim Meyering  <meyering@lucent.com>
22476
22477         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
22478
22479 2000-02-03  Jim Meyering  <meyering@lucent.com>
22480
22481         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
22482         rather than with `#if HAVE_UTMPNAME'.
22483
22484 2000-02-02  Jim Meyering  <meyering@lucent.com>
22485
22486         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
22487         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
22488         Reported by Eli Zaretskii.
22489
22490 2000-02-01  Jim Meyering  <meyering@lucent.com>
22491
22492         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
22493
22494 2000-01-31  Jim Meyering  <meyering@lucent.com>
22495
22496         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
22497         functions.  Add the time.h and sys/time.h headers along with the
22498         AC_REQUIRE'ment of AC_HEADER_TIME.
22499
22500 2000-01-31  Jim Meyering  <meyering@lucent.com>
22501
22502         * lib/nanosleep.h (nanosleep): Guard declaration with
22503         `#if ! HAVE_DECL_NANOSLEEP'.
22504         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
22505         the declaration in that vendor's sys/timers.h.
22506         Reported by Christian Krackowizer.
22507
22508         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
22509         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
22510         (ISPRINT): Likewise.
22511         Reported by Tom Tromey.
22512
22513 2000-01-30  Jim Meyering  <meyering@lucent.com>
22514
22515         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
22516
22517         * m4/prereq.m4 (utmp_includes): Define.
22518         Check for ut_user and ut_name members in both struct utmpx
22519         and struct utmp.
22520
22521 2000-01-30  Jim Meyering  <meyering@lucent.com>
22522
22523         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
22524         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
22525         header files where only utmpx.ut_user is declared.
22526
22527         * lib/readutmp.h (UT_USER): Define.
22528
22529 2000-01-29  Jim Meyering  <meyering@lucent.com>
22530
22531         * m4/lib-check.m4: New file containing library-related checks from
22532         fileutils and sh-utils (textutils had none).
22533
22534 2000-01-28  Jim Meyering  <meyering@lucent.com>
22535
22536         * m4/perl.m4: Change format of warning message to look more like that
22537         from the missing script.  Suggestion from François Pinard.
22538
22539 2000-01-25  Jim Meyering  <meyering@lucent.com>
22540
22541         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
22542         well as time.h in the compile check.
22543         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
22544         Fix typo in cross-compiling case: s/yes/no/.
22545
22546 2000-01-23  Jim Meyering  <meyering@lucent.com>
22547
22548         * m4/jm-macros.m4: Move df-related tests here from
22549         fileutils/configure.in
22550
22551         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
22552         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
22553
22554         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
22555         s/space/ac_fsusage_space/.
22556         (jm_FILE_SYSTEM_USAGE): Take two parameters.
22557
22558         * m4/ftruncate.m4: New file (derived from part of
22559         fileutils/configure.in).
22560         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
22561         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
22562
22563         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
22564         AC_SUBST these here, rather than just in sh-util/configure.in, so
22565         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
22566         all the same.
22567         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
22568         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
22569         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
22570         (AC_SUBST(POW_LIBM)): Likewise.
22571         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
22572
22573 2000-01-23  Jim Meyering  <meyering@lucent.com>
22574
22575         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
22576         obstack.c.
22577
22578 2000-01-22  Jim Meyering  <meyering@lucent.com>
22579
22580         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
22581
22582         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
22583
22584         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
22585         configure.in
22586         (AC_CHECK_HEADERS): Likewise for sh-utils.
22587         (AC_CHECK_HEADERS): Likewise for textutils.
22588         Merge the three lists of headers.
22589
22590         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
22591         from fileutils' configure.in.
22592
22593         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
22594         code. Moved tests into their own function (_jm_DECL_HEADERS) in
22595         check-decl.m4.
22596
22597         * m4/check-decl.m4: Use #if rather than #ifdef.
22598         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
22599         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
22600         (_jm_DECL_HEADERS): Define new function.
22601         (jm_CHECK_DECLARATIONS): Require it.
22602
22603 2000-01-22  Jim Meyering  <meyering@lucent.com>
22604
22605         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
22606         [! HAVE_DECL_STRTOULL]: Declare strtoull.
22607         Required for some AIX systems.  Reported by Christian Krackowizer.
22608         [TESTING] (main): New function.
22609
22610         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
22611         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
22612         letters.
22613
22614         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
22615         iswprint.
22616
22617         * lib/strverscmp.c (ISDIGIT): Define.
22618         (strverscmp): Use ISDIGIT, not isdigit.
22619
22620 2000-01-19  Jim Meyering  <meyering@lucent.com>
22621
22622         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
22623         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
22624         defines `struct timespec' in <sys/time.h>
22625
22626         * m4/c-bs-a.m4: Remove uses of changequote altogether.
22627         Thanks to Akim for explaining.
22628
22629 2000-01-17  Paul Eggert  <eggert@twinsun.com>
22630
22631         * lib/nanosleep.c (nanosleep):
22632         Don't use SA_INTERRUPT to decide whether to call sigaction, as
22633         POSIX.1 doesn't require SA_INTERRUPT and some systems
22634         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
22635         it's been part of POSIX.1 since day 1 (in 1988).
22636
22637 2000-01-17  Jim Meyering  <meyering@lucent.com>
22638
22639         * lib/interlock: Remove unused file.  Reported by François Pinard.
22640
22641 2000-01-16  Paul Eggert  <eggert@twinsun.com>
22642
22643         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
22644         alert, backslash, formfeed, and vertical tab unnecessarily in
22645         shell quoting style.
22646
22647 2000-01-16  Jim Meyering  <meyering@lucent.com>
22648
22649         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
22650         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
22651         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
22652         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
22653
22654 2000-01-16  Jim Meyering  <meyering@lucent.com>
22655
22656         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
22657         because the latter didn't work.
22658
22659 2000-01-15  Jim Meyering  <meyering@lucent.com>
22660
22661         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
22662         (AC_REPLACE_FUNCS): Add memcpy and memset.
22663         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
22664         Add strpbrk.
22665         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
22666
22667 2000-01-12  Jim Meyering  <meyering@lucent.com>
22668
22669         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
22670         (jm_PREREQ): Use it.
22671         (jm_PREREQ_READUTMP): New macro.
22672         (jm_PREREQ): Use it.
22673
22674 2000-01-11  Paul Eggert  <eggert@twinsun.com>
22675
22676         Quote multibyte characters correctly.
22677         * m4/c-bs-a.m4: New file.
22678         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
22679         (jm_PREREQ): Use it.
22680
22681 2000-01-11  Paul Eggert  <eggert@twinsun.com>
22682
22683         * m4/uintmax_t.m4: Port to autoconf 2.13.
22684
22685 2000-01-08  Jim Meyering  <meyering@ascend.com>
22686
22687         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
22688         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
22689
22690 2000-01-04  Jim Meyering  <meyering@ascend.com>
22691
22692         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
22693         jm_STRUCT_DIRENT_D_TYPE.
22694         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
22695         jm_STRUCT_DIRENT_D_INO.
22696         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
22697         jm_STRUCT_UTIMBUF.
22698         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
22699         renamings.
22700         * m4/utime.m4: Likewise.
22701
22702         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
22703         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
22704
22705 2000-01-03  Paul Eggert  <eggert@twinsun.com>
22706
22707         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
22708         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
22709
22710 2000-01-02  Jim Meyering  <meyering@ascend.com>
22711
22712         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
22713         remember if this is necessary.
22714
22715 1999-12-26  Jim Meyering  <meyering@ascend.com>
22716
22717         * m4/jm-macros.m4: Use it here.
22718         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
22719
22720 1999-12-23  Jim Meyering  <meyering@ascend.com>
22721
22722         * m4/jm-macros.m4: Check for clock_gettime (moved from
22723         fileutils/configure.in)
22724         Check for gettimeofday.
22725
22726 1999-12-20  Jim Meyering  <meyering@ascend.com>
22727
22728         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
22729         autoconf-2.14a-1999-12-20.
22730
22731 1999-12-19  Jim Meyering  <meyering@ascend.com>
22732
22733         * m4/lstat-slash.m4: New file.
22734         * m4/jm-macros.m4: Use the new macro:
22735         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
22736
22737 1999-12-07  Jim Meyering  <meyering@ascend.com>
22738
22739         * m4/perl.m4: Require that File::Compare be available, too.
22740         Too many systems seem to lack it.
22741
22742         * m4/strftime.m4: Add checks for most of the cpp macros tested in
22743         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
22744
22745 1999-11-18  Paul Eggert  <eggert@twinsun.com>
22746
22747         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
22748         problem with the QNX 4.25 shell, which doesn't propagate exit
22749         status of failed commands inside shell assignments.
22750
22751 1999-11-17  Jim Meyering  <meyering@ascend.com>
22752
22753         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
22754
22755 1999-11-07  Jim Meyering  <meyering@ascend.com>
22756
22757         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
22758
22759 1999-11-06  Jim Meyering  <meyering@ascend.com>
22760
22761         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
22762         * m4/jm-macros.m4 (jm_MACROS): Use it here.
22763
22764 1999-11-05  Jim Meyering  <meyering@ascend.com>
22765
22766         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
22767         configure.in of textutils, fileutils, and sh-utils into this one
22768         (shared between those packages) file.
22769         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
22770         AC_STRUCT_ST_BLKSIZE.
22771
22772 1999-11-03  Jim Meyering  <meyering@ascend.com>
22773
22774         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
22775         of AC_CHECK_TYPE checks includes unistd.h.
22776         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
22777         Suggestion from Akim Demaille.
22778
22779 1999-10-30  Jim Meyering  <meyering@ascend.com>
22780
22781         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
22782         m4-quoted string.
22783         * m4/ls-mntd-fs.m4: Likewise.
22784         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
22785         * m4/jm-winsz1.m4: Likewise.
22786
22787         * m4/const.m4: Remove file, since the fix made it into the experimental
22788         version of autoconf.
22789         * m4/mktime.m4: Likewise.
22790
22791         * m4/check-type.m4: Remove file, now that the latest version of
22792         AC_CHECK_TYPE takes a third arg to specify additional #includes.
22793
22794         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
22795         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
22796         AC_CHECK_TYPE.
22797
22798 1999-10-04  Jim Meyering  <meyering@ascend.com>
22799
22800         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
22801
22802 1999-09-22  Paul Eggert  <eggert@twinsun.com>
22803
22804         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
22805         2.95.1 bug with HP-UX 10.20.
22806
22807 1999-09-17  Jim Meyering  <meyering@ascend.com>
22808
22809         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
22810         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
22811         due to missing strdup (against sh-utils-2.0).
22812
22813 1999-08-29  Jim Meyering  <meyering@ascend.com>
22814
22815         * m4/jm-macros.m4: Require jm_BISON.
22816         * m4/bison.m4: New file.
22817
22818 1999-08-17  Paul Eggert  <eggert@twinsun.com>
22819
22820         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
22821         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
22822
22823 1999-08-05  Jim Meyering  <meyering@ascend.com>
22824
22825         * m4/getline.m4: Rename test file from conftestdata to conftest.data
22826         to avoid conflicts with `conftest' on 8+3 filesystems.
22827         Suggestion from Eli Zaretskii.
22828
22829 1999-08-04  Jim Meyering  <meyering@ascend.com>
22830
22831         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
22832         fileutils and sh-utils (textutils's getline test was inadequate).
22833         (AM_FUNC_GETLINE): Run this test.
22834         (AC_CHECK_FUNCS): Check for getdelim.
22835         Reported by Bob Proulx.
22836
22837 1999-08-02  Jim Meyering  <meyering@ascend.com>
22838
22839         * m4/jm-macros.m4: Add a comment.
22840
22841 1999-08-01  Paul Eggert  <eggert@twinsun.com>
22842
22843         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
22844         <inttypes.h> defines strtoumax as a macro (and not as a
22845         function).
22846
22847 1999-08-01  Paul Eggert  <eggert@twinsun.com>
22848
22849         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
22850         that we can shift, multiply and divide unsigned long long
22851         values; Ultrix cc can't do it.
22852
22853 1999-08-01  Paul Eggert  <eggert@twinsun.com>
22854
22855         * m4/mktime.m4: New file, which is a preview of what should appear
22856         in the next public autoconf release.
22857
22858 1999-08-01  Paul Eggert  <eggert@twinsun.com>
22859
22860         * m4/lfs.m4: Remove this file.
22861         * m4/largefile.m4: New file.  It contains the old contents of
22862         lfs.m4, except that all names with prefix AC_LFS have been
22863         changed to use the prefix AC_SYS_LARGEFILE instead, to be
22864         compatible with future autoconf versions.  Also, some minor m4
22865         quoting problems have been fixed.
22866
22867 1999-08-01  Paul Eggert  <eggert@twinsun.com>
22868
22869         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
22870         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
22871         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
22872         and simplify the shell code.
22873
22874 1999-08-01  Jim Meyering  <meyering@ascend.com>
22875
22876         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
22877         m4.
22878
22879 1999-07-20  Jim Meyering  <meyering@ascend.com>
22880
22881         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
22882
22883 1999-07-15  Jim Meyering  <meyering@ascend.com>
22884
22885         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
22886
22887 1999-05-22  Jim Meyering  <meyering@ascend.com>
22888
22889         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
22890
22891 1999-05-20  Jim Meyering  <meyering@ascend.com>
22892
22893         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
22894         Add a colon after each `then' in case $4 is empty.
22895
22896 1999-05-16  Jim Meyering  <meyering@ascend.com>
22897
22898         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
22899
22900 1999-05-10  Jim Meyering  <meyering@ascend.com>
22901
22902         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
22903
22904         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
22905         AC_FUNC_MKTIME.
22906
22907 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
22908
22909         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
22910
22911 1999-05-04  Paul Eggert  <eggert@twinsun.com>
22912
22913         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
22914         not CPPFLAGS, so that linking works correctly in IRIX.
22915
22916 1999-04-30  Paul Eggert  <eggert@twinsun.com>
22917
22918         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
22919
22920 1999-04-20  Paul Eggert  <eggert@twinsun.com>
22921
22922         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
22923         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
22924         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
22925         jm_AC_TYPE_UNSIGNED_LONG_LONG.
22926         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
22927
22928         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
22929
22930 1999-04-20  Jim Meyering  <meyering@ascend.com>
22931
22932         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
22933         AC_REPLACE xstroull if necessary.  From Paul Eggert.
22934         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
22935
22936 1999-04-18  Jim Meyering  <meyering@ascend.com>
22937
22938         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
22939         * m4/jm-macros.m4: Use it.
22940
22941 1999-04-06  Jim Meyering  <meyering@ascend.com>
22942
22943         * m4/strftime.m4: Remove test for %f.
22944
22945 1999-03-29  Jim Meyering  <meyering@ascend.com>
22946
22947         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
22948         superset of the AC_TYPE_* checks in the textutils, fileutils,
22949         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
22950         AC_TYPE_PID_T.
22951
22952 1999-03-28  Jim Meyering  <meyering@ascend.com>
22953
22954         * m4/jm-macros.m4: Define GNU_PACKAGE here.
22955         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
22956         replaced e.g., in the *.sh files of the sh-utils.
22957
22958 1999-03-20  Jim Meyering  <meyering@ascend.com>
22959
22960         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
22961         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
22962         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
22963
22964 1999-03-19  Jim Meyering  <meyering@ascend.com>
22965
22966         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
22967
22968 1999-03-12  Jim Meyering  <meyering@ascend.com>
22969
22970         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
22971
22972 1999-03-07  Jim Meyering  <meyering@ascend.com>
22973
22974         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
22975         declared.
22976
22977 1999-02-17  Jim Meyering  <meyering@ascend.com>
22978
22979         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
22980         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
22981
22982 1999-02-07  Jim Meyering  <meyering@ascend.com>
22983
22984         * m4/group-member.m4: New file -- extracted from sh-utils'
22985         configure.in.
22986
22987         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
22988         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
22989
22990 1999-02-06  Jim Meyering  <meyering@ascend.com>
22991
22992         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
22993         * m4/fnmatch.m4: Likewise.
22994         * m4/getgroups.m4: Likewise.
22995         * m4/lstat.m4: Likewise.
22996         * m4/malloc.m4: Likewise.
22997         * m4/putenv.m4: Likewise.
22998         * m4/realloc.m4: Likewise.
22999         * m4/regex.m4: Likewise.
23000         * m4/stat.m4: Likewise.
23001         * m4/strftime.m4: Likewise.
23002         Suggestion from Alain Magloire.
23003
23004         * m4/chown.m4: Use `.$ac_objext', not `.o'.
23005         * m4/fnmatch.m4: Likewise.
23006         * m4/getgroups.m4: Likewise.
23007         * m4/getline.m4: Likewise.
23008         * m4/lstat.m4: Likewise.
23009         * m4/malloc.m4: Likewise.
23010         * m4/memcmp.m4: Likewise.
23011         * m4/putenv.m4: Likewise.
23012         * m4/realloc.m4: Likewise.
23013         * m4/regex.m4: Likewise.
23014         * m4/stat.m4: Likewise.
23015         * m4/strftime.m4: Likewise.
23016         Suggestion from Alain Magloire.
23017
23018         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
23019         an argument.
23020
23021         * m4/regex.m4: Add a run-time Test for proper operation of
23022         re_compile_pattern.
23023
23024 1999-01-31  Jim Meyering  <meyering@ascend.com>
23025
23026         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
23027
23028 1999-01-30  Jim Meyering  <meyering@ascend.com>
23029
23030         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
23031
23032         * m4/jm-mktime.m4: Make this a wrapper around the official
23033         AM_FUNC_MKTIME rather than my private copy, now that the official one
23034         is up to date.
23035         * m4/mktime.m4: Remove file.
23036
23037         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
23038         * m4/uptime.m4: Likewise.
23039         * m4/uintmax_t.m4: Likewise.
23040
23041 1999-01-28  Jim Meyering  <meyering@ascend.com>
23042
23043         * m4/jm-macros.m4: Use jm_AFS.
23044         * m4/afs.m4: New file (from fileutils' configure.in).
23045
23046         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
23047         * m4/chown.m4: Likewise.
23048         * m4/d-ino.m4: Likewise.
23049         * m4/d-type.m4: Likewise.
23050         * m4/fnmatch.m4: Likewise.
23051         * m4/getgroups.m4: Likewise.
23052         * m4/gettext.m4: Likewise.
23053         * m4/jm-mktime.m4: Likewise.
23054         * m4/jm-winsz2.m4: Likewise.
23055         * m4/lcmessage.m4: Likewise.
23056         * m4/ls-mntd-fs.m4: Likewise.
23057         * m4/malloc.m4: Likewise.
23058         * m4/memcmp.m4: Likewise.
23059         * m4/putenv.m4: Likewise.
23060         * m4/realloc.m4: Likewise.
23061         * m4/st_mtim.m4: Likewise.
23062         * m4/strftime.m4: Likewise.
23063
23064 1999-01-16  Jim Meyering  <meyering@ascend.com>
23065
23066         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
23067         (ARGMATCH_DIE_DECL): Define.
23068
23069 1999-01-12  Jim Meyering  <meyering@ascend.com>
23070
23071         * m4/Makefile.am.in: Rewrite to avoid using fmt.
23072         Reported by Lars Hecking.
23073
23074 1999-01-10  Jim Meyering  <meyering@ascend.com>
23075
23076         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
23077         gross kludge.
23078         * m4/inttypes_h.m4: Likewise.
23079         * m4/lstat.m4: Likewise.
23080         * m4/malloc.m4: Likewise.
23081         * m4/readdir.m4: Likewise.
23082         * m4/realloc.m4: Likewise.
23083         * m4/st_dm_mode.m4: Likewise.
23084         * m4/stat.m4: Likewise.
23085         * m4/utimbuf.m4: Likewise.
23086         * m4/utimes.m4: Likewise.
23087
23088         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
23089         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
23090         comments in config.h.in are meaningful.
23091
23092         * m4/jm-macros.m4: Require autoconf-2.13 here.
23093
23094         * m4/regex.m4: By default, don't use the included regex.c on systems
23095         with glibc 2.  Suggestion from Uli Drepper.
23096
23097 1999-01-02  Jim Meyering  <meyering@ascend.com>
23098
23099         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
23100
23101 1998-12-18  Jim Meyering  <meyering@ascend.com>
23102
23103         * m4/Makefile.am.in (Makefile.am): Simplify rule.
23104         Based on a suggestion from Lars Hecking.
23105
23106 1998-11-16  Paul Eggert  <eggert@twinsun.com>
23107
23108         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
23109
23110 1998-11-16  Jim Meyering  <meyering@ascend.com>
23111
23112         * m4/lfs.m4: Double-quote the `uname...` expression.
23113
23114 1998-11-14  Jim Meyering  <meyering@ascend.com>
23115
23116         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
23117         * m4/stat.m4: Likewise.
23118
23119 1998-11-03  Jim Meyering  <meyering@ascend.com>
23120
23121         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
23122         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
23123
23124 1998-10-18  Jim Meyering  <meyering@ascend.com>
23125
23126         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
23127
23128 1998-10-17  Jim Meyering  <meyering@ascend.com>
23129
23130         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
23131         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
23132         calls for those previously hard-coded headers.  Instead, take a new
23133         parameter.
23134         (jm_CHECK_DECLARATIONS): Reflect interface change.
23135         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
23136         (jm_CHECK_DECL_LOCALTIME_R): New macro.
23137
23138         * m4/mktime.m4: Test for spring-forward gap before long-running test.
23139
23140 1998-10-14  Jim Meyering  <meyering@ascend.com>
23141
23142         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
23143         instead of "TZ=America/Vancouver".  From Paul Eggert.
23144
23145 1998-10-11  Jim Meyering  <meyering@ascend.com>
23146
23147         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
23148         This adds a test for a recently added compatibility fix for mktime.c.
23149         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
23150
23151 1998-09-27  Jim Meyering  <meyering@ascend.com>
23152
23153         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
23154
23155         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
23156         ../configure.in, including a change from Gordon Matzigkeit to allow
23157         cross-compiling for the Hurd.
23158
23159         * m4/glibc.m4: New file/macro to test for the GNU C Library
23160         versions 1 and 2.  From Gordon Matzigkeit.
23161         Indent.
23162
23163 1998-09-21  Jim Meyering  <meyering@ascend.com>
23164
23165         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
23166
23167 1998-08-18  Paul Eggert  <eggert@twinsun.com>
23168
23169         Port nanosecond-resolution times to UnixWare 2.1.2 and
23170         pedantic Solaris 2.6.
23171
23172         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
23173         AC_STRUCT_ST_MTIM.
23174         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
23175         Generate name of ns member, instead of just 1 or undef.
23176         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
23177
23178 1998-08-15  Jim Meyering  <meyering@ascend.com>
23179
23180         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
23181         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
23182         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
23183         instead of jm_TYPE_SSIZE_T.
23184
23185 1998-08-12  Jim Meyering  <meyering@ascend.com>
23186
23187         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
23188
23189 1998-08-02  Jim Meyering  <meyering@ascend.com>
23190
23191         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
23192         in acconfig.h manually.
23193
23194 1998-07-31  Paul Eggert  <eggert@twinsun.com>
23195
23196         * m4/st_mtim.m4: New file.
23197
23198 1998-07-28  Jim Meyering  <meyering@ascend.com>
23199
23200         * m4/utimes.m4: Undef stat.
23201
23202 1998-07-25  Jim Meyering  <meyering@ascend.com>
23203
23204         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
23205         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
23206
23207 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
23208
23209         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
23210         uid and gid actually remain unchanged.
23211
23212 1998-07-07  Jim Meyering  <meyering@ascend.com>
23213
23214         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
23215
23216 1998-07-04  Jim Meyering  <meyering@ascend.com>
23217
23218         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
23219         to prove that this macro can be used in packages without regex.c.
23220
23221 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
23222
23223         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
23224         is to be used.
23225
23226 1998-07-03  Jim Meyering  <meyering@ascend.com>
23227
23228         * m4/gettext.m4: Add -lintl if it's found to be necessary.
23229
23230         * m4/gettext.m4: New file -- from gettext-0.10.35.
23231         * m4/lcmessage.m4: Likewise.
23232         * m4/progtest.m4: Likewise.
23233
23234         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
23235         * m4/jm-macros.m4: Require the new macro.
23236
23237 1998-06-29  Jim Meyering  <meyering@ascend.com>
23238
23239         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
23240         for the definition of NGROUPS (used in a system header included
23241         by sys/mount.h).
23242
23243 1998-06-28  Jim Meyering  <meyering@ascend.com>
23244
23245         * m4/ls-mntd-fs.m4: New file.
23246         * m4/fstypename.m4: New file.
23247
23248         * m4/jm-macros.m4: Require the new macro.
23249         * m4/jm-glibc-io.m4: New file.
23250
23251 1998-05-19  Jim Meyering  <meyering@ascend.com>
23252
23253         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
23254         * m4/lchown.m4: New file.
23255
23256         * m4/Makefile.am.in: New file.
23257         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
23258
23259 1998-05-14  Jim Meyering  <meyering@ascend.com>
23260
23261         * m4/Makefile.am (EXTRA_DIST): Add them.
23262         * m4/jm-macros.m4: New file.
23263         * m4/utimbuf.m4: New file.
23264
23265 1998-05-12  Jim Meyering  <meyering@ascend.com>
23266
23267         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
23268
23269 1998-05-11  Jim Meyering  <meyering@ascend.com>
23270
23271         * m4/isc-posix.m4: New file.
23272
23273 1998-05-10  Jim Meyering  <meyering@ascend.com>
23274
23275         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
23276
23277 1998-05-09  Jim Meyering  <meyering@ascend.com>
23278
23279         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
23280         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
23281         with automake.
23282
23283         * m4/ssize_t.m4: New file.
23284         * m4/mktime.m4: Remove file -- the new automake has this now.
23285
23286 1998-04-26  Jim Meyering  <meyering@ascend.com>
23287
23288         * m4/assert.m4: New file.
23289         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
23290
23291 1998-04-05  Jim Meyering  <meyering@ascend.com>
23292
23293         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
23294         (jm_PREREQ): Use it here.
23295
23296 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
23297
23298         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
23299         in acconfig.h.
23300
23301 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
23302
23303         * m4/prereq.m4: New file.
23304         * m4/error.m4: New file.
23305         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
23306
23307 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
23308
23309         * m4/getline.m4: Don't set am_cv_func_working_getline before the
23310         cache-check for the same variable -- that defeated the purpose of
23311         the test; the test program was never run.  This was a problem only
23312         on systems with losing getline functions -- HP-UX 10.20 is one.
23313         Reported by Bjorn Helgaas.
23314
23315 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
23316
23317         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
23318
23319 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
23320
23321         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
23322
23323         * m4/const.m4: New file.  Use an initializer in this declaration
23324         typedef int charset[2]; const charset x;
23325         Reported by Bob Glickstein.
23326
23327 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
23328
23329         * m4/chown.m4: Fix reversed types on -1 args to chown.
23330         From Kaveh Ghazi.
23331
23332 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
23333
23334         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
23335         Add lseek and memchr.
23336
23337         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
23338         T.E.Dickey <dickey@clark.net> said that some older preprocessors
23339         have a 20-character limit on names.
23340
23341 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
23342
23343         * m4/inttypes_h.m4: New file.
23344         * m4/uintmax_t.m4: New file.
23345         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
23346
23347 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
23348   Free Software Foundation, Inc.
23349 Copying and distribution of this file, with or without modification,
23350 are permitted provided the copyright notice and this notice are preserved.