6aabd47de0ce54870b7fe9ff049717062bbbb6a7
[gnulib.git] / ChangeLog
1 2007-01-18  Eric Blake  <ebb9@byu.net>
2
3         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
4         replace gettimeofday.
5         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
6         name, to avoid infinite recursion.
7
8 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
9
10         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
11         module sys_time.
12         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
13         assume timespec.h defines struct timeval.
14         * lib/settime.c: Likewise.
15         * lib/utimens.c: Likewise.
16         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
17         since we now assume the gettimeofday module.
18         * lib/tempname.c (__gen_tempname): Likewise.
19         * lib/gettimeofday.h: Remove.
20         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
21         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
22         Include <time.h>, for 'time()'.
23         (localtime_buffer_addr): Also use this workaround if
24         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
25         to simplify the uses.  All uses changed.
26         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
27         that #undef is inside {}, and 'const' follows type name consistently.
28         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
29         (gettimeofday): Do not use the maximum possible value for
30         tv->tv_usec, since that might break usages other than ls.c.
31         Instead, we'll leave ls.c alone.  This undoes today's patch
32         by Bruno.  Add a compile-time warning for 1s-clock resolution;
33         we've never observed the problem but might as well keep the
34         canary.
35         * lib/nanosleep.c: Include timespec.h first, for interface check.
36         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
37         now assume the sys_time module.
38         * lib/tempname.c: Likewise.
39         * lib/timespec.h: Likewise.
40         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
41         needed.
42         * lib/strftime.c: Likewise.
43         * lib/timespec.h: Likewise.
44         * lib/posixtm.c: Include posixtm.h first, for interface check.
45         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
46         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
47         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
48         * lib/sys_time_.h: New file.
49         * lib/timespec.h (struct timespec): Use long int, not long.
50         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
51         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
52         Remove obsolescent call to AC_HEADER_TIME.
53         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
54         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
55         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
56         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
57         Likewise.
58         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
59         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
60         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
61         into the sys_time module.  Check for gettimeofday just once.
62         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
63         for gettimeofday signature to just check the signature.  Merely
64         compile it, since linking doesn't test signature.  Improve test for
65         whether gettimeofday.o is actually needed.
66         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
67         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
68         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
69         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
70         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
71         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
72         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
73         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
74         than worrying about sys/time.h.
75         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
76         Don't bother worrying about TIME_WITH_SYS_TIME.
77         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
78         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
79         * m4/sys_time_h.m4: New file.
80         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
81         Don't include sys/time.h.  Return from main rather than exiting.
82         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
83         all uses changed.
84         * modules/gethrxtime (Depends-on): Add sys_time.
85         * modules/gettime (Depends-on): Likewise.
86         * modules/gettimeofday (Depends-on): Likewise.
87         * modules/nanosleep (Depends-on): Likewise.
88         * modules/settime (Depends-on): Likewise.
89         * modules/tempname (Depends-on): Likewise.
90         * modules/utimens (Depends-on): Likewise.
91         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
92         (Include:) Change back to <sys/time.h>.
93         (Maintainer:) Add self.
94         * modules/sys_time: New file.
95         * modules/tempname (Depends-on): Add gettimeofday.
96         * tests/test-gettimeofday.c: Include <sys/time.h>
97         rather than gettimeofday.h.
98
99 2007-01-17  Bruno Haible  <bruno@clisp.org>
100
101         * gnulib-tool (func_get_license): Revert last patch. Instead, let
102         the license default to GPL.
103         (func_create_testdir): Don't complain if a module is LGPL and its
104         tests module depends on GPLed modules.
105
106 2007-01-17  Bruno Haible  <bruno@clisp.org>
107
108         * lib/gettimeofday.c (gettimeofday): Add code for the case
109         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
110         maximum possible value for tv->tv_usec, rather than the minimum one.
111
112 2005-10-08  Martin Lambers  <marlam@marlam.de>
113 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
114 2007-01-16  Bruno Haible  <bruno@clisp.org>
115
116         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
117         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
118         gl_FUNC_GETTIMEOFDAY.
119         (Include): Add gettimeofday.h.
120         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
121         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
122         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
123         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
124         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
125         * lib/gettimeofday.h: New file.
126         * lib/gettimeofday.c: Include <sys/timeb.h>.
127         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
128         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
129         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
130         fall back on time().
131
132         * tests/test-gettimeofday.c: New file.
133         * modules/gettimeofday-tests: New file.
134
135 2007-01-16  Eric Blake  <ebb9@byu.net>
136
137         * modules/fnmatch (Depends-on): Depend on wchar.
138         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
139         * m4/fnmatch.m4: Likewise.
140         * modules/mbchar (Makefile.am): Assume <wchar.h>.
141         * m4/mbchar.m4: Likewise.
142         * modules/mbswidth (Depends-on): Depend on wchar.
143         * lib/mbswidth.c: Assume <wchar.h>.
144         * m4/mbswidth.m4: Likewise.
145         * modules/quotearg (Depends-on): Depend on wchar.
146         * lib/quotearg.c: Assume <wchar.h>.
147         * m4/quotearg.m4: Likewise.
148         * modules/regex (Depends-on): Depend on wchar.
149         * lib/regex_internal.h: Assume <wchar.h>.
150         * m4/regex.m4: Likewise.
151         * modules/stdint (Depends-on): Depend on wchar.
152         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
153         * m4/stdint.m4: Likewise.
154         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
155         * modules/strftime (Depends-on): Depend on wchar.
156         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
157         * modules/strtol (Depends-on): Depend on wchar.
158         * lib/strtol.c: Assume <wchar.h>.
159         * modules/wcwidth (Depends-on): Depend on wchar.
160         * lib/wcwidth.h: Assume <wchar.h>.
161         * m4/wcwidth.m4: Likewise.
162
163 2007-01-16  Bruno Haible  <bruno@clisp.org>
164
165         * modules/csharpexec-script: New, created from...
166         * modules/csharpexec: ... this.
167
168 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
169
170         * modules/javaexec-script: New, created from...
171         * modules/javaexec: ... this.
172
173 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
174
175         * modules/poll (Dependencies): Add sys_select.
176
177 2007-01-15  Jim Meyering  <jim@meyering.net>
178
179         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
180         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
181         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
182         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
183
184 2007-01-15  Bruno Haible  <bruno@clisp.org>
185
186         * modules/striconveh: New file.
187         * lib/striconveh.h: New file.
188         * lib/striconveh.c: New file.
189         * MODULES.html.sh (Internationalization functions): Add striconveh.
190
191         * modules/striconveh-tests: New file.
192         * tests/test-striconveh.c: New file.
193
194 2007-01-15  Bruno Haible  <bruno@clisp.org>
195
196         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
197         not from GNU libiconv or GNU libc.
198
199 2007-01-15  Bruno Haible  <bruno@clisp.org>
200
201         * doc/gnulib-intro.texi (Copyright): Explain the different license
202         terms for module descriptions, autoconf macros, tests, documentation.
203
204 2007-01-14  Bruno Haible  <bruno@clisp.org>
205
206         * modules/striconv-tests: New file.
207         * tests/test-striconv.c: New file.
208
209 2007-01-14  Bruno Haible  <bruno@clisp.org>
210
211         * modules/iconv-tests: New file.
212         * tests/test-iconv.c: New file.
213
214 2007-01-14  Bruno Haible  <bruno@clisp.org>
215
216         * gnulib-tool (func_get_license): For test modules, use the license of
217         the main module.
218
219 2007-01-14  Bruno Haible  <bruno@clisp.org>
220
221         * modules/iconv (Include): Clarify that <iconv.h> can only be included
222         if iconv is found to exist.
223
224 2007-01-14  Bruno Haible  <bruno@clisp.org>
225
226         * modules/c-ctype-tests: New file.
227         * tests/test-c-ctype.c: New file.
228
229 2007-01-14  Bruno Haible  <bruno@clisp.org>
230
231         * modules/binary-io-tests: New file.
232         * tests/test-binary-io.sh: New file.
233         * tests/test-binary-io.c: New file.
234
235 2007-01-14  Bruno Haible  <bruno@clisp.org>
236
237         * modules/array-oset-tests: New file.
238         * tests/test-array_oset.c: New file.
239
240 2007-01-14  Bruno Haible  <bruno@clisp.org>
241
242         * modules/array-list-tests: New file.
243         * tests/test-array_list.c: New file.
244
245 2007-01-14  Bruno Haible  <bruno@clisp.org>
246
247         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
248         and make.
249         Reported by Simon Josefsson in
250         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
251
252 2007-01-14  Bruno Haible  <bruno@clisp.org>
253
254         * modules/allocsa-tests: New file.
255         * tests/test-allocsa.c: New file.
256
257 2007-01-14  Bruno Haible  <bruno@clisp.org>
258
259         * modules/fchdir (Depends-on): Add absolute-header.
260         * modules/unistd (Depends-on): Likewise.
261
262 2006-12-30  Bruno Haible  <bruno@clisp.org>
263
264         * modules/fchdir: New file.
265         * modules/unistd (Files): Add lib/unistd_.h.
266         (Makefile.am): Generate unistd.h from unistd_.h.
267         * lib/fchdir.c: New file.
268         * lib/dirent_.h: New file.
269         * lib/unistd_.h: New file.
270         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
271         * m4/fchdir.m4: New file.
272         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
273         (gl_HEADER_UNISTD): Invoke it.
274         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
275         function.
276         * lib/backupfile.c (opendir, closedir): Undefine.
277         * lib/chown.c (open, close): Undefine.
278         * lib/clean-temp.c (open, close): Undefine.
279         * lib/copy-file.c (open, close): Undefine.
280         * lib/execute.c (open, close): Undefine.
281         * lib/fsusage.c (open, close): Undefine.
282         * lib/gc-gnulib.c (open, close): Undefine.
283         * lib/getcwd.c (opendir, closedir): Undefine.
284         * lib/glob.c (opendir, closedir): Undefine.
285         * lib/javacomp.c (open, close): Undefine.
286         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
287         * lib/openat-proc.c (open, close): Undefine.
288         * lib/pagealign_alloc.c (open, close): Undefine.
289         * lib/pipe.c (open, close): Undefine.
290         * lib/progreloc.c (open, close): Undefine.
291         * lib/savedir.c (opendir, closedir): Undefine.
292         * lib/utime.c (open, close): Undefine.
293         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
294
295 2007-01-10  Bruno Haible  <bruno@clisp.org>
296
297         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
298
299 2007-01-12  Eric Blake  <ebb9@byu.net>
300
301         Provide a robust <wchar.h>.  Further simplifications are now
302         possible in other modules, but not included here.
303         * modules/wchar: New module.
304         * m4/wchar.m4: New file.
305         * lib/wchar_.h: Likewise.
306         * modules/mbchar (Depends-on): Depend on wchar, as the first use
307         of the new module.
308         * MODULES.html.sh (Extended multibyte and wide character utilities):
309         New section.
310
311 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
312
313         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
314         to a reasonable default for memory allocation.
315         (xreadlink): Don't allocate a huge buffer, to work around a buggy
316         file system that reports garbage st_size values for symlinks.
317         Problem reported by Liyang Hu.
318
319 2007-01-11  Simon Josefsson  <simon@josefsson.org>
320
321         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
322         Emacs .#* auto-save files).
323
324 2007-01-11  Bruno Haible  <bruno@clisp.org>
325
326         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
327         directory.
328
329 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
330
331         Use @...@ consistently in lib/wctype_.h.
332         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
333         on it being set to 1 or 0.
334         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
335         go back to AC_SUBSTing it.
336         * modules/wctype (Makefile.am): Undo previous change.
337
338 2007-01-10  Eric Blake  <ebb9@byu.net>
339
340         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
341         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
342         * modules/wctype (Makefile.am): Likewise.
343         Reported by Chris McGuire.
344
345 2007-01-10  Jim Meyering  <jim@meyering.net>
346
347         fts.c: a small readability/maintainability improvement
348         * lib/fts.c (fts_read): Make this code slightly more readable and
349         maintainable by hoisting the "sp->fts_cur = p" assignments to
350         immediately follow the statements that set P.  Derived from
351         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
352
353 2007-01-10  Eric Blake  <ebb9@byu.net>
354
355         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
356         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
357         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
358         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
359         Reported by Chris McGuire.
360
361 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
362
363         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
364         in sed script.
365
366 2007-01-09  Bruno Haible  <bruno@clisp.org>
367
368         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
369         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
370         variables.
371         (func_module): Use them.
372
373 2007-01-09  Bruno Haible  <bruno@clisp.org>
374
375         * modules/unistr/base: New file.
376         * lib/unistr.h: New file.
377
378         * modules/unistr/u8-to-u16: New file.
379         * lib/unistr/u8-to-u16.c: New file.
380
381         * modules/unistr/u8-to-u32: New file.
382         * lib/unistr/u8-to-u32.c: New file.
383
384         * modules/unistr/u16-to-u8: New file.
385         * lib/unistr/u16-to-u8.c: New file.
386
387         * modules/unistr/u16-to-u32: New file.
388         * lib/unistr/u16-to-u32.c: New file.
389
390         * modules/unistr/u32-to-u8: New file.
391         * lib/unistr/u32-to-u8.c: New file.
392
393         * modules/unistr/u32-to-u16: New file.
394         * lib/unistr/u32-to-u16.c: New file.
395
396         * modules/unistr/u8-check: New file.
397         * modules/unistr/u16-check: New file.
398         * modules/unistr/u32-check: New file.
399         * lib/unistr/u8-check.c: New file.
400         * lib/unistr/u16-check.c: New file.
401         * lib/unistr/u32-check.c: New file.
402
403         * modules/unistr/u8-chr: New file.
404         * modules/unistr/u16-chr: New file.
405         * modules/unistr/u32-chr: New file.
406         * lib/unistr/u8-chr.c: New file.
407         * lib/unistr/u16-chr.c: New file.
408         * lib/unistr/u32-chr.c: New file.
409
410         * modules/unistr/u8-cmp: New file.
411         * modules/unistr/u16-cmp: New file.
412         * modules/unistr/u32-cmp: New file.
413         * lib/unistr/u8-cmp.c: New file.
414         * lib/unistr/u16-cmp.c: New file.
415         * lib/unistr/u32-cmp.c: New file.
416
417         * modules/unistr/u8-cpy: New file.
418         * modules/unistr/u16-cpy: New file.
419         * modules/unistr/u32-cpy: New file.
420         * lib/unistr/u8-cpy.c: New file.
421         * lib/unistr/u16-cpy.c: New file.
422         * lib/unistr/u32-cpy.c: New file.
423         * lib/unistr/u-cpy.h: New file.
424
425         * modules/unistr/u8-cpy-alloc: New file.
426         * modules/unistr/u16-cpy-alloc: New file.
427         * modules/unistr/u32-cpy-alloc: New file.
428         * lib/unistr/u8-cpy-alloc.c: New file.
429         * lib/unistr/u16-cpy-alloc.c: New file.
430         * lib/unistr/u32-cpy-alloc.c: New file.
431         * lib/unistr/u-cpy-alloc.h: New file.
432
433         * modules/unistr/u8-endswith: New file.
434         * modules/unistr/u16-endswith: New file.
435         * modules/unistr/u32-endswith: New file.
436         * lib/unistr/u8-endswith.c: New file.
437         * lib/unistr/u16-endswith.c: New file.
438         * lib/unistr/u32-endswith.c: New file.
439         * lib/unistr/u-endswith.h: New file.
440
441         * modules/unistr/u8-mblen: New file.
442         * modules/unistr/u16-mblen: New file.
443         * modules/unistr/u32-mblen: New file.
444         * lib/unistr/u8-mblen.c: New file.
445         * lib/unistr/u16-mblen.c: New file.
446         * lib/unistr/u32-mblen.c: New file.
447
448         * modules/unistr/u8-mbtouc: New file.
449         * modules/unistr/u16-mbtouc: New file.
450         * modules/unistr/u32-mbtouc: New file.
451         * lib/unistr/u8-mbtouc.c: New file.
452         * lib/unistr/u16-mbtouc.c: New file.
453         * lib/unistr/u32-mbtouc.c: New file.
454
455         * modules/unistr/u8-mbtouc-safe: New file.
456         * modules/unistr/u16-mbtouc-safe: New file.
457         * modules/unistr/u32-mbtouc-safe: New file.
458         * lib/unistr/u8-mbtouc-safe.c: New file.
459         * lib/unistr/u16-mbtouc-safe.c: New file.
460         * lib/unistr/u32-mbtouc-safe.c: New file.
461
462         * modules/unistr/u8-move: New file.
463         * modules/unistr/u16-move: New file.
464         * modules/unistr/u32-move: New file.
465         * lib/unistr/u8-move.c: New file.
466         * lib/unistr/u16-move.c: New file.
467         * lib/unistr/u32-move.c: New file.
468         * lib/unistr/u-move.h: New file.
469
470         * modules/unistr/u8-next: New file.
471         * modules/unistr/u16-next: New file.
472         * modules/unistr/u32-next: New file.
473         * lib/unistr/u8-next.c: New file.
474         * lib/unistr/u16-next.c: New file.
475         * lib/unistr/u32-next.c: New file.
476
477         * modules/unistr/u8-prev: New file.
478         * modules/unistr/u16-prev: New file.
479         * modules/unistr/u32-prev: New file.
480         * lib/unistr/u8-prev.c: New file.
481         * lib/unistr/u16-prev.c: New file.
482         * lib/unistr/u32-prev.c: New file.
483
484         * modules/unistr/u8-set: New file.
485         * modules/unistr/u16-set: New file.
486         * modules/unistr/u32-set: New file.
487         * lib/unistr/u8-set.c: New file.
488         * lib/unistr/u16-set.c: New file.
489         * lib/unistr/u32-set.c: New file.
490         * lib/unistr/u-set.h: New file.
491
492         * modules/unistr/u8-startswith: New file.
493         * modules/unistr/u16-startswith: New file.
494         * modules/unistr/u32-startswith: New file.
495         * lib/unistr/u8-startswith.c: New file.
496         * lib/unistr/u16-startswith.c: New file.
497         * lib/unistr/u32-startswith.c: New file.
498         * lib/unistr/u-startswith.h: New file.
499
500         * modules/unistr/u8-stpcpy: New file.
501         * modules/unistr/u16-stpcpy: New file.
502         * modules/unistr/u32-stpcpy: New file.
503         * lib/unistr/u8-stpcpy.c: New file.
504         * lib/unistr/u16-stpcpy.c: New file.
505         * lib/unistr/u32-stpcpy.c: New file.
506         * lib/unistr/u-stpcpy.h: New file.
507
508         * modules/unistr/u8-stpncpy: New file.
509         * modules/unistr/u16-stpncpy: New file.
510         * modules/unistr/u32-stpncpy: New file.
511         * lib/unistr/u8-stpncpy.c: New file.
512         * lib/unistr/u16-stpncpy.c: New file.
513         * lib/unistr/u32-stpncpy.c: New file.
514         * lib/unistr/u-stpncpy.h: New file.
515
516         * modules/unistr/u8-strcat: New file.
517         * modules/unistr/u16-strcat: New file.
518         * modules/unistr/u32-strcat: New file.
519         * lib/unistr/u8-strcat.c: New file.
520         * lib/unistr/u16-strcat.c: New file.
521         * lib/unistr/u32-strcat.c: New file.
522         * lib/unistr/u-strcat.h: New file.
523
524         * modules/unistr/u8-strchr: New file.
525         * modules/unistr/u16-strchr: New file.
526         * modules/unistr/u32-strchr: New file.
527         * lib/unistr/u8-strchr.c: New file.
528         * lib/unistr/u16-strchr.c: New file.
529         * lib/unistr/u32-strchr.c: New file.
530
531         * modules/unistr/u8-strcmp: New file.
532         * modules/unistr/u16-strcmp: New file.
533         * modules/unistr/u32-strcmp: New file.
534         * lib/unistr/u8-strcmp.c: New file.
535         * lib/unistr/u16-strcmp.c: New file.
536         * lib/unistr/u32-strcmp.c: New file.
537
538         * modules/unistr/u8-strcpy: New file.
539         * modules/unistr/u16-strcpy: New file.
540         * modules/unistr/u32-strcpy: New file.
541         * lib/unistr/u8-strcpy.c: New file.
542         * lib/unistr/u16-strcpy.c: New file.
543         * lib/unistr/u32-strcpy.c: New file.
544         * lib/unistr/u-strcpy.h: New file.
545
546         * modules/unistr/u8-strcspn: New file.
547         * modules/unistr/u16-strcspn: New file.
548         * modules/unistr/u32-strcspn: New file.
549         * lib/unistr/u8-strcspn.c: New file.
550         * lib/unistr/u16-strcspn.c: New file.
551         * lib/unistr/u32-strcspn.c: New file.
552         * lib/unistr/u-strcspn.h: New file.
553
554         * modules/unistr/u8-strdup: New file.
555         * modules/unistr/u16-strdup: New file.
556         * modules/unistr/u32-strdup: New file.
557         * lib/unistr/u8-strdup.c: New file.
558         * lib/unistr/u16-strdup.c: New file.
559         * lib/unistr/u32-strdup.c: New file.
560         * lib/unistr/u-strdup.h: New file.
561
562         * modules/unistr/u8-strlen: New file.
563         * modules/unistr/u16-strlen: New file.
564         * modules/unistr/u32-strlen: New file.
565         * lib/unistr/u8-strlen.c: New file.
566         * lib/unistr/u16-strlen.c: New file.
567         * lib/unistr/u32-strlen.c: New file.
568         * lib/unistr/u-strlen.h: New file.
569
570         * modules/unistr/u8-strmblen: New file.
571         * modules/unistr/u16-strmblen: New file.
572         * modules/unistr/u32-strmblen: New file.
573         * lib/unistr/u8-strmblen.c: New file.
574         * lib/unistr/u16-strmblen.c: New file.
575         * lib/unistr/u32-strmblen.c: New file.
576
577         * modules/unistr/u8-strmbtouc: New file.
578         * modules/unistr/u16-strmbtouc: New file.
579         * modules/unistr/u32-strmbtouc: New file.
580         * lib/unistr/u8-strmbtouc.c: New file.
581         * lib/unistr/u16-strmbtouc.c: New file.
582         * lib/unistr/u32-strmbtouc.c: New file.
583
584         * modules/unistr/u8-strncat: New file.
585         * modules/unistr/u16-strncat: New file.
586         * modules/unistr/u32-strncat: New file.
587         * lib/unistr/u8-strncat.c: New file.
588         * lib/unistr/u16-strncat.c: New file.
589         * lib/unistr/u32-strncat.c: New file.
590         * lib/unistr/u-strncat.h: New file.
591
592         * modules/unistr/u8-strncmp: New file.
593         * modules/unistr/u16-strncmp: New file.
594         * modules/unistr/u32-strncmp: New file.
595         * lib/unistr/u8-strncmp.c: New file.
596         * lib/unistr/u16-strncmp.c: New file.
597         * lib/unistr/u32-strncmp.c: New file.
598
599         * modules/unistr/u8-strncpy: New file.
600         * modules/unistr/u16-strncpy: New file.
601         * modules/unistr/u32-strncpy: New file.
602         * lib/unistr/u8-strncpy.c: New file.
603         * lib/unistr/u16-strncpy.c: New file.
604         * lib/unistr/u32-strncpy.c: New file.
605         * lib/unistr/u-strncpy.h: New file.
606
607         * modules/unistr/u8-strnlen: New file.
608         * modules/unistr/u16-strnlen: New file.
609         * modules/unistr/u32-strnlen: New file.
610         * lib/unistr/u8-strnlen.c: New file.
611         * lib/unistr/u16-strnlen.c: New file.
612         * lib/unistr/u32-strnlen.c: New file.
613         * lib/unistr/u-strnlen.h: New file.
614
615         * modules/unistr/u8-strpbrk: New file.
616         * modules/unistr/u16-strpbrk: New file.
617         * modules/unistr/u32-strpbrk: New file.
618         * lib/unistr/u8-strpbrk.c: New file.
619         * lib/unistr/u16-strpbrk.c: New file.
620         * lib/unistr/u32-strpbrk.c: New file.
621         * lib/unistr/u-strpbrk.h: New file.
622
623         * modules/unistr/u8-strrchr: New file.
624         * modules/unistr/u16-strrchr: New file.
625         * modules/unistr/u32-strrchr: New file.
626         * lib/unistr/u8-strrchr.c: New file.
627         * lib/unistr/u16-strrchr.c: New file.
628         * lib/unistr/u32-strrchr.c: New file.
629
630         * modules/unistr/u8-strspn: New file.
631         * modules/unistr/u16-strspn: New file.
632         * modules/unistr/u32-strspn: New file.
633         * lib/unistr/u8-strspn.c: New file.
634         * lib/unistr/u16-strspn.c: New file.
635         * lib/unistr/u32-strspn.c: New file.
636         * lib/unistr/u-strspn.h: New file.
637
638         * modules/unistr/u8-strstr: New file.
639         * modules/unistr/u16-strstr: New file.
640         * modules/unistr/u32-strstr: New file.
641         * lib/unistr/u8-strstr.c: New file.
642         * lib/unistr/u16-strstr.c: New file.
643         * lib/unistr/u32-strstr.c: New file.
644         * lib/unistr/u-strstr.h: New file.
645
646         * modules/unistr/u8-strtok: New file.
647         * modules/unistr/u16-strtok: New file.
648         * modules/unistr/u32-strtok: New file.
649         * lib/unistr/u8-strtok.c: New file.
650         * lib/unistr/u16-strtok.c: New file.
651         * lib/unistr/u32-strtok.c: New file.
652         * lib/unistr/u-strtok.h: New file.
653
654         * modules/unistr/u8-uctomb: New file.
655         * modules/unistr/u16-uctomb: New file.
656         * modules/unistr/u32-uctomb: New file.
657         * lib/unistr/u8-uctomb.c: New file.
658         * lib/unistr/u16-uctomb.c: New file.
659         * lib/unistr/u32-uctomb.c: New file.
660
661         * MODULES.html.sh (Unicode string functions): Add the new modules.
662
663 2007-01-08  Bruno Haible  <bruno@clisp.org>
664
665         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
666         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
667         subdirectories.
668
669 2007-01-08  Karl Berry  <karl@gnu.org>
670
671         * doc/error.texi: mention that main() fns must set program_name
672         when progname is used.
673
674 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
675
676         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
677         WCTYPE_H is empty, for the benefit of builds from non-distclean
678         directories.  Problem reported by Eric Blake in
679         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
680
681 2007-01-08  Bruno Haible  <bruno@clisp.org>
682
683         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
684         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
685         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
686         PROVIDE_CANONICALIZE_FILENAME_MODE.
687         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
688
689 2007-01-08  Bruno Haible  <bruno@clisp.org>
690
691         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
692         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
693         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
694         * lib/fts.c: Likewise.
695         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
696
697 2006-12-25  Bruno Haible  <bruno@clisp.org>
698
699         * modules/utf8-ucs4-safe: New file.
700         * lib/utf8-ucs4-safe.h: New file.
701         * lib/unistr/utf8-ucs4-safe.c: New file.
702
703         * modules/utf16-ucs4-safe: New file.
704         * lib/utf16-ucs4-safe.h: New file.
705         * lib/unistr/utf16-ucs4-safe.c: New file.
706
707         * MODULES.html.sh (Unicode string functions): Add the new modules.
708
709 2007-01-08  Bruno Haible  <bruno@clisp.org>
710
711         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
712         (Depends-on): Add unitypes.
713         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
714         (u8_mbtouc_aux): Move out to separate file.
715         (u8_mbtouc): Use ucs4_t, uint8_t types.
716         * lib/unistr/utf8-ucs4.c: New file.
717
718         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
719         (Depends-on): Add unitypes.
720         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
721         (u16_mbtouc_aux): Move out to separate file.
722         (u16_mbtouc): Use ucs4_t, uint16_t types.
723         * lib/unistr/utf16-ucs4.c: New file.
724
725         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
726         (Depends-on): Add unitypes.
727         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
728         (u8_uctomb_aux): Move out to separate file.
729         (u8_uctomb): Use ucs4_t, uint8_t types.
730         * lib/unistr/ucs4-utf8.c: New file.
731
732         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
733         (Depends-on): Add unitypes.
734         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
735         (u16_uctomb_aux): Move out to separate file.
736         (u16_uctomb): Use ucs4_t, uint16_t types.
737         * lib/unistr/ucs4-utf16.c: New file.
738
739 2006-12-25  Bruno Haible  <bruno@clisp.org>
740
741         * modules/unitypes: New file.
742         * lib/unitypes.h: New file.
743         * MODULES.html.sh (func_all_modules): New section "Unicode string
744         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
745         this section. Add unitypes.
746
747 2007-01-08  Bruno Haible  <bruno@clisp.org>
748
749         Avoid variable names that conflict with those from libtool.
750         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
751         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
752         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
753         library_names_spec to acl_library_names_spec, hardcode_* to
754         acl_hardcode_*.
755         Reported by Ralf Wildenhues.
756
757 2007-01-08  Bruno Haible  <bruno@clisp.org>
758
759         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
760         definition.
761         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
762         definition.
763         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
764         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
765         definition.
766         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
767         definition.
768         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
769         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
770         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
771         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
772         definition.
773         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
774         definition.
775         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
776         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
777         GC_USE_<algorithm>.
778         * lib/gc-libgcrypt.c: Likewise.
779         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
780         * modules/gc-arctwo (configure.ac): Likewise.
781         * modules/gc-des (configure.ac): Likewise.
782         * modules/gc-hmac-md5 (configure.ac): Likewise.
783         * modules/gc-hmac-sha1 (configure.ac): Likewise.
784         * modules/gc-md2 (configure.ac): Likewise.
785         * modules/gc-md4 (configure.ac): Likewise.
786         * modules/gc-md5 (configure.ac): Likewise.
787         * modules/gc-random (configure.ac): Likewise.
788         * modules/gc-rijndael (configure.ac): Likewise.
789         * modules/gc-sha1 (configure.ac): Likewise.
790
791 2007-01-08  Bruno Haible  <bruno@clisp.org>
792
793         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
794         macro definition.
795         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
796         definition.
797         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
798         definition.
799         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
800         * modules/fcntl-safer (configure.ac): Likewise.
801         * modules/fopen-safer (configure.ac): Likewise.
802         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
803         GNULIB_FWRITEERROR macro definition.
804
805 2007-01-08  Bruno Haible  <bruno@clisp.org>
806
807         * m4/gnulib-common.m4: New file.
808         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
809         (func_get_filelist): Add m4/gnulib-common.m4.
810
811 2007-01-08  Bruno Haible  <bruno@clisp.org>
812
813         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
814         command.
815
816 2007-01-08  Jim Meyering  <jim@meyering.net>
817
818         Use a more robust test for a "can't happen" condition.
819         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
820         narrowed the st_size value.  Presuming the "can't happen" condition
821         is true, that narrowing could conceivably convert an invalid st_size
822         value into a valid one.  Instead, use a change based on Matthew
823         Woehlke's original patch.
824
825         Slight readability improvement: use an assert-like macro
826         in place of literal "abort ()" uses.
827         * lib/fts.c (fts_assert): Define.
828         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
829         Use this macro instead of a bare 'abort'.
830
831 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
832
833         Don't worry about using IRIX 5.3's wctype.h broken definitions;
834         simply work around them.
835         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
836         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
837         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
838         Don't bother to define as macros, since the standard doesn't require it.
839         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
840         longer worry about IRIX 5.3.
841         (HAVE_WCTYPE_CTMP_BUG): Remove.
842
843 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
844
845         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
846         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
847         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
848         Problems reported by Georg Schwarz for IRIX 5.3.
849
850         * gnulib-tool (autoconf_minversion): Take the maximum version number
851         found, not the minimum.  Problem reported by James Youngman.
852
853 2007-01-03  Karl Berry  <karl@gnu.org>
854
855         * doc/error.texi: new file, explaining interaction with progname.
856         * doc/gnulib.texi: include it.  Update copyright.
857
858 2007-01-03  Simon Josefsson  <simon@josefsson.org>
859
860         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
861         AC_CANONICAL_HOST, to improve autobuild outputs.
862
863 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
864             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
865
866         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
867         sockets, server sockets, and other file descriptors.  Count errors
868         to compute the return value.  Reorder the code a bit to be easier
869         to follow.  Don't set event bits that were not requested (except
870         POLLERR and POLLHUP).
871
872 2007-01-01  Bruno Haible  <bruno@clisp.org>
873
874         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
875
876 2007-01-03  Jim Meyering  <jim@meyering.net>
877
878         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
879
880 2007-01-02  Bruno Haible  <bruno@clisp.org>
881
882         * modules/settime (Include): Require timespec.h.
883         * modules/nanosleep (Include): Likewise.
884
885 2007-01-01  Bruno Haible  <bruno@clisp.org>
886
887         * gnulib-tool (func_emit_copyright_notice): Bump year.
888         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
889
890 2007-01-01  Bruno Haible  <bruno@clisp.org>
891
892         Improve support for OpenBSD.
893         * build-aux/config.rpath (libname_spec): Export.
894         (library_names_spec): New variable. Export.
895         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
896         library_names_spec from the config.rpath output. Locate shared library
897         through the name pattern in library_names_spec.
898
899 2007-01-01  Eric Blake  <ebb9@byu.net>
900
901         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
902
903 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
904
905         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
906         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
907         assume the C locale, and avoid an "eval" that could cause trouble.
908         Problem with SORT reported by Bob Proulx.
909
910         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
911         Define.  Trivial patch from Henning Nielsen Lund, originally
912         sent to bug-grep@gnu.org today.
913
914 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
915
916         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
917         struct stat.  Problem reported by Henning Nielsen Lund.
918         * lib/acl.c: Include acl.h first, to check interface.  Don't
919         bother to include sys/types.h and sys/stat.h again.
920
921 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
922
923         Import the following change from libc; problem reported by
924         Sven Verdoolaege.
925
926         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
927
928         [BZ #1373]
929         * lib/argp.h: Remove __NTH for __argp_usage inline function.
930
931 2006-12-28  Jim Meyering  <jim@meyering.net>
932
933         * build-aux/announce-gen: Do not assume that the package
934         builds any of tar.gz, tar.bz2, and .xdelta files.
935         Suggestion from Simon Josefsson.
936
937 2006-12-28  Simon Josefsson  <simon@josefsson.org>
938
939         * modules/announce-gen: New file.
940
941 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
942
943         * lib/mbchar.h: Just include <wctype.h>; the wctype module
944         handles its gotchas now.
945         * lib/mbswidth.c: Likewise.
946         * lib/wcwidth.h: Likewise.
947         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
948         and iswcntrl; the wctype module does this stuff now.
949         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
950         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
951         * modules/mbchar (Depends-on): Add wctype.
952         * modules/mbswidth (Depends-on): Likewise.
953         * modules/wcwidth (Depends-on): Likewise.
954
955 2006-12-27  Eric Blake  <ebb9@byu.net>
956
957         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
958         module uses more than what <wctype.h> is required to provide.
959
960 2006-12-26  Eric Blake  <ebb9@byu.net>
961
962         * gnulib-tool (sed_extract_prog): Avoid space-tab.
963
964 2006-12-26  Eric Blake  <ebb9@byu.net>
965
966         * modules/absolute-header: New module.
967         * modules/fcntl (Depends-on): Depend on it.
968         * modules/inttypes (Depends-on): Likewise.
969         * modules/stdint (Depends-on): Likewise.
970         * modules/sys_stat (Depends-on): Likewise.
971         * modules/wctype (Depends-on): Likewise.
972         * MODULES.html.sh (Support for building libraries and
973         executables): Document it.
974
975 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
976
977         * gnulib-tool (SED): Remove, undoing previous change.
978         The problem was that it broke coreutils on Solaris, because
979         "sed --posix" leaked into a makefile.
980         (sed): New alias, if 'alias' and GNU sed.
981
982 2006-12-24  Jim Meyering  <jim@meyering.net>
983
984         Work around an fchownat bug in glibc-2.4:
985         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
986         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
987         in spite of the -P option.
988         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
989         New macros.
990         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
991         * modules/openat (Files): Add lib/fchownat.c.
992         * lib/openat.c (fchownat): Don't define here.  Move to...
993         * lib/fchownat.c: ...this new file.
994
995 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
996
997         Fix bug reported by Bruno Haible in
998         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
999         where quotearg.c didn't compile on Mac OS X 10.2 because it
1000         lacks <wchar.h> and wint_t.
1001         * lib/wctype_.h (__wctype_wint_t): New type.
1002         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
1003         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
1004         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
1005         Arg is now of type __wctype_wint_t, not wint_t.
1006         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
1007         substitute HAVE_WINT_T.
1008         * modules/wctype (Files): Add m4/wint_t.m4.
1009         (wctype.h): Substitute HAVE_WINT_T.
1010
1011 2006-12-23  Bruno Haible  <bruno@clisp.org>
1012
1013         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
1014
1015 2006-12-23  Bruno Haible  <bruno@clisp.org>
1016
1017         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
1018         S_ISLNK.
1019         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
1020         mingw.
1021
1022 2006-12-22  Bruno Haible  <bruno@clisp.org>
1023
1024         * lib/copy-file.c: Include acl.h.
1025         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
1026         Close the file descriptors only after being done with copy_acl.
1027         * modules/copy-file (Depends-on): Add acl.
1028
1029 2006-12-22  Bruno Haible  <bruno@clisp.org>
1030
1031         * gnulib-tool (SED): New variable.
1032         Use $SED instead of sed everywhere.
1033
1034 2006-12-22  Bruno Haible  <bruno@clisp.org>
1035
1036         * modules/no-c++: New file.
1037         * m4/no-c++.m4: New file.
1038         * MODULES.html.sh (Support for building libraries and executables):
1039         Add no-c++.
1040
1041 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
1042
1043         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1044         Include <limits.h>, and use its INT_MAX to rewrite the
1045         j loop so that it does not overflow 'int'.  Problem reported by
1046         Ralf Wildenhues in
1047         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
1048         Play it safe by shifting left by 1 rather than multiplying by 2,
1049         as GCC is less likely to optimize this away when the value
1050         is signed (when it assumes overflow leads to undefined behavior).
1051         Also, don't assume time_t uses two's complement.
1052
1053 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1054
1055         * MODULES.html.sh: New module wctype.
1056         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
1057         * lib/fnmatch.c: Don't bother to include <wchar.h> before
1058         <wctype.h>, since the new wctype module should fix this.
1059         * lib/quotearg.c: Include <wctype.h> unconditionally, since
1060         the wctype module should arrange for it.
1061         * lib/regex_internal.h: Likewise.
1062         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
1063         since the wctype module should handle this now.
1064         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
1065         * modules/fnmatch (Depends-on): Add wctype.
1066         * modules/quotearg (Depends-on): Likewise.
1067         * modules/regex (Depends-on): Likewise.
1068
1069 2006-12-19  Bruno Haible  <bruno@clisp.org>
1070
1071         * lib/strdup.h [C++]: Wrap definitions in extern "C".
1072         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
1073
1074 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1075
1076         * modules/savewd (Depends-on): Fix dependency on fcntl.
1077
1078 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1079
1080         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
1081         conforms to C99, rather than relying on the user's environment
1082         setting of STDINT_H.
1083
1084 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1085         and Eric Blake  <ebb9@byu.net>
1086
1087         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
1088         This is more consistent with the other defines here.
1089         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
1090         Port to z/OS.  Problem reported by Paul Gilmartin.
1091         Change local vars to use gl_ prefix rather than ac_.
1092         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
1093         with other defines.
1094         * modules/double-slash-root: New module.
1095         * modules/dirname (Files): Remove m4/double-slash-root.m4.
1096         (Depends-on): Add double-slash-root.
1097         * MODULES.html.sh (File system functions): Mention new module.
1098
1099 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1100
1101         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
1102         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
1103         This is for the benefit of gzip, which doesn't do i18n.
1104
1105 2006-12-12  Jim Meyering  <jim@meyering.net>
1106
1107         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
1108         Reported by Andreas Schwab <schwab@suse.de>.
1109
1110 2006-12-12  Bruno Haible  <bruno@clisp.org>
1111
1112         Merge these changes.
1113         2006-09-05  Bruno Haible  <bruno@clisp.org>
1114         * lib/iconvme.c (iconv_string): No need to save and restore errno when
1115         iconv_alloc succeeded.
1116         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
1117         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
1118         test for " && dest " at the end - dest is always != NULL there. Call
1119         iconv with 4xNULL arguments initially, to reset the state. Call iconv
1120         with 2xNULL arguments, also to flush the state storage. Handle the
1121         IRIX iconv behaviour. Realloc the final result, to throw away unused
1122         memory.
1123
1124 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1125
1126         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
1127         and fchmodat unconditionally, since glibc 2.4 has them.
1128         Problem reported by Arkadiusz Miskiewicz.
1129
1130 2006-12-10  Bruno Haible  <bruno@clisp.org>
1131
1132         * gnulib-tool (func_import): Show the include files only for those
1133         modules that are copied and specified.
1134         Reported by Karl Berry.
1135
1136 2006-12-08  Jim Meyering  <jim@meyering.net>
1137
1138         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
1139         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
1140
1141         * build-aux/announce-gen: Add two new options, both optional:
1142         --bootstrap-tools=TOOL_LIST
1143               a comma-separated list of tools, e.g.,
1144               autoconf,automake,bison,gnulib
1145         --gnulib-snapshot-date=DATE
1146               if gnulib is in the bootstrap tool list,
1147               then report this as the snapshot date.
1148               If not specified, use the current date/time.
1149               If you specify a date here, be sure it's UTC.
1150
1151 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1152
1153         * tests/test-argp-2.sh: Fix test to match actual output.
1154         (func_compare): Fix sed script to be portable.
1155
1156 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
1157
1158         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
1159         workaround for this case.  It is not autoconfigured now; offhand
1160         it's hard to see how to autoconfigure it.
1161
1162 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1163
1164         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
1165         a directory that is about to be chowned.  Such a directory's
1166         initial file permissions should permit the owner only and this
1167         should not be changed until after the chown, since the group and
1168         other bits would be incorrect if they granted permission before
1169         the chown.
1170
1171         Fix porting problem for iswctype reported by Georg Schwarz in:
1172         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
1173         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
1174         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
1175         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
1176         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1177
1178 2006-12-03  Jim Meyering  <jim@meyering.net>
1179
1180         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
1181         p->fts_statp may not yet be defined.
1182         (fts_read): Instead, set it in the caller, once p->fts_statp is
1183         sure to be defined, and corresponds to a top-level directory.
1184         This bug made du -x fail.  Here's the coreutils test case:
1185         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
1186         Reported by Mike Frysinger.
1187
1188 2006-12-01  Jim Meyering  <jim@meyering.net>
1189
1190         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
1191         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
1192         Reported by Simon Josefsson.
1193
1194 2006-11-30  Jim Meyering  <jim@meyering.net>
1195
1196         * m4/warning.m4: Use the all-permissive copyright notice
1197         recommended by RMS (rather than LGPL).
1198         * m4/vararrays.m4: Likewise.
1199         * m4/flexmember.m4: Likewise.
1200
1201 2006-11-29  Bruno Haible  <bruno@clisp.org>
1202
1203         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1204         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
1205         using +=.
1206         Reported by Simon Josefsson <simon@josefsson.org>.
1207
1208 2006-11-28  James Youngman <jay@gnu.org>
1209
1210         * README: Advise users that they might find the bug-gnulib@gnu.org
1211         and autotools-announce@gnu.org mailing lists useful.
1212
1213 2006-11-28  Bruno Haible  <bruno@clisp.org>
1214
1215         * m4/ptrdiff_max.m4: Remove file.
1216
1217 2006-11-21  Bruno Haible  <bruno@clisp.org>
1218
1219         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
1220         _AC_COMPUTE_INT.
1221         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1222         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
1223         _AC_COMPUTE_INT.
1224         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1225         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
1226         _AC_COMPUTE_INT.
1227         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1228
1229 2006-11-28  Jim Meyering  <jim@meyering.net>
1230
1231         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
1232         warning from "gcc -Wshadow" about shadowing the builtin.
1233
1234 2006-11-27  Bruno Haible  <bruno@clisp.org>
1235
1236         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
1237         _AC_COMPUTE_INT.
1238         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1239
1240 2006-11-27  Bruno Haible  <bruno@clisp.org>
1241             Paul Eggert  <eggert@cs.ucla.edu>
1242
1243         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
1244
1245 2006-11-26  Bruno Haible  <bruno@clisp.org>
1246
1247         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1248         noinst_LTLIBRARIES.
1249
1250 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
1251             Bruno Haible  <bruno@clisp.org>
1252
1253         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
1254         if compiling with "gcc -ansi".
1255
1256 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1257
1258         Fix some incompatibilities with gcc -ansi -pedantic.
1259         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
1260         if compiling pedantically with GCC, unless it's C99 or later.
1261         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
1262         it mishandles gcc -ansi -pedantic as well.
1263         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
1264         if gcc -pedantic.
1265         * lib/regexec.c (check_node_accept_bytes): Don't use auto
1266         initializers for struct if -pedantic, unless it's C99 or later.
1267
1268 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
1269
1270         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
1271         Don't close an fd more than once. Identical atimes indicate
1272         success, not failure.
1273
1274 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
1275
1276         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
1277
1278 2006-11-23  Jim Meyering  <jim@meyering.net>
1279
1280         * build-aux/announce-gen: New file.  From coreutils.
1281
1282 2006-11-22  Jim Meyering  <jim@meyering.net>
1283
1284         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
1285         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
1286         (fts_read): Use a temporary to narrow the overused st_size member
1287         before using it in a switch statement.  Reported by Matthew Woehlke.
1288
1289         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
1290         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
1291
1292 2006-11-20  Bruno Haible  <bruno@clisp.org>
1293
1294         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
1295         changequote instead of pairs of brackets.
1296         Reported by Andreas Schwab <schwab@suse.de>.
1297
1298 2006-11-21  Jim Meyering  <jim@meyering.net>
1299
1300         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
1301         so as to remain compatible with older compilers.
1302         Patch from Michael Deutschmann.
1303
1304 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1305
1306         * MODULES.html.sh (File system functions): Add openat.
1307
1308         * lib/openat.h (rpl_fstatat): New macro, if
1309         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
1310         (fstatat): Define to rpl_fstatat under the same conditions,
1311         unless COMPILING_FSTATAT.
1312         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
1313         seems to have the bug.
1314         * lib/fstatat.c: New file.
1315         * modules/openat (Files): Add it.
1316
1317 2006-11-20  Bruno Haible  <bruno@clisp.org>
1318
1319         * Makefile: New file.
1320
1321 2006-11-20  Jim Meyering  <jim@meyering.net>
1322
1323         The beginnings of syntax-related checks for gnulib.
1324         * lib/Makefile: New file.
1325         * lib/t-idcache: New script.  Ensure that the two halves of
1326         idcache.c stay in sync.
1327
1328         * lib/idcache.c: Adjust comments in user- and group- portions to
1329         be more accurate, and to be consistent with one another.
1330
1331 2006-11-20  Jim Meyering  <jim@meyering.net>
1332
1333         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
1334         continue using the flexible array member (thus, this module performs
1335         half as many malloc calls), with the addition that...
1336         (getgroup, getuser): Consistently record a non-match via an empty
1337         "name" string, and map an empty string match to a NULL return value.
1338         * modules/idcache (Depends-on): Re-add flexmember.
1339
1340         * lib/idcache.c (getuser): Remove all uses of the register keyword.
1341         (getuidbyname, getgroup, getgidbyname): Likewise.
1342
1343         Use cleaner syntax: NULL rather than 0.
1344         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
1345
1346 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1347
1348         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
1349         It mishandled the case where the group was missing.
1350         Problem reported by Greg Schafer.
1351         * modules/idcache: Likewise.
1352
1353 2006-11-18  Jim Meyering  <jim@meyering.net>
1354
1355         * check-module (%exempt_header): Add exception for some
1356         conditionally-included headers.
1357
1358         * modules/i-ring (Depends-on): Add verify.
1359         (License): Change to LGPL.
1360
1361 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1362
1363         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
1364         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
1365         and inttostr.h.  Use snprintf rather than uinttostr, so that
1366         LGPLed code doesn't depend on GPLed.
1367
1368 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
1369
1370         * modules/inline (License): Change from GPL to LGPL.
1371
1372 2006-11-17  Jim Meyering  <jim@meyering.net>
1373
1374         * modules/d-type (License): Switch to LGPL.
1375
1376 2006-11-15  Bruno Haible  <bruno@clisp.org>
1377
1378         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
1379
1380 2006-11-15  Eric Blake  <ebb9@byu.net>
1381
1382         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
1383         the module dependency.
1384
1385 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1386             Bruno Haible  <bruno@clisp.org>
1387
1388         * gnulib-tool (func_create_testdir): Add license consistency check.
1389
1390 2006-11-15  Eric Blake  <ebb9@byu.net>
1391
1392         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
1393         random "(cached)" in configure output.
1394
1395 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1396
1397         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
1398         test for conforming inttypes.h is both announced and cached.
1399
1400         * MODULES.html.sh (seen_modules, seen_files): New variables.
1401         (func_module): Rewrite to use a few less gnulib-tool and sed
1402         invocations.  Avoid a couple of quadratic algorithms for ...
1403         (missed_modules, missed_files): ... these, with ...
1404         (func_append, func_tmpdir): ... these new functions, from
1405         gnulib-tool.  Analogously, install traps for cleanup.
1406
1407         * tests/test-gc.c (main): Remove unused variables.
1408         * tests/test-read-file.c: Include stdlib.h, for 'free'.
1409
1410 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
1411
1412         * modules/inttostr (License): Change to LGPL.
1413
1414 2006-11-14  Eric Blake  <ebb9@byu.net>
1415
1416         * modules/tempname (License): Change to LGPL.
1417
1418 2006-11-14  Eric Blake  <ebb9@byu.net>
1419
1420         * doc/functions.texi (Function Portability): *printf functions on
1421         Cygwin now understand all POSIX size specifiers.
1422
1423 2006-11-14  Bruno Haible  <bruno@clisp.org>
1424
1425         * modules/c-ctype (License): Change to LGPL.
1426
1427 2006-11-12  Bruno Haible  <bruno@clisp.org>
1428
1429         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
1430         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
1431         for GNOME libraries, for which the include files are installed in
1432         subdirectories of $prefix/include.
1433
1434 2006-11-12  Bruno Haible  <bruno@clisp.org>
1435
1436         * m4/lib-link.m4: Require at least autoconf-2.54.
1437         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
1438         name to underscores for the --with option.
1439
1440 2006-11-13  Bruno Haible  <bruno@clisp.org>
1441
1442         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
1443         the tests directory.
1444         Reported by Ralf Wildenhues.
1445
1446 2006-11-13  Bruno Haible  <bruno@clisp.org>
1447
1448         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
1449         (func_emit_initmacro_end): Undo the override here.
1450         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
1451         Works around the famous automake error in coreutils.
1452
1453 2006-11-13  Eric Blake  <ebb9@byu.net>
1454
1455         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
1456         element, not its node.
1457
1458 2006-11-12  Bruno Haible  <bruno@clisp.org>
1459
1460         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
1461         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
1462
1463 2006-11-12  Bruno Haible  <bruno@clisp.org>
1464
1465         * gnulib-tool: New option --local-symlink.
1466         (func_usage): Document it.
1467         (lsymbolic): New variable.
1468         (func_import, func_create_testdir): If --symlink was not specified,
1469         test whether --local-symlink was specified and the file comes from
1470         the local_gnulib_dir.
1471
1472 2006-11-12  Bruno Haible  <bruno@clisp.org>
1473
1474         * gnulib-tool (func_ln): New function.
1475         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
1476
1477 2006-11-12  Bruno Haible  <bruno@clisp.org>
1478
1479         Finish support for source files in subdirectories.
1480         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
1481         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
1482         AUTOMAKE_OPTIONS.
1483         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
1484
1485 2006-11-12  Bruno Haible  <bruno@clisp.org>
1486
1487         * gnulib-tool (func_get_automake_snippet): Synthesize also an
1488         EXTRA_lib_SOURCES augmentation.
1489         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
1490
1491 2006-11-12  Jim Meyering  <jim@meyering.net>
1492
1493         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
1494         file descriptors.  This also averts a failure on systems with
1495         native openat support when a traversed directory lacks "x" access.
1496         * lib/fts_.h: Include "i-ring.h"
1497         (struct FTS) [fts_fd_ring]: New member.
1498         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
1499         (FCHDIR): Add parentheses.
1500         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
1501         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
1502         When descending, rather than simply closing the previous
1503         fts_cwd_fd value, push that file descriptor onto the ring.
1504         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
1505         (fts_open): Initialize the new fd_ring member.
1506         (fts_close): Clear the ring.
1507         (fts_safe_changedir): When possible, use our new fd_ring to skip
1508         the diropen and fstat and dev/ino comparison that would normally
1509         accompany a virtual `chdir ("..")'.
1510
1511         * modules/fts (Depends-on): Add i-ring.
1512         * modules/i-ring: New module.
1513         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
1514         * m4/i-ring.m4: New file.
1515
1516 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1517
1518         * gnulib-tool (func_create_testdir): Fix replacement of
1519         `build-aux' in configure.ac.  Run autotools in gltests
1520         subdirectory.
1521         (func_create_testdir, func_create_megatestdir, test): There is
1522         no need for '--force' in most autotool invocations in a new
1523         tree.  Actually fail the whole test if any of the tools, or the
1524         configure or make stages fail.
1525
1526         Sync from Automake.
1527         * build-aux/gnupload: Revert last change.  Add pointer to upload
1528         instructions of the GNU Maintenance Instructions.
1529         Suggestion by Karl Berry.
1530
1531 2006-11-10  Jim Meyering  <jim@meyering.net>
1532
1533         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
1534
1535 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1536
1537         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
1538         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
1539         (bind_textdomain_codeset) [! ENABLE_NLS]:
1540         Evaluate all the arguments.  That way, callers get compatible behavior
1541         if the arguments have side effects.  Also, it avoids some GCC
1542         diagnostics in some cases; Joel E. Denny reported problems when Bison
1543         was configured with --enable-gcc-warnigs.
1544
1545 2006-11-10  Jim Meyering  <jim@meyering.net>
1546
1547         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
1548         relevant options in CFLAGS (like -O, -fno-inline) are taken into
1549         account.
1550
1551 2006-11-10  Jim Meyering  <jim@meyering.net>
1552
1553         * modules/inline: New file/module.
1554         * modules/xalloc (Files): Remove m4/inline.m4.
1555         (Depends-on): Add inline, instead.
1556         * modules/oset: Likewise.
1557         * modules/list: Likewise.
1558
1559 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1560
1561         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
1562         Problem reported by Matthew Woehlke.
1563
1564 2006-11-09  Bruno Haible  <bruno@clisp.org>
1565
1566         * lib/tempname.c (gen_tempname): Remove variant that invokes
1567         __gen_tempname.
1568         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
1569         __gen_tempname.
1570
1571 2006-11-08  Bruno Haible  <bruno@clisp.org>
1572
1573         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
1574         to 'yes' instead of 'cross-compiling'.
1575
1576 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
1577
1578         * lib/quotearg.h (quotearg_free): New decl.
1579         * lib/quotearg.c (quotearg_free): New function.
1580         (slot0, nslots, slotvec0, slotvec):
1581         Now file-scope so that quotearg_free can get at them.
1582
1583 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1584
1585         Sync from Automake.
1586         * build-aux/gnupload: Add missing 'gnu' to example URL.
1587         Report by Karl Berry.
1588
1589 2006-11-08  Bruno Haible  <bruno@clisp.org>
1590
1591         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
1592         Suggested by Paul Eggert.
1593
1594 2006-11-08  Jim Meyering  <jim@meyering.net>
1595
1596         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
1597         It's already included if !_LIBC.
1598         (fts_safe_changedir): Add a comment.
1599
1600 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1601
1602         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
1603         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
1604         Matthew Woehlke.
1605
1606         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
1607         definitions up, to avoid colliding with change below.
1608         (static_inline) [HAVE_INLINE]: New macro.
1609         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
1610         Provide extern decls when !HAVE_INLINE.  Do not define unless
1611         static_inline is defined, either by us or by xmalloc.c.  Use
1612         static_inline rather than static inline.
1613         (XCALLOC): Optimize sizeof(T) = 1 case.
1614         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
1615
1616 2006-11-07  Bruno Haible  <bruno@clisp.org>
1617
1618         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
1619         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
1620         AC_C_INLINE.
1621         * modules/xalloc (Files): Add m4/inline.m4.
1622
1623 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1624
1625         * README: Fix typo.
1626         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
1627         (Miscellanous Notes): ...from this.
1628
1629 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1630
1631         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
1632         Mention that offsetof should be used instead of sizeof.
1633         From Bruno Haible.
1634
1635 2006-11-07  Bruno Haible  <bruno@clisp.org>
1636
1637         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
1638
1639 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1640
1641         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1642         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
1643         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1644         (gl_tree_add_before, gl_tree_add_after):
1645         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
1646         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
1647         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
1648         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
1649         (gl_linked_add_after, gl_linked_add_at): Likewise.
1650         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
1651         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1652         (gl_tree_add_before, gl_tree_add_after): Likewise.
1653         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
1654         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
1655         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
1656
1657 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1658
1659         * lib/gl_oset.h: Use C comment style, not C++ comment style.
1660
1661 2006-11-06  Bruno Haible  <bruno@clisp.org>
1662
1663         * m4/inline.m4: New file.
1664         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
1665         * modules/list (Files): Add m4/inline.m4.
1666         * modules/oset (Files): Likewise.
1667
1668 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1669
1670         * lib/idcache.c: Include <stddef.h>, for offsetof.
1671         (struct userid.name): Change from char * to a flexible array member.
1672         All uses changed.
1673         * modules/idcache (Depends-on): Add flexmember.
1674
1675         * MODULES.html.sh (Core language properties): New module flexmember.
1676         * modules/flexmember, m4/flexmember.m4: New files.
1677
1678         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
1679         inline functions that are identical with the old xnmalloc_inline,
1680         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
1681         that we can avoid some unnecessary integer multiplications and
1682         divisions in the common case where the element size is known at
1683         compile time.
1684         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
1685         needed.
1686         (xnboundedmalloc): Remove.
1687         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
1688         arguments, for consistency with rest of this header.
1689         (xcharalloc): Rewrite using XNMALLOC.
1690         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
1691         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
1692         versions have been moved to lib/xalloc.h and renamed to be the
1693         non-*_inline versions.
1694         (xmalloc, xrealloc): Implement without reference to the xnmalloc
1695         and xnrealloc functions, since those functions are now inline and
1696         now call us.
1697         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
1698         renaming described above.
1699         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
1700         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
1701         captures the dependency in AC_C_INLINE.
1702
1703         New module canonicalize-lgpl, proposed by Charles Wilson in
1704         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
1705         with a few small changes afterwards.
1706         * MODULES.html.sh (File system functions): New module
1707         canonicalize-lgpl.
1708         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
1709         and canonicalize_file_name.
1710         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
1711         * modules/canonicalize-lgpl: New files.
1712
1713 2006-11-05  Bruno Haible  <bruno@clisp.org>
1714
1715         * gnulib-tool (func_import, func_create_testdir): Create directories
1716         also for files in subdirectories of lib/.
1717
1718 2006-11-05  Bruno Haible  <bruno@clisp.org>
1719
1720         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
1721         ANSI C compliant.
1722
1723 2006-11-03  Bruno Haible  <bruno@clisp.org>
1724
1725         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1726         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
1727         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
1728         (xnboundedmalloc): New inline function.
1729         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
1730         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
1731         xmalloc.
1732         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
1733         xmalloc.
1734         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
1735         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
1736         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
1737         xmalloc.
1738         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1739         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
1740         xmalloc.
1741         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
1742         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1743         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
1744         xmalloc.
1745         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1746         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
1747         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1748         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
1749         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
1750         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
1751         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
1752
1753 2006-11-03  Bruno Haible  <bruno@clisp.org>
1754
1755         * lib/c-ctype.h [C++]: Define functions without name mangling.
1756         * lib/fwriteerror.h [C++]: Likewise.
1757         * lib/gcd.h [C++]: Likewise.
1758         * lib/linebreak.h [C++]: Likewise.
1759
1760 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
1761
1762         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
1763         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
1764         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
1765         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
1766         Check for functions and headers just once.
1767         Check for declaration of canonicalize_file_name.
1768         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
1769
1770 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1771
1772         * gnulib-tool (func_import): Fix typo in actioncmd.
1773
1774 2006-11-02  Bruno Haible  <bruno@clisp.org>
1775
1776         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
1777         newline sequence in the Makefile.am snippet as a space, like "make"
1778         does.
1779         Reported by Roger Persson <perrog@gmail.com>.
1780
1781 2006-11-01  Bruno Haible  <bruno@clisp.org>
1782
1783         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
1784         already declared in <string.h>.
1785         * lib/strcase.h (strncasecmp): Don't declare it if yes.
1786
1787 2006-11-01  Bruno Haible  <bruno@clisp.org>
1788
1789         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
1790         * lib/strcase.h: Include <string.h>.
1791         (strcasecmp): Define to rpl_strcasecmp here.
1792
1793 2006-11-01  Bruno Haible  <bruno@clisp.org>
1794
1795         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
1796
1797 2006-11-01  Eric Blake  <ebb9@byu.net>
1798
1799         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
1800
1801         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
1802
1803 2006-10-29  Bruno Haible  <bruno@clisp.org>
1804
1805         Make it compile in C++ mode.
1806         * lib/full-write.c (full_rw): Add a cast.
1807
1808 2006-11-01  Bruno Haible  <bruno@clisp.org>
1809
1810         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
1811         be POSIX compliant.
1812         Reported by Roger Persson <perrog@gmail.com>.
1813
1814 2006-11-01  Eric Blake  <ebb9@byu.net>
1815
1816         * lib/getopt_.h: Fix comments.
1817
1818 2006-10-31  Eric Blake  <ebb9@byu.net>
1819
1820         * modules/tmpdir (Depends-on): Add sys_stat.
1821         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
1822         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
1823         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
1824         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
1825         tempname.
1826
1827 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
1828
1829         Avoid some C++ diagnostics reported by Bruno Haible.
1830         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
1831         xmalloc.
1832         (quotearg_alloc): Use xcharalloc rather than xmalloc.
1833         (struct slotvec): Move to top level.
1834         (quotearg_n_options): Rewrite to avoid xmalloc.
1835         * lib/xalloc.h (xcharalloc): New function.
1836         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
1837         [defined __cplusplus]: Add function template that provides result
1838         type propagation.  This part of the change is from Bruno Haible.
1839
1840 2006-10-29  Bruno Haible  <bruno@clisp.org>
1841
1842         Make it compile in C++ mode.
1843         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
1844         * lib/strnlen1.c (strnlen1): Cast memchr result.
1845         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
1846         * lib/clean-temp.c (string_equals, string_hash): Add casts.
1847         (create_temp_dir): Rename local variable 'template'.
1848         (compile_csharp_using_sscli): Add cast.
1849         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
1850         * lib/findprog.c (find_in_path): Likewise.
1851         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
1852         * lib/wait-process.c (register_slave_subprocess): Likewise.
1853
1854 2006-10-22  Bruno Haible  <bruno@clisp.org>
1855
1856         * modules/tsearch: New file.
1857         * lib/tsearch.h: New file.
1858         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
1859         * m4/tsearch.m4: New file.
1860         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
1861
1862 2006-10-29  Eric Blake  <ebb9@byu.net>
1863
1864         * lib/arcfour.c: Assume config.h.
1865         * lib/arctwo.c: Likewise.
1866         * lib/base64.c: Likewise.
1867         * lib/check-version.c: Likewise.
1868         * lib/crc.c: Likewise.
1869         * lib/des.c: Likewise.
1870         * lib/gc-gnulib.c: Likewise.
1871         * lib/gc-libgcrypt.c: Likewise.
1872         * lib/gc-pbkdf2-sha1.c: Likewise.
1873         * lib/getaddrinfo.c: Likewise.
1874         * lib/getdelim.c: Likewise.
1875         * lib/getline.c: Likewise.
1876         * lib/hmac-md5.c: Likewise.
1877         * lib/hmac-sha1.c: Likewise.
1878         * lib/iconvme.c: Likewise.
1879         * lib/md2.c: Likewise.
1880         * lib/md4.c: Likewise.
1881         * lib/memxor.c: Likewise.
1882         * lib/read-file.c: Likewise.
1883         * lib/readline.c: Likewise.
1884         * lib/rijndael-alg-fst.c: Likewise.
1885         * lib/rijndael-api-fst.c: Likewise.
1886         * lib/xgetdomainname.c: Likewise.
1887
1888 2006-10-28  Eric Blake  <ebb9@byu.net>
1889
1890         * lib/xstrndup.c: Assume config.h.
1891
1892 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
1893
1894         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
1895         stat-macros.h is now for our own macros, whereas stat_h is for
1896         macros in the <sys/stat.h> name space.
1897         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
1898         (STAT_MACROS_H): Remove.
1899         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
1900         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
1901         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
1902         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
1903         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
1904         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
1905         Move these macros to ...
1906         * lib/stat_.h: here.  Don't include stat-macros.h.
1907         * lib/canonicalize.c: Don't include stat-macros.h.
1908         * lib/chown.c: Likewise.
1909         * lib/euidaccess.c: Likewise.
1910         * lib/file-type.c: Likewise.
1911         * lib/filemode.c: Likewise.
1912         * lib/glob.c: Likewise.
1913         * lib/isapipe.c: Likewise.
1914         * lib/lchown.c: Likewise.
1915         * lib/lstat.c: Likewise.
1916         * lib/mkdir-p.c: Likewise.
1917         * lib/rmdir.c: Likewise.
1918         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
1919         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
1920         unless mkdir isn't declared, to speed up 'configure'.
1921         Always create sys/stat.h, since it's unlikely any real sys/stat.h
1922         would define all the S_* symbols.
1923         * modules/canonicalize (Depends-on):
1924         Depend on sys_stat, not stat-macros.
1925         * modules/chown: Likewise.
1926         * modules/euidaccess: Likewise.
1927         * modules/filemode: Likewise.
1928         * modules/file-type: Likewise.
1929         * modules/glob: Likewise.
1930         * modules/isapipe: Likewise.
1931         * modules/lchown: Likewise.
1932         * modules/lstat: Likewise.
1933         * modules/mkancesdirs: Likewise.
1934         * modules/rmdir: Likewise.
1935         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
1936         * modules/modechange: Likewise.
1937         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
1938         (configure.ac): Remove gl_STAT_MACROS.
1939         * modules/sys_stat (Depends-on): Remove stat-macros.
1940
1941 2006-10-27  Bruno Haible  <bruno@clisp.org>
1942
1943         * m4/signed.m4: Remove file.
1944         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
1945         invocation.
1946         * modules/vasnprintf (Files): Remove m4/signed.m4.
1947
1948 2006-10-27  Bruno Haible  <bruno@clisp.org>
1949
1950         Update to GNU gettext 0.16.
1951         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
1952         m4/inttypes-h.m4, m4/signed.m4.
1953         * m4/gettext.m4: Update to GNU gettext 0.16.
1954         * m4/intl.m4: New file, from GNU gettext.
1955         * m4/intldir.m4: New file, from GNU gettext.
1956         * config/srclist.txt: Update
1957
1958 2006-10-27  Eric Blake  <ebb9@byu.net>
1959
1960         * MODULES.html.sh: Document tempname.
1961         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
1962         dependencies.
1963         (Files): Move lib/tempname.c...
1964         * modules/tempname: ...to this new module.
1965         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
1966         (gl_PREREQ_TEMPNAME): Move...
1967         * m4/tempname.m4: ...to this new file.
1968         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
1969         * modules/sys_stat (Depends-on): Add stat-macros.
1970         * lib/stat_.h (includes): Pick up stat macros.
1971         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
1972         if stat macros are broken.
1973         * lib/tempname.c (includes): No need to include "stat-macros.h".
1974         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
1975         (direxists, __path_search) [!_LIBC]: Don't compile these in
1976         gnulib; the tmpdir module covers that.
1977         * lib/tempname.h: New file.
1978
1979 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
1980
1981         * COPYING: Explain how gnulib-tool converts licence headers.
1982         Almost all wording by Eric Blake.
1983
1984 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
1985
1986         * lib/mbchar.h (is_basic_table): Make read-only.
1987         * lib/mbchar.c (is_basic_table): Likewise.
1988         Reported by John Darrington.
1989
1990 2006-10-25  Bruno Haible  <bruno@clisp.org>
1991
1992         * lib/progname.h (set_program_name): Undefine before defining.
1993
1994 2006-10-25  Bruno Haible  <bruno@clisp.org>
1995
1996         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
1997         false for non-gcc C++ compilers.
1998         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
1999
2000 2006-10-24  Bruno Haible  <bruno@clisp.org>
2001
2002         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
2003         iconv implementations like Irix iconv.
2004
2005 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2006
2007         * modules/vararrays: New file.
2008         * m4/vararrays.m4: New file, taken from diffutils.
2009         * MODULES.html.sh: New module vararrays.
2010
2011 2006-10-24  Karl Berry  <karl@gnu.org>
2012
2013         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
2014         Don't call GNU Unix.
2015
2016 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2017
2018         * users.txt: Add Libtool.
2019
2020         Sync from Libtool:
2021
2022         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2023
2024         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
2025         to gnulib's policy of including config.h unconditionally.
2026
2027 2006-10-24  Bruno Haible  <bruno@clisp.org>
2028
2029         * modules/wcwidth (Files): Add m4/wint_t.m4.
2030         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
2031         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
2032
2033 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2034
2035         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
2036         to pacify GCC with some -W flags enabled.  Problem reported by
2037         Bruno Haible.
2038
2039 2006-10-24  Jim Meyering  <jim@meyering.net>
2040
2041         * MODULES.html.sh: Remove uinttostr.  It's not a module.
2042         Reported by Karl Berry.
2043
2044 2006-10-23  Bruno Haible  <bruno@clisp.org>
2045
2046         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
2047
2048 2006-10-24  Bruno Haible  <bruno@clisp.org>
2049
2050         * lib/gl_list.h: Use C comment style, not C++ comment style.
2051
2052 2006-10-23  Eric Blake  <ebb9@byu.net>
2053
2054         * lib/getaddrinfo.c (includes): Add missing include.
2055
2056 2006-10-23  Bruno Haible  <bruno@clisp.org>
2057             Paul Eggert  <eggert@cs.ucla.edu>
2058
2059         Ability to rename obstack_free.
2060         * lib/obstack.h (__obstack_free): New macro. Declare instead of
2061         obstack_free.
2062         (obstack_free): Invoke the __obstack_free macro.
2063         * lib/obstack.c (obstack_free): Use __obstack_free macro.
2064
2065 2006-10-23  Bruno Haible  <bruno@clisp.org>
2066             Paul Eggert  <eggert@cs.ucla.edu>
2067
2068         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
2069         __argc, __argv from the declaration. (They are defined as macros on
2070         mingw.)
2071
2072 2006-10-22  Bruno Haible  <bruno@clisp.org>
2073
2074         * doc/gnulib-intro.texi: New file.
2075         * doc/gnulib.texi: Include it.
2076
2077 2006-10-21  Bruno Haible  <bruno@clisp.org>
2078
2079         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
2080         "Introduction", "Miscellanous Notes", "Particular Modules".
2081
2082 2006-10-21  Bruno Haible  <bruno@clisp.org>
2083
2084         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2085         Change mostlyclean-local rule to avoid sh syntax error from bash
2086         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
2087
2088 2006-10-23  Jim Meyering  <jim@meyering.net>
2089
2090         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
2091         in place of snprintf.
2092
2093         * modules/inttostr (Files): Add lib/uinttostr.c.
2094         * lib/uinttostr.c (inttostr): New file/function.
2095         * lib/inttostr.h (uinttostr): Declare.
2096         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
2097         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
2098         Add uinttostr.
2099         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
2100
2101 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2102
2103         * lib/canonicalize.c (ELOOP): Define if not already defined.
2104         Problem reported by Bruno Haible in
2105         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
2106
2107 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2108
2109         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
2110         Problem reported by Perry Smith and Ville Laurikari.
2111
2112         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
2113         uses.
2114
2115 2006-10-19  Bruno Haible  <bruno@clisp.org>
2116
2117         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
2118         for mingw.
2119
2120 2006-10-19  Bruno Haible  <bruno@clisp.org>
2121
2122         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
2123         Needed for mingw.
2124
2125 2006-10-19  Bruno Haible  <bruno@clisp.org>
2126
2127         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
2128
2129 2006-10-19  Bruno Haible  <bruno@clisp.org>
2130
2131         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
2132         it.
2133
2134 2006-10-19  Bruno Haible  <bruno@clisp.org>
2135
2136         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
2137         invocation.
2138
2139 2006-10-19  Bruno Haible  <bruno@clisp.org>
2140
2141         * gnulib-tool (func_create_testdir): Don't include ftruncate and
2142         mountlist by default.
2143
2144 2006-10-16  Bruno Haible  <bruno@clisp.org>
2145
2146         * lib/c-strstr.c: Include c-strstr.h.
2147
2148 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2149
2150         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
2151         in a slash.
2152
2153 2006-10-18  Bruno Haible  <bruno@clisp.org>
2154
2155         * lib/lock.h [C++]: Wrap definitions in extern "C".
2156
2157 2006-10-18  Bruno Haible  <bruno@clisp.org>
2158
2159         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
2160         gl_LIBOBJS list.
2161
2162 2006-10-18  Bruno Haible  <bruno@clisp.org>
2163
2164         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
2165
2166 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
2167
2168         * lib/xstrtol.h: Include gettext.h.
2169         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
2170         Problem reported by Eric Blake.
2171         * modules/xstrtol (Depends-on): Add gettext-h.
2172
2173 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2174
2175         * lib/strftime.c (advance): New macro.
2176         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
2177         incomplete type, so you can't add 0 to it.  Problem and patch
2178         reported by Eelco Dolstra for dietlibc.
2179
2180 2006-10-18  Jim Meyering  <jim@meyering.net>
2181
2182         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
2183         type for a local, and rename it: s/up/user_proc/.
2184
2185 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2186
2187         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
2188         READ_UTMP_USER_PROCESS.
2189         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
2190
2191 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
2192
2193         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
2194         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
2195
2196 2006-10-17  Eric Blake  <ebb9@byu.net>
2197
2198         * lib/sigprocmask.c (sigprocmask): Fix typo.
2199
2200         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
2201
2202         * modules/clean-temp (Makefile.am): Don't add to make output...
2203         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
2204         config.h.
2205
2206 2006-10-17  Bruno Haible  <bruno@clisp.org>
2207
2208         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
2209         differently if DEFAULT_TEXT_DOMAIN is set.
2210
2211 2006-10-16  Bruno Haible  <bruno@clisp.org>
2212
2213         * lib/clean-temp.c: Include fwriteerror.h.
2214
2215 2006-10-16  Bruno Haible  <bruno@clisp.org>
2216
2217         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
2218
2219 2006-10-16  Bruno Haible  <bruno@clisp.org>
2220
2221         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
2222         * lib/sigprocmask.h: Include <sys/types.h>.
2223         (sigset_t): Use the system's definition if present.
2224
2225 2006-10-17  Eric Blake  <ebb9@byu.net>
2226
2227         * lib/xvasprintf.c (includes): Assume config.h.
2228         * lib/xasprintf.c (includes): Likewise.
2229
2230 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
2231
2232         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
2233         at least as wide as intmax_t.
2234
2235 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
2236
2237         (Imported from Automake.)
2238         * build-aux/gnupload: Update to version 1.1 of directive file.
2239
2240 2006-10-16  Eric Blake  <ebb9@byu.net>
2241
2242         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
2243         match Automake 1.10a.
2244
2245 2006-10-14  Bruno Haible  <bruno@clisp.org>
2246
2247         * modules/sigprocmask: New file.
2248         * lib/sigprocmask.h: New file.
2249         * lib/sigprocmask.c: New file.
2250         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
2251         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
2252         request sigprocmask.o.
2253         (gl_PREREQ_SIGPROCMASK): New macro.
2254         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
2255         (Depends-on): Add sigprocmask.
2256         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
2257         gt_SIGNALBLOCKING. Test for 'raise' only once.
2258         * lib/fatal-signal.c: Include sigprocmask.h.
2259         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
2260         unblock_fatal_signals): Define always.
2261         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2262         sigprocmask.
2263
2264 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
2265
2266         Sync from Automake.
2267         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
2268         which incorrectly sets the mode of an existing destination
2269         directory.  In some cases the unpatched install-sh could do the
2270         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
2271         system.  We hope this is rare in practice, but it's clearly worth
2272         fixing.  Problem reported by Alex Unleashed in
2273         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
2274         Also, don't bother to check for -m bugs unless we're using -m;
2275         suggested by Stepan Kasal.
2276
2277 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2278
2279         Sync from Automake.
2280         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
2281         `-c' flag, so they appear at the same position as in %FASTDEP%
2282         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
2283         which ignores unknown options only after the first non-option.
2284         Bug report against M4 by Nelson H. F. Beebe.
2285
2286 2006-10-13  Jim Meyering  <jim@meyering.net>
2287
2288         Fix a bug in yesterday's change.
2289         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
2290         p->fts_statp->st_dev would be used uninitialized.
2291         Ensures that we always call fts_stat on the very first entry.
2292         Miklos Szeredi reported that find -xdev stopped working.
2293
2294 2006-10-12  Bruno Haible  <bruno@clisp.org>
2295
2296         * gnulib-tool (func_get_automake_snippet): Append an automatically
2297         computed EXTRA_DIST augmentation.
2298         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
2299         * modules/alloca-opt (Makefile.am): Likewise.
2300         * modules/allocsa (Makefile.am): Likewise.
2301         * modules/arcfour (Makefile.am): Likewise.
2302         * modules/arctwo (Makefile.am): Likewise.
2303         * modules/argmatch (Makefile.am): Likewise.
2304         * modules/argz (Makefile.am): Likewise.
2305         * modules/atexit (Makefile.am): Likewise.
2306         * modules/backupfile (Makefile.am): Likewise.
2307         * modules/byteswap (Makefile.am): Likewise.
2308         * modules/c-strtod (Makefile.am): Likewise.
2309         * modules/c-strtold (Makefile.am): Likewise.
2310         * modules/calloc (Makefile.am): Likewise.
2311         * modules/canon-host (Makefile.am): Likewise.
2312         * modules/canonicalize (Makefile.am): Likewise.
2313         * modules/chdir-long (Makefile.am): Likewise.
2314         * modules/chdir-safer (Makefile.am): Likewise.
2315         * modules/check-version (Makefile.am): Likewise.
2316         * modules/chown (Makefile.am): Likewise.
2317         * modules/cloexec (Makefile.am): Likewise.
2318         * modules/close-stream (Makefile.am): Likewise.
2319         * modules/closeout (Makefile.am): Likewise.
2320         * modules/crc (Makefile.am): Likewise.
2321         * modules/csharpexec (Makefile.am): Likewise.
2322         * modules/cycle-check (Makefile.am): Likewise.
2323         * modules/des (Makefile.am): Likewise.
2324         * modules/dev-ino (Makefile.am): Likewise.
2325         * modules/dirfd (Makefile.am): Likewise.
2326         * modules/dirname (Makefile.am): Likewise.
2327         * modules/dup2 (Makefile.am): Likewise.
2328         * modules/eealloc (Makefile.am): Likewise.
2329         * modules/error (Makefile.am): Likewise.
2330         * modules/euidaccess (Makefile.am): Likewise.
2331         * modules/exclude (Makefile.am): Likewise.
2332         * modules/exitfail (Makefile.am): Likewise.
2333         * modules/fcntl-safer (Makefile.am): Likewise.
2334         * modules/fcntl (Makefile.am): Likewise.
2335         * modules/file-type (Makefile.am): Likewise.
2336         * modules/fileblocks (Makefile.am): Likewise.
2337         * modules/filemode (Makefile.am): Likewise.
2338         * modules/filenamecat (Makefile.am): Likewise.
2339         * modules/fnmatch (Makefile.am): Likewise.
2340         * modules/fopen-safer (Makefile.am): Likewise.
2341         * modules/fpending (Makefile.am): Likewise.
2342         * modules/fprintftime (Makefile.am): Likewise.
2343         * modules/free (Makefile.am): Likewise.
2344         * modules/fsusage (Makefile.am): Likewise.
2345         * modules/ftruncate (Makefile.am): Likewise.
2346         * modules/fts (Makefile.am): Likewise.
2347         * modules/gc-arcfour (Makefile.am): Likewise.
2348         * modules/gc-des (Makefile.am): Likewise.
2349         * modules/gc-hmac-md5 (Makefile.am): Likewise.
2350         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
2351         * modules/gc-md4 (Makefile.am): Likewise.
2352         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2353         * modules/gc-sha1 (Makefile.am): Likewise.
2354         * modules/gc (Makefile.am): Likewise.
2355         * modules/getaddrinfo (Makefile.am): Likewise.
2356         * modules/getcwd (Makefile.am): Likewise.
2357         * modules/getdelim (Makefile.am): Likewise.
2358         * modules/getdomainname (Makefile.am): Likewise.
2359         * modules/getgroups (Makefile.am): Likewise.
2360         * modules/gethostname (Makefile.am): Likewise.
2361         * modules/gethrxtime (Makefile.am): Likewise.
2362         * modules/getline (Makefile.am): Likewise.
2363         * modules/getloadavg (Makefile.am): Likewise.
2364         * modules/getlogin_r (Makefile.am): Likewise.
2365         * modules/getndelim2 (Makefile.am): Likewise.
2366         * modules/getopt (Makefile.am): Likewise.
2367         * modules/getpagesize (Makefile.am): Likewise.
2368         * modules/getpass-gnu (Makefile.am): Likewise.
2369         * modules/getpass (Makefile.am): Likewise.
2370         * modules/getsubopt (Makefile.am): Likewise.
2371         * modules/gettime (Makefile.am): Likewise.
2372         * modules/gettimeofday (Makefile.am): Likewise.
2373         * modules/getugroups (Makefile.am): Likewise.
2374         * modules/getusershell (Makefile.am): Likewise.
2375         * modules/glob (Makefile.am): Likewise.
2376         * modules/group-member (Makefile.am): Likewise.
2377         * modules/hard-locale (Makefile.am): Likewise.
2378         * modules/hash (Makefile.am): Likewise.
2379         * modules/hmac-md5 (Makefile.am): Likewise.
2380         * modules/hmac-sha1 (Makefile.am): Likewise.
2381         * modules/human (Makefile.am): Likewise.
2382         * modules/idcache (Makefile.am): Likewise.
2383         * modules/imaxabs (Makefile.am): Likewise.
2384         * modules/imaxdiv (Makefile.am): Likewise.
2385         * modules/inet_ntop (Makefile.am): Likewise.
2386         * modules/inet_pton (Makefile.am): Likewise.
2387         * modules/intprops (Makefile.am): Likewise.
2388         * modules/inttostr (Makefile.am): Likewise.
2389         * modules/inttypes (Makefile.am): Likewise.
2390         * modules/isapipe (Makefile.am): Likewise.
2391         * modules/javaversion (Makefile.am): Likewise.
2392         * modules/lchmod (Makefile.am): Likewise.
2393         * modules/lchown (Makefile.am): Likewise.
2394         * modules/localcharset (Makefile.am): Likewise.
2395         * modules/long-options (Makefile.am): Likewise.
2396         * modules/lstat (Makefile.am): Likewise.
2397         * modules/malloc (Makefile.am): Likewise.
2398         * modules/mathl (Makefile.am): Likewise.
2399         * modules/mbchar (Makefile.am): Likewise.
2400         * modules/md2 (Makefile.am): Likewise.
2401         * modules/md4 (Makefile.am): Likewise.
2402         * modules/md5 (Makefile.am): Likewise.
2403         * modules/memcasecmp (Makefile.am): Likewise.
2404         * modules/memchr (Makefile.am): Likewise.
2405         * modules/memcmp (Makefile.am): Likewise.
2406         * modules/memcoll (Makefile.am): Likewise.
2407         * modules/memcpy (Makefile.am): Likewise.
2408         * modules/memmem (Makefile.am): Likewise.
2409         * modules/memmove (Makefile.am): Likewise.
2410         * modules/mempcpy (Makefile.am): Likewise.
2411         * modules/memrchr (Makefile.am): Likewise.
2412         * modules/memset (Makefile.am): Likewise.
2413         * modules/memxor (Makefile.am): Likewise.
2414         * modules/mkancesdirs (Makefile.am): Likewise.
2415         * modules/mkdir-p (Makefile.am): Likewise.
2416         * modules/mkdir (Makefile.am): Likewise.
2417         * modules/mkdtemp (Makefile.am): Likewise.
2418         * modules/mkstemp (Makefile.am): Likewise.
2419         * modules/mktime (Makefile.am): Likewise.
2420         * modules/modechange (Makefile.am): Likewise.
2421         * modules/mountlist (Makefile.am): Likewise.
2422         * modules/nanosleep (Makefile.am): Likewise.
2423         * modules/obstack (Makefile.am): Likewise.
2424         * modules/openat (Makefile.am): Likewise.
2425         * modules/pagealign_alloc (Makefile.am): Likewise.
2426         * modules/pathmax (Makefile.am): Likewise.
2427         * modules/physmem (Makefile.am): Likewise.
2428         * modules/poll (Makefile.am): Likewise.
2429         * modules/posixtm (Makefile.am): Likewise.
2430         * modules/posixver (Makefile.am): Likewise.
2431         * modules/putenv (Makefile.am): Likewise.
2432         * modules/quote (Makefile.am): Likewise.
2433         * modules/quotearg (Makefile.am): Likewise.
2434         * modules/raise (Makefile.am): Likewise.
2435         * modules/read-file (Makefile.am): Likewise.
2436         * modules/readline (Makefile.am): Likewise.
2437         * modules/readlink (Makefile.am): Likewise.
2438         * modules/readtokens (Makefile.am): Likewise.
2439         * modules/readutmp (Makefile.am): Likewise.
2440         * modules/realloc (Makefile.am): Likewise.
2441         * modules/regex (Makefile.am): Likewise.
2442         * modules/rename-dest-slash (Makefile.am): Likewise.
2443         * modules/rename (Makefile.am): Likewise.
2444         * modules/rijndael (Makefile.am): Likewise.
2445         * modules/rmdir (Makefile.am): Likewise.
2446         * modules/rpmatch (Makefile.am): Likewise.
2447         * modules/safe-read (Makefile.am): Likewise.
2448         * modules/safe-write (Makefile.am): Likewise.
2449         * modules/same-inode (Makefile.am): Likewise.
2450         * modules/same (Makefile.am): Likewise.
2451         * modules/save-cwd (Makefile.am): Likewise.
2452         * modules/savedir (Makefile.am): Likewise.
2453         * modules/setenv (Makefile.am): Likewise.
2454         * modules/settime (Makefile.am): Likewise.
2455         * modules/sha1 (Makefile.am): Likewise.
2456         * modules/sig2str (Makefile.am): Likewise.
2457         * modules/snprintf (Makefile.am): Likewise.
2458         * modules/stat-macros (Makefile.am): Likewise.
2459         * modules/stat-time (Makefile.am): Likewise.
2460         * modules/stdbool (Makefile.am): Likewise.
2461         * modules/stdint (Makefile.am): Likewise.
2462         * modules/stdlib-safer (Makefile.am): Likewise.
2463         * modules/stpcpy (Makefile.am): Likewise.
2464         * modules/stpncpy (Makefile.am): Likewise.
2465         * modules/strcase (Makefile.am): Likewise.
2466         * modules/strcasestr (Makefile.am): Likewise.
2467         * modules/strchrnul (Makefile.am): Likewise.
2468         * modules/strcspn (Makefile.am): Likewise.
2469         * modules/strdup (Makefile.am): Likewise.
2470         * modules/strerror (Makefile.am): Likewise.
2471         * modules/strftime (Makefile.am): Likewise.
2472         * modules/strndup (Makefile.am): Likewise.
2473         * modules/strnlen (Makefile.am): Likewise.
2474         * modules/strpbrk (Makefile.am): Likewise.
2475         * modules/strsep (Makefile.am): Likewise.
2476         * modules/strstr (Makefile.am): Likewise.
2477         * modules/strtod (Makefile.am): Likewise.
2478         * modules/strtoimax (Makefile.am): Likewise.
2479         * modules/strtok_r (Makefile.am): Likewise.
2480         * modules/strtol (Makefile.am): Likewise.
2481         * modules/strtoll (Makefile.am): Likewise.
2482         * modules/strtoul (Makefile.am): Likewise.
2483         * modules/strtoull (Makefile.am): Likewise.
2484         * modules/strtoumax (Makefile.am): Likewise.
2485         * modules/strverscmp (Makefile.am): Likewise.
2486         * modules/sys_socket (Makefile.am): Likewise.
2487         * modules/sys_stat (Makefile.am): Likewise.
2488         * modules/sysexits (Makefile.am): Likewise.
2489         * modules/time_r (Makefile.am): Likewise.
2490         * modules/timegm (Makefile.am): Likewise.
2491         * modules/timespec (Makefile.am): Likewise.
2492         * modules/tmpfile-safer (Makefile.am): Likewise.
2493         * modules/trim (Makefile.am): Likewise.
2494         * modules/unistd-safer (Makefile.am): Likewise.
2495         * modules/unlinkdir (Makefile.am): Likewise.
2496         * modules/unlocked-io (Makefile.am): Likewise.
2497         * modules/userspec (Makefile.am): Likewise.
2498         * modules/utime (Makefile.am): Likewise.
2499         * modules/utimecmp (Makefile.am): Likewise.
2500         * modules/utimens (Makefile.am): Likewise.
2501         * modules/vasnprintf (Makefile.am): Likewise.
2502         * modules/vasprintf (Makefile.am): Likewise.
2503         * modules/vsnprintf (Makefile.am): Likewise.
2504         * modules/xalloc (Makefile.am): Likewise.
2505         * modules/xgetcwd (Makefile.am): Likewise.
2506         * modules/xnanosleep (Makefile.am): Likewise.
2507         * modules/xreadlink (Makefile.am): Likewise.
2508         * modules/xstrtod (Makefile.am): Likewise.
2509         * modules/xstrtol (Makefile.am): Likewise.
2510         * modules/xstrtold (Makefile.am): Likewise.
2511         * modules/yesno (Makefile.am): Likewise.
2512         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
2513
2514 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
2515
2516         * modules/error (Makefile.am): Distribute files through
2517         EXTRA_DIST, not lib_SOURCES.
2518
2519 2006-10-12  Eric Blake  <ebb9@byu.net>
2520
2521         * modules/error (Makefile.am): Distribute files in /lib.
2522         * modules/obstack (Makefile.am): Likewise.
2523
2524 2006-10-12  Bruno Haible  <bruno@clisp.org>
2525
2526         * modules/acl (Makefile.am): Distribute all files in lib/ through
2527         EXTRA_DIST.
2528         * modules/arcfour (Makefile.am): Likewise.
2529         * modules/arctwo (Makefile.am): Likewise.
2530         * modules/argmatch (Makefile.am): Likewise.
2531         * modules/argz (Makefile.am): Likewise.
2532         * modules/atexit (Makefile.am): Likewise.
2533         * modules/backupfile (Makefile.am): Likewise.
2534         * modules/c-strtod (Makefile.am): Likewise.
2535         * modules/c-strtold (Makefile.am): Likewise.
2536         * modules/calloc (Makefile.am): Likewise.
2537         * modules/canon-host (Makefile.am): Likewise.
2538         * modules/canonicalize (Makefile.am): Likewise.
2539         * modules/chdir-long (Makefile.am): Likewise.
2540         * modules/chdir-safer (Makefile.am): Likewise.
2541         * modules/check-version (Makefile.am): Likewise.
2542         * modules/chown (Makefile.am): Likewise.
2543         * modules/cloexec (Makefile.am): Likewise.
2544         * modules/close-stream (Makefile.am): Likewise.
2545         * modules/closeout (Makefile.am): Likewise.
2546         * modules/crc (Makefile.am): Likewise.
2547         * modules/cycle-check (Makefile.am): Likewise.
2548         * modules/des (Makefile.am): Likewise.
2549         * modules/dirfd (Makefile.am): Likewise.
2550         * modules/dirname (Makefile.am): Likewise.
2551         * modules/dup2 (Makefile.am): Likewise.
2552         * modules/euidaccess (Makefile.am): Likewise.
2553         * modules/exclude (Makefile.am): Likewise.
2554         * modules/exitfail (Makefile.am): Likewise.
2555         * modules/fcntl-safer (Makefile.am): Likewise.
2556         * modules/file-type (Makefile.am): Likewise.
2557         * modules/fileblocks (Makefile.am): Likewise.
2558         * modules/filemode (Makefile.am): Likewise.
2559         * modules/filenamecat (Makefile.am): Likewise.
2560         * modules/fnmatch (Makefile.am): Likewise.
2561         * modules/fopen-safer (Makefile.am): Likewise.
2562         * modules/fpending (Makefile.am): Likewise.
2563         * modules/fprintftime (Makefile.am): Likewise.
2564         * modules/free (Makefile.am): Likewise.
2565         * modules/fsusage (Makefile.am): Likewise.
2566         * modules/ftruncate (Makefile.am): Likewise.
2567         * modules/fts (Makefile.am): Likewise.
2568         * modules/gc (Makefile.am): Likewise.
2569         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2570         * modules/getaddrinfo (Makefile.am): Likewise.
2571         * modules/getcwd (Makefile.am): Likewise.
2572         * modules/getdelim (Makefile.am): Likewise.
2573         * modules/getdomainname (Makefile.am): Likewise.
2574         * modules/getgroups (Makefile.am): Likewise.
2575         * modules/gethostname (Makefile.am): Likewise.
2576         * modules/gethrxtime (Makefile.am): Likewise.
2577         * modules/getline (Makefile.am): Likewise.
2578         * modules/getloadavg (Makefile.am): Likewise.
2579         * modules/getlogin_r (Makefile.am): Likewise.
2580         * modules/getopt (Makefile.am): Likewise.
2581         * modules/getpass (Makefile.am): Likewise.
2582         * modules/getpass-gnu (Makefile.am): Likewise.
2583         * modules/getsubopt (Makefile.am): Likewise.
2584         * modules/gettime (Makefile.am): Likewise.
2585         * modules/gettimeofday (Makefile.am): Likewise.
2586         * modules/getugroups (Makefile.am): Likewise.
2587         * modules/getusershell (Makefile.am): Likewise.
2588         * modules/glob (Makefile.am): Likewise.
2589         * modules/group-member (Makefile.am): Likewise.
2590         * modules/hard-locale (Makefile.am): Likewise.
2591         * modules/hash (Makefile.am): Likewise.
2592         * modules/hmac-md5 (Makefile.am): Likewise.
2593         * modules/hmac-sha1 (Makefile.am): Likewise.
2594         * modules/human (Makefile.am): Likewise.
2595         * modules/idcache (Makefile.am): Likewise.
2596         * modules/imaxabs (Makefile.am): Likewise.
2597         * modules/imaxdiv (Makefile.am): Likewise.
2598         * modules/inet_ntop (Makefile.am): Likewise.
2599         * modules/inet_pton (Makefile.am): Likewise.
2600         * modules/inttostr (Makefile.am): Likewise.
2601         * modules/isapipe (Makefile.am): Likewise.
2602         * modules/lchown (Makefile.am): Likewise.
2603         * modules/long-options (Makefile.am): Likewise.
2604         * modules/lstat (Makefile.am): Likewise.
2605         * modules/malloc (Makefile.am): Likewise.
2606         * modules/mathl (Makefile.am): Likewise.
2607         * modules/mbchar (Makefile.am): Likewise.
2608         * modules/md2 (Makefile.am): Likewise.
2609         * modules/md4 (Makefile.am): Likewise.
2610         * modules/md5 (Makefile.am): Likewise.
2611         * modules/memcasecmp (Makefile.am): Likewise.
2612         * modules/memchr (Makefile.am): Likewise.
2613         * modules/memcmp (Makefile.am): Likewise.
2614         * modules/memcoll (Makefile.am): Likewise.
2615         * modules/memcpy (Makefile.am): Likewise.
2616         * modules/memmem (Makefile.am): Likewise.
2617         * modules/memmove (Makefile.am): Likewise.
2618         * modules/mempcpy (Makefile.am): Likewise.
2619         * modules/memrchr (Makefile.am): Likewise.
2620         * modules/memset (Makefile.am): Likewise.
2621         * modules/memxor (Makefile.am): Likewise.
2622         * modules/mkancesdirs (Makefile.am): Likewise.
2623         * modules/mkdir (Makefile.am): Likewise.
2624         * modules/mkdir-p (Makefile.am): Likewise.
2625         * modules/mkdtemp (Makefile.am): Likewise.
2626         * modules/mkstemp (Makefile.am): Likewise.
2627         * modules/mktime (Makefile.am): Likewise.
2628         * modules/modechange (Makefile.am): Likewise.
2629         * modules/mountlist (Makefile.am): Likewise.
2630         * modules/nanosleep (Makefile.am): Likewise.
2631         * modules/openat (Makefile.am): Likewise.
2632         * modules/pagealign_alloc (Makefile.am): Likewise.
2633         * modules/physmem (Makefile.am): Likewise.
2634         * modules/poll (Makefile.am): Likewise.
2635         * modules/posixtm (Makefile.am): Likewise.
2636         * modules/posixver (Makefile.am): Likewise.
2637         * modules/putenv (Makefile.am): Likewise.
2638         * modules/quote (Makefile.am): Likewise.
2639         * modules/quotearg (Makefile.am): Likewise.
2640         * modules/raise (Makefile.am): Likewise.
2641         * modules/read-file (Makefile.am): Likewise.
2642         * modules/readline (Makefile.am): Likewise.
2643         * modules/readlink (Makefile.am): Likewise.
2644         * modules/readtokens (Makefile.am): Likewise.
2645         * modules/readutmp (Makefile.am): Likewise.
2646         * modules/realloc (Makefile.am): Likewise.
2647         * modules/regex (Makefile.am): Likewise.
2648         * modules/rename (Makefile.am): Likewise.
2649         * modules/rename-dest-slash (Makefile.am): Likewise.
2650         * modules/rijndael (Makefile.am): Likewise.
2651         * modules/rmdir (Makefile.am): Likewise.
2652         * modules/rpmatch (Makefile.am): Likewise.
2653         * modules/safe-read (Makefile.am): Likewise.
2654         * modules/safe-write (Makefile.am): Likewise.
2655         * modules/same (Makefile.am): Likewise.
2656         * modules/save-cwd (Makefile.am): Likewise.
2657         * modules/savedir (Makefile.am): Likewise.
2658         * modules/setenv (Makefile.am): Likewise.
2659         * modules/settime (Makefile.am): Likewise.
2660         * modules/sha1 (Makefile.am): Likewise.
2661         * modules/sig2str (Makefile.am): Likewise.
2662         * modules/snprintf (Makefile.am): Likewise.
2663         * modules/stdlib-safer (Makefile.am): Likewise.
2664         * modules/stpcpy (Makefile.am): Likewise.
2665         * modules/stpncpy (Makefile.am): Likewise.
2666         * modules/strcase (Makefile.am): Likewise.
2667         * modules/strcasestr (Makefile.am): Likewise.
2668         * modules/strchrnul (Makefile.am): Likewise.
2669         * modules/strcspn (Makefile.am): Likewise.
2670         * modules/strdup (Makefile.am): Likewise.
2671         * modules/strerror (Makefile.am): Likewise.
2672         * modules/strftime (Makefile.am): Likewise.
2673         * modules/strndup (Makefile.am): Likewise.
2674         * modules/strnlen (Makefile.am): Likewise.
2675         * modules/strpbrk (Makefile.am): Likewise.
2676         * modules/strsep (Makefile.am): Likewise.
2677         * modules/strstr (Makefile.am): Likewise.
2678         * modules/strtod (Makefile.am): Likewise.
2679         * modules/strtoimax (Makefile.am): Likewise.
2680         * modules/strtok_r (Makefile.am): Likewise.
2681         * modules/strtol (Makefile.am): Likewise.
2682         * modules/strtoll (Makefile.am): Likewise.
2683         * modules/strtoul (Makefile.am): Likewise.
2684         * modules/strtoull (Makefile.am): Likewise.
2685         * modules/strtoumax (Makefile.am): Likewise.
2686         * modules/strverscmp (Makefile.am): Likewise.
2687         * modules/time_r (Makefile.am): Likewise.
2688         * modules/timegm (Makefile.am): Likewise.
2689         * modules/tmpfile-safer (Makefile.am): Likewise.
2690         * modules/unistd-safer (Makefile.am): Likewise.
2691         * modules/unlinkdir (Makefile.am): Likewise.
2692         * modules/userspec (Makefile.am): Likewise.
2693         * modules/utime (Makefile.am): Likewise.
2694         * modules/utimecmp (Makefile.am): Likewise.
2695         * modules/utimens (Makefile.am): Likewise.
2696         * modules/vasnprintf (Makefile.am): Likewise.
2697         * modules/vasprintf (Makefile.am): Likewise.
2698         * modules/vsnprintf (Makefile.am): Likewise.
2699         * modules/xalloc (Makefile.am): Likewise.
2700         * modules/xgetcwd (Makefile.am): Likewise.
2701         * modules/xnanosleep (Makefile.am): Likewise.
2702         * modules/xreadlink (Makefile.am): Likewise.
2703         * modules/xstrtod (Makefile.am): Likewise.
2704         * modules/xstrtol (Makefile.am): Likewise.
2705         * modules/xstrtold (Makefile.am): Likewise.
2706         * modules/yesno (Makefile.am): Likewise.
2707
2708 2006-10-12  Jim Meyering  <jim@meyering.net>
2709
2710         * m4/getloadavg.m4: Revert the change below.
2711
2712         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
2713         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
2714         fail with a symlink, which is what coreutils' ./bootstrap now
2715         creates by default.
2716
2717 2006-10-12  Bruno Haible  <bruno@clisp.org>
2718
2719         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
2720         mingw.
2721         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
2722         MSVC and mingw explicitly.
2723
2724 2006-10-11  Simon Josefsson  <jas@extundo.com>
2725             Bruno Haible  <bruno@clisp.org>
2726
2727         Add support for multiple gnulib-tool invocations in the scope of a
2728         single configure.ac file.
2729         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
2730         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
2731         with the same contents as the _LIBADD variable.
2732         (func_emit_initmacro_start, func_emit_initmacro_end,
2733         func_emit_initmacro_done): New functions.
2734         (func_import, func_create_testdir): Invoke them. Allow the identifiers
2735         gl_LIBOBJS and gl_LTLIBOBJS.
2736
2737 2006-10-11  Bruno Haible  <bruno@clisp.org>
2738
2739         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
2740         (func_create_testdir): Don't create po/Makefile.am, don't invoke
2741         autoreconf. Instead, invoke autopoint explicitly but move back the
2742         *.m4 files from gnulib.
2743
2744 2006-10-11  Bruno Haible  <bruno@clisp.org>
2745
2746         * gnulib-tool (func_usage): Make module names after --create-testdir
2747         optional.
2748         (func_create_testdir): If no module was specified, use nearly all
2749         modules.
2750
2751 2006-10-12  Jim Meyering  <jim@meyering.net>
2752
2753         Big performance improvement for fts-based tools that use FTS_NOSTAT.
2754         Avoid spurious inode-mismatch problems on non-POSIX file systems.
2755         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
2756         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
2757         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
2758         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
2759         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
2760         (fts_set_stat_required): New function.
2761         (fts_open): Defer the calls to fts_stat, if possible or requested.
2762         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
2763         into fts_stat itself.
2764         (fts_read): Perform any required (deferred) fts_stat call.
2765         (fts_build): Likewise, for the directory we're about to open and read.
2766         In the readdir loop, carefully decide whether each entry will require
2767         an eventual call to fts_stat, using dirent.d_type info if available.
2768         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
2769         a command line argument into this function.  Update all callers.
2770         Map a return value of FTS_DOT to FTS_D for a command line argument.
2771         * modules/fts (Depends-on): Add d-type.  Alphabetize.
2772         Thanks to Miklos Szeredi for his tenacity and for the initial
2773         bug report about "find" failing on a FUSE-based file system.
2774
2775         * lib/fts.c (fts_open): Use consistent indentation.
2776
2777 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
2778
2779         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
2780         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
2781         reported by Jim Meyering.  All uses of cache variables renamed
2782         to match Autoconf's.
2783         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
2784         the other one.
2785
2786         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
2787         Fix misspelling in diagnostic.
2788
2789 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2790
2791         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
2792         defined.  Problem reported by Matthew Woehlke.
2793
2794         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
2795         Add support for Tandem NonStop R series.
2796         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
2797         Use new macro.
2798
2799         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
2800         (has_trailing_slash): Omit size arg; all callers changed.
2801         Omit 'inline', since it doesn't help performance and we'd
2802         need to configure it.
2803         Don't count //, ///, etc. as having a trailing slash.
2804         As a side effect, this removes a C99ism reported by Matthew Woehlke.
2805         (rpl_rename_dest_slash): On failure, use rename's errno rather
2806         than (in some cases) an incorrect or junk errno.
2807         Simplify code by removing need to compute length; this does
2808         cause it to make two passes instead of one over the file name,
2809         but it's worth it.
2810
2811         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
2812         change, since Autoconf's version may no longer be appropriate now
2813         that we are using CVS Autoconf's version.  Add support for Tandem.
2814
2815 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2816             Bruno Haible  <bruno@clisp.org>
2817
2818         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
2819         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
2820         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
2821         gl_AC_TYPE_LONG_LONG.
2822
2823         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
2824         instead of HAVE_LONG_LONG.
2825         * lib/printf-args.c (printf_fetchargs): Likewise.
2826         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
2827         * lib/vasnprintf.c (VASNPRINTF): Likewise.
2828         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
2829         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
2830         gl_AC_TYPE_LONG_LONG.
2831
2832 2006-10-11  Bruno Haible  <bruno@clisp.org>
2833
2834         * m4/longlong.m4: Add comments.
2835         * m4/ulonglong.m4: Likewise.
2836
2837 2006-10-10  Bruno Haible  <bruno@clisp.org>
2838
2839         Make it possible to #define stpcpy, strdup to aliases.
2840         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
2841         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
2842
2843 2006-10-10  Bruno Haible  <bruno@clisp.org>
2844
2845         Make it possible to #define gcd to an alias.
2846         * lib/gcd.c: Include config.h.
2847
2848 2006-10-10  Bruno Haible  <bruno@clisp.org>
2849
2850         Make it possible to #define c_isascii to an alias.
2851         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
2852         defined. Undefine the macros before defining them, to avoid gcc
2853         warnings.
2854         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
2855         define NO_C_CTYPE_MACROS early.
2856
2857 2006-10-10  Bruno Haible  <bruno@clisp.org>
2858
2859         Make it possible to #define set_program_name to an alias.
2860         * lib/progname.c: Don't undefine set_program_name; instead, undefine
2861         ENABLE_RELOCATABLE early.
2862
2863 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
2864
2865         Port to Tandem NSK OSS, which has 64-bit signed int but at most
2866         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
2867         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
2868         More generally, don't assume that 64-bit signed int is available
2869         if unsigned int is, and vice versa.
2870         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
2871         unsigned symbols, not on their signed counterparts.
2872         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
2873         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
2874         (UINT64_C, UINTMAX_C):
2875         Likewise.
2876         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
2877         unsigned counterparts.
2878         (Have_long_long, Unsigned): New macros.
2879         (Int): Renamed from INT.
2880         (strtoimax): Use the new macros.
2881         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
2882         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
2883         * modules/inttypes (inttypes.h): Substitute
2884         HAVE_UNSIGNED_LONG_LONG_INT.
2885         * modules/stdint (stdint.h): Likewise.
2886         (Files): Add m4/ulonglong.m4.
2887
2888 2006-10-10  Bruno Haible  <bruno@clisp.org>
2889
2890         Fix a gcc -Wshadow warning.
2891         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
2892         to 'bucket'.
2893         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
2894         gl_linked_indexof_from_to): Likewise.
2895         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
2896         Likewise.
2897         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
2898         Likewise.
2899         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
2900         Reported by Eric Blake.
2901
2902 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
2903
2904         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
2905         for NetBSD.  Problem reported by Bruno Haible.
2906
2907 2006-10-09  Jim Meyering  <jim@meyering.net>
2908
2909         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
2910         Patch from Bruno Haible.
2911
2912 2006-10-09  Jim Meyering  <jim@meyering.net>
2913
2914         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
2915         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
2916         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
2917
2918 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
2919
2920         Don't include <config.h> twice; this doesn't work in some cases,
2921         e.g., when config.h has "#define intmax_t long long int" and
2922         we include <config.h>, <inttypes.h>, <config.h> in that order.
2923         Problem reported by Matthew Woehlke in:
2924         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
2925         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
2926         * lib/fts-cycle.c: Don't include config.h.
2927         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
2928         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
2929         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
2930         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
2931         inttypes.h.
2932         * lib/xstrtoumax.c: Likewise.
2933         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
2934         __strtol and the like, so that this module is more like its siblings.
2935         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
2936         Remove; no longer needed now that we assume gnulib inttypes.h.
2937
2938 2006-10-08  Bruno Haible  <bruno@clisp.org>
2939
2940         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
2941         option.
2942
2943 2006-10-07  Jim Meyering  <jim@meyering.net>
2944
2945         * modules/inttypes (inttypes.h): Revert what seems to have been
2946         an inadvertent part of today's change: use "|", not "/" in the
2947         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
2948
2949 2006-10-07  Bruno Haible  <bruno@clisp.org>
2950
2951         * modules/sublist: New file.
2952
2953 2006-10-07  Bruno Haible  <bruno@clisp.org>
2954
2955         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
2956         * modules/argz (argz.h): Likewise.
2957         * modules/arpa_inet (arpa/inet.h): Likewise.
2958         * modules/byteswap (byteswap.h): Likewise.
2959         * modules/configmake (configmake.h): Likewise.
2960         * modules/fcntl (fcntl.h): Likewise.
2961         * modules/fnmatch (fnmatch.h): Likewise.
2962         * modules/getopt (getopt.h): Likewise.
2963         * modules/glob (glob.h): Likewise.
2964         * modules/inttypes (inttypes.h): Likewise.
2965         * modules/netinet_in (netinet/in.h): Likewise.
2966         * modules/poll (poll.h): Likewise.
2967         * modules/stdbool (stdbool.h): Likewise.
2968         * modules/stdint (stdint.h): Likewise.
2969         * modules/sys_select (sys/select.h): Likewise.
2970         * modules/sys_socket (sys/socket.h): Likewise.
2971         * modules/sys_stat (sys/stat.h): Likewise.
2972         * modules/sysexits (sysexits.h): Likewise.
2973         * modules/unistd (unistd.h): Likewise.
2974         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2975         Add a "DO NOT EDIT" comment to the generated file.
2976         (func_import): Likewise for gnulib-comp.m4.
2977
2978 2006-10-07  Bruno Haible  <bruno@clisp.org>
2979
2980         * lib/gl_sublist.h: New file.
2981         * lib/gl_sublist.c: New file.
2982
2983 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
2984
2985         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
2986         name (relative to the original working directory) and the file
2987         name component (relative to the temporary working directory).  All
2988         callers changed.
2989         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
2990         * lib/mkdir-p.c (make_dir_parents): Likewise.
2991         * lib/mkdir-p.h (make_dir_parents): Likewise.
2992
2993 2006-10-06  Eric Blake  <ebb9@byu.net>
2994
2995         Define several macros for use by the clean-temp module.
2996         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
2997         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
2998         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
2999
3000         * lib/clean-temp.h (close_stream_temp): New declaration.
3001         * lib/clean-temp.c (includes): Pull in headers according to what
3002         other modules are in use.
3003         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
3004
3005 2006-10-06  Bruno Haible  <bruno@clisp.org>
3006
3007         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
3008         instead of fopen, fwriteerror.
3009
3010 2006-10-06  Bruno Haible  <bruno@clisp.org>
3011
3012         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
3013         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
3014         int.
3015         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
3016         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
3017         Return an error indicator.
3018         Suggested by Eric Blake.
3019
3020 2006-10-06  Bruno Haible  <bruno@clisp.org>
3021
3022         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
3023         Reported by Eric Blake.
3024
3025 2006-10-06  Bruno Haible  <bruno@clisp.org>
3026
3027         * modules/closeout (Description): Mention stderr too.
3028
3029 2006-10-06  Bruno Haible  <bruno@clisp.org>
3030         and Paul Eggert  <eggert@cs.ucla.edu>
3031
3032         * lib/closeout.c (close_stdout): Also close stderr.
3033         * lib/closeout.h: Update comment.
3034
3035 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3036
3037         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
3038         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
3039         * lib/dirchownmod.c: Include lchown.h.
3040         * lib/lchown.c: Don't include files that lchown.h now includes.
3041         Don't declare chown, since lchown.h now does that.
3042         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
3043         (lchown): Define to rpl_chown if lchown is declared but
3044         does not exist.  Declare using a prototype if lchown is not
3045         declared.  Add a copyright notice.
3046         * lib/mkstemp.h: Include <unistd.h>.
3047         * lib/openat.c: Include lchown.h.
3048
3049         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
3050         we now test for that separately.
3051         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
3052         rather than O_NOFOLLOW, when testing whether it's possible to
3053         avoid a race condition reliably.
3054         * lib/savewd.c (savewd_chdir): Likewise.
3055
3056         Remove macros that are no longer needed now that stdint.h is
3057         reliable.
3058         * lib/fsusage.c (UINTMAX_MAX): Remove.
3059         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
3060         * lib/utimecmp.c (SIZE_MAX): Remove.
3061
3062         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
3063
3064         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
3065         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
3066         O_NOATIME works.
3067
3068 2006-10-05  Bruno Haible  <bruno@clisp.org>
3069
3070         * lib/gl_list.h (gl_sortedlist_search_from_to,
3071         gl_sortedlist_indexof_from_to): New declarations.
3072         (gl_list_implementation): New fields sortedlist_search_from_to,
3073         sortedlist_indexof_from_to.
3074         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
3075         inline functions.
3076         * lib/gl_list.c (gl_sortedlist_search_from_to,
3077         gl_sortedlist_indexof_from_to): New functions.
3078         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
3079         function.
3080         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
3081         (gl_array_sortedlist_search_from_to): New function.
3082         (gl_array_list_implementation): Update.
3083         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
3084         function.
3085         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
3086         (gl_carray_sortedlist_search_from_to): New function.
3087         (gl_carray_list_implementation): Update.
3088         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
3089         gl_linked_sortedlist_indexof_from_to): New functions.
3090         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3091         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3092         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
3093         gl_tree_sortedlist_indexof_from_to): New functions.
3094         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3095         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3096         Update.
3097         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3098         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
3099         Update.
3100
3101 2006-10-05  Bruno Haible  <bruno@clisp.org>
3102
3103         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
3104         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
3105         (struct gl_list_implementation): Add fields search_from_to,
3106         indexof_from_to. Remove fields search, indexof.
3107         (gl_list_search): Use the search_from_to method.
3108         (gl_list_search_from, gl_list_search_from_to): New functions.
3109         (gl_list_indexof): Use the indexof_from_to method.
3110         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3111         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
3112         (gl_list_search_from, gl_list_search_from_to): New functions.
3113         (gl_list_indexof): Use the indexof_from_to method.
3114         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3115         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
3116         gl_array_indexof. Add start_index, end_index arguments.
3117         (gl_array_search_from_to): Renamed from gl_array_search. Add
3118         start_index, end_index arguments.
3119         (gl_array_remove, gl_array_list_implementation): Update.
3120         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
3121         gl_carray_indexof. Add start_index, end_index arguments.
3122         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
3123         start_index, end_index arguments.
3124         (gl_carray_remove, gl_carray_list_implementation): Update.
3125         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
3126         gl_linked_search. Add start_index, end_index arguments.
3127         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
3128         start_index, end_index arguments.
3129         (gl_linked_remove): Update.
3130         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3131         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3132         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
3133         field to 'size_t'.
3134         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
3135         gl_tree_search. Add start_index, end_index arguments.
3136         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3137         start_index, end_index arguments.
3138         (gl_tree_remove): Update.
3139         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3140         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3141         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
3142         function.
3143         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
3144         gl_tree_search. Add start_index, end_index arguments.
3145         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3146         start_index, end_index arguments.
3147         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3148         Update.
3149         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
3150
3151 2006-10-05  Bruno Haible  <bruno@clisp.org>
3152
3153         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
3154
3155         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
3156         fwriteerror_temp): New declarations.
3157         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
3158         (descriptors): New variable.
3159         (cleanup): First, close the descriptors.
3160         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
3161         fclose_temp, fwriteerror_temp): New functions.
3162
3163 2006-10-04  Jim Meyering  <jim@meyering.net>
3164
3165         * lib/fts.c (fts_open): Tiny comment change.
3166
3167 2006-10-04  Bruno Haible  <bruno@clisp.org>
3168
3169         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
3170         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
3171         gl_LOCK_BODY.
3172         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
3173         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
3174         gl_LOCK_EARLY_BODY.
3175         (gl_LOCK): Require gl_LOCK_BODY.
3176
3177 2006-10-04  Bruno Haible  <bruno@clisp.org>
3178
3179         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
3180         (gl_oset_search_atleast): New declaration.
3181         (struct gl_oset_implementation): Add field 'search_atleast'.
3182         (gl_oset_search_atleast): New inline function.
3183         * lib/gl_oset.c (gl_oset_search_atleast): New function.
3184         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
3185         (gl_array_oset_implementation): Update.
3186         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
3187         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
3188         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
3189
3190 2006-10-04  Bruno Haible  <bruno@clisp.org>
3191
3192         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
3193
3194 2006-10-03  Bruno Haible  <bruno@clisp.org>
3195
3196         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
3197         from gl_avltreehash_list_implementation.
3198
3199 2006-10-03  Bruno Haible  <bruno@clisp.org>
3200
3201         * lib/gl_oset.c (gl_oset_add): Fix return type.
3202
3203 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
3204
3205         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
3206
3207 2006-10-02  Eric Blake  <ebb9@byu.net>
3208
3209         * modules/strnlen (Depends-on): Add extensions.
3210
3211 2006-10-02  Eric Blake  <ebb9@byu.net>
3212
3213         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
3214         definition in 2.60+.
3215
3216 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
3217
3218         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
3219         checks.
3220
3221 2006-10-02  Bruno Haible  <bruno@clisp.org>
3222
3223         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
3224         to the AUTOMAKE_OPTIONS.
3225         Reported by Jim Meyering.
3226
3227 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
3228
3229         Work around bug in Solaris 10 /proc file system:
3230         /proc/self/fd/NNN/.. isn't the parent directory of
3231         the directory whose file descriptor is NNN.  This needs to
3232         be worked around at run time, not compile time, since a
3233         program might be built on Solaris 8, where things work, and
3234         run on Solaris 10.
3235         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
3236         to use the following interface instead:
3237         (OPENAT_BUFFER_SIZE): New macro.
3238         (openat_proc_name): New function.
3239         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
3240         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
3241         Likewise.
3242         * lib/openat-proc.c: New file.
3243         * modules/openat (Files): Add lib/openat-proc.c.
3244         (Depends-on): Add same-inode, stdbool.
3245         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
3246
3247 2006-09-29  Bruno Haible  <bruno@clisp.org>
3248
3249         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
3250         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
3251         argument. Set stdout_closed before testing for ferror, not after.
3252         (fwriteerror, fwriteerror_no_ebadf): New functions.
3253
3254 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3255
3256         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
3257
3258 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
3259
3260         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
3261         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
3262
3263 2006-09-28  Jim Meyering  <jim@meyering.net>
3264
3265         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
3266         Include <unistd.h>.
3267
3268 2006-09-28  Bruno Haible  <bruno@clisp.org>
3269
3270         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
3271         * modules/linkedhash-list (Depends-on): Likewise.
3272         * modules/rbtreehash-list (Depends-on): Likewise.
3273
3274 2006-09-28  Bruno Haible  <bruno@clisp.org>
3275
3276         * lib/strndup.h: Simplify the redefinition of strndup.
3277         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
3278         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
3279
3280 2006-09-28  Bruno Haible  <bruno@clisp.org>
3281
3282         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
3283         * lib/gl_linkedhash_list.c: Likewise.
3284         * lib/gl_rbtreehash_list.c: Likewise.
3285
3286 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
3287
3288         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
3289         getaddrinfo.
3290
3291         * lib/__fpending.h: Don't include <stdio_ext.h> unless
3292         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
3293         it causes <stdio_ext.h> to cause a compile-time error.
3294         Problem reported by Nelson H. F. Beebe.
3295         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
3296         of HAVE_DECL___PENDING.
3297
3298         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
3299         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
3300         declaration.
3301
3302 2006-09-27  Jim Meyering  <jim@meyering.net>
3303
3304         This file could end up with a definition for a function
3305         named __strndup, rather than rpl_strndup on a system with
3306         incomplete weak_alias support.
3307         * lib/strndup.c (strndup): Rename from __strndup.
3308         Remove #defines that used to map __strndup to strndup.
3309         Don't use K&R prototypes.
3310         Remove LIBC-related code, since this file is not sync'd with glibc.
3311         * lib/strndup.h: Revamp, accordingly.
3312         * m4/strndup.m4: Modernize.
3313
3314 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
3315
3316         * modules/savewd (Depends-on): Add 'raise'.
3317         * lib/savewd.c: Include <signal.h>, for 'raise'.
3318
3319 2006-09-26  Jim Meyering  <jim@meyering.net>
3320
3321         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
3322         when we detect Darwin 8.7.0's acl_get_file bug.
3323         Rearrange to perform the new (below) run-test while $LIBS
3324         contains any acl-related library.  Set USE_ACL at the end.
3325         (gl_ACL_GET_FILE): New function.
3326
3327 2006-09-26  Eric Blake  <ebb9@byu.net>
3328
3329         * lib/verror.c: Include <config.h> unconditionally.
3330
3331 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
3332
3333         * modules/clock-time (Maintainer): Add self.
3334         * modules/getlogin_r (Depends-on): Add extensions.
3335
3336 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3337
3338         * modules/clock-time: New module.
3339         * modules/nanosleep (Depends-on): Add clock-time.
3340         * modules/gethrxtime (Depends-on): Likewise.
3341         * modules/gettime (Depends-on): Likewise.
3342         * modules/settime (Depends-on): Likewise.
3343
3344         * modules/fts-lgpl: Depend on openat.
3345         * modules/mkancesdirs: Depend on savewd.
3346         * modules/mkdir-p: Likewise.
3347
3348 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3349
3350         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
3351
3352         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
3353         `gl_have_arbitrary_file_name_length_limit' to
3354         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
3355         actually works between configure runs.
3356
3357 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3358             Bruno Haible  <bruno@clisp.org>
3359
3360         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
3361
3362 2006-09-25  Jim Meyering  <jim@meyering.net>
3363
3364         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
3365         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
3366
3367 2006-09-25  Eric Blake  <ebb9@byu.net>
3368
3369         * gnulib-tool (func_import, func_create_testdir): Fix typos in
3370         exec's in 2006-09-18 patch when shuffling fds.
3371
3372 2006-09-25  Bruno Haible  <bruno@clisp.org>
3373
3374         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
3375         Reported by Jim Meyering.
3376
3377 2006-09-24  Jim Meyering  <jim@meyering.net>
3378
3379         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
3380         compare a pointer against a literal "0".  That caused failures with
3381         at least HP-UX's hpcc.
3382
3383 2006-09-22  Simon Josefsson  <jas@extundo.com>
3384
3385         * modules/gc-sha1:
3386         * modules/gc-md4:
3387         * modules/gc-hmac-sha1:
3388         * modules/gc-hmac-md5:
3389         * modules/gc-des:
3390         * modules/gc-arcfour: Distribute more files.
3391
3392 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3393
3394         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
3395         (gl_linked_iterator_from_to): Initialize struct completely.
3396         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
3397         (gl_tree_iterator_from_to): Likewise
3398         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
3399         * lib/gl_array_list.c [lint] (gl_array_iterator)
3400         (gl_array_iterator_from_to): Likewise.
3401         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
3402         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
3403         (gl_carray_iterator_from_to): Likewise.
3404
3405         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
3406         * lib/md4.c (md4_process_block): Remove unused variable.
3407         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
3408         parentheses for clarity.
3409
3410 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3411
3412         * modules/bison-i18n (Depends-on): Add gettext.
3413
3414 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3415
3416         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
3417         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
3418         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
3419         also add missing comma that caused broken test.
3420         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
3421         stdlib.h, for `abort'.
3422         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
3423         variables.
3424         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
3425         include unistd.h if present, for `rmdir'.
3426         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
3427         variables.
3428         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
3429         in the process include standard headers for prototypes.
3430         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
3431         gets declared on GNU/Linux.
3432         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
3433         unistd.h, for `rmdir'.
3434         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
3435
3436         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
3437         always true.
3438         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
3439
3440         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
3441
3442 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3443
3444         * gnulib-tool (func_version): Create output all at once.  This
3445         may help avoid triggering unnecessary SIGPIPEs, and at any
3446         rate it doesn't hurt.
3447
3448 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3449             Bruno Haible  <bruno@clisp.org>
3450
3451         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
3452         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3453         * m4/signed.m4 (bh_C_SIGNED): Likewise.
3454
3455         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
3456         (gl_FUNC_VASPRINTF): Invoke it.
3457
3458 2006-09-22  Bruno Haible  <bruno@clisp.org>
3459
3460         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
3461         getloadavg.c as first argument.
3462
3463 2006-09-22  Bruno Haible  <bruno@clisp.org>
3464
3465         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
3466         at the beginning of the gl_INIT macro.
3467         * modules/getloadavg (configure.ac): Pass $gl_source_base to
3468         gl_GETLOADAVG.
3469
3470 2006-09-22  Bruno Haible  <bruno@clisp.org>
3471
3472         * gnulib-tool (func_create_megatestdir): Don't include the config-h
3473         module.
3474         Suggested by Ralf Wildenhues.
3475
3476 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
3477
3478         Import this patch from libc:
3479
3480         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
3481
3482         * lib/regex_internal.c (re_string_reconstruct): Handle
3483         offset < pstr->valid_raw_len && pstr->offsets_needed case.
3484         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
3485         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
3486         re_string_context_at.
3487
3488         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
3489         now requires it.
3490         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
3491         gl_REGEX now does it for us.
3492         (gl_REGEX): Add test taken from
3493         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
3494
3495         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
3496         Check that large offsets work.  Modernize Autoconf usages.
3497         Prefer "yes" to mean a good thing rather than a bad.
3498         Don't put "#define mkstemp" in config.h, as this might interfere
3499         with standard system headers that "#define mkstemp mkstemp64".
3500
3501         * modules/mkstemp (Depends-on): Add extensions, so that
3502         mkstemp is visible on some platforms.
3503         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
3504         (Include): Change to "mkstemp.h" from <stdlib.h>.
3505         (Files): Add mkstemp.h.
3506
3507         * lib/mkstemp.h: New file, since some standard headers
3508         #define mkstemp.
3509         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
3510         Include "mkstemp.h".
3511         Make the _LIBC code resemble glibc original more,
3512         e.g., use K&R style.
3513         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
3514         (mkstemp): Remove, since mkstemp.h does this for us.
3515         * lib/stdlib--.h: Include mkstemp.h.
3516
3517         Import this patch from libc:
3518
3519         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3520
3521         * lib/tempname.c (__gen_tempname): Change attempts_min
3522         into a macro.  Use preprocessor to decide how to initialize
3523         attempts [Coverity CID 67].
3524
3525 2006-09-20  Bruno Haible  <bruno@clisp.org>
3526
3527         * lib/mkdtemp.c: Import from libc.
3528         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3529                 * sysdeps/posix/tempname.c (__gen_tempname): Change
3530                 attempts_min into a macro.  Use preprocessor to decide how to
3531                 initialize attempts [Coverity CID 67].
3532         2001-11-27  Paul Eggert  <eggert@twinsun.com>
3533                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
3534                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
3535
3536 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3537
3538         * gnulib-tool (func_exit): New function, to allow to pass the
3539         exit status portably through the trap.  Use everywhere.
3540         (--help, --version): Signal a write error.
3541         (trap): catch SIGPIPE, for write errors.
3542         Exit at the end of the trap, with the correct exit status.
3543
3544 2006-09-19  Karl Berry  <karl@gnu.org>
3545
3546         * doc/gnulib.texi: note about the license texinfo files.
3547
3548 2006-09-19  Eric Blake  <ebb9@byu.net>
3549
3550         * gnulib-tool: Avoid space-tab.
3551
3552 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3553
3554         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
3555         that prevented coreutils 6.1 from building.  Problem reported
3556         by Petter Reinholdtsen.
3557
3558 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3559
3560         * gnulib-tool (avoidlist): Fix typo that broke options like
3561         --avoid=lock that are used by coreutils bootstrap.
3562
3563 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
3564
3565         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
3566         more systematically.
3567
3568 2006-09-18  Jim Meyering  <jim@meyering.net>
3569
3570         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
3571
3572 2006-09-18  Bruno Haible  <bruno@clisp.org>
3573
3574         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
3575
3576 2006-09-18  Bruno Haible  <bruno@clisp.org>
3577
3578         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
3579         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
3580         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
3581         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
3582         * m4/gettext.m4: Require autoconf >= 2.52.
3583         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
3584         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
3585         of gl_cv_header_inttypes_h.
3586
3587 2006-09-18  Bruno Haible  <bruno@clisp.org>
3588
3589         * lib/javaversion.c: Include configmake.h.
3590
3591 2006-09-18  Bruno Haible  <bruno@clisp.org>
3592
3593         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
3594         avoid that the while loops be executed in a subshell.
3595
3596 2006-09-18  Bruno Haible  <bruno@clisp.org>
3597
3598         * MODULES.html.sh (func_module): Break long lines.
3599         Suggested by Bruce Korb <bkorb@gnu.org>.
3600
3601 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3602
3603         Speed up by a factor of 1.12.
3604         * gnulib-tool (nl): New variable.
3605         (func_import): Rewrite include directive extraction to only read each
3606         directive once.
3607
3608 2006-09-17  Bruno Haible  <bruno@clisp.org>
3609
3610         * modules/javaversion (Makefile.am): Remove DEFS setting.
3611         (Depends-on): Add configmake, for PKGDATADIR definition.
3612
3613 2006-09-17  Bruno Haible  <bruno@clisp.org>
3614
3615         * gnulib-tool (func_create_testdir): Rewrite all files at once.
3616
3617 2006-09-17  Bruno Haible  <bruno@clisp.org>
3618
3619         * gnulib-tool (func_append): New function, stolen from libtool.m4.
3620         (func_modules_transitive_closure, func_modules_add_dummy,
3621         func_modules_to_filelist, func_import, func_create_testdir,
3622         func_create_megatestdir, ...): Use it wherever possible.
3623         Suggested by Ralf Wildenhues.
3624
3625 2006-09-16  Karl Berry  <karl@gnu.org>
3626
3627         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
3628         to avoid sectioning errors.
3629         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
3630         [ifinfo]: blank line after @center-ed titles.
3631         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
3632         Spell FSF address consistently with others.
3633         (These changes approved by rms.)
3634
3635 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3636
3637         Speed up by a factor of 1.61.
3638         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
3639         already checked module names again.
3640
3641 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3642
3643         Speed up by a factor of 1.13.
3644         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
3645         for new_files, and the input to func_add_or_update.
3646
3647 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3648
3649         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
3650         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
3651
3652 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3653
3654         * modules/mkancesdirs (Depends-on): Add fcntl.
3655         * modules/savewd: New file.
3656         * MODULES.html.sh (File system functions): Add savewd.
3657
3658         * modules/configmake (Makefile.am): Add support for the
3659         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
3660
3661 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3662
3663         * m4/savewd.m4: New file.
3664
3665 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3666
3667         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
3668         (dirchownmod): New arg FD.  All callers changed.
3669         Use FD rather than opening the directory ourself, as opening is
3670         now the caller's responsibility.
3671         * lib/dirchownmod.h: Likewise.
3672         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
3673         hosts that require <sys/types.h> before <sys/stat.h>.  Include
3674         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
3675         (test_dir): Remove.
3676         (mkancesdirs): Return length of prefix of FILE that has already
3677         been made, or -2 if there is a child doing the work.  Redo
3678         algorithm so that it is O(N) rather than O(N**2).  Optimize away
3679         ".", and treat ".." specially since it might stray back into
3680         already-created areas.  Use a subprocess if necessary.  New arg
3681         WD; all users changed.  MAKE_DIR function should now return 1
3682         if it creates a directory that is not readable.  Return -2 if
3683         a child process is spun off.
3684         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
3685         Adjust signature to match code.
3686         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
3687         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
3688         all users changed.
3689         * lib/savewd.c, lib/savewd.h: New files.
3690
3691 2006-09-15  Jim Meyering  <jim@meyering.net>
3692
3693         * modules/rename-dest-slash: New module.
3694         * MODULES.html.sh (posix_compat): Add it here.
3695
3696         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
3697
3698 2006-09-15  Jim Meyering  <jim@meyering.net>
3699
3700         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
3701         file.
3702
3703         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
3704
3705 2006-09-15  Jim Meyering  <jim@meyering.net>
3706
3707         * lib/rename-dest-slash.c (has_trailing_slash): Use
3708         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
3709         (rpl_rename_dest_slash): Perform the cheaper trailing slash
3710         test before testing whether SRC is a directory.
3711         Suggestions from Bruno Haible.
3712
3713         Avoid a warning about an unused variable.
3714         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
3715         into the #ifdef block where it's used.
3716
3717         * lib/rename-dest-slash.c: New file.
3718
3719 2006-09-14  Bruno Haible  <bruno@clisp.org>
3720
3721         * lib/allocsa.c: Include <config.h> unconditionally.
3722         * lib/asnprintf.c: Likewise.
3723         * lib/asprintf.c: Likewise.
3724         * lib/c-strcasecmp.c: Likewise.
3725         * lib/c-strcasestr.c: Likewise.
3726         * lib/c-strncasecmp.c: Likewise.
3727         * lib/c-strstr.c: Likewise.
3728         * lib/classpath.c: Likewise.
3729         * lib/clean-temp.c: Likewise.
3730         * lib/concatpath.c: Likewise.
3731         * lib/copy-file.c: Likewise.
3732         * lib/csharpcomp.c: Likewise.
3733         * lib/csharpexec.c: Likewise.
3734         * lib/execute.c: Likewise.
3735         * lib/fatal-signal.c: Likewise.
3736         * lib/findprog.c: Likewise.
3737         * lib/fwriteerror.c: Likewise.
3738         * lib/gl_array_list.c: Likewise.
3739         * lib/gl_array_oset.c: Likewise.
3740         * lib/gl_avltree_list.c: Likewise.
3741         * lib/gl_avltree_oset.c: Likewise.
3742         * lib/gl_avltreehash_list.c: Likewise.
3743         * lib/gl_carray_list.c: Likewise.
3744         * lib/gl_linked_list.c: Likewise.
3745         * lib/gl_linkedhash_list.c: Likewise.
3746         * lib/gl_list.c: Likewise.
3747         * lib/gl_oset.c: Likewise.
3748         * lib/gl_rbtree_list.c: Likewise.
3749         * lib/gl_rbtree_oset.c: Likewise.
3750         * lib/gl_rbtreehash_list.c: Likewise.
3751         * lib/imaxabs.c: Likewise.
3752         * lib/imaxdiv.c: Likewise.
3753         * lib/javacomp.c: Likewise.
3754         * lib/javaexec.c: Likewise.
3755         * lib/javaversion.c: Likewise.
3756         * lib/linebreak.c: Likewise.
3757         * lib/localcharset.c: Likewise.
3758         * lib/lock.c: Likewise.
3759         * lib/mbchar.c: Likewise.
3760         * lib/mbswidth.c: Likewise.
3761         * lib/mkdtemp.c: Likewise.
3762         * lib/pipe.c: Likewise.
3763         * lib/printf-args.c: Likewise.
3764         * lib/printf-parse.c: Likewise.
3765         * lib/progname.c: Likewise.
3766         * lib/progreloc.c: Likewise.
3767         * lib/readlink.c: Likewise.
3768         * lib/sh-quote.c: Likewise.
3769         * lib/stpcpy.c: Likewise.
3770         * lib/stpncpy.c: Likewise.
3771         * lib/strcasecmp.c: Likewise.
3772         * lib/strcasestr.c: Likewise.
3773         * lib/strcspn.c: Likewise.
3774         * lib/striconv.c: Likewise.
3775         * lib/strncasecmp.c: Likewise.
3776         * lib/strnlen1.c: Likewise.
3777         * lib/strstr.c: Likewise.
3778         * lib/strtok_r.c: Likewise.
3779         * lib/tls.c: Likewise.
3780         * lib/tmpdir.c: Likewise.
3781         * lib/unicodeio.c: Likewise.
3782         * lib/unsetenv.c: Likewise.
3783         * lib/vasnprintf.c: Likewise.
3784         * lib/vasprintf.c: Likewise.
3785         * lib/wait-process.c: Likewise.
3786         * lib/xallocsa.c: Likewise.
3787         * lib/xsetenv.c: Likewise.
3788         * lib/xstriconv.c: Likewise.
3789
3790 2006-09-13  Simon Josefsson  <jas@extundo.com>
3791
3792         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
3793         that internally, suggested by Ralf Wildenhues
3794         <Ralf.Wildenhues@gmx.de>.
3795
3796 2006-09-13  Simon Josefsson  <jas@extundo.com>
3797
3798         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
3799         @LIBOBJS@.
3800         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3801
3802 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
3803
3804         * lib/_fpending.c: Include <config.h> unconditionally, since we no
3805         longer worry about uses that don't define HAVE_CONFIG_H.
3806         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
3807         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
3808         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
3809         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
3810         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
3811         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
3812         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
3813         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
3814         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
3815         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
3816         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
3817         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
3818         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
3819         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
3820         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
3821         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
3822         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
3823         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
3824         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
3825         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
3826         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
3827         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
3828         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
3829         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
3830         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
3831         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
3832         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
3833         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
3834         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
3835         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
3836         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
3837         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
3838         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
3839         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
3840         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
3841         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
3842         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
3843         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
3844         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
3845         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
3846         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
3847         Likewise.
3848
3849 2006-09-13  Eric Blake  <ebb9@byu.net>
3850
3851         * lib/getopt.c: Fix typo in last commit.
3852
3853 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
3854
3855         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
3856         dgettext.
3857
3858 2006-09-12  Jim Meyering  <jim@meyering.net>
3859
3860         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
3861         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
3862         Reported by Nelson H. F. Beebe.
3863
3864 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
3865
3866         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
3867         program_invocation_name and program_invocation_short_name are
3868         initialized.
3869         * lib/argp-namefrob.h: Move declarations of program_invocation_name
3870         and program_invocation_short_name to argp.h, so they are visible
3871         to user programs.
3872         * lib/argp.h: Likewise
3873
3874 2006-09-10  Bruno Haible  <bruno@clisp.org>
3875
3876         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
3877         m4/inttypes_h.m4, m4/uintmax_t.m4.
3878
3879 2006-09-10  Bruno Haible  <bruno@clisp.org>
3880
3881         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
3882         gl_AC_TYPE_UINTMAX_T.
3883
3884 2006-09-10  Bruno Haible  <bruno@clisp.org>
3885
3886         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
3887
3888 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
3889
3890         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
3891         convention.  Text proposed by Bruno Haible.
3892         (struct argp_option): Document the use of N_() wrappers.
3893
3894         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
3895         '\v', and translate the two parts separately, instead of feeding
3896         the whole string to gettext.  This allows to exclude
3897         '\v' from the strings visible to the translator by writing doc
3898         strings as N_("..") "\v" N_("..").
3899
3900 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
3901
3902         * config/srclist.txt: Undo latest change; the bug was fixed.
3903
3904 2006-09-09  Bruno Haible  <bruno@clisp.org>
3905
3906         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
3907         assignments if building a library without libtool.
3908         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
3909         in func_emit_lib_Makefile_am.
3910         (func_import): When building a static library libfoo.a, arrange to
3911         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
3912         (func_create_testdir): Likewise.
3913         * modules/gc (configure.ac, Makefile.am): If building statically,
3914         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
3915         * modules/iconvme (configure.ac, Makefile.am): Likewise.
3916         * modules/striconv (configure.ac, Makefile.am): Likewise.
3917         Based on a suggestion by Ralf Wildenhues.
3918
3919 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3920
3921         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
3922         Check for unistd.h too, since Autoconf doesn't assume POSIX.
3923         Also:
3924
3925         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3926         Add year_2050_test to catch glibc bug 2821
3927         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3928
3929         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3930         Prefer #ifdef to #if.
3931
3932         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
3933         Return from 'main' instead of calling 'exit'.
3934
3935 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3936
3937         * lib/mktime.c (guess_time_tm): Fix bug where mktime
3938         returned the maximum time_t value rather than (time_t) -1.
3939         Problem originally reported by William Bardwell
3940         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3941
3942         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3943         Moved to here ...
3944         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3945         ... from here.
3946
3947 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3948
3949         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
3950         2821 is fixed.
3951
3952 2006-09-08  Jim Meyering  <jim@meyering.net>
3953
3954         Don't make generated files read-only.  That would bother too many
3955         people.  However, do retain the ability to work when targets are
3956         read-only: remove the destination and temporary files before writing
3957         them (when generated via sed or echo), or by using the -f option for
3958         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
3959         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3960         * modules/byteswap, modules/configmake, modules/fcntl:
3961         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3962         * modules/localcharset, modules/netinet_in, modules/poll:
3963         * modules/stdbool, modules/stdint, modules/sys_select:
3964         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3965
3966 2006-09-08  Jim Meyering  <jim@meyering.net>
3967
3968         Avoid new build failure on FreeBSD 6.0.
3969         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
3970         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
3971         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
3972
3973 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3974
3975         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
3976
3977 2006-09-07  Jim Meyering  <jim@meyering.net>
3978
3979         Fix global typo in last change: use chmod u-w, not chmod u-x.
3980         Spotted by Paul Eggert and Bruce Korb.
3981         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3982         * modules/byteswap, modules/configmake, modules/fcntl:
3983         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3984         * modules/localcharset, modules/netinet_in, modules/poll:
3985         * modules/stdbool, modules/stdint, modules/sys_select:
3986         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3987
3988 2006-09-06  Jim Meyering  <jim@meyering.net>
3989
3990         Make generated files be read-only.
3991         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
3992         Ensure that each generated file is now read-only.
3993         * modules/argz: Likewise.
3994         * modules/arpa_inet: Likewise.
3995         * modules/byteswap: Likewise.
3996         * modules/configmake: Likewise.
3997         * modules/fcntl: Likewise.
3998         * modules/fnmatch: Likewise.
3999         * modules/getopt: Likewise.
4000         * modules/glob: Likewise.
4001         * modules/inttypes: Likewise.
4002         * modules/netinet_in: Likewise.
4003         * modules/poll: Likewise.
4004         * modules/stdbool: Likewise.
4005         * modules/stdint: Likewise.
4006         * modules/sys_select: Likewise.
4007         * modules/sys_socket: Likewise.
4008         * modules/sys_stat: Likewise.
4009         * modules/sysexits: Likewise.
4010         * modules/localcharset: Same as above, but continue using temporary
4011         file named "t-$@" (why different?) rather than the "$@-t" used
4012         everywhere else.
4013
4014         * modules/sysexits (Makefile.am): Replace literal occurrences
4015         of "sysexit.h" more readable, and more consistent, "$@".
4016
4017 2006-09-06  Bruno Haible  <bruno@clisp.org>
4018
4019         * modules/striconv: New file.
4020         * modules/xstriconv: New file.
4021         * MODULES.html.sh (Internationalization functions): Add striconv,
4022         xstriconv.
4023
4024 2006-09-06  Bruno Haible  <bruno@clisp.org>
4025
4026         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
4027         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
4028         not using libtool correctly.
4029
4030 2006-09-06  Bruno Haible  <bruno@clisp.org>
4031
4032         * lib/striconv.h: New file.
4033         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
4034         iconvstring.c.
4035         * lib/xstriconv.h: New file.
4036         * lib/xstriconv.c: New file.
4037
4038 2006-09-06  Bruno Haible  <bruno@clisp.org>
4039
4040         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4041         lib_..._LDFLAGS.
4042
4043 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4044
4045         * lib/argz_.h: Sync from Libtool.
4046
4047         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
4048                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4049
4050         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
4051
4052 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4053
4054         * modules/trim: New file.
4055
4056 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4057
4058         * lib/trim.h: New file.
4059         * lib/trim.c: New file.
4060
4061 2006-09-05  Bruno Haible  <bruno@clisp.org>
4062
4063         * MODULES.html.sh (String handling): Add trim.
4064
4065 2006-09-04  Karl Berry  <karl@gnu.org>
4066
4067         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
4068         until next release.
4069
4070 2006-09-03  Bruno Haible  <bruno@clisp.org>
4071
4072         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
4073         correctly.
4074
4075 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4076
4077         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
4078         not gl_GETLOADAVG.  Omit unneeded semicolons.
4079         Problems reported by Ralf Wildenhues in
4080         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4081         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
4082         at the end, which is the usual gnulib style.
4083
4084         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
4085         of doing all the work ourselves.
4086         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
4087         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
4088
4089 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4090
4091         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
4092         Problem reported by Ralf Wildenhues in
4093         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4094
4095         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
4096         HAVE_STRUCT_STATFS_F_FSTYPENAME.
4097
4098 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4099
4100         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
4101         yesterday's patch by changing test -n to test -z.
4102
4103 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4104
4105         * modules/getloadavg (Files): Add m4/getloadavg.m4.
4106         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
4107         the former is now obsolescent.
4108
4109         * modules/chdir-long (Depends-on): Add fcntl.
4110
4111 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4112
4113         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
4114         obsolescent, and programs should use gnulib instead.
4115         * m4/getloadavg.m4: New file, with contents taken from Autoconf
4116         but with prefixes changed.
4117
4118 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4119
4120         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
4121         or stdbool.h, because they might not exist while configuring.
4122
4123         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
4124         Don't include unistd.h or limits.h; not needed, since chdir-long.h
4125         does that for us.
4126         (O_DIRECTORY): Remove.
4127
4128 2006-08-31  Eric Blake  <ebb9@byu.net>
4129
4130         * gnulib-tool: Don't let emacs change spaces to TAB.
4131
4132 2006-08-31  Bruno Haible  <bruno@clisp.org>
4133
4134         * gnulib-tool: When calling func_import more than once, do it in a
4135         subshell.
4136         Reported by Eric Blake <ebb9@byu.net>.
4137
4138 2006-08-31  Bruno Haible  <bruno@clisp.org>
4139
4140         * gnulib-tool (nl): Remove variable.
4141         (sed_transform_lib_file): Use more robust test for config-h module.
4142         (func_import): Fix typo in 2006-08-25 patch.
4143
4144 2006-08-31  Bruno Haible  <bruno@clisp.org>
4145
4146         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
4147         specified, augment Makefile.am variables instead of assigning them.
4148
4149 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4150
4151         Work around a bug in both the Linux and SunOS 64-bit kernels:
4152         nanosleep mishandles sleeps for longer than 2**31 seconds.
4153         Problem reported by Frank v Waveren in
4154         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4155         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
4156         Check for nanosleep bug.
4157         (LIB_NANOSLEEP): Append clock_gettime library if needed.
4158
4159 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4160
4161         Work around a bug in both the Linux and SunOS 64-bit kernels:
4162         nanosleep mishandles sleeps for longer than 2**31 seconds.
4163         Problem reported by Frank v Waveren in
4164         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4165         * lib/nanosleep.c (BILLION): New constant.
4166         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
4167         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
4168         implementation.
4169
4170 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4171
4172         * modules/nanosleep (Depends-on): Add gettime.
4173
4174 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4175         and Simon Josefsson  <jas@extundo.com>
4176         and Oskar Liljeblad  <oskar@osk.mine.nu>
4177
4178         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
4179         * gnulib-tool (func_import): New license type 'unmodifiable license
4180         text'.
4181         * modules/fdl: Use it.  Longer description.
4182         * module/gpl, module/lgpl: New files.
4183
4184 2006-08-30  Jim Meyering  <jim@meyering.net>
4185
4186         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
4187         shadowing the parameter.
4188
4189 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4190
4191         Sync from Libtool:
4192
4193         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4194
4195         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
4196         sharing with gnulib.  Report by Eric Blake.
4197
4198 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4199
4200         * modules/isapipe: New file.
4201         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
4202
4203 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4204
4205         * modules/configmake (Makefile.am): Add a comment, and omit
4206         the CONFIGMAKE_ prefix from generated macro names.  Suggested
4207         by Bruno Haible.
4208
4209 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4210
4211         * m4/isapipe.m4: New file.
4212
4213 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4214
4215         * lib/isapipe.c, lib/isapipe.h: New files.
4216
4217 2006-08-29  Jim Meyering  <jim@meyering.net>
4218
4219         * modules/configmake (Makefile.am): Make configmake.h depend on
4220         Makefile.  Otherwise, a stale configmake.h could hang around.
4221
4222 2006-08-29  Eric Blake  <ebb9@byu.net>
4223
4224         * lib/error.c (error_at_line, print_errno_message): Match libc, after
4225         resolution of upstream bug 3044.
4226
4227 2006-08-29  Bruno Haible  <bruno@clisp.org>
4228
4229         * modules/localcharset (Depends-on): Add configmake.
4230         (Makefile.am): Remove setting of LIBDIR through DEFS.
4231
4232 2006-08-29  Bruno Haible  <bruno@clisp.org>
4233
4234         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
4235         defined.
4236
4237 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4238
4239         * modules/fcntl: New file.
4240         * modules/chdir-safer (Depends-on): Add fcntl.
4241         * modules/fts: Likewise.
4242         * modules/mkdir-p: Likewise.
4243
4244         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
4245         This undoes the most recent change, since we're now addressing the
4246         problem in a different way.
4247
4248         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
4249         into output, since the output might be called Makefile.am even
4250         if $makefile_name is something different.
4251         (func_import): Use $makefile_am rather than
4252         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
4253         empty.
4254
4255         * modules/inttypes (Files): Add m4/inttypes-h.m4.
4256
4257 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4258
4259         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
4260         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
4261         recent change to stdint.m4, since we're now addressing the problem in a
4262         different way.
4263
4264 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4265
4266         * m4/fcntl_h.m4: New file.
4267
4268 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4269
4270         * lib/fcntl_.h: New file.
4271         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
4272         the fcntl module.
4273         * lib/dirchownmod.c: Likewise.
4274         * lib/fts.c: Likewise.
4275
4276         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
4277         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
4278         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
4279         just before including <inttypes.h>, to avoid circular inclusion.
4280
4281 2006-08-28  Jim Meyering  <jim@meyering.net>
4282
4283         * doc/visibility.texi: Actually read and correct the grammar of the
4284         sentence affected by yesterday's change.
4285
4286 2006-08-28  Eric Blake  <ebb9@byu.net>
4287
4288         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
4289         needs wrapper.
4290
4291 2006-08-28  Eric Blake  <ebb9@byu.net>
4292
4293         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
4294
4295 2006-08-28  Eric Blake  <ebb9@byu.net>
4296
4297         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
4298
4299 2006-08-28  Bruno Haible  <bruno@clisp.org>
4300
4301         * modules/c-strstr: New file, from GNU gettext.
4302         * MODULES.html.sh (String handling): Add c-strstr.
4303
4304 2006-08-28  Bruno Haible  <bruno@clisp.org>
4305
4306         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
4307         macros.
4308         Reported by Eric Blake.
4309
4310 2006-08-28  Bruno Haible  <bruno@clisp.org>
4311
4312         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
4313         (VASNPRINTF): Return a string of length > INT_MAX without failing.
4314         * lib/vasprintf.c: Include errno.h, limits.h.
4315         (EOVERFLOW): New fallback definition.
4316         (vasprintf): Test here whether the string length is > INT_MAX.
4317         * lib/vsnprintf.c: Include errno.h, limits.h.
4318         (EOVERFLOW): New fallback definition.
4319         (vsnprintf): Fix bug when generated string was too long for the buffer.
4320         Test here whether the string length is > INT_MAX.
4321
4322 2006-08-28  Bruno Haible  <bruno@clisp.org>
4323
4324         * lib/inttypes_.h (SCNX*): Remove definitions.
4325         Reported by Eric Blake.
4326
4327 2006-08-28  Bruno Haible  <bruno@clisp.org>
4328
4329         * lib/c-strstr.h: New file, from GNU gettext.
4330         * lib/c-strstr.c: New file, from GNU gettext.
4331
4332 2006-08-28  Bruno Haible  <bruno@clisp.org>
4333
4334         * gnulib-tool: Reorder some statements.
4335
4336 2006-08-28  Bruno Haible  <bruno@clisp.org>
4337
4338         * gnulib-tool: New option --makefile-name.
4339         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
4340         $makefile_name.
4341         (func_import): Write $makefile_name to the cache file, and read it from
4342         there unless explicitly specified. Use $makefile_name as file name
4343         instead of Makefile.am. Adjust the recommendations accordingly.
4344
4345 2006-08-28  Bruno Haible  <bruno@clisp.org>
4346
4347         * gnulib-tool (func_verify_module): Check against misapplying patch.
4348
4349 2006-08-28  Bruno Haible  <bruno@clisp.org>
4350
4351         * gnulib-tool (func_relativize, func_relconcat): New functions.
4352         Give an error if --local-dir is given with --update.
4353         Remove trailing slashes from $local_gnulib_dir.
4354         (func_import): Store the relativized $local_gnulib_dir in
4355         gnulib-cache.m4, and read it from there if not specified explicitly.
4356
4357 2006-08-28  Bruno Haible  <bruno@clisp.org>
4358
4359         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
4360         is the current directory. Respect also $local_gnulib_dir.
4361
4362 2006-08-28  Bruno Haible  <bruno@clisp.org>
4363             Simon Josefsson  <jas@extundo.com>
4364
4365         BeOS portability.
4366         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
4367
4368 2006-08-27  Jim Meyering  <jim@meyering.net>
4369
4370         * doc/visibility.texi: Remove duplicate word: "pointer".
4371
4372 2006-08-26  Bruno Haible  <bruno@clisp.org>
4373
4374         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
4375         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
4376         (Makefile.am): Create inttypes.h from inttypes_.h.
4377         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
4378
4379         * modules/imaxabs: New file.
4380
4381         * modules/imaxdiv: New file.
4382
4383 2006-08-26  Bruno Haible  <bruno@clisp.org>
4384
4385         * m4/inttypes.m4: New file.
4386         * m4/_inttypes_h.m4: Remove file.
4387         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
4388         PRI_MACROS_BROKEN.
4389         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
4390
4391         * m4/imaxabs.m4: New file.
4392
4393         * m4/imaxdiv.m4: New file.
4394
4395 2006-08-26  Bruno Haible  <bruno@clisp.org>
4396
4397         * lib/inttypes_.h: New file.
4398         * lib/inttypes.h: Remove file.
4399         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
4400
4401         * lib/imaxabs.c: New file.
4402
4403         * lib/imaxdiv.c: New file.
4404
4405 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4406
4407         New config-h module, so that "make" output needn't be cluttered
4408         by -DHAVE_CONFIG_H.
4409         * MODULES.html.sh (Support for building libraries and executables):
4410         Add config-h.
4411         * modules/config-h: New file.
4412         * gnulib-tool (nl, sed_transform_lib_file): New vars.
4413         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
4414         the config-h module is used.
4415
4416         New configmake module, so that "make" output needn't be cluttered
4417         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
4418         * MODULES.html.sh (Support for building libraries and executables):
4419         Add configmake.
4420         * modules/configmake: New file.
4421
4422 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4423
4424         * m4/config-h.m4: New file.
4425
4426 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4427
4428         * config/srclist.txt: Add elisp-comp.
4429
4430 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4431
4432         * MODULES.html.sh (Support for building libraries and executables):
4433         Add elisp-comp.
4434         * build-aux/elisp-comp: New file.
4435         * modules/elisp-comp: New file.
4436
4437 2006-08-24  Bruno Haible  <bruno@clisp.org>
4438
4439         * gnulib-tool (func_create_testdir): Use non-default values of
4440         sourcebase and m4base.
4441
4442 2006-08-24  Bruno Haible  <bruno@clisp.org>
4443
4444         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
4445         HTML structure.
4446
4447 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
4448
4449         * modules/openat (Depends-on): Add lchown.
4450
4451 2006-08-23  Bruno Haible  <bruno@clisp.org>
4452
4453         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
4454         of gl_LOCK_EARLY instead of gl_LOCK.
4455
4456 2006-08-23  Bruno Haible  <bruno@clisp.org>
4457
4458         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
4459         on OSF/1 to no.
4460         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
4461
4462 2006-08-23  Bruno Haible  <bruno@clisp.org>
4463
4464         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
4465         as unusable.
4466
4467         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
4468         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
4469         (gl_LOCK): New macro.
4470
4471 2006-08-22  Simon Josefsson  <jas@extundo.com>
4472
4473         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
4474         to md5 module.
4475
4476 2006-08-22  Simon Josefsson  <jas@extundo.com>
4477
4478         * MODULES.html.sh: Add "Support for maintaining and release
4479         projects".
4480
4481         * build-aux/gnupload: New file, from coreutils.
4482
4483 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4484
4485         Avoid the need for AC_LIBSOURCES in m4 macros.
4486         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
4487         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
4488         * modules/check-version (EXTRA_DIST): Add check-version.h.
4489         * modules/crc (EXTRA_DIST): Add crc.h.
4490         * modules/des (EXTRA_DIST): Add des.h.
4491         * modules/gc (EXTRA_DIST): Add gc.h.
4492         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
4493         * modules/getline (EXTRA_DIST): Add getline.h.
4494         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
4495         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
4496         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
4497         * modules/md2 (EXTRA_DIST): Add md2.h.
4498         * modules/md4 (EXTRA_DIST): Add md4.h.
4499         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
4500         * modules/read-file (EXTRA_DIST): Add read-file.h.
4501         * modules/readline (EXTRA_DIST): Add readline.h.
4502         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
4503         rijndael-api-fst.h.
4504
4505 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4506
4507         * m4/rijndael.m4 (gl_ARCFOUR):
4508         * m4/arctwo.m4 (gl_ARCTWO):
4509         * m4/check-version.m4 (gl_CHECK_VERSION):
4510         * m4/crc.m4 (gl_CRC):
4511         * m4/des.m4 (gl_DES):
4512         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
4513         * m4/gc.m4 (gl_GC):
4514         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
4515         * m4/getline.m4 (gl_FUNC_GETLINE):
4516         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
4517         * m4/hmac-md5.m4 (gl_HMAC_MD5):
4518         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
4519         * m4/md2.m4 (gl_MD2):
4520         * m4/md4.m4 (gl_MD4):
4521         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
4522         * m4/read-file.m4 (gl_FUNC_READ_FILE):
4523         * m4/readline.m4 (gl_FUNC_READLINE):
4524         * m4/rijndael.m4 (gl_RIJNDAEL):
4525         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
4526         to get the necessary .h files and whatnot.
4527
4528 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4529
4530         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
4531         gnulib rather than the other way around.
4532         * config/srclistvars.sh (COREUTILS): Remove.
4533
4534 2006-08-22  Jim Meyering  <jim@meyering.net>
4535
4536         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
4537
4538         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
4539
4540 2006-08-22  Eric Blake  <ebb9@byu.net>
4541
4542         * modules/regexprops-generic: New file.
4543         * MODULES.html.sh (Support for building documentation): List it.
4544
4545 2006-08-22  Eric Blake  <ebb9@byu.net>
4546
4547         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
4548         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
4549         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
4550         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
4551
4552 2006-08-22  Bruno Haible  <bruno@clisp.org>
4553
4554         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
4555         and lib_LTLIBRARIES like the other lib_* variables.
4556
4557 2006-08-22  Bruno Haible  <bruno@clisp.org>
4558
4559         * build-aux/x-to-1.in: New file, from GNU gettext.
4560
4561 2006-08-22  Bruno Haible  <bruno@clisp.org>
4562
4563         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
4564         <utmpx.h> exists.
4565
4566 2006-08-22  Bruno Haible  <bruno@clisp.org>
4567
4568         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
4569         <utmpx.h> exists.
4570
4571 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4572
4573         BeOS portability.
4574         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
4575         exist.
4576         Problem reported by Bruno Haible.
4577
4578 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4579
4580         Avoid the need for AC_LIBSOURCES in m4 macros.
4581         * modules/acl (EXTRA_DIST): Add acl.h.
4582         * modules/argmatch (Files): Add m4/argmatch.m4.
4583         (configure.ac): Add gl_ARGMATCH.
4584         (EXTRA_DIST): Renamed from lib_SOURCES, for
4585         consistency with the other modules.  Remove argmatch.c.
4586         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
4587         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
4588         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
4589         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
4590         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
4591         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
4592         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
4593         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
4594         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
4595         * modules/closeout (EXTRA_DIST): Add closeout.h.
4596         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
4597         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
4598         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
4599         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
4600         dirname.h; remove basename.c and stripslash.c.
4601         * modules/exclude (EXTRA_DIST): Add exclude.h.
4602         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
4603         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
4604         * modules/file-type (EXTRA_DIST): Add file-type.h.
4605         * modules/filemode (EXTRA_DIST): Add filemode.h.
4606         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
4607         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4608         * modules/fpending (EXTRA_DIST): Add __fpending.h.
4609         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
4610         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
4611         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
4612         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
4613         * modules/getdate (EXTRA_DIST): Add getdate.c.
4614         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
4615         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
4616         * modules/getpass (EXTRA_DIST): Add getpass.h.
4617         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
4618         * modules/group-member (EXTRA_DIST): Add group-member.h.
4619         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
4620         * modules/hash (EXTRA_DIST): Add hash.h.
4621         * modules/human (EXTRA_DIST): Add human.h.
4622         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
4623         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
4624         * modules/lchown (EXTRA_DIST): Add lchown.h.
4625         * modules/long-options (EXTRA_DIST): Add long-options.h.
4626         * modules/lstat (EXTRA_DIST): Add lstat.h.
4627         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
4628         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
4629         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
4630         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
4631         * modules/memxor (EXTRA_DIST): Add memxor.h.
4632         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
4633         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
4634         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
4635         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
4636         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
4637         * modules/physmem (EXTRA_DIST): Add physmem.h.
4638         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
4639         * modules/posixver (EXTRA_DIST): Add posixver.h.
4640         * modules/quote (EXTRA_DIST): Add quote.h.
4641         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
4642         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
4643         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
4644         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
4645         regex_internal.h regexec.c.
4646         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
4647         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
4648         * modules/same (EXTRA_DIST): Add same.h.
4649         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
4650         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
4651         * modules/savedir (EXTRA_DIST): Add savedir.h.
4652         * modules/sha1 (EXTRA_DIST): Add sha1.h.
4653         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
4654         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
4655         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
4656         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
4657         * modules/strdup (EXTRA_DIST): Add strdup.h.
4658         * modules/strftime (EXTRA_DIST): Add strftime.h.
4659         * modules/strndup (EXTRA_DIST): Add strndup.h.
4660         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
4661         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
4662         * modules/time_r (EXTRA_DIST): Add time_r.h.
4663         * modules/timespec (EXTRA_DIST): Add timespec.h.
4664         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4665         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
4666         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
4667         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
4668         * modules/userspec (EXTRA_DIST): Add userspec.h.
4669         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
4670         * modules/utimens (EXTRA_DIST): Add utimens.h.
4671         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
4672         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
4673         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
4674         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
4675         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
4676         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
4677         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
4678         * modules/yesno (EXTRA_DIST): Add yesno.h.
4679
4680 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4681
4682         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
4683
4684         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
4685         * m4/dev-ino.m4, same-inode.m4: Remove.
4686
4687         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
4688         * m4/acl.m4 (AC_FUNC_ACL):
4689         * m4/backupfile.m4 (gl_BACKUPFILE):
4690         * m4/c-strtod.m4 (gl_C99_STRTOLD):
4691         * m4/canon-host.m4 (gl_CANON_HOST):
4692         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
4693         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
4694         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
4695         * m4/cloexec.m4 (gl_CLOEXEC):
4696         * m4/close-stream.m4 (gl_CLOSE_STREAM):
4697         * m4/closeout.m4 (gl_CLOSEOUT):
4698         * m4/dirfd.m4 (gl_FUNC_DIRFD):
4699         * m4/dirname.m4 (gl_DIRNAME):
4700         * m4/exclude.m4 (gl_EXCLUDE):
4701         * m4/exitfail.m4 (gl_EXITFAIL):
4702         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
4703         * m4/file-type.m4 (gl_FILE_TYPE):
4704         * m4/filemode.m4 (gl_FILEMODE):
4705         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
4706         * m4/fpending.m4 (gl_FUNC_FPENDING):
4707         * m4/fprintftime.m4 (gl_FPRINTFTIME):
4708         * m4/fts.m4 (gl_FUNC_FTS):
4709         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
4710         * m4/getdate.m4 (gl_GETDATE):
4711         * m4/gethrxtime.m4 (gl_GETHRXTIME):
4712         * m4/getpagesize.m4 (gl_GETPAGESIZE):
4713         * m4/getpass.m4 (gl_FUNC_GETPASS):
4714         * m4/gettime.m4 (gl_GETTIME):
4715         * m4/getugroups.m4 (gl_GETUGROUPS):
4716         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
4717         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
4718         * m4/hard-locale.m4 (gl_HARD_LOCALE):
4719         * m4/hash.m4 (gl_HASH):
4720         * m4/idcache.m4 (gl_IDCACHE):
4721         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
4722         * m4/lchown.m4 (gl_FUNC_LCHOWN):
4723         * m4/long-options.m4 (gl_LONG_OPTIONS):
4724         * m4/lstat.m4 (gl_FUNC_LSTAT):
4725         * m4/md5.m4 (gl_MD5):
4726         * m4/memcasecmp.m4 (gl_MEMCASECMP):
4727         * m4/memcoll.m4 (gl_MEMCOLL):
4728         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
4729         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
4730         * m4/memxor.m4 (gl_MEMXOR):
4731         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
4732         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
4733         * m4/modechange.m4 (gl_MODECHANGE):
4734         * m4/mountlist.m4 (gl_MOUNTLIST):
4735         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4736         * m4/openat.m4 (gl_FUNC_OPENAT):
4737         * m4/pathmax.m4 (gl_PATHMAX):
4738         * m4/physmem.m4 (gl_PHYSMEM):
4739         * m4/posixtm.m4 (gl_POSIXTM):
4740         * m4/posixver.m4 (gl_POSIXVER):
4741         * m4/quote.m4 (gl_QUOTE):
4742         * m4/quotearg.m4 (gl_QUOTEARG):
4743         * m4/readtokens.m4 (gl_READTOKENS):
4744         * m4/readutmp.m4 (gl_READUTMP):
4745         * m4/regex.m4 (gl_REGEX):
4746         * m4/safe-read.m4 (gl_SAFE_READ):
4747         * m4/safe-write.m4 (gl_SAFE_WRITE):
4748         * m4/same.m4 (gl_SAME):
4749         * m4/save-cwd.m4 (gl_SAVE_CWD):
4750         * m4/savedir.m4 (gl_SAVEDIR):
4751         * m4/settime.m4 (gl_SETTIME):
4752         * m4/sha1.m4 (gl_SHA1):
4753         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
4754         * m4/stat-macros.m4 (gl_STAT_MACROS):
4755         * m4/stat-time.m4 (gl_STAT_TIME):
4756         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
4757         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
4758         * m4/strdup.m4 (gl_FUNC_STRDUP):
4759         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
4760         * m4/strndup.m4 (gl_FUNC_STRNDUP):
4761         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
4762         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
4763         * m4/time_r.m4 (gl_TIME_R):
4764         * m4/timespec.m4 (gl_TIMESPEC):
4765         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
4766         * m4/unlinkdir.m4 (gl_UNLINKDIR):
4767         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
4768         * m4/userspec.m4 (gl_USERSPEC):
4769         * m4/utimecmp.m4 (gl_UTIMECMP):
4770         * m4/utimens.m4 (gl_UTIMENS):
4771         * m4/xalloc.m4 (gl_XALLOC):
4772         * m4/xgetcwd.m4 (gl_XGETCWD):
4773         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
4774         * m4/xreadlink.m4 (gl_XREADLINK):
4775         * m4/xstrtod.m4 (gl_XSTRTOD):
4776         * m4/yesno.m4 (gl_YESNO):
4777         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
4778         to get the necessary .h files and whatnot.
4779
4780 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
4781             Bruno Haible  <bruno@clisp.org>
4782
4783         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
4784         /bin/sh understanding of '!' conditional negation.
4785
4786 2006-08-21  Jim Meyering  <jim@meyering.net>
4787
4788         * modules/openat (Depends-on): Really alphabetize.
4789
4790         * modules/acl (Depends-on): Add error and quote.
4791
4792         * check-module (find_included_lib_files): Add at-func.c to the
4793         ok-to-include-more-than-once white list.
4794
4795         * modules/openat (Depends-on): Add lstat.  Alphabetize.
4796
4797 2006-08-21  Bruno Haible  <bruno@clisp.org>
4798
4799         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4800         Emit a pkgdata_DATA variable only if some snippets add contents to it.
4801         Reported by Martin Lambers <marlam@marlam.de>.
4802
4803 2006-08-21  Bruno Haible  <bruno@clisp.org>
4804
4805         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
4806         specify an installation location, don't emit a noinst_LIBRARIES or
4807         noinst_LTLIBRARIES assignment.
4808
4809 2006-08-21  Bruno Haible  <bruno@clisp.org>
4810
4811         BeOS portability.
4812         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
4813         BeOS has mbrtowc() but no <wctype.h>.
4814
4815 2006-08-21  Bruno Haible  <bruno@clisp.org>
4816
4817         BeOS portability.
4818         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
4819         exist.
4820
4821 2006-08-21  Bruno Haible  <bruno@clisp.org>
4822
4823         BeOS portability.
4824         * lib/mbchar.h: Include <wctype.h> only if it exists.
4825
4826 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4827
4828         Remove files that are no longer needed by their respective modules.
4829         * m4/obstack.m4: Remove.
4830         * m4/strerror_r.m4: Remove.
4831         * m4/uint32_t.m4: Remove.
4832         * m4/uintptr_t.m4: Remove.
4833         * m4/ullong_max.m4: Remove.
4834         * m4/xstrtoimax.m4: Remove.
4835         * m4/xstrtoumax.m4: Remove.
4836
4837         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
4838         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
4839         dependencies now capture this.
4840
4841         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
4842         Do not use AC_LIBSOURCES, since gnulib modules now do this.
4843         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
4844         * m4/human.m4 (gl_HUMAN): Likewise.
4845         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
4846         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
4847
4848         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
4849
4850         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
4851         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
4852         stdint.
4853         * m4/human.m4 (gl_HUMAN): Likewise.
4854         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
4855         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
4856         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
4857         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
4858         * m4/xstrtol (gl_XSTRTOL): Likewise.
4859
4860         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
4861         AC_TYPE_LONG_LONG_INT.
4862         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
4863         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
4864         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
4865         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
4866
4867         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
4868         on stdbool.
4869
4870         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
4871         (gl_PREREQ_XSTRTOUL): Remove.
4872
4873         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
4874
4875         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
4876         mode.
4877
4878 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4879
4880         Add and change modules to make it easier for coreutils to use
4881         gnulib-tool.
4882         * modules/backupfile (Files): Remove m4/d-ino.m4.
4883         (Depends-on): Add d-ino.
4884         * modules/cycle-check (Depends-on): Add stdint.
4885         (lib_SOURCES): Add cycle-check.h.
4886         * modules/d-ino: New module.
4887         * modules/d-type: New module.
4888         * modules/error (Files): Remove m4/strerror_r.m4.
4889         * modules/filemode (Files): Add m4/st_dm_mode.m4.
4890         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4891         m4/inttypes_h.m4, m4/uintmax_t.m4.
4892         (Depends-on): Add stdint.
4893         (lib_SOURCES): Add fsusage.h.
4894         * modules/getcwd (Files): Remove d-ino.m4.
4895         (Depends-on): Add d-ino.
4896         * modules/getndelim2 (Depends-on): Add stdint.
4897         * modules/glob (Files): Remove m4/d-type.m4.
4898         (Depends-on): Add d-type.
4899         * modules/host-os: New module.
4900         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
4901         m4/inttypes_h.m4, m4/uintmax_t.m4.
4902         * Depends-on: Add stdint.
4903         (lib_SOURCES): Add human.h.
4904         * modules/inttostr (Files): Remove m4/intmax_t.m4,
4905         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
4906         m4/uintmax_t.m4, m4/ulonglong.m4.
4907         (Depends-on): Add stdint.
4908         (EXTRA_DIST): Add inttostr.h.
4909         * modules/lchmod: New module.
4910         * modules/link-follow: New module.
4911         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
4912         (Depends-on): Add lchmod.
4913         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
4914         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
4915         (Depends-on): Add stdint.
4916         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
4917         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
4918         (Depends-on): Add stdint.
4919         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
4920         * modules/perl: New module.
4921         * modules/regex (Depends-on): Add stdint.
4922         * modules/rmdir-errno: New module.
4923         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4924         m4/intmax_t.m4.
4925         (Depends-on): Add stdint.
4926         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4927         m4/uintmax_t.m4.
4928         (Depends-on): Add stdint.
4929         * modules/unlink-busy: New module.
4930         * modules/utimecmp (Depends-on): Add stdint.
4931         * modules/uptime: New module.
4932         * modules/winsz-ioctl: New module.
4933         * modules/winsz-termios: New module.
4934         * modules/xnanosleep (Depends-on): Add nanosleep.
4935         * modules/ullong_max: Remove.
4936         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
4937         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
4938         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
4939         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
4940         (Depends-on): Add inttypes.
4941         (lib_SOURCES): Add xstrtol.h.
4942         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
4943         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
4944         * MODULES.html.sh: Move 'assert' into the assert section.
4945         Move 'dummy' into the linking section.
4946         Remove ullong_max.
4947         Add section for compatibility checks for POSIX:2001 functions,
4948         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
4949         winsz-ioctl, and winsz-termios into it.
4950         Add lchmod.
4951         Add top-level Misc section and put host-os, perl, and uptime
4952         into it.
4953
4954 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4955
4956         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
4957         now assume the stdint module.  Do not include inttypes.h.
4958         * lib/fsusage.h: Likewise.
4959         * lib/getndelim2.c: Likewise.
4960         * lib/human.h: Likewise.
4961         * lib/inttostr.h: Likewise.
4962         * lib/obstack.c: Likewise.
4963         * lib/regex_internal.h: Likewise.
4964         * lib/tempname.c: Likewise.
4965         * lib/utimecmp.c: Likewise.
4966         * lib/xstrtol.h: Likewise.
4967
4968         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
4969
4970         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
4971         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
4972         * lib/xtime.h: Likewise.
4973
4974 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4975
4976         * modules/openat (Files): Add lib/fchmodat.c.
4977         Fixes problem reported by Jay Youngman.
4978
4979 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4980
4981         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
4982         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
4983
4984 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
4985             Bruno Haible  <bruno@clisp.org>
4986
4987         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4988         and is a script that invokes bison. Tighten the code. Add comments.
4989
4990 2006-08-18  Jim Meyering  <jim@meyering.net>
4991
4992         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
4993         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
4994         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
4995         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
4996
4997 2006-08-18  Bruno Haible  <bruno@clisp.org>
4998
4999         * modules/bison-i18n: New file.
5000         * MODULES.html.sh (Internationalization functions): Add it.
5001
5002 2006-08-18  Bruno Haible  <bruno@clisp.org>
5003
5004         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
5005         sys/statvfs.h. When getmntinfo was found, check its declaration and
5006         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
5007
5008 2006-08-18  Bruno Haible  <bruno@clisp.org>
5009
5010         * m4/bison-i18n.m4: New file, from bison.
5011
5012 2006-08-18  Bruno Haible  <bruno@clisp.org>
5013
5014         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
5015         (ME_DUMMY): Treat "kernfs" as a dummy.
5016         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
5017
5018 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5019
5020         Update from coreutils.
5021
5022         2006-08-15  Jim Meyering  <jim@meyering.net>
5023
5024         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
5025
5026         2006-01-17  Jim Meyering  <jim@meyering.net>
5027
5028         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
5029
5030         2006-01-11  Jim Meyering  <jim@meyering.net>
5031
5032         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
5033         Check for the lchmod function.
5034
5035 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5036
5037         Update from coreutils.
5038
5039         * lib/__fpending.h: Add copyright notice.
5040         * lib/fprintftime.h: Likewise.
5041         * lib/savedir.c: Use (C) in copyright notice.
5042         * lib/savedir.h: Likewise.
5043
5044         2006-08-15  Jim Meyering  <jim@meyering.net>
5045
5046         * lib/at-func.c: New file, with the logic of all emulated at-functions.
5047         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
5048         in support of the EXPECTED_ERRNO macro.
5049         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
5050         definitions.  Instead, define the appropriate symbols and include
5051         "at-func.c".
5052         * lib/mkdirat.c (mkdirat): Likewise.
5053         * lib/fchmodat.c (fchmodat): Likewise.
5054         (ENOSYS): Remove definition.
5055         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
5056         it.  Don't include "unistd--.h" -- it wasn't ever used.
5057
5058         2006-01-17  Jim Meyering  <jim@meyering.net>
5059
5060         Rewrite fts.c not to change the current working directory,
5061         by using openat, fstatat, fdopendir, etc..
5062
5063         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
5064         (HAVE_OPENAT_SUPPORT): Define.
5065         [_LIBC] (fchdir): Don't undef or define; no longer used.
5066         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
5067         Now, this `function' always succeeds, and consumes its file descriptor
5068         parameter -- so callers must not close such FDs.  Update callers.
5069         (diropen_fd, opendirat, cwd_advance_fd): New functions.
5070         (diropen): Add parameter, SP.  Adjust all callers.
5071         Implement using diropen_fd, rather than open.
5072         (fts_open): Initialize new member, fts_cwd_fd.
5073         Remove fts_rft-setting code.
5074         (fts_close): Close fts_cwd_fd, if necessary.
5075         (__opendir2): Define in terms of opendir or opendirat,
5076         depending on whether the FST_NOCHDIR flag is set.
5077         (fts_build): Since fts_safe_changedir consumes its FD, and since
5078         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
5079         and close the dup'd file descriptor upon failure.
5080         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
5081         (fts_safe_changedir): Tweak semantics to reflect that this function
5082         now calls cwd_advance_fd and hence consumes its FD argument.
5083         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
5084         [struct FTS] (fts_rft): Remove now-unused member.
5085         [struct FTS] (fts_cycle.state): Improve comment.
5086
5087         * lib/openat.c (openat_needs_fchdir): New function.
5088         * lib/openat.h (openat_needs_fchdir): Declare it.
5089
5090 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5091
5092         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
5093         Problem and fix reported by Pádraig Brady in
5094         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
5095
5096 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5097
5098         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
5099
5100 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5101
5102         * lib/memcoll.c (memcoll): Optimize for the common case where the
5103         arguments are bytewise equal.
5104
5105 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5106
5107         * doc/regexprops-generic.texi: Add a copyright notice.
5108
5109 2006-08-15  Bruno Haible  <bruno@clisp.org>
5110
5111         * modules/tmpdir (License): Change to LGPL.
5112
5113 2006-08-15  Bruno Haible  <bruno@clisp.org>
5114
5115         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
5116         module.
5117
5118 2006-08-14  Simon Josefsson  <jas@extundo.com>
5119
5120         * config/srclist.txt: Add gnupload.
5121
5122 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5123
5124         Change copyright notice from LGPL 2 to GPL 2, since that's the
5125         standard form used in the gnulib repository.
5126         * tests/test-lock.c: Likewise.
5127         * tests/test-stdint.c: Likewise.
5128         * tests/test-tls.c: Likewise.
5129
5130         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
5131         prelude-manager.  User shorter URLs for GNU projects, without '?'.
5132         Add copyright notice.
5133
5134         * check-module: Add copyright notice.  Output a copyright
5135         notice if "--version" is specified.
5136         * modules/COPYING: New file.
5137         * tests/test-getaddrinfo.c: Add copyright notice.
5138         * tests/test-verify.c: Likewise.
5139
5140 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5141
5142         Change copyright notice from LGPL 2 to GPL 2, since that's the
5143         standard form used in the gnulib repository.
5144         * lib/lock.c: LGPL -> GPL.
5145         * lib/lock.h: Likewise.
5146         * lib/strnlen1.c: Likewise.
5147         * lib/strnlen1.h: Likewise.
5148         * lib/tls.c: Likewise.
5149         * lib/tls.h: Likewise.
5150         * lib/tmpdir.c: Likewise.
5151
5152         * lib/TODO: Remove; this belongs only in coreutils.
5153
5154 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5155
5156         Add copyright notices to long-enough files that lack them, since
5157         otherwise the files aren't clearly free.  Use the same notice that
5158         getdate.texi already uses.
5159         * doc/alloca-opt.texi: Add copyright notice.
5160         * doc/alloca.texi: Likewise.
5161         * doc/ctime.texi: Likewise.
5162         * doc/functions.texi: Likewise.
5163         * doc/gcd.texi: Likewise.
5164         * doc/gnulib-tool.texi: Likewise.
5165         * doc/inet_ntoa.texi: Likewise.
5166         * doc/visibility.texi: Likewise.
5167
5168         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
5169         * doc/quote.texi: Add copyright notice.
5170
5171         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
5172         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
5173         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
5174         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
5175         is now obsolete, and give a pointer to the Sun list.
5176         Add copyright notice.
5177
5178 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5179
5180         * config/srclistvars.sh: Add copyright notice.
5181
5182 2006-08-14  Eric Blake  <ebb9@byu.net>
5183
5184         Import the following change from libc:
5185
5186         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
5187
5188         Upstream bug 2997.
5189         * lib/misc/error.c: Add space between program name and message if file
5190         name is missing.
5191
5192 2006-08-12  Karl Berry  <karl@gnu.org>
5193
5194         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
5195         remove, these originate in gnulib now.
5196
5197 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5198
5199         * doc/Makefile (standards.info standards.html standards.dvi):
5200         Also depend on make-stds.texi.
5201
5202 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
5203
5204         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
5205         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
5206
5207         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
5208         in wchar_t.  Problem reported by Eric Blake.
5209
5210         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
5211         LEN is smaller than SIZE.  Suggested by Bruno Haible.
5212         Also, help the compiler to keep LEN in a register.
5213
5214 2006-08-11  Eric Blake  <ebb9@byu.net>
5215
5216         * users.txt: Sort.  Add tar.
5217
5218 2006-08-11  Bruno Haible  <bruno@clisp.org>
5219
5220         * users.txt: New file.
5221
5222 2006-08-11  Bruno Haible  <bruno@clisp.org>
5223
5224         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
5225         before <wchar.h>. Needed for OSF/1 and BSD/OS.
5226
5227 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5228
5229         * modules/snprintf (Depends-on): Remove minmax.
5230         (Maintainer): Add self and Bruno.
5231
5232 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5233
5234         * lib/.cppi-disable: Add snprintf.h, socket_.h.
5235         * lib/snprintf.c: Include <errno.h> and <limits.h>.
5236         (EOVERFLOW): Define if the system does not.
5237         Do not include "minmax.h"; it wasn't used.
5238         (snprintf): Don't assume size_t promotes to an unsigned type.
5239         Fix bug when generated string was too long for the buffer: the
5240         buffer's contents are supposed to be the initial prefix of the
5241         output.  Don't assume vasnprintf returns EOVERFLOW if the size
5242         exceeds INT_MAX; do the check ourselves.
5243
5244         Import the following changes from libc:
5245
5246         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
5247
5248         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
5249         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
5250         set wc to the byte which couldn't be converted.
5251         (re_string_reconstruct): Don't clear valid_raw_len before calling
5252         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
5253         tip_context using re_string_context_at.
5254
5255         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
5256
5257         * lib/posix/regex.h: g++ still cannot handled [restrict].
5258
5259         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
5260
5261         * lib/posix/regex.h: Remove special handling for VMS.
5262
5263 2006-08-10  Jim Meyering  <jim@meyering.net>
5264
5265         * modules/same-inode: New module.
5266         * modules/dev-ino: New module.
5267         * modules/cycle-check: Depend on these modules, rather than simply
5268         including their .h files.
5269         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
5270         required via m4/cycle-check.m4.
5271         * modules/same: Depend on new same-inode module, rather than
5272         including same-inode.h.
5273         * modules/chdir-safer: New file.
5274
5275         * modules/chown (Depends-on): Add stat-macros.
5276
5277 2006-08-10  Jim Meyering  <jim@meyering.net>
5278
5279         * m4/cycle-check.m4: New file.
5280         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
5281         * m4/dev-ino.m4, m4/same-inode.m4: New files.
5282
5283 2006-08-10  Eric Blake  <ebb9@byu.net>
5284
5285         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
5286         in from original proposal.
5287
5288 2006-08-10  Eric Blake  <ebb9@byu.net>
5289         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5290
5291         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
5292         namespace.
5293
5294 2006-08-10  Bruno Haible  <bruno@clisp.org>
5295
5296         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
5297         as well.
5298
5299 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5300
5301         Sync from coreutils.
5302
5303         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
5304
5305         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
5306         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
5307
5308 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5309
5310         * modules/restrict: Remove; no longer needed now that we assume
5311         Autoconf 2.59 or later.
5312         * MODULES.html.sh: Remove 'restrict'.
5313         * modules/argp (Depends-on): Remove 'restrict'.
5314         * modules/base64 (Depends-on): Likewise.
5315         * modules/gc (Depends-on): Likewise.
5316         * modules/getaddrinfo (Depends-on): Likewise.
5317         * modules/glob (Depends-on): Likewise.
5318         * modules/inet_ntop (Depends-on): Likewise.
5319         * modules/inet_pton (Depends-on): Likewise.
5320         * modules/memxor (Depends-on): Likewise.
5321         * modules/regex (Depends-on): Likewise.
5322         * modules/strtok_r (Depends-on): Likewise.
5323         * modules/time_r (Depends-on): Likewise.
5324
5325 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5326
5327         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
5328         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
5329         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5330         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
5331         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
5332         * m4/memxor.m4 (gl_MEMXOR): Likewise.
5333         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
5334         gl_C_RESTRICT replaced by AC_C_RESTRICT.
5335
5336         Merge from coreutils.
5337         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
5338         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
5339         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
5340         * m4/time_r.m4 (gl_TIME_R): Likewise.
5341
5342 2006-08-09  Karl Berry  <karl@gnu.org>
5343
5344         * config/srclist.txt: no more gettext-tools, per Bruno.
5345
5346 2006-08-08  Eric Blake  <ebb9@byu.net>
5347
5348         * modules/verror: New module.
5349         * MODULES.html.sh: Document it.
5350
5351 2006-08-08  Eric Blake  <ebb9@byu.net>
5352
5353         * lib/verror.h, lib/verror.c: New files.
5354
5355 2006-08-08  Eric Blake  <ebb9@byu.net>
5356
5357         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
5358         verror_at_line output complies with GNU Coding Standards even when
5359         file is NULL.
5360
5361 2006-08-07  Bruno Haible  <bruno@clisp.org>
5362
5363         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
5364         versions of AIX.
5365         Reported by Ralf Wildenhues.
5366
5367 2006-08-07  Bruno Haible  <bruno@clisp.org>
5368
5369         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
5370         in an AC_DEFUN. Needed so that the autoconf snippets can use
5371         AC_REQUIRE.
5372
5373 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5374
5375         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5376         Initialize pkgdata_DATA.
5377         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
5378         overriding it.
5379
5380 2006-08-06  Eric Blake  <ebb9@byu.net>
5381
5382         * lib/error.h: Fold in some upstream changes from glibc.
5383         * lib/error.c: Likewise.
5384
5385 2006-08-04  Bruno Haible  <bruno@clisp.org>
5386
5387         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5388         Make the mostlyclean-local rule depend on mostlyclean-generic.
5389         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
5390
5391 2006-07-31  Bruno Haible  <bruno@clisp.org>
5392
5393         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
5394         <stdlib.h>, <string.h>.
5395
5396 2006-07-30  Bruno Haible  <bruno@clisp.org>
5397
5398         * modules/readlink (License): Change to LGPL.
5399
5400 2006-07-30  Bruno Haible  <bruno@clisp.org>
5401
5402         * modules/javaversion (Makefile.am): Distribute javaversion.java and
5403         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
5404         set PKGDATADIR to point to it.
5405
5406 2006-07-30  Bruno Haible  <bruno@clisp.org>
5407
5408         * modules/csharpexec (configure.ac): Comment out macro invocation.
5409         * modules/javaexec (configure.ac): Likewise.
5410         * modules/javacomp-script (configure.ac): Likewise.
5411
5412         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
5413
5414 2006-07-30  Bruno Haible  <bruno@clisp.org>
5415
5416         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
5417         linked-list.
5418
5419 2006-07-30  Bruno Haible  <bruno@clisp.org>
5420
5421         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
5422
5423 2006-07-30  Bruno Haible  <bruno@clisp.org>
5424
5425         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5426         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
5427         get removed.
5428
5429 2006-07-29  Bruno Haible  <bruno@clisp.org>
5430
5431         Make it possible for gnulib-tool to work with locally modified or
5432         augmented gnulib repositories.
5433         * gnulib-tool (func_usage): Document --local-dir option.
5434         (local_gnulib_dir): New variable.
5435         Handle --local-dir option.
5436         (func_lookup_file): New function.
5437         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
5438         (func_get_description, func_get_filelist, func_get_description,
5439         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
5440         func_get_automake_snippet, func_get_include_directive,
5441         func_get_license, func_get_maintainer): Use func_lookup_file.
5442         (func_import, func_create_testdir): Use func_lookup_file.
5443
5444 2006-07-29  Bruno Haible  <bruno@clisp.org>
5445
5446         * modules/setenv (Depends-on): Add unistd.
5447
5448 2006-07-29  Bruno Haible  <bruno@clisp.org>
5449
5450         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
5451
5452 2006-07-29  Bruno Haible  <bruno@clisp.org>
5453
5454         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
5455
5456 2006-07-29  Bruno Haible  <bruno@clisp.org>
5457
5458         * gnulib-tool (import, update): If there is no Makefile.am, look at
5459         aclocal.m4, instead of bailing out.
5460
5461 2006-07-29  Bruno Haible  <bruno@clisp.org>
5462
5463         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
5464         Categorize the options by when they are useful.
5465
5466 2006-07-29  Bruno Haible  <bruno@clisp.org>
5467
5468         * gnulib-tool (func_usage): Document option --no-libtool.
5469         Handle option --no-libtool.
5470         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
5471         for changed semantics of $libtool variable.
5472         (func_import): Likewise. If libtool is not used, show this through
5473         an option --no-libtool.
5474         (func_create_testdir): Update.
5475
5476 2006-07-29  Bruno Haible  <bruno@clisp.org>
5477
5478         * gnulib-tool (func_import): Extend error message about missing
5479         --doc-base.
5480
5481 2006-07-29  Bruno Haible  <bruno@clisp.org>
5482
5483         * gnulib-tool (func_import): Don't create the $docbase directory if
5484         there is no file to store there.
5485
5486 2006-07-29  Bruno Haible  <bruno@clisp.org>
5487
5488         * gnulib-tool (autoconf_minversion): If a --dir option is given and
5489         relevant, look for configure.ac there, not in the current directory.
5490         Also use a simple search for AC_PREREQ, not "autoconf --trace".
5491
5492 2006-07-29  Bruno Haible  <bruno@clisp.org>
5493
5494         * gnulib-tool (SORT): New variable.
5495         (func_usage): Undocument --assume-autoconf option.
5496         Remove --assume-autoconf option handling.
5497         (autoconf_minversion): Determine from the contents of configure.ac.
5498         (func_import): Remove autoconf_minversion handling.
5499         Suggested by Eric Blake.
5500
5501 2006-07-29  Bruno Haible  <bruno@clisp.org>
5502
5503         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
5504
5505 2006-07-29  Bruno Haible  <bruno@clisp.org>
5506
5507         * config/srclist.txt (*setenv.[ch]): Remove rules.
5508
5509 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5510
5511         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
5512
5513 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5514
5515         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
5516         arpa/inet.h.
5517
5518 2006-07-28  Simon Josefsson  <jas@extundo.com>
5519
5520         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
5521         * modules/inet_pton (Depends-on): Likewise.
5522
5523 2006-07-28  Simon Josefsson  <jas@extundo.com>
5524
5525         * m4/netinet_in_h.m4: New file.
5526
5527 2006-07-28  Simon Josefsson  <jas@extundo.com>
5528
5529         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
5530         #include's.
5531
5532 2006-07-28  Simon Josefsson  <jas@extundo.com>
5533
5534         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
5535         #include's.
5536
5537 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
5538
5539         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
5540         setgid on directories only if they set these bits.
5541         * lib/modechange.h: Remove obsolete comment about masks.
5542
5543 2006-07-28  Eric Blake  <ebb9@byu.net>
5544
5545         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
5546         macro expansion.
5547
5548 2006-07-28  Bruno Haible  <bruno@clisp.org>
5549
5550         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
5551
5552 2006-07-28  Bruno Haible  <bruno@clisp.org>
5553
5554         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
5555
5556 2006-07-28  Bruno Haible  <bruno@clisp.org>
5557
5558         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
5559         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
5560         Define fallbacks.
5561         Avoids link error on FreeBSD 4.x.
5562         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
5563
5564         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
5565         encoding.
5566         * lib/mbswidth.c (iswcntrl): Likewise.
5567
5568 2006-07-27  Bruno Haible  <bruno@clisp.org>
5569
5570         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
5571         test.
5572
5573 2006-07-27  Bruno Haible  <bruno@clisp.org>
5574
5575         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
5576         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
5577         defined.
5578
5579 2006-07-26  Eric Blake  <ebb9@byu.net>
5580
5581         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
5582
5583 2006-07-26  Eric Blake  <ebb9@byu.net>
5584
5585         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
5586         like mingw that lack mkstemp.
5587         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
5588         avoid compilation warning on mingw.
5589
5590 2006-07-26  Bruno Haible  <bruno@clisp.org>
5591
5592         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
5593         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
5594         INT_FAST*_MIN, INTPTR_MIN.
5595
5596 2006-07-25  Bruno Haible  <bruno@clisp.org>
5597
5598         * modules/version-etc (Depends-on): Add stdarg.
5599
5600 2006-07-25  Bruno Haible  <bruno@clisp.org>
5601
5602         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
5603         complex commands.
5604
5605 2006-07-25  Bruno Haible  <bruno@clisp.org>
5606
5607         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
5608         defined in <stdarg.h> or config.h.
5609
5610 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5611
5612         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
5613         (gl_STDIO_SAFER): Remove.
5614
5615 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5616
5617         * MODULES.html.sh (File stream based Input/Output):
5618         Add fopen-safer, tmpfile-safer; remove stdio-safer.
5619         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
5620         * modules/fopen-safer, modules/tmpfile-safer: New files.
5621         * modules/stdio-safer: Remove.
5622
5623 2006-07-24  Bruno Haible  <bruno@clisp.org>
5624
5625         * modules/tmpdir: New file.
5626         * MODULES.html.sh (File system functions): Add it.
5627
5628 2006-07-24  Bruno Haible  <bruno@clisp.org>
5629
5630         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
5631         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
5632
5633 2006-07-24  Bruno Haible  <bruno@clisp.org>
5634
5635         * modules/clean-temp: New file.
5636
5637 2006-07-24  Bruno Haible  <bruno@clisp.org>
5638
5639         * m4/tmpdir.m4: New file, from GNU gettext.
5640
5641 2006-07-24  Bruno Haible  <bruno@clisp.org>
5642
5643         * lib/tmpdir.h: New file, from GNU gettext.
5644         * lib/tmpdir.c: New file, from GNU gettext.
5645
5646 2006-07-24  Bruno Haible  <bruno@clisp.org>
5647
5648         * lib/clean-temp.h: New file, from GNU gettext.
5649         * lib/clean-temp.c: New file, from GNU gettext.
5650
5651 2006-07-23  Eric Blake  <ebb9@byu.net>
5652
5653         * modules/stdio-safer (Files): Add tmpfile-safer.c.
5654         (Depends-on): Add binary-io.
5655
5656 2006-07-23  Eric Blake  <ebb9@byu.net>
5657
5658         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
5659
5660 2006-07-23  Eric Blake  <ebb9@byu.net>
5661
5662         * lib/tmpfile-safer.c: New file.
5663         * lib/stdio-safer.h (fopen_safer): Add prototype.
5664         * lib/stdio--.h (tmpfile): Make safer.
5665
5666 2006-07-23  Bruno Haible  <bruno@clisp.org>
5667
5668         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
5669         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
5670         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
5671         gl_linked_remove_at): Use it.
5672
5673 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5674         and Simon Josefsson <jas@extundo.com>
5675
5676         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
5677
5678         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
5679
5680 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5681
5682         * modules/close-stream: New file.
5683         * modules/closeout (Description): Make it clear that it exits
5684         with a diagnostic on error.
5685         (Depends-on): Add close-stream.  Remove fpending, stdbool.
5686         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
5687
5688 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5689
5690         * m4/close-stream.m4: New file.
5691
5692 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5693
5694         * lib/close-stream.c, lib/close-stream.h: New files.
5695
5696 2006-07-22  Bruno Haible  <bruno@clisp.org>
5697
5698         Merge from GNU gettext 0.15.
5699
5700         2006-05-01  Bruno Haible  <bruno@clisp.org>
5701
5702                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
5703
5704         2006-07-22  Bruno Haible  <bruno@clisp.org>
5705
5706                 * modules/javaversion: New file.
5707                 * MODULES.html.sh (Java): Add javaversion.
5708
5709         2006-03-12  Bruno Haible  <bruno@clisp.org>
5710
5711                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
5712
5713         2005-12-04  Bruno Haible  <bruno@clisp.org>
5714
5715                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
5716                 (untested).
5717
5718         2006-06-21  Bruno Haible  <bruno@clisp.org>
5719
5720                 Avoid warnings from recent versions of mcs.
5721                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
5722                 -o, -L, -r any more. Use options documented since mcs-1.0
5723                 instead. Similarly for -g.
5724
5725         2005-12-04  Bruno Haible  <bruno@clisp.org>
5726
5727                 * build-aux/csharpcomp.sh.in: Suffix for resources is
5728                 .resources, not .resource.
5729
5730         2005-07-09  Bruno Haible  <bruno@clisp.org>
5731
5732                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
5733                 add a .dll suffix.
5734                 Reported by Mark Junker <mjscod@gmx.de>.
5735
5736         2006-07-22  Bruno Haible  <bruno@clisp.org>
5737
5738                 * modules/gettext: Upgrade to gettext-0.15.
5739                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
5740                 m4/visibility.m4.
5741                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
5742
5743 2006-07-22  Bruno Haible  <bruno@clisp.org>
5744
5745         Merge from GNU gettext 0.15.
5746
5747         2006-03-25  Bruno Haible  <bruno@clisp.org>
5748
5749                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
5750
5751         2006-07-21  Bruno Haible  <bruno@clisp.org>
5752
5753                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
5754                 "1.1".
5755
5756         2006-05-09  Bruno Haible  <bruno@clisp.org>
5757
5758                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
5759                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
5760                 for the conftestver execution.
5761
5762         2006-05-01  Bruno Haible  <bruno@clisp.org>
5763
5764                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
5765                 optional target-version argument. Verify that the compiler
5766                 groks source of the specified source-version, or add -source
5767                 option as necessary. Verify that the compiler produces
5768                 bytecode in the specified target-version, or add -target and
5769                 -source options as necessary. Make the result of the test
5770                 available as variable CONF_JAVAC. Also log error output in
5771                 config.log.
5772
5773         2006-03-11  Bruno Haible  <bruno@clisp.org>
5774
5775                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
5776
5777         2006-05-09  Bruno Haible  <bruno@clisp.org>
5778
5779                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
5780                 CLASSPATH_SEPARATOR to a semicolon.
5781
5782         2006-03-12  Bruno Haible  <bruno@clisp.org>
5783
5784                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
5785                 available as variable CONF_JAVA, for subsequent autoconf
5786                 tests. Also log error output in config.log.
5787
5788         2006-07-19  Bruno Haible  <bruno@clisp.org>
5789
5790                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
5791                 that getline works on glibc2 systems. Needed to avoid trouble
5792                 in relocatable.c.
5793                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
5794
5795         2005-12-04  Bruno Haible  <bruno@clisp.org>
5796
5797                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
5798                 launcher (untested).
5799
5800         2005-12-04  Bruno Haible  <bruno@clisp.org>
5801
5802                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
5803
5804         2006-07-22  Bruno Haible  <bruno@clisp.org>
5805
5806                 * gettext.m4: Update from GNU gettext-0.15.
5807                 * nls.m4: Likewise.
5808                 * po.m4: Likewise.
5809                 * inttypes-pri.m4: Likewise.
5810                 * inttypes-h.m4: Renamed from inttypes.m4.
5811                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
5812
5813 2006-07-22  Bruno Haible  <bruno@clisp.org>
5814
5815         Merge from GNU gettext 0.15.
5816
5817         2005-07-05  Bruno Haible  <bruno@clisp.org>
5818
5819                 * printf-args.c (printf_fetchargs): Work around broken
5820                 definition of wint_t on mingw.
5821
5822         2005-02-12  Bruno Haible  <bruno@clisp.org>
5823
5824                 * xallocsa.h: Add extern "C" for C++.
5825
5826         2006-05-17  Bruno Haible  <bruno@clisp.org>
5827
5828                 Cygwin portability.
5829                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
5830
5831         2006-04-30  Bruno Haible  <bruno@clisp.org>
5832
5833                 * progreloc.c: Include <mach-o/dyld.h> if available.
5834                 (find_executable): Use _NSGetExecutablePath when possible.
5835
5836         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5837
5838                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
5839                 function.
5840
5841         2005-12-29  Bruno Haible  <bruno@clisp.org>
5842
5843                 * progreloc.c (set_program_name_and_installdir): Fix
5844                 compilation error.
5845
5846         2005-12-04  Bruno Haible  <bruno@clisp.org>
5847
5848                 Cygwin portability.
5849                 * progreloc.c: Include <windows.h> also on Cygwin.
5850                 (find_executable): Add support for Cygwin.
5851                 (set_program_name_and_installdir): Handle also platforms with
5852                 nonempty EXEEXT.
5853
5854         2006-07-11  Bruno Haible  <bruno@clisp.org>
5855
5856                 * javacomp.c: Fix a comment.
5857                 Reported by Jim Meyering.
5858
5859         2006-04-30  Bruno Haible  <bruno@clisp.org>
5860
5861                 * javacomp.h (compile_java_class): Add source_version,
5862                 target_version arguments.
5863                 * javacomp.c: Rewritten to choose only a compiler that
5864                 respects the specified source_version and target_version.
5865
5866         2006-06-27  Bruno Haible  <bruno@clisp.org>
5867
5868                 Assume correct S_ISDIR macro.
5869                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
5870
5871         2006-07-22  Bruno Haible  <bruno@clisp.org>
5872
5873                 * javaversion.h: New file, from GNU gettext.
5874                 * javaversion.c: New file, from GNU gettext.
5875                 * javaversion.java: New file, from GNU gettext.
5876                 * javaversion.class: New file, from GNU gettext.
5877
5878         2006-05-17  Bruno Haible  <bruno@clisp.org>
5879
5880                 Cygwin portability.
5881                 * javaexec.c (execute_java_class): Test for jview program
5882                 also on Cygwin.
5883
5884         2006-04-09  Bruno Haible  <bruno@clisp.org>
5885
5886                 * fatal-signal.c: Don't include string.h.
5887                 (at_fatal_signal): Use a copying loop instead of memcpy.
5888
5889         2005-12-04  Bruno Haible  <bruno@clisp.org>
5890
5891                 * csharpexec.c: Add support for 'clix' launcher (untested).
5892                 (execute_csharp_using_sscli): New function.
5893                 (execute_csharp_program): Call it.
5894
5895         2006-06-21  Bruno Haible  <bruno@clisp.org>
5896
5897                 Avoid warnings from recent versions of mcs.
5898                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
5899                 -o, -L, -r any more. Use options documented since mcs-1.0
5900                 instead. Similarly for -g.
5901
5902         2005-07-09  Bruno Haible  <bruno@clisp.org>
5903
5904                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
5905                 add a .dll suffix.
5906                 Reported by Mark Junker <mjscod@gmx.de>.
5907
5908         2006-06-17  Bruno Haible  <bruno@clisp.org>
5909
5910                 * config.charset: Update for NetBSD 3.0.
5911
5912         2006-05-17  Bruno Haible  <bruno@clisp.org>
5913
5914                 Cygwin portability.
5915                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
5916
5917         2006-05-16  Bruno Haible  <bruno@clisp.org>
5918
5919                 * localcharset.c [CYGWIN]: Include <windows.h>.
5920                 (get_charset_aliases): For Cygwin, return the same CPxxx
5921                 aliases list as under WIN32.
5922                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
5923                 the environment variables. Fall back to GetACP().
5924
5925         2006-04-05  Bruno Haible  <bruno@clisp.org>
5926
5927                 * config.charset: Update Juan Manuel Guerrero's address.
5928
5929         2005-02-12  Bruno Haible  <bruno@clisp.org>
5930
5931                 * allocsa.h: Add extern "C" for C++.
5932
5933         2005-02-10  Bruno Haible  <bruno@clisp.org>
5934
5935                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
5936                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
5937
5938         2006-07-22  Bruno Haible  <bruno@clisp.org>
5939
5940                 * gettext.h: Update to GNU gettext-0.15.
5941
5942 2006-07-22  Bruno Haible  <bruno@clisp.org>
5943
5944         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
5945         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
5946         lib-prefix.m4, longdouble.m4, ssize_t.m4.
5947
5948 2006-07-21  Eric Blake  <ebb9@byu.net>
5949
5950         * modules/stdlib-safer: New file.
5951         * MODULES.html.sh (File stream based Input/Output): Add
5952         stdlib-safer.
5953
5954 2006-07-21  Eric Blake  <ebb9@byu.net>
5955
5956         * lib/stdlib-safer.h: New file from coreutils, required by
5957         stdlib--.h.
5958
5959 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
5960
5961         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
5962
5963 2006-07-20  Bruno Haible  <bruno@clisp.org>
5964
5965         * gnulib-tool: Recognize new option --assume-autoconf.
5966         (autoconf_minversion): New variable.
5967         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
5968
5969 2006-07-20  Bruno Haible  <bruno@clisp.org>
5970
5971         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
5972
5973 2006-07-19  Derek R. Price  <derek@ximbiot.com>
5974
5975         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
5976         Reindent and repaginate.
5977
5978 2006-07-19  Derek Price  <derek@ximbiot.com>
5979
5980         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
5981         Correct grammar.
5982
5983 2006-07-17  Bruno Haible  <bruno@clisp.org>
5984
5985         * modules/list: New file.
5986         * modules/array-list: New file.
5987         * modules/carray-list, modules/carray-list-tests: New files.
5988         * modules/linked-list, modules/linked-list-tests: New files.
5989         * modules/avltree-list, modules/avltree-list-tests: New files.
5990         * modules/rbtree-list, modules/rbtree-list-tests: New files.
5991         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
5992         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
5993         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
5994         * modules/oset: New file.
5995         * modules/array-oset: New file.
5996         * modules/avltree-oset, modules/avltree-oset-tests: New files.
5997         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
5998         * tests/test-carray_list.c: New file.
5999         * tests/test-linked_list.c: New file.
6000         * tests/test-avltree_list.c: New file.
6001         * tests/test-rbtree_list.c: New file.
6002         * tests/test-linkedhash_list.c: New file.
6003         * tests/test-avltreehash_list.c: New file.
6004         * tests/test-rbtreehash_list.c: New file.
6005         * tests/test-avltree_oset.c: New file.
6006         * tests/test-rbtree_oset.c: New file.
6007         * MODULES.html.sh (Container data structures): New section.
6008
6009 2006-07-17  Bruno Haible  <bruno@clisp.org>
6010
6011         * m4/gl_list.m4: New file.
6012
6013 2006-07-17  Bruno Haible  <bruno@clisp.org>
6014
6015         * lib/gl_list.h: New file.
6016         * lib/gl_list.c: New file.
6017         * lib/gl_array_list.h: New file.
6018         * lib/gl_array_list.c: New file.
6019         * lib/gl_carray_list.h: New file.
6020         * lib/gl_carray_list.c: New file.
6021         * lib/gl_linked_list.h: New file.
6022         * lib/gl_linked_list.c: New file.
6023         * lib/gl_anylinked_list1.h: New file.
6024         * lib/gl_anylinked_list2.h: New file.
6025         * lib/gl_avltree_list.h: New file.
6026         * lib/gl_avltree_list.c: New file.
6027         * lib/gl_anyavltree_list1.h: New file.
6028         * lib/gl_anyavltree_list2.h: New file.
6029         * lib/gl_rbtree_list.h: New file.
6030         * lib/gl_rbtree_list.c: New file.
6031         * lib/gl_anyrbtree_list1.h: New file.
6032         * lib/gl_anyrbtree_list2.h: New file.
6033         * lib/gl_anytree_list1.h: New file.
6034         * lib/gl_anytree_list2.h: New file.
6035         * lib/gl_linkedhash_list.h: New file.
6036         * lib/gl_linkedhash_list.c: New file.
6037         * lib/gl_anyhash_list1.h: New file.
6038         * lib/gl_anyhash_list2.h: New file.
6039         * lib/gl_avltreehash_list.h: New file.
6040         * lib/gl_avltreehash_list.c: New file.
6041         * lib/gl_rbtreehash_list.h: New file.
6042         * lib/gl_rbtreehash_list.c: New file.
6043         * lib/gl_anytreehash_list1.h: New file.
6044         * lib/gl_anytreehash_list2.h: New file.
6045
6046         * lib/gl_oset.h: New file.
6047         * lib/gl_oset.c: New file.
6048         * lib/gl_array_oset.h: New file.
6049         * lib/gl_array_oset.c: New file.
6050         * lib/gl_avltree_oset.h: New file.
6051         * lib/gl_avltree_oset.c: New file.
6052         * lib/gl_rbtree_oset.h: New file.
6053         * lib/gl_rbtree_oset.c: New file.
6054         * lib/gl_anytree_oset.h: New file.
6055
6056 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6057
6058         * m4/mkancesdirs.m4: New file.
6059         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
6060         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
6061         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
6062         it.
6063
6064 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6065
6066         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
6067         * lib/mkancesdirs.h: New files.
6068         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
6069         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
6070         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
6071         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
6072         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
6073         callers changed.  Revamp internals significantly, by not
6074         attempting to create directories that are temporarily more
6075         permissive than the final results.  Do not attempt to use
6076         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
6077         This removes some race conditions, fixes some bugs, and simplifies
6078         things.  Use new dirchownmod function to do owner and mode changes.
6079         * lib/mkdir-p.h: Likewise.
6080         * lib/modechange.c (octal_to_mode): New function.
6081         (struct mode_change): New member mentioned.
6082         (make_node_op_equals): New arg mentioned.  All callers changed.
6083         (mode_compile): Keep track of which mode bits the user has explicitly
6084         mentioned.
6085         (mode_adjust): New arg DIR, so that we implement the X op correctly.
6086         New arg PMODE_BITS, to keep track of which mode bits the user
6087         mentioned; it treats S_ISUID and S_ISGID speciall.
6088         All callers changed.
6089         * lib/modechange.h: Likewise.
6090
6091 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6092
6093         * MODULES.html.sh: Add mkancestors.
6094         * modules/mkancesdirs: New module.
6095         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
6096         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
6097         The chdir-safer and afs files are now orphans; I'll remove them
6098         unless someone speaks up.
6099         Add lib/dirchownmod.c, lib/dirchownmod.h.
6100         (Depends-on): Remove alloca, chown, save-cwd, dirname.
6101         Add lchown, mkancesdirs.
6102         (Maintainer): Add self.
6103
6104 2006-07-15  Karl Berry  <karl@gnu.org>
6105
6106         * gnulib-tool: help message wording/arrangement.
6107
6108 2006-07-14  Simon Josefsson  <jas@extundo.com>
6109
6110         * doc/gnulib.texi (Libtool and Windows): New section.
6111
6112 2006-07-12  Simon Josefsson  <jas@extundo.com>
6113
6114         * modules/gendocs (License): Fix license, approved by Karl.
6115
6116 2006-07-12  Eric Blake  <ebb9@byu.net>
6117
6118         * MODULES.html.sh: Add gendocs.
6119
6120 2006-07-11  Eric Blake  <ebb9@byu.net>
6121
6122         * modules/fdl: New module, to install doc/fdl.texi.
6123         * MODULES.html.sh: Add new section for documentation modules.
6124         * gnulib-tool: Avoid space-tab.
6125         (--doc-base): New option, to manage files from doc.
6126
6127 2006-07-11  Eric Blake  <ebb9@byu.net>
6128
6129         * m4/absolute-header.m4: Fix comments to match recent change.
6130
6131 2006-07-11  Eric Blake  <ebb9@byu.net>
6132
6133         * gnulib-tool: List --doc-base before --tests-base.
6134
6135 2006-07-11  Derek R. Price  <derek@ximbiot.com>
6136
6137         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
6138
6139 2006-07-11  Bruno Haible  <bruno@clisp.org>
6140
6141         * README: Mention where to put documentation.
6142
6143 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6144
6145         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
6146
6147 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6148
6149         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
6150         to stdint.m4.
6151
6152 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6153
6154         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
6155         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
6156         "no/such/file/stdint.h" when there is no such file, so that
6157         the resulting C code can be parsed by dodgy compilers.
6158         Problems reported by Bob Proulx.
6159
6160 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6161
6162         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
6163         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6164         macros into the GNU _D_EXACT_NAMLEN.
6165         * lib/savedir.c:  Likewise.
6166         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
6167
6168 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6169         and Paul Eggert  <eggert@cs.ucla.edu>
6170
6171         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
6172         * m4/savedir.m4:
6173         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6174         macros into the GNU _D_EXACT_NAMLEN.
6175
6176 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6177
6178         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
6179         around the absolute name, to work around a problem with the HP-UX
6180         11.23 native C compiler, reported by Bob Proulx.
6181
6182 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6183
6184         * doc/maintain.texi, make-stds.texi: Sync from
6185         <http://savannah.gnu.org/projects/gnustandards>.
6186
6187 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6188
6189         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
6190
6191 2006-07-09  Jim Meyering  <jim@meyering.net>
6192
6193         * m4/glob.m4: Remove a doubled word in a comment.
6194
6195 2006-07-09  Jim Meyering  <jim@meyering.net>
6196
6197         * lib/argp-pv.c: Remove a doubled word in a comment.
6198         * lib/check-version.c (check_version): Likewise.
6199         * lib/javacomp.c (compile_java_class): Likewise.
6200
6201 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
6202
6203         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
6204         for the benefit of people using Autoconf 2.60.  If you want to
6205         support older Autoconf versions you can copy m4/onceonly_2_57.m4
6206         (or m4/onceonly.m4, if pre-2.57) manually.
6207
6208 2006-07-08  Jim Meyering  <jim@meyering.net>
6209
6210         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
6211         comment.
6212         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
6213         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
6214         comment.
6215
6216 2006-07-08  Jim Meyering  <jim@meyering.net>
6217
6218         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
6219
6220 2006-07-07  Simon Josefsson  <jas@extundo.com>
6221
6222         * tests/test-crc.c: Change expected crc value, the test vector
6223         were probably computed using the old broken crc.c?
6224
6225 2006-07-06  Simon Josefsson  <jas@extundo.com>
6226
6227         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
6228         now the canonical place for the M4 file).
6229
6230         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
6231         from the sys_socket dependency now.
6232
6233         * modules/inet_pton (Files): Ditto.
6234
6235         * modules/inet_ntop (Files): Ditto.
6236
6237 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6238
6239         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
6240         not gl_PREREQ_GETUSERSHELL.
6241
6242 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6243
6244         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
6245         with only one argument, for Autoconf 2.60.
6246         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
6247         expand to nothing, so add a shell command to avoid syntax error.
6248         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6249
6250 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6251
6252         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
6253
6254 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6255
6256         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
6257         no longer needed.  Check for isblank decl.
6258         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
6259         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
6260         of existence.
6261
6262 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6263
6264         * lib/getloadavg.c: Use __VMS, not VMS.
6265         * lib/getopt.c: Likewise.
6266         * lib/getpagesize.h: Likewise.
6267         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
6268         and probably does not work.
6269
6270 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6271
6272         * lib/.cppi-disable: Add wcwidth.
6273         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
6274         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
6275         (ISGRAPH): Remove.  All uses changed to isgraph.
6276         (FOLD) [!defined _LIBC]: Remove special case.
6277         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
6278         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
6279         HAVE_ISBLANK.
6280         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
6281         case.
6282
6283 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6284
6285         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
6286         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
6287         brackets.  Other minor changes to suppress some compiler
6288         warnings.
6289
6290 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6291         and Paul Eggert  <eggert@cs.ucla.edu>
6292
6293         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
6294         of invoking obsolescent AC_HEADER_DIRENT macro.
6295         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
6296         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
6297         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
6298         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
6299         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
6300         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6301         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
6302         * m4/readdir.m4: Remove; no longer needed.
6303
6304 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6305         and Paul Eggert  <eggert@cs.ucla.edu>
6306
6307         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
6308         Don't worry about this obsolete case any more.
6309         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
6310         directories.
6311         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
6312         worry about this obsolete case any more.
6313         * lib/fts.c: Likewise.
6314         * lib/getcwd.c: Likewise.
6315         * lib/glob.h: Likewise.
6316         * lib/savedir.c: Likewise.
6317
6318 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6319
6320         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
6321         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
6322         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
6323         needed.
6324         All uses removed.
6325         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6326         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6327         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
6328         needed.
6329         * m4/getdate.m4 (gl_GETDATE): Likewise.
6330         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6331         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6332         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6333         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6334         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6335         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6336         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
6337         needed.
6338
6339 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6340
6341         * lib/memcasecmp.c: Include <limits.h>.
6342         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
6343         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
6344         Don't assume isdigit succeeds only on '0' through '9'.
6345
6346 2006-07-05  Eric Blake  <ebb9@byu.net>
6347
6348         * modules/getaddrinfo (Depends-on): Add snprintf.
6349
6350 2006-07-05  Eric Blake  <ebb9@byu.net>
6351
6352         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
6353         to avoid 'header present but could not be compiled' on cygwin.
6354
6355 2006-07-05  Eric Blake  <ebb9@byu.net>
6356
6357         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
6358         missing from netdb.h.
6359         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
6360
6361 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6362
6363         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
6364         no longer needed.
6365         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
6366         * m4/getdate.m4 (gl_GETDATE): Likewise.
6367         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6368         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6369         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6370         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6371         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6372
6373 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6374
6375         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
6376         All uses of is_space replaced by isspace.
6377         * lib/exit.h: Don't talk about STDC_HEADERS.
6378         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
6379         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
6380         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
6381         replaced by isprint etc.
6382         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
6383         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6384         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
6385         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
6386         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
6387         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6388
6389 2006-07-05  Bruno Haible  <bruno@clisp.org>
6390
6391         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
6392         the function exists, before testing against AIX.
6393         Reported by Martin Lambers <marlam@marlam.de>.
6394
6395 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6396
6397         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
6398         From Mark D. Baushke.
6399
6400 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6401
6402         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
6403         to the absolute name, not just one, to bypass Sun C 5.8's
6404         "warning: #include of /usr/include/... may be non-portable".
6405
6406 2006-07-04  Eric Blake  <ebb9@byu.net>
6407
6408         * modules/dirname-tests: New test module.
6409         * tests/test-dirname.c: New file, replacing dirname.c
6410         TEST_DIRNAME section that was recently deleted.
6411
6412 2006-07-04  Bruno Haible  <bruno@clisp.org>
6413
6414         Assume ANSI C header files and <ctype.h> functions.
6415         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
6416         (mbsnwidth): Use isprint, iscntrl instead.
6417
6418 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6419
6420         Merge from coreutils.
6421         * MODULES.html.sh: Add xstrtold.
6422         * modules/xstrtold: New file.
6423         * modules/cycle-check (Files): Add lib/same-inode.h.
6424         * modules/dirname (Files): Add m4/double-slash-root.m4.
6425         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
6426         * modules/mkdir-p (Files): Add lib/same-inode.h.
6427         * modules/same (Files): Add lib/same-inode.h.
6428
6429 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6430
6431         * m4/absolute-header.m4: Renamed from full-header-path.m4.
6432         This is to keep the terminology clean; POSIX talks about
6433         "absolute pathnames", not "full pathnames", but the GNU
6434         Coding Standards say to use "path" for something else;
6435         so use "absolute" to keep both sides happy.
6436         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
6437         Set gl_absolute_header, not gl_full_header_path.
6438         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
6439         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
6440         All uses changed.
6441
6442         Merge from coreutils.
6443
6444         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6445
6446         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
6447         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
6448         want to require the building of c-strtod.o.
6449         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
6450         needs -lm directly.
6451         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
6452
6453         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6454
6455         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
6456         --as-needed option if available.  Problem reported by Albert Chin in
6457         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
6458         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
6459         cc merely issues a bunch of annoying warnings for --as-needed
6460         (this problem was reported by Bob Proulx).  Also, try linking with
6461         -lm to detect a bug in binutils 2.16 (this problem was reported
6462         by Ralf Wildenhues).
6463
6464         2006-06-18  Jim Meyering  <jim@meyering.net>
6465
6466         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
6467         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
6468         macro.
6469         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
6470         also check for glibc-2.4's abort-inducing bug.
6471
6472         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
6473         Low-probability clean-up should be to use rmdir to get rid of
6474         the just-created directory, not unlink.
6475
6476         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
6477         configure fail, and request a bug report to inform us about it.
6478         Add a comment that, barring reports to the contrary, in 2007 we'll
6479         assume ftruncate is universally available.
6480
6481         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6482
6483         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
6484
6485         2006-03-12  Jim Meyering  <jim@meyering.net>
6486
6487         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
6488         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
6489         * m4/same.m4 (gl_SAME): Likewise.
6490         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
6491
6492         2006-03-11  Eric Blake  <ebb9@byu.net>
6493
6494         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
6495         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
6496         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
6497         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
6498
6499 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6500
6501         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
6502         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
6503         reported by Mark D. Baushke, one in
6504         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
6505
6506         Merge from coreutils.
6507
6508         * lib/.cppi-disable: Add stdint_.h.
6509         * lib/.cvsignore: Add stdint.h.
6510
6511         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6512
6513         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
6514         both double and long double versions.
6515         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
6516         * lib/xstrtold.c: New file.
6517         * lib/xstrtod.h (xstrtold): New decl.
6518
6519         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
6520
6521         * lib/filemode.c (setst): Remove.
6522         (strmode): Rewrite to avoid setst.  This makes the code shorter,
6523         (arguably) clearer, and the generated code is a bit smaller on my
6524         Debian GNU/Linux stable x86 host.
6525
6526         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6527
6528         * lib/filemode.c: Include "filemode.h" first, to test the interface.
6529         Assume that filemode.h includes sys/types.h and sys/stat.h.
6530         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
6531         (ftypelet): Reorder to put common cases first, for efficiency.
6532         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
6533         to do 'M'.
6534         (strmode): Renamed from mode_string, and now stores 12 bytes instead
6535         of 10, for compatibility with FreeBSD.  All callers changed.
6536         (filemodestring): Now stores 12 bytes instead of 10, and sets file
6537         types that can't be deduced solely from st_mode.  First arg is now a
6538         const pointer.
6539         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
6540         (strmode): Renamed from mode_string.
6541         (filemodestring): New decl.
6542         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
6543         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
6544         needed.
6545         (S_ISPORT, S_ISWHT): New macros, if not already defined.
6546
6547         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
6548
6549         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
6550         fsusage.h now does that.  Include fsusage.h first, to test interface.
6551         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
6552         at most one method (the old code could have generated decls that
6553         didn't conform to C89, not that this was ever exercised).
6554         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
6555
6556         2006-03-19  Jim Meyering  <jim@meyering.net>
6557
6558         Work even in a chroot where d_ino values for entries in "/"
6559         don't match the stat.st_ino values for the same names.
6560         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
6561         number, iterate through all entries again, using lstat instead.
6562         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
6563         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
6564
6565         * lib/getcwd.c (__getcwd): Clarify a comment.
6566         Use memcpy in place of a call to strcpy.
6567
6568         2006-03-12  Jim Meyering  <jim@meyering.net>
6569
6570         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
6571         matches that of the current directory (which we're about to chdir ".."
6572         out of), then save the dev-ino of the parent, instead.
6573
6574         * lib/same-inode.h (SAME_INODE): New file/macro.
6575         * lib/chdir-safer.c (SAME_INODE): Remove definition.
6576         Include "same-inode.h", instead.
6577         * lib/same.c: Likewise.
6578         * lib/cycle-check.h: Include "same-inode.h".
6579         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
6580         * lib/cycle-check.c (SAME_INODE): Remove definition.
6581         * lib/root-dev-ino.h: Include "same-inode.h".
6582
6583         2006-03-11  Eric Blake  <ebb9@byu.net>
6584
6585         * lib/same.c (same_name): s/base_name/last_component/
6586         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
6587         * lib/filenamecat.c (file_name_concat): Likewise.
6588
6589         2006-03-11  Eric Blake  <ebb9@byu.net>,
6590                     Paul Eggert  <eggert@cs.ucla.edu>
6591
6592         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
6593         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
6594         drive prefix.
6595         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
6596         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
6597         (last_component): New method.
6598         * lib/dirname.c (dir_len): Determine when drive letters need a
6599         subsequent slash.  Preserve // when it is special.
6600         (dir_name): Don't append dot when drive letter is absolute.
6601         [TEST_DIRNAME]: Move into a full-blown gnulib test.
6602         * lib/basename.c (base_name): New semantics - malloc the result.
6603         Preserve // when it is special.  Preserve relative files that look
6604         like drive letters.
6605         (base_len): Preserve // when it is special.
6606         (last_component): New method, similar to old base_name semantics.
6607         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
6608         base_name.  Strip redundant slashes from ///.
6609
6610 2006-07-03  Jim Meyering  <jim@meyering.net>
6611
6612         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
6613         macro is used before the first cycle_check call.
6614
6615 2006-07-03  Eric Blake  <ebb9@byu.net>
6616
6617         * modules/dirname (Depends-on): Add xstrndup.
6618
6619 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6620
6621         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
6622         test cases, so that config.log is a bit easier to follow.
6623
6624 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6625
6626         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
6627         both are 64 bits, since this seems to be the tradition, and this
6628         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
6629         we ever run into a host that prefers long long to long in this
6630         case, we'll need another configure-time test.  Problem reported by
6631         Jim Meyering.
6632
6633 2006-07-02  Eric Blake  <ebb9@byu.net>
6634
6635         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
6636
6637 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6638
6639         * modules/inttypes (Depends-on): No longer depends on stdint.
6640         * modules/stdint (Description): Say more about assumptions.
6641         Say that the fast types might differ.  Say macros are used.
6642         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
6643         (Makefile.am): Revise list of substituted symbols to match
6644         new stdint.m4.
6645         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
6646         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
6647         * tests/test-stdint.c (verify_same_types)
6648         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
6649         the code conforms to C99/C89.
6650         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
6651         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
6652
6653 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6654
6655         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
6656         but fix a bug, by requiring at least 64 bits.
6657         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
6658         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
6659         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
6660         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
6661
6662         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
6663         changes.  Make 2.59 a prerequisite.  Check and substitute for
6664         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
6665         inttypes.h.  Do not use special include files; just use the
6666         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
6667         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
6668         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
6669         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
6670         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
6671         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
6672         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
6673         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
6674         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
6675         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
6676         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
6677         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
6678         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
6679         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
6680         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
6681         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
6682         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
6683         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
6684         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
6685         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
6686         WINT_MAX.  Check for C99 conformance more strictly, by detecting
6687         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
6688         not check for things that C99 does not require, e.g., int8_t.  If
6689         a test isn't needed unless <stdint.h> isn't working, and is
6690         unlikely to be needed for any other reason, then don't do it
6691         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
6692         size_t, since we assume C89 freestanding at least.  Do not check
6693         for sig_atomic_t, wchar_t, or wint_t, since the code now does
6694         the right thing even if the types are not defined.  Instead use:
6695         (gl_STDINT_TYPE_PROPERTIES): New macro.
6696         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
6697         testing whether <sys/types.h> clashes, as Autoconf does this for
6698         us now.  All uses removed.
6699         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
6700         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
6701         (gl_CHECK_TYPE_SAME):
6702         Remove; no longer needed.
6703         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
6704         exists, since we'll return 0 anyway in that case.
6705         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
6706
6707 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6708
6709         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
6710         possible collision with system files.
6711         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
6712         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
6713         WCHAR_MIN and WCHAR_MAX in this case.
6714         (<stddef.h>): Do not include; no longer needed.
6715         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
6716         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
6717         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
6718         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
6719         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
6720         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
6721         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
6722         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
6723         !defined(__c99))]: Include in this case too, since it's harmless
6724         now.
6725         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
6726         dangerous to do so.
6727         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
6728         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
6729         (_STDINT_MIN, _STDINT_MAX): New macros.
6730         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
6731         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
6732         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
6733         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
6734         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
6735         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
6736         macros, not typedefs; this simplifies things quite a bit.
6737         Use long int for all types narrower than int64_t.
6738         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
6739         Define in terms of long long int or int64_t or long int,
6740         not int64_t or int32_t.  This saves some compile-time testing.
6741         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
6742         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
6743         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
6744         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
6745         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
6746         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
6747         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
6748         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
6749         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
6750         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
6751         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
6752         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
6753         undef any previous version and define our own version, for
6754         simplicity and consistency with the new macros for types.
6755         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
6756         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
6757         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
6758         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
6759         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
6760         @WINT_T_SUFFIX@ to keep things simple here.
6761         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
6762         Simplify by assuming typical 8/16/32/64 host, since we're
6763         already doing that elsewhere anyway.
6764         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
6765         and assume long long int is 64 bits if available.  This
6766         speeds up 'configure'.
6767
6768 2006-07-01  Eric Blake  <ebb9@byu.net>
6769
6770         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
6771         Reported by Andreas Buening.
6772
6773 2006-07-01  Eric Blake  <ebb9@byu.net>
6774
6775         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
6776
6777 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6778
6779         * lib/getaddrinfo.c: fixed typo
6780
6781 2006-06-29  Jim Meyering  <jim@meyering.net>
6782
6783         * modules/strftime (Maintainer): Add my name, since with the
6784         FPRINTFTIME changes strftime.c has forked from glibc.
6785
6786 2006-06-29  Eric Blake  <ebb9@byu.net>
6787
6788         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
6789
6790 2006-06-29  Eric Blake  <ebb9@byu.net>
6791
6792         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
6793
6794 2006-06-29  Eric Blake  <ebb9@byu.net>
6795
6796         * lib/stat_.h: New file.
6797
6798 2006-06-29  Eric Blake  <ebb9@byu.net>
6799
6800         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
6801         unused static function.
6802
6803 2006-06-29  Eric Blake  <ebb9@byu.net>
6804
6805         * doc/functions.texi (Function Portability): Document missing lstat
6806         on mingw.
6807
6808 2006-06-29  Eric Blake  <ebb9@byu.net>
6809
6810         * MODULES.html.sh: Add sys_stat.
6811         * modules/sys_stat: New module.
6812         * modules/mkstemp (Depends-on): Add sys_stat.
6813
6814 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6815
6816         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
6817
6818 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6819
6820         * m4/c-bs-a.m4: Removed.
6821
6822 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6823
6824         * lib/strftime.c: Assume strftime() exists.
6825
6826 2006-06-29  Derek Price  <derek@ximbiot.com>
6827
6828         * modules/c-bs-a: Removed - \a is C89.
6829         * MODULES.html.sh: Remove c-bs-a.
6830
6831 2006-06-29  Bruno Haible  <bruno@clisp.org>
6832
6833         * modules/wcwidth (License): Change to LGPL.
6834
6835 2006-06-28  Simon Josefsson  <jas@extundo.com>
6836
6837         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
6838         on _WIN32.
6839
6840         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
6841         getnameinfo.
6842
6843 2006-06-28  Simon Josefsson  <jas@extundo.com>
6844
6845         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
6846
6847 2006-06-28  Simon Josefsson  <jas@extundo.com>
6848
6849         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
6850         functions there.  It will succeed on Windows XP, but on Windows
6851         2000 and (presumably) earlier, it will fail, and use the internal
6852         re-implementation.
6853         (use_win32_p): New function.
6854         (getaddrinfo): Use strtoul on servname, to support numeric ports.
6855         Support AI_NUMERICSERV to disable getservbyname.
6856         (getnameinfo): New function, only supports
6857         NI_NUMERICHOST|NI_NUMERICSERV for now.
6858
6859         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
6860         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
6861         getnameinfo.
6862
6863 2006-06-28  Eric Blake  <ebb9@byu.net>
6864
6865         * modules/wcwidth: New file.
6866         * modules/mbchar (Depends-on): Add wcwidth.
6867         * modules/mbswidth (Depends-on): Add wcwidth.
6868         * MODULES.html.sh: Add wcwidth.
6869
6870 2006-06-28  Eric Blake  <ebb9@byu.net>
6871
6872         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
6873         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
6874
6875 2006-06-28  Eric Blake  <ebb9@byu.net>
6876
6877         * lib/xvasprintf.h: Fix comments.
6878
6879 2006-06-28  Eric Blake  <ebb9@byu.net>
6880
6881         * lib/mbchar.h (wcwidth): Include wcwidth.h.
6882         * lib/mbswidth.c (wcwidth): Move from here...
6883         * lib/wcwidth.h: ...to this new file.
6884
6885 2006-06-28  Derek R. Price  <derek@ximbiot.com>
6886
6887         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
6888
6889         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
6890         it's obsolete.
6891         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
6892
6893 2006-06-28  Derek R. Price  <derek@ximbiot.com>
6894
6895         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
6896         Autoconf 2.60 says this stuff was obsolete.
6897
6898 2006-06-28  Bruno Haible  <bruno@clisp.org>
6899
6900         * modules/wcwidth (Files): Add m4/wchar_t.m4.
6901
6902 2006-06-28  Bruno Haible  <bruno@clisp.org>
6903
6904         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
6905         gt_TYPE_WCHAR_T.
6906
6907 2006-06-28  Bruno Haible  <bruno@clisp.org>
6908
6909         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
6910         declaration for wcwidth.
6911         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
6912
6913 2006-06-28  Bruno Haible  <bruno@clisp.org>
6914
6915         * lib/mkdtemp.c [MINGW]: Include <io.h>.
6916         (mkdir): Define using _mkdir.
6917
6918 2006-06-28  Bruno Haible  <bruno@clisp.org>
6919
6920         * lib/getaddrinfo.h: Fix POSIX URL.
6921         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
6922         _WIN32.
6923         (use_win32_p): Make static.
6924         (getaddrinfo): Reject service name if it is empty or does not consist
6925         solely of decimal digits, or if its value is > 65535.
6926         (getnameinfo): Remove useless casts.
6927
6928 2006-06-27  Simon Josefsson  <jas@extundo.com>
6929
6930         * modules/sys_select: New file, suggested by Bruno Haible, Paul
6931         Eggert and Martin Lambers.
6932
6933 2006-06-27  Simon Josefsson  <jas@extundo.com>
6934
6935         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
6936         Eggert and Martin Lambers.
6937
6938 2006-06-27  Bruno Haible  <bruno@clisp.org>
6939
6940         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
6941         result to 0, not to empty.
6942         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
6943
6944 2006-06-27  Bruno Haible  <bruno@clisp.org>
6945
6946         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
6947
6948 2006-06-26  Simon Josefsson  <jas@extundo.com>
6949
6950         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
6951         present.
6952
6953 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
6954
6955         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
6956         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
6957         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
6958
6959 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
6960
6961         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
6962
6963 2006-06-26  Bruno Haible  <bruno@clisp.org>
6964
6965         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
6966
6967 2006-06-26  Bruno Haible  <bruno@clisp.org>
6968
6969         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
6970
6971 2006-06-26  Bruno Haible  <bruno@clisp.org>
6972
6973         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
6974         SGI C compiler in pre-C99 mode.
6975         Suggested by Mark D. Baushke and Larry Jones.
6976
6977 2006-06-26  Bruno Haible  <bruno@clisp.org>
6978
6979         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
6980         WCHAR_MAX.
6981         Reported by Mark D. Baushke and Larry Jones.
6982
6983 2006-06-26  Bruno Haible  <bruno@clisp.org>
6984
6985         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
6986         in pre-C99 mode.
6987         Suggested by Mark D. Baushke and Larry Jones.
6988
6989 2006-06-23  Simon Josefsson  <jas@extundo.com>
6990             Bruno Haible  <bruno@clisp.org>
6991
6992         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
6993         Emit mostlyclean-local rule.
6994         (func_emit_tests_Makefile_am): Likewise.
6995         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
6996
6997 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
6998
6999         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
7000
7001 2006-06-23  Bruno Haible  <bruno@clisp.org>
7002
7003         * tests/test-stdint.c: Update to match ISO C 99 Technical
7004         Corrigendum 1.
7005
7006 2006-06-23  Bruno Haible  <bruno@clisp.org>
7007
7008         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
7009
7010 2006-06-23  Bruno Haible  <bruno@clisp.org>
7011
7012         * lib/stdint_.h: Treat IRIX like OpenBSD.
7013
7014 2006-06-23  Bruno Haible  <bruno@clisp.org>
7015
7016         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
7017         ISO C 99 Technical Corrigendum 1.
7018
7019 2006-06-22  Simon Josefsson  <jas@extundo.com>
7020
7021         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
7022         MinGW.
7023
7024 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
7025
7026         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
7027         needed.  Some compiler complained about some of them.  Problem reported
7028         by Larry Jones in
7029         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
7030
7031 2006-06-21  Simon Josefsson  <jas@extundo.com>
7032
7033         * tests/test-getaddrinfo.c: New file.
7034
7035         * modules/getaddrinfo-tests: New file.
7036
7037         * MODULES.html.sh: Add inet_pton.
7038
7039         * modules/inet_pton: New file.
7040
7041 2006-06-21  Simon Josefsson  <jas@extundo.com>
7042
7043         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
7044         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
7045         of using the (limited) gnulib implementation on Windows XP.
7046
7047         * m4/inet_pton.m4: New file.
7048
7049 2006-06-21  Simon Josefsson  <jas@extundo.com>
7050
7051         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
7052         variable.
7053
7054         * lib/socket_.h: Don't define WINVER.
7055
7056         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
7057         slightly modified to work in gnulib.
7058
7059 2006-06-21  Simon Josefsson  <jas@extundo.com>
7060
7061         * doc/gnulib.texi (Windows sockets): Add.
7062
7063 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
7064
7065         * lib/read-file.c (fread_file): Start with buffer allocation of
7066         0 bytes rather than 1 byte; this simplifies the code.
7067         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
7068         code to free buffer and save/restore errno.
7069         (internal_read_file): Remove unused local.
7070
7071 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
7072
7073         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
7074         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
7075         Problem reported by Denis Excoffier in
7076         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
7077
7078 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7079
7080         * modules/sys_socket, modules/socklen: Include sys/types since
7081         FreeBSD 4.x's sys/socket.h needs it.
7082
7083 2006-06-19  Simon Josefsson  <jas@extundo.com>
7084
7085         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
7086
7087 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7088
7089         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
7090
7091 2006-06-19  Bruno Haible  <bruno@clisp.org>
7092
7093         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
7094         and FULL_PATH_INTTYPES_H in angle brackets.
7095         Reported by Mark D. Baushke <mdb@gnu.org>.
7096
7097 2006-06-17  Eric Blake  <ebb9@byu.net>
7098
7099         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
7100         errno.
7101
7102 2006-06-17  Bruno Haible  <bruno@clisp.org>
7103
7104         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
7105         <sys/inttypes.h>.
7106
7107 2006-06-17  Bruno Haible  <bruno@clisp.org>
7108
7109         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
7110         whether errno is declared. Assume <errno.h> declares errno.
7111
7112 2006-06-17  Bruno Haible  <bruno@clisp.org>
7113
7114         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
7115
7116 2006-06-17  Bruno Haible  <bruno@clisp.org>
7117
7118         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
7119         problem on Solaris 2.5.1.
7120
7121 2006-06-16  Eric Blake  <ebb9@byu.net>
7122
7123         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
7124         * lib/unicodeio.c [!defined errno]: Likewise.
7125         * lib/strtol.c [!defined errno]: Likewise.
7126         * lib/strtod.c [!defined errno]: Likewise.
7127
7128 2006-06-15  Eric Blake  <ebb9@byu.net>
7129
7130         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
7131
7132 2006-06-15  Eric Blake  <ebb9@byu.net>
7133
7134         * config/srclist.txt (ssize_t.m4): Lose sync.
7135
7136 2006-06-15  Bruno Haible  <bruno@clisp.org>
7137
7138         * modules/stdint (Files): Include m4/full-header-path.m4,
7139         m4/size_max.m4, m4/wchar_t.m4.
7140         (Makefile.am): Many more substitutions.
7141         * modules/stdint-tests: New file.
7142         * tests/test-stdint.c: New file.
7143
7144 2006-06-15  Bruno Haible  <bruno@clisp.org>
7145
7146         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
7147         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
7148         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
7149         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
7150         gl_CHECK_TYPE_SAME): New macros.
7151
7152 2006-06-15  Bruno Haible  <bruno@clisp.org>
7153
7154         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
7155
7156 2006-06-15  Bruno Haible  <bruno@clisp.org>
7157
7158         * lib/stdint_.h: Rewritten to be fully auto-configured.
7159         Fixes bug on HP-UX/IA64.
7160
7161 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
7162
7163         * lib/getdate.y (__attribute__): Don't define if already defined.
7164         Problem reported by Larry Jones.
7165         * lib/utimens.c (__attribute__): Likewise.
7166
7167 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
7168
7169         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
7170         reported by Andreas Schwab.
7171
7172 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7173             Bruno Haible  <bruno@clisp.org>
7174
7175         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
7176         check for the declaration of strnlen and a run test that exposes the
7177         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
7178         rpl_strndup.
7179
7180 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7181             Bruno Haible  <bruno@clisp.org>
7182
7183         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
7184
7185 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7186
7187         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
7188         compile test, for Tru64 4.0D.
7189
7190 2006-05-28  Karl Berry  <karl@gnu.org>
7191
7192         * config/srclist.txt (printf-args.c): lose sync.
7193
7194 2006-05-26  Martin Lambers  <marlam@marlam.de>
7195
7196         * lib/getpass.c: Updates the test for the native W32 API, and adds
7197         missing includes, thus fixing compilation warnings.
7198
7199 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7200
7201         * lib/exclude.c (exclude_fnmatch): New function.
7202         (excluded_file_name): Call exclude_fnmatch.
7203         * lib/exclude.h (excluded_file_name): New prototype
7204
7205 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
7206
7207         * lib/tempname.c (small_open, large_open): New macros.
7208         (__open, __open64) [!_LIBC]: Remove.
7209         (__gen_tempname): Use small_open and large_open instead of __open
7210         and __open64.  This fixes a portability bug on HP-UX 11.11i
7211         reported by Simon Wing-Tang in
7212         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
7213
7214 2006-05-24  Bruno Haible  <bruno@clisp.org>
7215
7216         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
7217         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
7218         Reported by Thorsten Maerz <torte@netztorte.de> via
7219         Aaron Stone <aaron@serendipity.cx>.
7220
7221 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7222
7223         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
7224         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
7225         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
7226         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
7227         not really conditional on the cache.
7228         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
7229
7230 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7231
7232         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
7233         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
7234         (my_usleep): Don't mishandle maximum value.
7235
7236 2006-05-19  Jim Meyering  <jim@meyering.net>
7237
7238         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
7239
7240 2006-05-17  Bruno Haible  <bruno@clisp.org>
7241
7242         Cygwin portability.
7243         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
7244
7245 2006-05-17  Bruno Haible  <bruno@clisp.org>
7246
7247         * lib/stdint_.h: Fix recognition of Cygwin.
7248
7249 2006-05-15  Bruno Haible  <bruno@clisp.org>
7250
7251         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
7252         on libtool patch by Ralf Wildenhues.
7253
7254 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
7255
7256         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
7257         test for C99 conformance; (bool) 0.5 is an integer constant
7258         expression, but (bool) -0.5 is not.  Problem reported by Fedor
7259         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
7260
7261 2006-05-11  Simon Josefsson  <jas@extundo.com>
7262
7263         * m4/xvasprintf.m4: Fix obvious typo.
7264
7265 2006-05-11  Jim Meyering  <jim@meyering.net>
7266
7267         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
7268         James Lemley.
7269
7270 2006-05-10  Simon Josefsson  <jas@extundo.com>
7271
7272         * lib/md4.c: Typo fix, update copyright years.
7273         (K1, K2): Don't use L because it turn computations into 64-bit on
7274         64-bit platforms.
7275
7276 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
7277
7278         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
7279         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
7280         unwanted sign propagation, e.g., on hosts with 64-bit int.
7281         There still are some problems with reeelly weird theoretical hosts
7282         (e.g., 33-bit int) but it's not worth worrying about now.
7283         * lib/sha1.c (rol): Likewise.
7284         (K1, K2, K3, K4): Remove unnecessary L suffix.
7285
7286 2006-05-10  Bruno Haible  <bruno@clisp.org>
7287
7288         * lib/des.c: Cast to avoid warnings.
7289
7290 2006-05-09  Bruno Haible  <bruno@clisp.org>
7291
7292         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
7293         (Depends-on): Depend also on xsize, stdarg.
7294         (configure.ac): Add gl_XVASPRINTF.
7295
7296 2006-05-09  Bruno Haible  <bruno@clisp.org>
7297
7298         * m4/xvasprintf.m4: New file.
7299
7300 2006-05-09  Bruno Haible  <bruno@clisp.org>
7301
7302         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
7303         (EOVERFLOW): Define fallback value.
7304         (xstrcat): New function.
7305         (xvasprintf): Recognize the special case of a string concatenation.
7306
7307 2006-05-08  Eric Blake  <ebb9@byu.net>
7308
7309         * gnulib-tool (func_version): Base copyright year on CVS date.
7310         (func_emit_copyright_notice): New function.
7311         (func_emit_lib_Makefile_am): Use it.
7312         (func_emit_tests_Makefile_am): Likewise.
7313         (func_import): Likewise.
7314
7315 2006-05-08  Bruno Haible  <bruno@clisp.org>
7316
7317         * modules/stdarg: New file.
7318         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
7319
7320 2006-05-08  Bruno Haible  <bruno@clisp.org>
7321
7322         * m4/stdarg.m4: New file, from GNU gettext.
7323
7324 2006-05-08  Bruno Haible  <bruno@clisp.org>
7325
7326         * config/srclist.txt (build-aux/config.rpath): different from latest
7327         release.
7328
7329 2006-05-08  Bruno Haible  <bruno@clisp.org>
7330
7331         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
7332
7333 2006-05-05  Jim Meyering  <jim@meyering.net>
7334
7335         * m4/warning.m4: New file, derived from bison's file by the same name.
7336
7337 2006-05-03  Bruno Haible  <bruno@clisp.org>
7338
7339         * lib/stdint_.h: Shorter URL.
7340         * lib/inttypes.h: Likewise.
7341
7342 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7343
7344         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
7345
7346 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7347
7348         * lib/verify.h: Document the internals better.  Most of this change
7349         was written by Bruno Haible.
7350
7351 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7352
7353         * doc/verify.texi: New file, partly based on a proposal by
7354         Bruno Haible.
7355
7356 2006-05-02  Bruno Haible  <bruno@clisp.org>
7357
7358         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
7359         test from here...
7360         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
7361
7362 2006-04-29  Bruno Haible  <bruno@clisp.org>
7363
7364         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
7365         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
7366
7367 2006-04-29  Bruno Haible  <bruno@clisp.org>
7368
7369         * gnulib-tool: Make --update option actually work.
7370
7371 2006-04-29  Bruno Haible  <bruno@clisp.org>
7372
7373         * doc/gcd.texi: New file.
7374         * doc/gnulib.texi: Include it.
7375
7376 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
7377
7378         * lib/getdate.y (get_date): When adding relative date, start with the
7379         initial time, not with the result of the first mktime call.
7380
7381 2006-04-25  Bruno Haible  <bruno@clisp.org>
7382
7383         * gnulib-tool (func_import): Output the include directives in three
7384         blocks, sorted separately.
7385         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7386
7387 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7388
7389         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
7390         to define main with arguments, for C++.  Reported by Eric Blake.
7391         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
7392         Prefer 'int main ()' to 'int main (void)', for C++.
7393         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
7394         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
7395         for 'main', for C99 and C++.
7396
7397 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7398
7399         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
7400         Don't assume that exit status -1 is valid.
7401         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7402         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
7403         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
7404         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
7405         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
7406         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
7407         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
7408         functions can be used without declaring them, or that you can
7409         exit with status -1.
7410         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
7411
7412 2006-04-24  Karl Berry  <karl@gnu.org>
7413
7414         * config/srclist.txt (longdouble.m4): sync lost.
7415
7416 2006-04-24  Eric Blake  <ebb9@byu.net>
7417
7418         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
7419
7420 2006-04-24  Bruno Haible  <bruno@clisp.org>
7421
7422         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
7423         poll() implementation in AIX.
7424         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7425
7426 2006-04-24  Bruno Haible  <bruno@clisp.org>
7427
7428         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
7429         assigned exactly once.
7430
7431 2006-04-23  Claudio Fontana  <claudio@gnu.org>
7432             Bruno Haible  <bruno@clisp.org>
7433
7434         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
7435         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
7436         for AM_CPPFLAGS.
7437
7438 2006-04-23  Bruno Haible  <bruno@clisp.org>
7439
7440         * modules/copy-file: Depend on unistd.
7441         * modules/execute: Likewise.
7442         * modules/fatal-signal: Likewise.
7443         * modules/findprog: Likewise.
7444         * modules/mkdtemp : Likewise.
7445         * modules/pipe: Likewise.
7446         * modules/wait-process: Likewise.
7447
7448 2006-04-23  Bruno Haible  <bruno@clisp.org>
7449
7450         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
7451         condition was already detected.
7452         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7453
7454 2006-04-23  Bruno Haible  <bruno@clisp.org>
7455
7456         * lib/copy-file.c: Include <unistd.h> unconditionally.
7457         * lib/execute.c: Likewise.
7458         * lib/fatal-signal.c: Likewise.
7459         * lib/findprog.c: Likewise.
7460         * lib/mkdtemp.c: Likewise.
7461         * lib/pipe.h: Likewise.
7462         * lib/pipe.c: Likewise.
7463         * lib/wait-process.h: Likewise.
7464
7465 2006-04-23  Bruno Haible  <bruno@clisp.org>
7466
7467         * gnulib-tool (func_usage): Fix --import description. Document
7468         --update.
7469         (func_import): Create temporary file in a temporary directory, if
7470         --dry-run is specified. Silence errors from 'grep' when there are no
7471         m4 files in $m4dir.
7472         (func_create_testdir): Silence errors from 'grep' when there are no
7473         m4 files in $m4dir.
7474         Reported by Karl Berry <karl@freefriends.org>.
7475
7476 2006-04-20  Bruno Haible  <bruno@clisp.org>
7477
7478         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
7479         one argument, so that the code will be portable to Autoconf 2.60.
7480         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
7481         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7482         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
7483
7484 2006-04-19  Derek Price  <derek@ximbiot.com>
7485             Eric Blake  <ebb9@byu.net>
7486
7487         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
7488         rather than "/full/path.h".  Update comment to match.  Shorten &
7489         generalize m4_translit call via AS_TR_CPP.
7490
7491 2006-04-19  Derek Price  <derek@ximbiot.com>
7492             Eric Blake  <ebb9@byu.net>
7493
7494         * lib/inttypes.h: Correct grammar in comment.
7495
7496 2006-04-18  Derek Price  <derek@ximbiot.com>
7497             Paul Eggert  <eggert@cs.ucla.edu>
7498
7499         * modules/inttypes: New file.
7500         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
7501
7502 2006-04-18  Derek Price  <derek@ximbiot.com>
7503             Paul Eggert  <eggert@cs.ucla.edu>
7504
7505         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
7506         New files.
7507
7508 2006-04-18  Derek Price  <derek@ximbiot.com>
7509             Paul Eggert  <eggert@cs.ucla.edu>
7510
7511         * lib/inttypes.h: New file.
7512         * lib/strtoimax.c: Assume <inttypes.h>.
7513
7514 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
7515
7516         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
7517         isn't mounted.  Problem reported by Kir Kolyshkin.
7518
7519 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
7520
7521         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
7522         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
7523         Derek R. Price.
7524         * lib/regex.h (RE_DUP_MAX): Update comment to match current
7525         implementation.
7526
7527 2006-04-12  Eric Blake  <ebb9@byu.net>
7528
7529         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
7530         is now done automatically by the corresponding Autoconf macro.
7531
7532 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
7533
7534         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
7535         time_r.h.
7536
7537 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7538
7539         Merge regex changes from libc, removing some of our
7540         POSIX-conformance changes that were rejected and redoing them in a
7541         less-intrusive way.
7542
7543         * lib/regcomp.c (re_compile_internal, init_dfa):
7544         Length arg is now size_t, not Idx.  All uses changed.
7545         (peek_token): Forward decl now says internal_function.
7546         (__re_error_msgid, __re_error_msgid_idx):
7547         Now static rather than extern with attribute_hidden.
7548         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
7549         For some reason libc prefers K&R style defns for external functions.
7550         (regerror) [!defined _LIBC]: Likewise.
7551         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
7552         (seek_collating_symbol_entry, lookup_collation_sequence_value):
7553         (build_range_exp, build_collating_symbol):
7554         Use K&R-style defn.
7555         (re_compile_fastmap): Use '\0' to memset, not 0.
7556         (utf8_sb_map): Make the calculations more obvious.
7557         (init_dfa, parse_bracket_exp, build_charclass_op):
7558         Call calloc and cast result, as glibc does.
7559         (init_word_char, fetch_token, peek_token, peek_token_bracket):
7560         (build_range_exp, build_collating_symbol):
7561         Now internal functions.
7562
7563         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
7564
7565         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
7566         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
7567         Don't depend on VMS; depend on __VMS instead, for POSIX
7568         namespace cleanness.
7569         (regoff_t): Define to ssize_t, not long int.
7570
7571         Remove the REG_ macros named below.  Instead, make the old names
7572         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
7573         __USE_GNU_REGEX.
7574         (REG_BACKSLASH_ESCAPE_IN_LISTS):
7575         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
7576         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
7577         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
7578         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
7579         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
7580         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
7581         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
7582         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
7583         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
7584         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
7585         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
7586         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
7587         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
7588         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
7589         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
7590         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
7591         (REG_NREGS):
7592         Remove.  All uses replaced by the old RE_* names.
7593         (RE_BACKSLASH_ESCAPE_IN_LISTS):
7594         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
7595         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
7596         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
7597         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
7598         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
7599         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
7600         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
7601         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
7602         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
7603         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
7604         Don't bother having these macros be independent of each others'
7605         values, since they no longer exist in the POSIX name space.
7606
7607         Rename the following member names back to their old names,
7608         unless !__USE_GNU_REGEX.  All uses changed back.
7609         (buffer): Renamed from re_buffer.
7610         (allocated): Renamed from re_allocated.
7611         (used): Renamed from re_used.
7612         (syntax): Renamed from re_syntax.
7613         (fastmap): Renamed from re_fastmap.
7614         (translate): Renamed from re_translate.
7615         (can_be_null): Renamed from re_can_be_null.
7616         (regs_allocated): Renamed from re_regs_allocated.
7617         (fastmap_accurate): Renamed from re_fastmap_accurate.
7618         (no_sub): Renamed from re_no_sub.
7619         (not_bol): Renamed from re_not_bol.
7620         (not_eol): Renamed from re_not_eol.
7621         (newline_anchor): Renamed from re_newline_anchor.
7622         (num_regs): Renamed from rm_num_regs.
7623         (start): Renamed from rm_start.
7624         (end): Renamed from rm_end.
7625
7626         (free_state): Move up a bit.
7627
7628         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
7629         #define to be empty.
7630         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
7631         when that is what is intended.
7632         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
7633         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
7634         (MAX): New macro.
7635         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
7636         All uses changed back to re_malloc, etc.  It's now the caller's
7637         responsibility to check for overflow; all callers changed.
7638         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
7639         (re_x2nrealloc): Remove.
7640         (free_state): Remove decl.
7641
7642         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
7643         (re_set_registers, re_exec):
7644         Use K&R-style defn.
7645
7646         2006-01-31  Roland McGrath  <roland@redhat.com>
7647
7648         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
7649         Reported by Mike Frysinger <vapier@gentoo.org>.
7650
7651         2006-01-15  Andreas Jaeger  <aj@suse.de>
7652
7653         [BZ #1950]
7654         * lib/regex_internal.c (re_string_reconstruct): Adjust for
7655         build_wcs_upper_buffer change.
7656         (build_wcs_upper_buffer): Change return type.
7657
7658         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
7659
7660         * lib/regex_internal.h: Include <stdint.h> if available.
7661
7662         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
7663
7664         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
7665
7666         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7667
7668         * lib/regcomp.c: Adjust for changed secondary hash function.
7669
7670         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
7671
7672         * lib/regex.h: Pretty printing.
7673         Clean up namespace a bit.
7674
7675         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
7676
7677         * lib/regexec.c (update_cur_sifted_state, check_arrival,
7678         check_arrival_add_next_nodes): Avoid using uninitialized variable.
7679
7680         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
7681                     Ulrich Drepper  <drepper@redhat.com>
7682
7683         [BZ #1302]
7684         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
7685         changed.
7686         (bitset_word_t): Renamed from bitset_word.  All uses changed.
7687
7688         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
7689
7690         [BZ #281]
7691         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
7692         * lib/regcomp.c: Remove unnecessary uses of
7693         unsigned RE_TRANSLATE_TYPE.
7694         * lib/regex_internal.h: Likewise.
7695         * lib/regex_internal.c: Likewise.
7696         * lib/regexec.c: Likewise.
7697         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
7698
7699         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
7700
7701         * lib/regexec.c (find_recover_state): Remove unnecessary
7702         initialization.
7703         (transit_state_bkref): Make DFA a const pointer.
7704         (get_subexp): Likewise.
7705         (check_arrival): Likewise.
7706         (update_cur_sifted_state): Likewise.
7707         (re_search_internal): Likewise.
7708         (prune_impossible_nodes): Likewise.
7709         (acquire_init_state_context): Likewise.
7710         (proceed_next_node): Likewise.
7711         (set_regs): Likewise.
7712         (free_fail_stack_return): Likewise.
7713         (check_arrival_expand_ecl): Mark DFA parameter as const.
7714         (check_arrival_expand_ecl_sub): Likewise.
7715         (check_subexp_limits): Likewise.
7716         (sub_epsilon_src_nodes):  Likewise.
7717         (add_epsilon_src_nodes):  Likewise.
7718         (merge_state_array): Likewise.
7719         (update_regs): Likewise.
7720         (build_trtable): Likewise.
7721         (sift_states_backward): Mark MCTX parameter as const.
7722         (build_sifted_states): Likewise.
7723         (update_cur_sifted_state): Likewise.
7724         (sift_states_mkref): Likewise.
7725         (check_arrival_expand_ecl): Mark eclosure as const.
7726         (check_dst_limits_calc_pos_1): Likewise.
7727         * lib/regex_internal.h (re_match_context_t): Make dfa a const
7728         pointer.
7729
7730         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
7731
7732         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
7733         (transit_state_sb): Likewise.
7734         (transit_state_mb): Likewise.
7735         (sift_states_iter_mb): Likewise.
7736         (check_arrival_add_next_nodes): Likewise.
7737         (check_node_accept_bytes): Change first parameter to pointer-to-const.
7738         [_LIBC] (re_search_2_stub): Use mempcpy.
7739
7740         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
7741         mbrtowc for very simple UTF-8 case.
7742
7743         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
7744         a pointer-to-const.
7745         (re_acquire_state_context): Likewise.
7746         * lib/regex_internal.h: Adjust prototypes.
7747
7748         * lib/regex.c: Prevent using C++ compilers.
7749
7750         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
7751         (re_acquire_state_context): Likewise.
7752
7753 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7754
7755         * modules/regex (Depends-on): Add ssize_t.
7756
7757 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7758
7759         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
7760         translation table.
7761
7762 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7763
7764         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
7765
7766 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
7767             Bruno Haible  <bruno@clisp.org>
7768
7769         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
7770         <sys/types.h> and <inttypes.h>.
7771
7772 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7773
7774         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
7775         `__error_t_defined', so argp.h will not typedef the former.
7776
7777 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
7778
7779         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
7780         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
7781         glibc names.  Even if glibc is changed to conform to POSIX, the
7782         traditional names will be available anyway, since regex depends on
7783         the extensions module.  Also, fix a longstanding typo in the
7784         implementation of Spencer ERE test #75 from grep 2.3.  Problems
7785         reported by Emanuele Giaquinta.  Also, change sense of cached
7786         variable, so that the message makes sense.
7787
7788 2006-03-24  Simon Josefsson  <jas@extundo.com>
7789
7790         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
7791         including some doc fixes.
7792         (base64_encode_alloc): Fix +1 bug on allocation failures.
7793
7794 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7795
7796         * lib/base64.c (base64_encode): Do not read past end of array with
7797         unsanitized input on systems with CHAR_BIT > 8.
7798
7799 2006-03-24  Eric Blake  <ebb9@byu.net>
7800
7801         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
7802
7803 2006-03-22  Karl Berry  <karl@gnu.org>
7804
7805         * config/srclist.txt (*setenv.[ch]): get from coreutils.
7806         * config/srclistvars.sh (COREUTILS): new var.
7807
7808 2006-03-17  Jim Meyering  <jim@meyering.net>
7809
7810         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
7811         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
7812
7813 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
7814
7815         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
7816         no longer needs it.  Instead, check that regoff_t is as least
7817         as wide as ptrdiff_t.
7818
7819         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
7820         so that our regex.h stays compatible with the installed regex.
7821         This is helpful for installers who configure --without-included-regex.
7822         Problem reported by Emanuele Giaquinta.
7823
7824 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
7825
7826         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
7827         Typedef to long int, not to off_, as POSIX will likely change
7828         in that direction.
7829
7830 2006-03-15  Eric Blake  <ebb9@byu.net>
7831
7832         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
7833
7834 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7835
7836         * lib/argp-help.c (validate_uparams): Fix typo
7837         * lib/argp-parse.c (argp_default_options): Consistently begin help
7838         messages with a lowercase letter.
7839
7840 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
7841
7842         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
7843         overrun buffers and shouldn't be used (much as gets shouldn't be
7844         used).
7845         * lib/time_r.c (asctime_r, ctime_r): Likewise.
7846
7847 2006-03-08  Simon Josefsson  <jas@extundo.com>
7848
7849         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
7850         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7851
7852 2006-03-08  Simon Josefsson  <jas@extundo.com>
7853
7854         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
7855         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7856
7857 2006-03-08  Simon Josefsson  <jas@extundo.com>
7858
7859         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
7860         signal that configure disabled the device.
7861
7862 2006-03-08  Simon Josefsson  <jas@extundo.com>
7863
7864         * build-aux/maint.mk: Fix refresh-po, to handle no translated
7865         languages.
7866
7867 2006-03-07  Simon Josefsson  <jas@extundo.com>
7868
7869         * modules/getopt (Depends-on): Add unistd.
7870
7871         * modules/unistd: New file.
7872
7873 2006-03-07  Simon Josefsson  <jas@extundo.com>
7874
7875         * modules/gc-random: New file.
7876
7877 2006-03-07  Simon Josefsson  <jas@extundo.com>
7878
7879         * m4/unistd_h.m4: New file.
7880
7881 2006-03-07  Simon Josefsson  <jas@extundo.com>
7882
7883         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
7884         test to be side-effect free by storing the result in the cache
7885         variable gl_cv_lib_readline, and moving the assignment of
7886         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
7887         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7888
7889 2006-03-07  Simon Josefsson  <jas@extundo.com>
7890
7891         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
7892         error on missing devices (the functions will return an error).
7893
7894         * m4/gc.m4: Move random stuff to gc-random.m4
7895
7896 2006-03-07  Simon Josefsson  <jas@extundo.com>
7897
7898         * lib/unistd_.h: New file.
7899
7900 2006-03-07  Simon Josefsson  <jas@extundo.com>
7901
7902         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
7903
7904 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7905
7906         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
7907         Problem reported by Juan Manuel Guerrero.
7908
7909 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7910
7911         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
7912         the unistd module.
7913         * lib/getlogin_r.c: Likewise.
7914         * lib/getlogin_r.h: Likewise.
7915         * lib/glob.c: Likewise.
7916         * lib/pagealign_alloc.c: Likewise.
7917         * lib/unistd_.h: Remove; no longer needed.
7918
7919 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7920
7921         * MODULES.html.sh (Support for systems lacking POSIX:2001):
7922         Add unistd.
7923         * modules/c-stack (Depends-on): Add unistd.
7924         * modules/getlogin_r: Likewise.
7925         * modules/glob: Likewise.
7926         * modules/pagealign_alloc: Likewise.
7927         * modules/unistd (Files): Remove lib/unistd_.h.
7928         (EXTRA_DIST): Remove.
7929         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
7930         need unistd_.h.
7931         (MOSTLYCLEANFILES): Remove unistd.h-t.
7932
7933 2006-03-03  Simon Josefsson  <jas@extundo.com>
7934
7935         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
7936
7937 2006-03-03  Simon Josefsson  <jas@extundo.com>
7938
7939         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
7940         libidn and bison.
7941
7942 2006-03-03  Simon Josefsson  <jas@extundo.com>
7943
7944         * build-aux/maint.mk: Add indent target.
7945
7946 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
7947
7948         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
7949         our replacement poll.h in any case, to avoid a differing
7950         declaration from a system header.  Seen on AIX.
7951
7952 2006-03-01  Simon Josefsson  <jas@extundo.com>
7953
7954         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
7955         <kasal@ucw.cz>.
7956
7957 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7958
7959         * modules/gettime (Depends-on): Add extensions module.
7960         * modules/nanosleep (Depends-on): Likewise.
7961         * modules/settime (Depends-on): Likewise.
7962
7963 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7964
7965         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
7966         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
7967         pedantically.
7968         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7969         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
7970
7971         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
7972         not "==".  Reported by Ralf Wildenhues.
7973
7974 2006-03-01  Karl Berry  <karl@gnu.org>
7975
7976         * doc/Copyright/request-*: new files, synced from gnuorg.
7977
7978 2006-03-01  Karl Berry  <karl@gnu.org>
7979
7980         * config/srclist.txt (Copyright/*): new entries.
7981
7982 2006-02-28  Simon Josefsson  <jas@extundo.com>
7983
7984         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
7985
7986 2006-02-27  Simon Josefsson  <jas@extundo.com>
7987
7988         * lib/base64.h: Indent #define's.  From Jim Meyering
7989         <jim@meyering.net>.
7990
7991 2006-02-27  Jim Meyering  <jim@meyering.net>
7992
7993         Revert the change of 2006-02-24, so these files can continue
7994         to be sync'd from gettext.
7995         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
7996         of `config.h'.
7997
7998 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
7999
8000         * modules/intprops: New file.
8001         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8002         Add intprops.
8003         * modules/getloadavg (Files): Remove lib/intprops.h.
8004         (Depends-on): Add intprops.
8005         * modules/human: Likewise.
8006         * modules/inttostr: Likewise.
8007         * modules/openat: Likewise.
8008         * modules/sig2str: Likewise.
8009         * modules/userspec: Likewise.
8010         * modules/utimecmp: Likewise.
8011         * modules/xnanosleep: Likewise.
8012         * modules/xstrtol: Likewise.
8013
8014 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
8015
8016         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
8017         * modules/lock-tests (TESTS): Use $(EXEEXT).
8018         * modules/tls-tests: Likewise.
8019         * modules/argp-tests: Likewise.
8020         (check_PROGRAMS): New var, replacing...
8021         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
8022
8023 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8024
8025         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
8026         `config.h'.
8027
8028 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
8029
8030         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
8031
8032 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8033
8034         Sync from coreutils.
8035         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
8036         gl_CHDIR_SAFER.
8037
8038 2006-02-22  Jim Meyering  <jim@meyering.net>
8039
8040         Sync from coreutils.
8041         * m4/chdir-safer.m4: New file.
8042
8043 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
8044
8045         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
8046         AT_FDCWD exceeds INT_MAX.
8047         * lib/openat.h (AT_FDCWD): Likewise.
8048
8049 2006-02-17  Eric Blake  <address@hidden>
8050
8051         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
8052
8053 2006-02-16  Simon Josefsson  <jas@extundo.com>
8054
8055         * modules/getaddrinfo (Depends-on): Add sys_socket.
8056
8057 2006-02-15  Simon Josefsson  <jas@extundo.com>
8058
8059         * build-aux/maint.mk: Add dsyntax-check rule.
8060
8061 2006-02-15  Eric Blake  <ebb9@byu.net>
8062
8063         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
8064         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
8065         'present but cannot compile' warnings on cygwin.
8066         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
8067         use ws2tcpip.h if sys/socket.h works.
8068         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
8069         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
8070
8071 2006-02-14  Simon Josefsson  <jas@extundo.com>
8072
8073         * modules/maintainer-makefile (Files): Rename.
8074
8075         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
8076         and (the local) Makefile.cfg to maint-cfg.mk.
8077
8078         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
8079         to the latter.
8080
8081         * modules/maintainer-makefile: New module.
8082
8083         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
8084         severaly stripped to make it possible to build it up from scratch
8085         with reliable tests.
8086
8087         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
8088         fixes to permit overriding the default actions when configure and
8089         makefile are not available.
8090
8091 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
8092
8093         Sync from coreutils.
8094         * modules/lstat (Depends-on): Don't depend on xalloc.
8095         (License): Change from GPL to LGPL, since this is now simply a
8096         replacement for a libc function.
8097
8098 2006-02-14  Jim Meyering  <jim@meyering.net>
8099
8100         Sync from coreutils.
8101
8102         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
8103         failure on deficient systems, and simplify gnulib lgpl dependencies.
8104         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
8105         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
8106
8107         * lib/xalloc-die.c: Remove unused definition of N_.
8108
8109 2006-02-14  Jim Meyering  <jim@meyering.net>
8110
8111         Sync from coreutils.
8112         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
8113         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
8114         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
8115         double-quote uses of that variable, to accommodate the rare case in
8116         which getmntent is available in none of the libraries checked.  This
8117         happens at least on FreeBSD 5.0.
8118
8119 2006-02-13  Simon Josefsson  <jas@extundo.com>
8120
8121         * gnulib-tool (Usage): Fix --import, from
8122         karl@freefriends.org (Karl Berry).
8123
8124 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8125
8126         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
8127
8128 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8129
8130         * lib/argp-namefrob.h: Restore changes accidentally lost during the
8131         "autoupdate" on 2005-12-12.
8132
8133 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8134
8135         * modules/closeout (Depends-on): Remove atexit.
8136
8137 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8138
8139         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
8140         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
8141
8142 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
8143
8144         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
8145         __EXTENSIONS__ if this causes compilation to fail.  Problem
8146         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
8147         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
8148
8149 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
8150
8151         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
8152         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
8153         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
8154         All uses changed.
8155
8156 2006-01-26  Simon Josefsson  <jas@extundo.com>
8157
8158         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
8159         prototype is visible on mingw32.
8160
8161         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
8162         for mingw32.
8163
8164         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
8165         mingw32).
8166
8167 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
8168
8169         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
8170         attempt to open for write; this always fails, at least on POSIX
8171         hosts.  This reinstates the 2006-01-09 change, which was
8172         inadvertently removed.
8173
8174 2006-01-26  Bruno Haible  <bruno@clisp.org>
8175
8176         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
8177         Reported by Paul Eggert.
8178
8179 2006-01-26  Bruno Haible  <bruno@clisp.org>
8180             Paul Eggert  <eggert@cs.ucla.edu>
8181
8182         * lib/stdbool_.h (_Bool)
8183         [(! (defined __cplusplus || defined __BEOS__)
8184           && !defined __GNUC__
8185           && !(defined __HP_cc || defined __xlc__
8186                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
8187                || defined __sgi))]:
8188         #define to signed char in these cases too; this simplifies
8189         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
8190         etc., separately) and makes it more conservative.
8191
8192 2006-01-25  Simon Josefsson  <jas@extundo.com>
8193
8194         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
8195         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
8196         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
8197
8198 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8199
8200         * lib/argp-namefrob.h: Bugfix. Remove stray #
8201
8202 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
8203
8204         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
8205         so that we test the test.
8206         Check for yet another HP-UX cc bug involving *bool |= bool.
8207
8208 2006-01-25  Karl Berry  <karl@gnu.org>
8209
8210         * config/srclist.txt (vasnprintf.c): sync lost.
8211
8212 2006-01-25  Jim Meyering  <jim@meyering.net>
8213
8214         Sync from the stable (b5) branch of coreutils:
8215
8216         * lib/fts.c (fts_children): Don't let close() clobber errno from
8217         failed fchdir().
8218
8219         * lib/fts.c (fts_stat): When following a symlink-to-directory,
8220         don't necessarily interpret stat-fails+lstat-succeeds as indicating
8221         a dangling symlink.  That can also happen at least for ELOOP.
8222         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
8223         FYI, this bug predates the inclusion of fts.c in coreutils.
8224
8225         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
8226         in their own block, so pre-c99 compilers don't object.
8227
8228         Avoid the double-free (first in fts_read, second in fts_close) that
8229         would occur when an `active' directory is made inaccessible (e.g.,
8230         via chmod a-x) during a traversal.
8231         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8232         before returning.  Reproduce this failure by
8233         mkdir -p a/b; cd a; chmod a-x . b
8234         Reported by Stavros Passas.
8235
8236 2006-01-25  Jim Meyering  <jim@meyering.net>
8237
8238         * lib/fileblocks.c: Remove more useless parentheses.
8239         * lib/readutmp.h: Likewise.
8240
8241 2006-01-25  Bruno Haible  <bruno@clisp.org>
8242
8243         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
8244         warnings.
8245         Reported by Paul Eggert.
8246
8247 2006-01-25  Bruno Haible  <bruno@clisp.org>
8248
8249         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
8250         rid of a trap command. For Solaris sh.
8251         Reported by Mark D. Baushke <mdb@gnu.org>.
8252
8253 2006-01-24  Simon Josefsson  <jas@extundo.com>
8254
8255         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
8256         Bruno.
8257
8258 2006-01-24  Karl Berry  <karl@gnu.org>
8259
8260         * config/srclist.txt (argp-namefrob.h): sync lost.
8261
8262 2006-01-24  Jim Meyering  <jim@meyering.net>
8263
8264         * modules/openat (Files): Add lib/intprops.h.
8265         From Mark D. Baushke.
8266
8267 2006-01-24  Jim Meyering  <jim@meyering.net>
8268
8269         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
8270         Reported by Mark D. Baushke.
8271
8272 2006-01-24  Jim Meyering  <jim@meyering.net>
8273
8274         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
8275
8276 2006-01-24  Bruno Haible  <bruno@clisp.org>
8277
8278         * modules/strnlen (Maintainer): Change from glibc to all.
8279
8280 2006-01-24  Bruno Haible  <bruno@clisp.org>
8281
8282         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
8283         Patch by Paul Eggert.
8284
8285 2006-01-24  Bruno Haible  <bruno@clisp.org>
8286
8287         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
8288         already has it.
8289         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
8290         2005-11-26.
8291
8292         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
8293         'signed char' to avoid problems with the built-in _Bool type.
8294         Reported by Paul Eggert on 2005-11-26.
8295
8296 2006-01-24  Bruno Haible  <bruno@clisp.org>
8297
8298         * gnulib-tool (func_import): Avoid constructing complicated sed
8299         expressions inside backquote.
8300         Report and solution by Mark D. Baushke <mdb@gnu.org>.
8301
8302 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
8303
8304         These changes imported from libc.
8305         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
8306         test and two separate function calls.
8307         * lib/strndup.c (__strndup): Add libc_hidden_def.
8308
8309 2006-01-23  Simon Josefsson  <jas@extundo.com>
8310
8311         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
8312         Remove the test_*_SOURCES variable: automake infers it by default.
8313         * modules/tls-tests: Likewise.
8314
8315 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8316
8317         Work around porting bugs reported by Dieter in
8318         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
8319         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
8320         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
8321         Include "getopt.h" first, to check interface.
8322         (getenv): Declare only if defined HAVE_DECL_GETENV &&
8323         !HAVE_DECL_GETENV.
8324         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
8325         (__strndup): Revert to K&R-style function dfns, the glibc style.
8326         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
8327         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
8328         Include strnlen.h first, to get prototype properly.
8329         (strnlen): Renamed from __strnlen.
8330         Remove weak alias.
8331
8332 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8333
8334         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
8335
8336 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8337
8338         * config/srclist.txt: Adjust to reflect glibc reorganization.
8339         This affects only comments.
8340
8341 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8342
8343          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
8344          Reported by Bruce Korb <bkorb@gnu.org>.
8345
8346 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
8347
8348         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
8349         to pacify gcc -Wswitch-default.
8350
8351 2006-01-22  Bruno Haible  <bruno@clisp.org>
8352
8353         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
8354         temporary buffer for sprintf, take into account the precision also
8355         for 'd', 'i', 'u', 'o', 'x', 'X'.
8356
8357 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8358
8359         * modules/argp-tests: New module
8360         * tests/test-argp.c: New file
8361         * tests/test-argp-2.sh: New file
8362
8363 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8364
8365         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
8366         (__argp_base_name): Removed
8367         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
8368         typo.
8369         (__argp_base_name): Provide macro definition or extern declaration
8370         depending on the configuration
8371
8372 2006-01-20  Simon Josefsson  <jas@extundo.com>
8373
8374         * modules/inet_ntop (Depends-on): Depend on sys_socket.
8375
8376 2006-01-20  Simon Josefsson  <jas@extundo.com>
8377
8378         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
8379
8380 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
8381
8382         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
8383         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
8384         Suggested by Bruno Haible.
8385
8386 2006-01-20  Karl Berry  <karl@gnu.org>
8387
8388         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
8389         until changes propagate, I guess.
8390
8391 2006-01-19  Simon Josefsson  <jas@extundo.com>
8392
8393         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
8394
8395 2006-01-19  Simon Josefsson  <jas@extundo.com>
8396
8397         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
8398
8399 2006-01-19  Simon Josefsson  <jas@extundo.com>
8400
8401         * gnulib-tool: Set check_PROGRAMS.
8402
8403         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8404         modules/des-tests, modules/gc-arcfour-tests,
8405         modules/gc-arctwo-tests, modules/gc-des-tests,
8406         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8407         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8408         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8409         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8410         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8411         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
8412         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
8413         test_*_SOURCES.
8414
8415 2006-01-18  Simon Josefsson  <jas@extundo.com>
8416
8417         * modules/socklen (Depends-on): Depend on sys_socket.
8418
8419 2006-01-18  Simon Josefsson  <jas@extundo.com>
8420
8421         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8422         modules/des-tests, modules/gc-arcfour-tests,
8423         modules/gc-arctwo-tests, modules/gc-des-tests,
8424         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8425         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8426         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8427         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8428         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8429         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
8430         $(EXEEXT) to automake TESTS variable, for mingw32.
8431
8432 2006-01-17  Simon Josefsson  <jas@extundo.com>
8433
8434         * modules/socklen (Include): Need sys/socket.h.
8435
8436 2006-01-17  Bruno Haible  <bruno@clisp.org>
8437
8438         * modules/ssize_t (Include): Add <sys/types.h>.
8439
8440 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
8441
8442         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
8443         it's not portable and it doesn't work with cross-compiles.
8444         Problem reported by Bruno Haible.  Fix missing-$ typo in
8445         'test "gl_cv_ignore_unused_libraries" ...' that prevented
8446         -zignore from being used with Sun's C compiler.
8447
8448 2006-01-12  Simon Josefsson  <jas@extundo.com>
8449
8450         * lib/base64.c: Fix warning, reported by Bruno Haible
8451         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
8452
8453 2006-01-12  Bruno Haible  <bruno@clisp.org>
8454
8455         * modules/ldd: New file.
8456         * build-aux/ldd.sh.in: New file.
8457         * MODULES.html.sh (Support for building libraries and executables): Add
8458         ldd.
8459
8460 2006-01-12  Bruno Haible  <bruno@clisp.org>
8461
8462         * m4/ldd.m4: New file.
8463
8464 2006-01-12  Bruno Haible  <bruno@clisp.org>
8465
8466         * gnulib-tool (func_import, func_create_testdir): Don't go into an
8467         endless loop while replacing $auxdir with build-aux.
8468
8469 2006-01-11  Simon Josefsson  <jas@extundo.com>
8470
8471         * lib/stdint_.h (SIZE_MAX): Add missing (.
8472
8473 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
8474
8475         Sync from coreutils.
8476         * lib/md5.c: Fix commentary typos.
8477         (alignof, UNALIGNED_P): No need for a GCC-specific version.
8478         * lib/md5.h (__attribute__): Remove; unused.
8479         * lib/sha1.c: Fix commentary to match md5 better.
8480         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
8481         so that we don't need to worry about alignment.  All uses changed.
8482         This merges the 2005-10-28 md5 change into sha1.
8483
8484 2006-01-11  Jim Meyering  <jim@meyering.net>
8485
8486         Sync from coreutils.
8487         * lib/md5.c (OP): Fix spacing.
8488
8489 2006-01-11  Bruno Haible  <bruno@clisp.org>
8490
8491         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8492         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
8493         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
8494
8495 2006-01-11  Bruno Haible  <bruno@clisp.org>
8496
8497         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8498         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
8499         the "early" section as well.
8500
8501 2006-01-11  Bruno Haible  <bruno@clisp.org>
8502
8503         Avoid "ar: no archive members specified" error on MacOS X.
8504         * gnulib-tool (func_modules_add_dummy): New function.
8505         (func_import, func_create_testdir): Invoke it.
8506
8507 2006-01-11  Bruno Haible  <bruno@clisp.org>
8508
8509         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
8510         with $auxdir in AC_CONFIG_FILES statements.
8511
8512 2006-01-11  Bruno Haible  <bruno@clisp.org>
8513
8514         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8515         Initialize also noinst_HEADERS to empty.
8516
8517 2006-01-11  Bruno Haible  <bruno@clisp.org>
8518
8519         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
8520         variables.
8521         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
8522         autoreconf.
8523
8524 2006-01-11  Bruno Haible  <bruno@clisp.org>
8525
8526         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
8527         overridable by the user.
8528         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8529
8530 2006-01-10  Simon Josefsson  <jas@extundo.com>
8531
8532         * modules/sys_socket: New file.
8533
8534 2006-01-10  Simon Josefsson  <jas@extundo.com>
8535
8536         * m4/sys_socket_h.m4: New file.
8537
8538 2006-01-10  Simon Josefsson  <jas@extundo.com>
8539
8540         * lib/socket_.h: New file.
8541
8542 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8543
8544         * modules/readutmp (Maintainer): Add myself.
8545
8546 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8547
8548         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
8549         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
8550         People who are still concerned with buggy memcmp implementations
8551         can invoke gl_FUNC_MEMCMP themselves.
8552
8553 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8554
8555         * lib/regex_internal.h (BITSET_WORD_BITS):
8556         Work around a bug in 64-bit PGC (before version 6.1-2), where the
8557         preprocessor mishandles large unsigned values as if they were signed.
8558         Problem reported by Claudio Fontana in
8559         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
8560
8561 2006-01-10  Jim Meyering  <jim@meyering.net>
8562
8563         Avoid the double-free (first in fts_read, second in fts_close) that
8564         would occur when an `active' directory is made inaccessible (e.g.,
8565         via chmod a-x) during a traversal.
8566         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8567         before returning.  Reproduce this failure by
8568         mkdir -p a/b; cd a; chmod a-x . b
8569         Reported by Stavros Passas.
8570
8571         Sync from coreutils.
8572         * lib/sha1.c: Tweak grammar in a comment.
8573
8574 2006-01-10  Jim Meyering  <jim@meyering.net>
8575
8576         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
8577         Patch by Joerg Sonnenberger.
8578
8579 2006-01-10  Bruno Haible  <bruno@clisp.org>
8580
8581         * modules/readutmp: Depend on module free.
8582         * modules/strtok_r: Depend on module restrict.
8583
8584 2006-01-10  Bruno Haible  <bruno@clisp.org>
8585
8586         * modules/gettext (configure.ac): Add an invocation of
8587         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
8588
8589 2006-01-10  Bruno Haible  <bruno@clisp.org>
8590
8591         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
8592         Reported by Werner Lemberg <wl@gnu.org>.
8593
8594 2006-01-10  Bruno Haible  <bruno@clisp.org>
8595
8596         * lib/localcharset.c: Update from GNU gettext.
8597
8598 2006-01-10  Bruno Haible  <bruno@clisp.org>
8599
8600         * lib/argp.h (__const): Remove macro. Use const instead.
8601         * lib/argp-fmtstream.h (__const): Likewise.
8602         * lib/glob_.h (__const): Remove macro.
8603         * lib/glob-libc.h: Use const instead of __const.
8604
8605 2006-01-10  Bruno Haible  <bruno@clisp.org>
8606
8607         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
8608         variable.
8609         Needed to avoid an automake error regarding the 'gettext' module.
8610
8611 2006-01-09  Simon Josefsson  <jas@extundo.com>
8612
8613         * modules/inet_ntop (Depends-on): Add restrict.
8614
8615 2006-01-09  Simon Josefsson  <jas@extundo.com>
8616
8617         * modules/gc-rijndael-tests (License): Put under LGPL.
8618
8619         * modules/gc-des-tests (License): Likewise.
8620
8621         * modules/gc-arcfour-tests (License): Likewise.
8622
8623         * modules/gc-arctwo-tests (License): Likewise.
8624
8625         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
8626
8627         * modules/gc-hmac-sha1-tests (Files): Likewise.
8628
8629         * modules/gc-hmac-md5-tests (License): Likewise.
8630
8631         * modules/gc-sha1-tests (License): Likewise.
8632
8633         * modules/gc-md5-tests (License): Likewise.
8634
8635         * modules/gc-md4-tests (License): Likewise.
8636
8637         * modules/gc-md2-tests (License): Likewise.
8638
8639         * modules/gc-tests (License): Likewise.
8640
8641         * modules/des-tests (License): Likewise.
8642
8643         * modules/md4-tests (License): Likewise.
8644
8645         * modules/md2-tests (License): Likewise.
8646
8647 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8648
8649         Sync from coreutils:
8650
8651         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
8652         * modules/lib-ignore: New file.
8653         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
8654         chdir-safer.m4, lchmod.m4.
8655         * modules/openat: Add mkdirat.c, openat-priv.h.
8656
8657 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8658
8659         Sync from coreutils.
8660         * m4/lib-ignore.m4: New file.
8661         * m4/lchmod.m4: New file.
8662
8663 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8664
8665         Sync from coreutils.
8666         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
8667         for write access: POSIX says that must fail.
8668         * lib/fts.c (diropen): Likewise.
8669         * lib/save-cwd.c (save_cwd): Likewise.
8670         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
8671         well, for minor improvements on hosts that lack O_DIRECTORY.
8672         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
8673         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
8674         Fall back on chown if open failed with EACCES.
8675
8676         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
8677         Report an error at compile-time if only a 1-second nominal clock
8678         resolution is found.
8679
8680         * lib/lchmod.h: New file.
8681         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
8682         (make_dir_parents): Use lchown rather than chown, and
8683         lchmod rather than chmod.
8684
8685         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
8686         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
8687         "proc" reported by n0dalus.
8688
8689         * lib/mountlist.c: Include <limits.h>.
8690         (dev_from_mount_options)
8691         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
8692         New function.  It no longer assumes "dev=" has the System V meaning
8693         on Linux (since it doesn't).  It also parses "dev=" more carefully.
8694         (read_file_system_list)
8695         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
8696         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
8697         dev= in that case.
8698
8699         * lib/posixtm.h (PDS_PRE_2000): New macro.
8700         * lib/posixtm.c (year): Arg is now syntax_bits rather than
8701         allow_century.  All usages changed.  Reject dates outside the range
8702         1969-1999 if PDS_PRE_2000 is used.
8703
8704 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8705
8706         Sync from coreutils.
8707         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
8708         (Time of day items): Mention the possibility of leap seconds.
8709         Problem reported by Dr. David Alan Gilbert.
8710
8711 2006-01-09  Jim Meyering  <jim@meyering.net>
8712
8713         Sync from coreutils.
8714
8715         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
8716
8717         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
8718
8719         * lib/modechange.c (mode_compile): Reject an invalid mode string
8720         that starts with an octal digit.  From Andreas Gruenbacher.
8721
8722         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
8723         and dup to open_safer and dup_safer, respectively.
8724         (openat_permissive): Fix typo in comment.
8725
8726         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
8727         "gettext.h"; either no longer needed or are guaranteed by openat.h.
8728         (_): Remove; no longer needed.
8729         (openat): Renamed from rpl_openat; no need for rpl_openat
8730         since openat.h renames openat for us.
8731         Replace most of the body with a call to openat_permissive,
8732         to avoid duplicate code.
8733         Port to (probably hypothetical) environments were mode_t is
8734         wider than int.
8735         (openat_permissive): Require mode arg, so that we can check
8736         types better.  Put it just after flags.  Change cwd failure
8737         indicator from pointer-to-bool to pointer-to-errno-value.
8738         All callers changed.
8739         Invoke openat_save_fail and/or openat_restore_fail if
8740         cwd_errno is null, so that openat can call us.
8741         (openat_permissive, fdopendir, fstatat, unlinkat):
8742         Simplify errno handling to avoid some duplicate code,
8743         as it's OK to set errno on success.
8744         * lib/openat.h: Revamp code so that function macros depend on
8745         __OPENAT_PREFIX only, not also on AT_FDCWD.
8746         (openat_ro): Remove.  Caller changed to use openat_permissive.
8747         (openat_permissive): Now a macro, if not a function.
8748         (openat_restore_fail, openat_save_fail): Now always functions,
8749         since mkdirat needs them even if __OPENAT_PREFIX is defined.
8750
8751         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
8752         and openat.c.
8753         * lib/mkdirat.c: Include openat-priv.h.
8754         Remove definitions of macros defined therein.
8755         * lib/openat.c: Likewise.
8756
8757         * lib/mkdirat.c (mkdirat): New file and function.
8758         * lib/openat.h (mkdirat): Declare.
8759
8760         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
8761
8762         * lib/openat.h (openat_permissive): Declare.
8763         (openat_ro): Define.
8764
8765         * lib/openat.c (EXPECTED_ERRNO): New macro.
8766         (openat_permissive): New function -- used in remove.c rewrite.
8767         (all functions): Set errno just before returning, only if there
8768         was an actual failure.
8769         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
8770
8771         Emulate openat-family functions using Linux's procfs, if possible.
8772         Idea and some code based on Ulrich Drepper's glibc changes.
8773
8774         * lib/openat.c: (BUILD_PROC_NAME): New macro.
8775         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
8776         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
8777         before falling back on save_cwd and restore_cwd.
8778         (fdopendir, fstatat, unlinkat): Likewise.
8779
8780         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
8781         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
8782
8783         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
8784         as second argument to va_arg.  Otherwise, some versions of gcc
8785         warn that `if this code is reached, the program will abort'.
8786
8787 2006-01-09  Jim Meyering  <jim@meyering.net>
8788
8789         Sync from coreutils.
8790         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
8791         Require openat-priv.h.
8792
8793 2006-01-09  Bruno Haible  <bruno@clisp.org>
8794
8795         * modules/strnlen (Include): Use strnlen.h.
8796
8797 2006-01-09  Bruno Haible  <bruno@clisp.org>
8798
8799         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
8800
8801 2006-01-09  Bruno Haible  <bruno@clisp.org>
8802
8803         * lib/sysexit_.h (EX_OK): New macro.
8804         Suggested by Martin Lambers <marlam@marlam.de>.
8805
8806 2006-01-09  Bruno Haible  <bruno@clisp.org>
8807
8808         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
8809         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
8810
8811 2006-01-09  Bruno Haible  <bruno@clisp.org>
8812
8813         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
8814         numbers.
8815
8816 2006-01-09  Bruno Haible  <bruno@clisp.org>
8817
8818         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
8819         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
8820         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
8821         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
8822
8823 2006-01-09  Bruno Haible  <bruno@clisp.org>
8824
8825         * build-aux/javacomp.sh.in: New file, moved from lib/.
8826         * modules/javacomp-script (Files): Update.
8827         (configure.ac): Add AC_CONFIG_FILES invocation.
8828         (EXTRA_DIST): Remove variable.
8829
8830         * build-aux/javaexec.sh.in: New file, moved from lib/.
8831         * modules/javaexec (Files): Update.
8832         (configure.ac): Add AC_CONFIG_FILES invocation.
8833         (EXTRA_DIST): Remove javaexec.sh.in.
8834
8835         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
8836         * modules/csharpcomp-script (Files): Update.
8837         (configure.ac): Add AC_CONFIG_FILES invocation.
8838         (EXTRA_DIST): Remove variable.
8839
8840         * build-aux/csharpexec.sh.in: New file, moved from lib/.
8841         * modules/csharpexec (Files): Update.
8842         (configure.ac): Add AC_CONFIG_FILES invocation.
8843         (EXTRA_DIST): Remove csharpexec.sh.in.
8844
8845 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
8846
8847         Sync from coreutils.
8848
8849         Add POSIX ACL support
8850         * lib/acl.h (copy_acl, set_acl): Add declarations.
8851         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
8852         systems other than Linux.
8853         (chmod_or_fchmod): New function: use fchmod when possible,
8854         and chmod otherwise.
8855         (file_has_acl): Add a POSIX ACL implementation, with a
8856         Linux-specific subcase.
8857         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
8858         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
8859         acls are unsupported.
8860         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
8861         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
8862         are unsupported.
8863
8864 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
8865
8866         Sync from coreutils.
8867         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
8868
8869 2006-01-07  Bruno Haible  <bruno@clisp.org>
8870
8871         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
8872         gl_EARLY.
8873
8874 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8875
8876         * lib/strftime.c (tzname): Don't declare if it is already #defined.
8877         Problem reported for Mingw by Mark Junker.
8878
8879 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8880
8881         * README: Gnulib normally doesn't generate a tarball.
8882
8883 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
8884
8885         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
8886         long int, not int, for nanosecond counts, so that people who are
8887         used to POSIX struct timespec won't be surprised.  Reported by Jim
8888         Meyering.
8889
8890 2005-12-28  Bruno Haible  <bruno@clisp.org>
8891
8892         * build-aux/config.rpath: Update from GNU gettext.
8893
8894 2005-12-16  Jim Meyering  <jim@meyering.net>
8895
8896         * modules/fprintftime: New module.
8897         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
8898
8899 2005-12-16  Jim Meyering  <jim@meyering.net>
8900
8901         * m4/fprintftime.m4: New file.
8902
8903 2005-12-16  Jim Meyering  <jim@meyering.net>
8904
8905         * lib/fprintftime.c, lib/fprintftime.h: New files.
8906
8907 2005-12-15  Simon Josefsson  <jas@extundo.com>
8908
8909         * modules/socklen (configure.ac): Fix M4 macro name, to align with
8910         new m4/socklen.m4.
8911
8912 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8913
8914         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
8915         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
8916
8917 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8918
8919         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
8920         * lib/argp-help.c (fill_in_uparams): Check if the constructed
8921         struct uparams is valid. Fall back to the default values if it is
8922         not.
8923
8924 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8925
8926         * modules/argp (Files): Add argp-pin.c
8927         (Depends-on): dirname
8928         (lib_SOURCES): Add argp-pin.c
8929
8930 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8931
8932         * m4/argp.m4:  Check if program_invocation_name and
8933         program_invocation_short_name are declared and define appropriate
8934         macros if they are not.
8935
8936 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8937
8938         * lib/argp-help.c (__argp_base_name): New function
8939         (__argp_short_program_name): Rewrite using __argp_base_name
8940         * lib/argp-namefrob.h: Define program_invocation_name and
8941         program_invocation_short_name if requested
8942         (__argp_base_name): Add prototype
8943         * lib/argp-parse.c (argp_def): Use gettext wrappers
8944         (argp_default_parser): Use __argp_base_name
8945         * lib/argp-pin.c: New file. Defines program_invocation_name and
8946         program_invocation_short_name on systems that lack them.
8947
8948 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8949
8950         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
8951         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8952         porting problem reported by Georg Schwarz in
8953         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8954
8955 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8956
8957         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
8958         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8959         porting problem reported by Georg Schwarz in
8960         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8961
8962 2005-12-05  Bruno Haible  <bruno@clisp.org>
8963
8964         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
8965         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
8966         Reported by Mark Junker <mjscod@gmx.de>.
8967
8968 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
8969
8970         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
8971         Use implementation from Albert Chin, with some
8972         comments/corrections by Stepan Kasal and myself.
8973
8974 2005-12-02  Bruno Haible  <bruno@clisp.org>
8975
8976         * gnulib-tool (func_import): Accept GPLed build tool modules when
8977         --lgpl is given.
8978         * modules/csharpcomp-script: New file.
8979         * modules/csharpcomp: Depend on it.
8980         * modules/javacomp-script: New file.
8981         * modules/javacomp: Depend on it.
8982         Suggested by Simon Josefsson.
8983
8984 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
8985
8986         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
8987         statement, to work around an HP-UX 10.20 compiler bug reported by
8988         Peter O'Gorman.
8989
8990 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8991
8992         * modules/savedir (Depends-on): Add openat.
8993
8994 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8995
8996         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
8997         (uintmax_t) [defined uintmax_t]: Do not declare.
8998         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
8999         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
9000         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
9001         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
9002         sake of portability to weird hosts that C allows (though we don't
9003         know of any practical examples).
9004
9005         * lib/savedir.h (fdsavedir): New decl.
9006         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
9007         contains most of the former guts of savedir.
9008         (savedir): Use savedirstream.
9009         Include "openat.h".
9010
9011 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
9012
9013         * modules/obstack (Files): Add m4/ulonglong.m4.
9014         Problem reported by Davide Angelocola.
9015
9016 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
9017
9018         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
9019         coreutils no longer futzes with rounding modes.
9020
9021 2005-11-14  Jim Meyering  <jim@meyering.net>
9022
9023         * lib/mkstemp-safer.c: Include <config.h>, required for possible
9024         replacement of mkstemp.
9025
9026 2005-11-10  Simon Josefsson  <jas@extundo.com>
9027
9028         * lib/readline.c: Remove EOL.
9029
9030 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9031
9032         * modules/gethrxtime (Depends-on): Add gettime.
9033
9034 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9035
9036         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
9037         or gettimeofday; no longer needed.
9038
9039 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9040
9041         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
9042         time business.
9043         (gethrxtime) [! (HAVE_NANOUPTIME
9044         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
9045         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
9046         our own approximation.
9047
9048 2005-11-08  Eric Blake  <ebb9@byu.net>
9049
9050         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9051
9052 2005-11-08  Eric Blake  <ebb9@byu.net>
9053
9054         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9055
9056 2005-11-04  Bruno Haible  <bruno@clisp.org>
9057
9058         * gnulib-tool: Implement --update mode.
9059
9060 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9061
9062         Fix porting problem reported by Theodoros V. Kalamatianos.
9063         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
9064         Don't assume that futimes failing means we must fail.
9065
9066 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9067
9068         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
9069         variables to suggest the intended function of the PATH_MAX check.
9070
9071 2005-10-30  Kean Johnston  <jkj@sco.com>
9072
9073         Trivial changes to support SCO systems.
9074         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
9075         as PATH_MAX.
9076         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
9077         where __ptr is null when no I/O is pending.
9078
9079 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
9080
9081         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
9082         leave errno alone.  Problem reported by Dmitry V. Levin.
9083
9084 2005-10-28  Simon Josefsson  <jas@extundo.com>
9085
9086         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
9087         Test more.
9088
9089         * tests/test-gc-md2.c, tests/test-md2.c: New files.
9090
9091         * modules/md2, modules/md2-tests: New files.
9092
9093 2005-10-28  Simon Josefsson  <jas@extundo.com>
9094
9095         * m4/inet_ntop.m4: More tests.
9096
9097         * m4/gc-md2.m4, md2.m4: New file.
9098
9099 2005-10-28  Simon Josefsson  <jas@extundo.com>
9100
9101         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
9102         "restrict" keywords, as per POSIX.  Protect the function
9103         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
9104         Don't use K&R prototypes.  Check the sprintf return values.
9105         Re-define EAFNOSUPPORT if not present.  Indent.
9106
9107         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
9108         suggested by Bruno Haible <bruno@clisp.org>.
9109
9110         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
9111
9112         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
9113
9114         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
9115         libgcrypt).
9116
9117         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
9118
9119         * lib/md2.h, lib/md2.c: New files.
9120
9121 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
9122
9123         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
9124         errno alone.  Problem reported by Frederic Jolliton.
9125
9126 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9127
9128         * modules/verify (License): Change from GPL to LGPL.  This is a
9129         tiny module and there are apparently near-equivalents that are
9130         under the BSD license.
9131
9132 2005-10-24  Simon Josefsson  <jas@extundo.com>
9133
9134         * modules/sha1: Relicense to LGPL.
9135
9136 2005-10-24  Simon Josefsson  <jas@extundo.com>
9137
9138         * lib/md4.h: Shrink buffer size, now that we changed the type.
9139
9140 2005-10-23  Simon Josefsson  <jas@extundo.com>
9141
9142         * gnulib-tool (func_import): Fix --tests-base.
9143
9144 2005-10-22  Simon Josefsson  <jas@extundo.com>
9145
9146         * modules/arcfour (Depends-on): Need stdint.
9147
9148 2005-10-22  Simon Josefsson  <jas@extundo.com>
9149
9150         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
9151         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
9152
9153 2005-10-22  Simon Josefsson  <jas@extundo.com>
9154
9155         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
9156         suggested by Bruno Haible <bruno@clisp.org>.
9157
9158 2005-10-22  Simon Josefsson  <jas@extundo.com>
9159
9160         * lib/crc.h: Include stddef.h, for size_t.
9161
9162 2005-10-22  Simon Josefsson  <jas@extundo.com>
9163
9164         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
9165         arcfour_context struct (simplify test vector testing in GNU
9166         Shishi).
9167
9168 2005-10-21  Simon Josefsson  <jas@extundo.com>
9169
9170         * modules/des, modules/des-tests: New files.
9171
9172         * modules/gc-des, modules/gc-des-tests: New files.
9173
9174         * tests/test-des.c, tests/test-gc-des.c: New file.
9175
9176 2005-10-21  Simon Josefsson  <jas@extundo.com>
9177
9178         * modules/arctwo, modules/arctwo-tests: New files.
9179
9180         * tests/test-arctwo.c: New file.
9181
9182         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
9183
9184         * tests/test-gc-arctwo.c: New file.
9185
9186 2005-10-21  Simon Josefsson  <jas@extundo.com>
9187
9188         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
9189         Bruno Haible <bruno@clisp.org>.
9190
9191         * m4/gc-des.m4: New file.
9192
9193 2005-10-21  Simon Josefsson  <jas@extundo.com>
9194
9195         * m4/arctwo.m4: New file.
9196
9197         * m4/gc-arctwo.m4: New file.
9198
9199 2005-10-21  Simon Josefsson  <jas@extundo.com>
9200
9201         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
9202         block.
9203
9204 2005-10-21  Simon Josefsson  <jas@extundo.com>
9205
9206         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
9207         <bruno@clisp.org>.
9208
9209         * lib/hmac-sha1.c (hmac_sha1): Likewise.
9210
9211         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
9212         Bruno Haible <bruno@clisp.org>.
9213
9214         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
9215         <bruno@clisp.org>.
9216
9217 2005-10-21  Simon Josefsson  <jas@extundo.com>
9218
9219         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
9220
9221 2005-10-21  Simon Josefsson  <jas@extundo.com>
9222
9223         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
9224
9225 2005-10-21  Simon Josefsson  <jas@extundo.com>
9226
9227         * lib/des.h, lib/des.c: New files.
9228
9229         * lib/gc-gnulib.c: Support DES.c
9230
9231 2005-10-21  Simon Josefsson  <jas@extundo.com>
9232
9233         * lib/arctwo.h, lib/arctwo.c: New files.
9234
9235         * lib/gc-gnulib.c: Support ARCTWO.
9236
9237 2005-10-21  Simon Josefsson  <jas@extundo.com>
9238
9239         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
9240         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9241
9242 2005-10-21  Simon Josefsson  <jas@extundo.com>
9243
9244         * gnulib-tool (func_import, func_create_testdir): Define automake
9245         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
9246         Makefile.am snippet),
9247         suggested by Bruno Haible <bruno@clisp.org>.
9248
9249         * modules/gc (Makefile.am): Use it.
9250
9251 2005-10-21  Bruno Haible  <bruno@clisp.org>
9252
9253         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
9254         patch.
9255
9256 2005-10-19  Simon Josefsson  <jas@extundo.com>
9257
9258         * tests/test-gc-rijndael.c: New file.
9259
9260         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
9261
9262 2005-10-19  Simon Josefsson  <jas@extundo.com>
9263
9264         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
9265         interface too.
9266
9267 2005-10-19  Simon Josefsson  <jas@extundo.com>
9268
9269         * tests/test-gc-arcfour.c: New file.
9270
9271         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
9272
9273 2005-10-19  Simon Josefsson  <jas@extundo.com>
9274
9275         * modules/gc-md4, modules/gc-md4-tests: New file.
9276
9277         * tests/test-gc-md4.c: New file.
9278
9279 2005-10-19  Simon Josefsson  <jas@extundo.com>
9280
9281         * m4/gc-md4.m4: New file.
9282
9283 2005-10-19  Simon Josefsson  <jas@extundo.com>
9284
9285         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
9286         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
9287         <kasal@ucw.cz>.
9288
9289 2005-10-19  Simon Josefsson  <jas@extundo.com>
9290
9291         * m4/gc-arcfour.m4: New file.
9292
9293         * m4/gc-rijndael.m4: New file.
9294
9295 2005-10-19  Simon Josefsson  <jas@extundo.com>
9296
9297         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
9298
9299 2005-10-19  Simon Josefsson  <jas@extundo.com>
9300
9301         * lib/gc-gnulib.c: Support ARCFOUR.
9302
9303 2005-10-19  Simon Josefsson  <jas@extundo.com>
9304
9305         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
9306         support.
9307
9308         * lib/gc.h: Add ECB enum type.
9309
9310         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
9311
9312 2005-10-18  Simon Josefsson  <jas@extundo.com>
9313
9314         * tests/test-md5.c: New file.
9315
9316         * modules/md5-tests: New file.
9317
9318 2005-10-18  Simon Josefsson  <jas@extundo.com>
9319
9320         * tests/test-md4.c: New file.
9321
9322         * modules/md4, modules/md4-tests: New files.
9323
9324 2005-10-18  Simon Josefsson  <jas@extundo.com>
9325
9326         * m4/md4.m4: New file.
9327
9328 2005-10-18  Simon Josefsson  <jas@extundo.com>
9329
9330         * lib/md4.h, lib/md4.c: New files, based on md5.?.
9331
9332 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
9333
9334         * gnulib-tool (func_create_testdir): Omit the second check whether
9335         BUILT_SOURCES in nonempty.
9336
9337 2005-10-17  Simon Josefsson  <jas@extundo.com>
9338
9339         * tests/test-rijndael.c: New file.
9340
9341 2005-10-17  Simon Josefsson  <jas@extundo.com>
9342
9343         * modules/sha1: Depend on stdint instead of md5.
9344
9345         * modules/md5: Depend on stdint, remove uint32_t.
9346
9347 2005-10-17  Simon Josefsson  <jas@extundo.com>
9348
9349         * modules/gc-sha1-tests: New file.
9350
9351         * tests/test-gc-sha1.c: New file.
9352
9353 2005-10-17  Simon Josefsson  <jas@extundo.com>
9354
9355         * m4/md5.m4: Remove call to uint32_t.m4.
9356
9357 2005-10-17  Simon Josefsson  <jas@extundo.com>
9358
9359         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
9360
9361         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
9362         md5.h.
9363
9364         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
9365
9366         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
9367
9368 2005-10-17  Simon Josefsson  <jas@extundo.com>
9369
9370         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
9371
9372 2005-10-17  Simon Josefsson  <jas@extundo.com>
9373
9374         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
9375
9376 2005-10-17  Simon Josefsson  <jas@extundo.com>
9377
9378         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
9379
9380         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
9381
9382 2005-10-17  Bruno Haible  <bruno@clisp.org>
9383
9384         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
9385         that it can also be used in a test.
9386
9387 2005-10-16  Bruno Haible  <bruno@clisp.org>
9388
9389         * gnulib-tool (func_emit_tests_Makefile_am): Also define
9390         TESTS_ENVIRONMENT, so that individual tests can augment it.
9391
9392         * gnulib-tool (func_create_testdir): Use an intermediate target for
9393         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
9394         macros, like $(ALLOCA_H), which cannot be passed through the command
9395         line.
9396
9397 2005-10-15  Simon Josefsson  <jas@extundo.com>
9398
9399         * modules/rijndael-tests: New file.
9400
9401         * modules/rijndael: New file.
9402
9403 2005-10-15  Simon Josefsson  <jas@extundo.com>
9404
9405         * m4/rijndael.m4: New file.
9406
9407 2005-10-15  Simon Josefsson  <jas@extundo.com>
9408
9409         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
9410
9411         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
9412
9413 2005-10-14  Simon Josefsson  <jas@extundo.com>
9414
9415         * tests/test-arcfour.c: New file.
9416
9417         * modules/arcfour, modules/arcfour-tests: New files.
9418
9419 2005-10-14  Simon Josefsson  <jas@extundo.com>
9420
9421         * m4/arcfour.m4: New file.
9422
9423 2005-10-14  Simon Josefsson  <jas@extundo.com>
9424
9425         * lib/arcfour.h, lib/arcfour.c: New files.
9426
9427 2005-10-14  Roland McGrath  <roland@redhat.com>
9428
9429         Import from libc.  [BZ #1331]
9430         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
9431         macro argument.
9432         Reported by Matej Vela <vela@debian.org>.
9433
9434 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9435
9436         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
9437         include <wchar.h>; no longer needed.
9438
9439 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9440
9441         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
9442
9443 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
9444         and  Ulrich Drepper  <drepper@redhat.com>
9445
9446         Import from libc.
9447         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
9448         instead of inline stream orientation test and two separate
9449         function calls.  Pay no attention to USE_IN_LIBIO.
9450
9451 2005-10-13  Simon Josefsson  <jas@extundo.com>
9452
9453         * modules/gc-hmac-md5-tests: New file.
9454
9455         * tests/test-gc-hmac-sha1.c: New file.
9456
9457         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
9458
9459         * modules/gc-hmac-md5-tests: New file.
9460
9461         * tests/test-gc-md5.c: New file.
9462
9463         * modules/gc-md5-tests: New file.
9464
9465 2005-10-13  Simon Josefsson  <jas@extundo.com>
9466
9467         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
9468         Move memory allocation outside of loop.
9469
9470 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
9471
9472         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
9473         intermediate directory is in a read-only file system.  Problem
9474         reported by Eric Blake.
9475
9476 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
9477
9478         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
9479
9480 2005-10-12  Simon Josefsson  <jas@extundo.com>
9481
9482         * tests/test-hmac-sha1.c: New file.
9483
9484         * modules/hmac-sha1-tests: New file.
9485
9486         * modules/hmac-sha1: New file.
9487
9488 2005-10-12  Simon Josefsson  <jas@extundo.com>
9489
9490         * modules/gc-sha1: New file.
9491
9492 2005-10-12  Simon Josefsson  <jas@extundo.com>
9493
9494         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
9495
9496         * tests/test-gc-pbkdf2-sha1.c: New file.
9497
9498 2005-10-12  Simon Josefsson  <jas@extundo.com>
9499
9500         * modules/gc-md5, modules/gc-hmac-md5: New files.
9501
9502         * modules/gc (Files): Remove md5, memxor and hmac files.
9503
9504 2005-10-12  Simon Josefsson  <jas@extundo.com>
9505
9506         * m4/gc-pbkdf2-sha1.m4: New file.
9507
9508         * m4/gc-hmac-sha1.m4: New file.
9509
9510         * m4/gc-sha1: New file.
9511
9512         * m4/hmac-sha1.m4: New file.
9513
9514 2005-10-12  Simon Josefsson  <jas@extundo.com>
9515
9516         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
9517
9518         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
9519
9520 2005-10-12  Simon Josefsson  <jas@extundo.com>
9521
9522         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
9523         suggested by Bruno Haible <bruno@clisp.org>.
9524
9525 2005-10-12  Simon Josefsson  <jas@extundo.com>
9526
9527         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
9528
9529 2005-10-12  Simon Josefsson  <jas@extundo.com>
9530
9531         * lib/gc-pbkdf2-sha1.c: New file.
9532
9533         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
9534
9535 2005-10-12  Simon Josefsson  <jas@extundo.com>
9536
9537         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
9538
9539         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
9540
9541 2005-10-12  Simon Josefsson  <jas@extundo.com>
9542
9543         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
9544         GC_USE_HMAC_MD5, respectively.
9545
9546         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
9547         (gc_md5): Fix typo.
9548
9549         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
9550
9551         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
9552
9553         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
9554
9555 2005-10-12  Bruno Haible  <bruno@clisp.org>
9556
9557         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
9558         Reported by Stepan Kasal <kasal@ucw.cz>.
9559
9560 2005-10-11  Simon Josefsson  <jas@extundo.com>
9561
9562         * tests/test-crc.c: New file.
9563
9564         * modules/crc, modules/crc-tests: New files.
9565
9566 2005-10-11  Simon Josefsson  <jas@extundo.com>
9567
9568         * m4/crc.m4: New file.
9569
9570 2005-10-11  Simon Josefsson  <jas@extundo.com>
9571
9572         * lib/gc.h: Add gc_hash and gc_hash_buffer.
9573
9574         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
9575
9576         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
9577
9578 2005-10-11  Simon Josefsson  <jas@extundo.com>
9579
9580         * lib/crc.h, lib/crc.c: New files.
9581
9582         * lib/gc.h (gc_hash_buffer): Add doc.
9583
9584 2005-10-11  Bruno Haible  <bruno@clisp.org>
9585
9586         * modules/c-strcasestr: New file.
9587         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
9588
9589 2005-10-11  Bruno Haible  <bruno@clisp.org>
9590
9591         * modules/c-strcase: New file.
9592         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
9593
9594 2005-10-11  Bruno Haible  <bruno@clisp.org>
9595
9596         * lib/strcasecmp.c: Include limits.h.
9597         (strcasecmp): Avoid integer overflow on exotic platforms.
9598         * lib/strncasecmp.c: Include limits.h.
9599         (strncasecmp): Avoid integer overflow on exotic platforms.
9600         Reported by Paul Eggert.
9601
9602 2005-10-11  Bruno Haible  <bruno@clisp.org>
9603
9604         * lib/c-strcasestr.h: New file, from GNU gettext.
9605         * lib/c-strcasestr.c: New file, from GNU gettext.
9606
9607 2005-10-11  Bruno Haible  <bruno@clisp.org>
9608
9609         * lib/c-strcase.h: New file, from GNU gettext.
9610         * lib/c-strcasecmp.c: New file, from GNU gettext.
9611         * lib/c-strncasecmp.c: New file, from GNU gettext.
9612
9613 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9614
9615         * modules/mempcpy (License): GPL -> LGPL.
9616         * modules/strchrnul (License): Likewise.
9617         * modules/sysexits (License): Likewise.
9618
9619 2005-10-08  Simon Josefsson  <jas@extundo.com>
9620
9621         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
9622
9623 2005-10-07  Simon Josefsson  <jas@extundo.com>
9624
9625         * m4/memxor.m4: Remove gl_C_RESTRICT call.
9626
9627 2005-10-06  Simon Josefsson  <jas@extundo.com>
9628
9629         * tests/test-hmac-md5.c: New file.
9630
9631         * modules/hmac-md5-tests: New file.
9632
9633         * modules/hmac-md5: New file.
9634
9635 2005-10-06  Simon Josefsson  <jas@extundo.com>
9636
9637         * m4/hmac-md5.m4: New file.
9638
9639         * m4/memxor.m4: Require gl_C_RESTRICT.
9640
9641 2005-10-06  Simon Josefsson  <jas@extundo.com>
9642
9643         * lib/memxor.c (memxor): Avoid casts and warnings.
9644
9645 2005-10-06  Simon Josefsson  <jas@extundo.com>
9646
9647         * lib/hmac-md5.c: New file.
9648
9649         * lib/hmac.h: New file.
9650
9651 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9652
9653         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
9654         promotes to int, not unsigned int, to catch the AIX 5.3
9655         compiler bug.
9656
9657 2005-10-05  Simon Josefsson  <jas@extundo.com>
9658
9659         * modules/memxor: New file.
9660
9661         * modules/iconv (Files): Move config.rpath to havelib, it is used
9662         there.
9663
9664         * modules/havelib (Files): Add config.rpath.
9665
9666 2005-10-05  Simon Josefsson  <jas@extundo.com>
9667
9668         * m4/memxor.m4: New file.
9669
9670 2005-10-05  Simon Josefsson  <jas@extundo.com>
9671
9672         * lib/memxor.c (memxor): Fix compiler error.
9673
9674         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
9675         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
9676
9677         * lib/memxor.h, lib/memxor.c: New files.
9678
9679         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
9680         we assume all systems have it, suggested by Jim Meyering
9681         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
9682         any systems lack sys/socket.h; mingw32 is known to lack it, but we
9683         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
9684         same reasons.
9685
9686 2005-10-05  Simon Josefsson  <jas@extundo.com>
9687
9688         * config/srclist.txt: Add glibc bug 1423 for md5.h.
9689
9690 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9691
9692         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
9693         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
9694         needed, since the source code now assumes these .h files.
9695
9696 2005-10-05  Derek Price  <derek@ximbiot.com>
9697
9698         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
9699
9700 2005-10-05  Bruno Haible  <bruno@clisp.org>
9701
9702         * modules/stdint (License): Change to LGPL.
9703
9704 2005-10-04  Simon Josefsson  <jas@extundo.com>
9705
9706         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
9707         D. Baushke" <mdb@gnu.org>.
9708
9709 2005-10-04  Bruno Haible  <bruno@clisp.org>
9710
9711         * lib/verify.h (verify_true): Provide alternative definition for C++.
9712
9713 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
9714
9715         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
9716         (SSIZE_MAX): New macro, if not already defined.
9717         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
9718         than 2 GiB.
9719
9720 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9721
9722         Sync from coreutils.
9723         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
9724         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
9725         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
9726         ULLONG_MAX doesn't work with 2.7.2.1.
9727
9728 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9729
9730         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
9731         From Ben Pfaff.
9732
9733         * modules/exclude (Depends-on): Depend on verify.
9734         * modules/strtoimax (Depends-on): Likewise.
9735         * modules/utimecmp (Depends-on): Likewise.
9736
9737 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9738
9739         * lib/exclude.c: Include verify.h.
9740         (verify): Remove.  All callers changed to use verify.h's version.
9741         * lib/strtoimax.c: Likewise.
9742         * lib/utimecmp.c: Likewis.e
9743
9744         Sync from coreutils.
9745         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
9746         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
9747         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
9748         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
9749         bother returning ENOSYS if settimeofday or stime fails; just let
9750         them return whatever errno they want to return.
9751         * lib/utimens.c: Include unistd.h, for dup2.
9752         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
9753         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
9754
9755 2005-10-02  Jim Meyering  <jim@meyering.net>
9756
9757         Sync from coreutils.
9758         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
9759         from glibc-2.2.5 that fails for read-only files.
9760
9761 2005-10-02  Jim Meyering  <jim@meyering.net>
9762
9763         Sync from coreutils.
9764         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
9765         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
9766         `#if HAVE_CONFIG_H'.
9767         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
9768         Remove AT_FDCWD test.
9769         Do not consume the fd unless successful.
9770         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
9771         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
9772         block, so that we don't even try to compile it if settimeofday is
9773         available.  This works around a compilation failure on OSF1 V5.1,
9774         due to stime requiring a `long int*' while tv_sec is `int'.
9775
9776 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
9777
9778         Sync from coreutils.
9779         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
9780         against `yes', rather than just testing for nonempty.
9781
9782 2005-10-01  Simon Josefsson  <jas@extundo.com>
9783
9784         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
9785         and Darwin.
9786
9787         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
9788         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
9789         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
9790         freeaddrinfo and gai_strerror are declared by the POSIX headers.
9791         Check if struct addrinfo is declared.
9792
9793 2005-10-01  Simon Josefsson  <jas@extundo.com>
9794
9795         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
9796         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
9797         AI_* and EAI_* definitions.  Protect function declarations.
9798
9799 2005-10-01  Jim Meyering  <jim@meyering.net>
9800
9801         Sync from coreutils.
9802
9803         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
9804         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
9805         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
9806         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
9807         in the inet and nsl libraries.  Required on Solaris 5.7.
9808
9809 2005-10-01  Jim Meyering  <jim@meyering.net>
9810
9811         Sync from coreutils.
9812         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
9813         in the inet and nsl libraries.  Required on Solaris 5.7.
9814
9815 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
9816
9817         * lib/getdelim.c (getdelim): Remove unused variables.
9818
9819 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
9820
9821         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
9822         so that the code works even with ancient cpp.  Portability problem
9823         with GCC 2.7.2.1 reported by Thomas M.Ott.
9824
9825 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
9826
9827         * modules/regex (Depends-on): Add strcase.
9828
9829         * modules/gethostname (Licence): Change from GPL to LGPL, since
9830         gethostname.c is a trivial implementation of a standard library
9831         function.
9832         * modules/poll (License): Change from GPL to LGPL, since it's
9833         derived from LGPL code.
9834
9835 2005-09-27  Jim Meyering  <jim@meyering.net>
9836
9837         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
9838         HAVE_CONFIG_H.
9839
9840         * lib/intprops.h (signed_type_or_expr__): Define.
9841         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
9842         for unsigned types.
9843
9844 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
9845
9846         * lib/verify.h (verify_expr): Remove, replacing with:
9847         (verify_true): New macro that returns true instead of void.
9848         (verify_type__): Remove.
9849         (verify): Use verify_true rather than verify_type__.
9850
9851 2005-09-26  Bruno Haible  <bruno@clisp.org>
9852
9853         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
9854         is necessary.
9855         (lib_SOURCES): Remove mbchar.c.
9856         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
9857         (Files): Add m4/mbrtowc.m4.
9858         * modules/mbiter: Likewise.
9859         * modules/mbuiter: Likewise.
9860
9861 2005-09-26  Bruno Haible  <bruno@clisp.org>
9862
9863         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
9864         compile mbchar.c if they are not both present.
9865         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
9866         * m4/mbiter.m4 (gl_MBITER): Likewise.
9867         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
9868         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
9869         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
9870
9871 2005-09-25  Jim Meyering  <jim@meyering.net>
9872
9873         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
9874         also uses socklen_t.
9875
9876 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
9877
9878         * lib/utimens.c (ENOSYS): Define if not already defined.
9879         (futimens): Support having a null PATH if the file descriptor
9880         is nonnegative.
9881
9882         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
9883         Remove.
9884         (__attribute): Define to empty unless GCC 3.1 or later.
9885         This works around a core dump on OpenBSD 3.4, which has GCC
9886         2.95.3, which dumps core when given __attribute__(()).  It also
9887         simplifies other tests, since we really don't want to bother with
9888         worrying about which ancient version of GCC supported what.
9889         Original problem reported by Yoann Vandoorselaere, with part of
9890         the fix suggested by Derek Price.
9891
9892 2005-09-24  Jim Meyering  <jim@meyering.net>
9893
9894         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
9895         so we can once again use a positive bitfield width of 1 -- now we
9896         don't have to explain why we were using a bitfield width of 2.
9897
9898 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
9899
9900         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
9901         and similarly for the other external symbols.  Problem reported
9902         by James Gallager.
9903
9904         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
9905         bug reported by Jim Meyering.
9906
9907         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
9908         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
9909         not needed, since socklen is a prerequisite module.
9910
9911 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
9912
9913         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
9914         Problem reported by Eric Blake.
9915         (getaddrinfo): Initialize se so that it's not garbage.
9916         Redo internal storage allocation so that it doesn't make unportable
9917         assumptions about alignment.
9918         Fix a memory leak.
9919
9920         * lib/utimens.c (futimens): Use futimesat if available.
9921         Prefer it to futimes since it doesn't have the futimes bug.
9922
9923         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
9924         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
9925         Instead, declare a function that returns a pointer to an array,
9926         and use verify_type__ to declare the size of the array.
9927         Problem and germ of a solution reported by Bruno Haible.
9928         (verify_type__): Use 2, not 1, for bitfield size, to avoid
9929         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
9930
9931 2005-09-23  Jim Meyering  <jim@meyering.net>
9932
9933         Sync from coreutils.
9934         Correct build failure (socklen_t not defined) on at least
9935         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
9936         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
9937
9938 2005-09-23  Jim Meyering  <jim@meyering.net>
9939
9940         * modules/getaddrinfo (Depends-on): Add socklen.
9941
9942 2005-09-23  Bruno Haible  <bruno@clisp.org>
9943
9944         * tests/test-verify.c: New file.
9945
9946 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9947
9948         Sync from coreutils.
9949
9950         * modules/argmatch (Depends-on): Add verify.
9951         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
9952         unistd-safer.
9953         * modules/save-cwd (Depends-on): Likewise.
9954
9955         * modules/openat (Files): Add lib/openat-die.c.
9956         (Depends-on): Remove error, exitfail.
9957         Add dirname.
9958
9959         * modules/verify: New file.
9960         * MODULES.html.sh (Diagnostics <assert.h>): New section,
9961         with "verify" module.
9962
9963 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9964
9965         Sync from coreutils.
9966
9967         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
9968         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
9969         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
9970         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
9971         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
9972         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
9973         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
9974         Don't bother checking for string.h, stdlib.h, unistd.h.
9975         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
9976         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
9977         module's job.
9978         * m4/jm-macros.m4 (gl_MACROS): Likewise.
9979         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
9980
9981         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
9982         (gl_GETDATE): Use it.
9983
9984         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
9985
9986 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9987
9988         Sync from coreutils.
9989
9990         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
9991         stat-time.h.
9992         * lib/argmatch.h: Include verify.h
9993         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
9994         (ARGMATCH_ASSERT): Remove; unused.
9995         * lib/canonicalize.c: Assume STDC_HEADERS.
9996         * lib/exclude.c: Include "strcase.h".
9997         * lib/regex_internal.h [!defined _LIBC]: Likewise.
9998         * lib/getusershell.c: Include stdio--.h rather than stdio.h
9999         and stdio-safer.h.
10000         (getusershell): Call fopen, not fopen_safer.
10001         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
10002         Do not include unistd-safer.h.
10003         (save_cwd): Don't call fd_safer; no longer needed
10004         now that we include fcntl--.h.
10005
10006         * lib/getdate.y (relative_time): New type.
10007         (RELATIVE_TIME_0): New constant.
10008         (parser_control): Use relative_time instead of doing it ourselves.
10009         (%union): Add new relative_time rel member.
10010         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
10011         Now typeless.
10012         (relunit, relunit_snumber): Now of type rel.
10013         (zone, rel, relunit, get_date): Adjust to above changes.
10014
10015         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
10016         Do not include unistd-safer.h.
10017         (getloadavg): Don't call fd_safer; no longer needed
10018         now that we include fcntl--.h.
10019
10020         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
10021         (make_dir_parents): Treat ENOSYS like EEXIST.
10022
10023         Improve quality of diagnostics on restore_cwd failure.
10024         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
10025         (make_dir_parents): Last arg is now int * (for errno), not bool *.
10026         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
10027         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
10028         each time through the loop.  Do not diagnose restore_cwd failure;
10029         that is the caller's job (and perhaps the caller does not care).
10030
10031         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
10032         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
10033         If the file already exists but is not a directory, don't bother
10034         to try to make its parents.
10035         Close potential file descriptor leak if we can't chdir("/") (!).
10036         Don't always return true if chdir($PWD) fails; return true only
10037         if the requested action was done successfully (except for the
10038         chdir($PWD)).
10039         Don't log final directory unless we actually made it.
10040         Refactor to avoid duplicate code to fix up permissions.
10041         Don't attempt to fix up parent permissions if chdir($PWD) fails.
10042
10043         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
10044         to make it a bit faster and (I hope) clearer.
10045         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
10046         Fix bug in formats like %2N.
10047
10048         * lib/verify.h: New file.
10049
10050 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10051
10052         Sync from coreutils.
10053         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
10054
10055 2005-09-22  Jim Meyering  <jim@meyering.net>
10056
10057         Sync from coreutils.
10058
10059         * m4/lstat.m4 (gl_FUNC_LSTAT):
10060         Use AC_LIBSOURCES to require lstat.c and lstat.h.
10061         Remove obsolete comment.
10062         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
10063         * m4/xstrtod.m4: Likewise.
10064
10065         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
10066
10067 2005-09-22  Jim Meyering  <jim@meyering.net>
10068
10069         Sync from coreutils.
10070
10071         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
10072
10073         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
10074         the .tm_year member, since otherwise gcc-4.0 would now warn about
10075         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
10076
10077         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
10078         order to avoid an unsuppressible warning from gcc on 64-bit systems.
10079
10080         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
10081         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
10082         when run in a time zone for which daylight savings time is in effect
10083         for the starting date.
10084
10085         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
10086         stop us from restricting permissions of just-created absolute-named
10087         directories.
10088         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
10089         to restore initial working directory.
10090         * lib/mkdir-p.c (make_dir_parents): New parameter:
10091         different_working_dir, to tell caller if/when we change the working
10092         directory and are unable to return to the initial one.
10093         * lib/mkdir-p.h (make_dir_parents): Update prototype.
10094         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
10095         `return false'.  This fixes a bug introduced on 2004-07-30.
10096
10097         * lib/openat.c (fdopendir): Be sure to close the supplied
10098         file descriptor before returning.  This makes our replacement
10099         implementation a little closer to Solaris's, where fdopendir
10100         ties the file descriptor to the returned DIR* pointer.
10101         * lib/openat.c (unlinkat): New function.
10102         * lib/openat.h (unlinkat): Add prototype.
10103         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
10104         (openat_restore_fail): Rename from openat_restore_die.
10105         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
10106
10107         Provide an alternative to exiting immediately upon save_cwd or
10108         restore_cwd failure.  Now, an application can arrange e.g.,
10109         to perform a longjump in that case.
10110         * lib/openat.c: Include dirname.h.
10111         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
10112         (rpl_openat, fdopendir, fstatat): Call openat_save_die
10113         and openat_restore_die rather than calling error directly.
10114         Don't include "error.h" or "exitfail.h"; they're no longer needed.
10115
10116         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
10117         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
10118         define.
10119
10120         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
10121         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
10122                             int utc, int nanoseconds);
10123         Background:
10124         date should not have to allocate a megabyte of virtual memory to
10125         handle a format argument like +%1048575T.  When implemented with
10126         strftime, it must allocate such a buffer, use strftime to fill it
10127         in, print it, then free it.
10128         With fprintftime, it simply prints everything and exits.
10129         With no need for memory allocation, that's one fewer way to fail.
10130         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
10131         optional field width, not before, so we accept %9:z, not %:9z.
10132         (my_strftime): Be sure to use L_('x') for literals.
10133
10134         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
10135         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
10136         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
10137         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
10138         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
10139         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
10140         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
10141         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
10142         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
10143         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
10144         * lib/xgethostname.c, lib/xreadlink.c:
10145         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
10146
10147         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
10148         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
10149         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
10150         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10151         and don't include <sys/file.h>).
10152
10153 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
10154
10155         Sync from coreutils.
10156
10157         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
10158         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
10159         [!LDAV_DONE]: Avoid unused variable warning.
10160
10161 2005-09-21  Bruno Haible  <bruno@clisp.org>
10162
10163         * lib/unicodeio.h (unicode_to_mb): New declaration.
10164
10165 2005-09-20  Derek Price  <derek@ximbiot.com>
10166
10167         * lib/getaddrinfo.c: Don't include <netdb.h> included from
10168         getaddrinfo.h.
10169
10170 2005-09-20  Bruno Haible  <bruno@clisp.org>
10171
10172         * gnulib-tool: Remove trailing slashes from the values specified for
10173         --source-base, --m4-base, --tests-base, --aux-dir.
10174         Suggested by Simon Josefsson <jas@extundo.com>.
10175
10176 2005-09-20  Bruno Haible  <bruno@clisp.org>
10177
10178         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
10179         func_modules_to_filelist, func_import, func_create_testdir): Make all
10180         sorting results locale-independent, so that gnulib-cache.m4 doesn't
10181         change when gnulib-tool is invoked in a different locale.
10182
10183 2005-09-19  Simon Josefsson  <jas@extundo.com>
10184
10185         * m4/socklen.m4: Fix typo.
10186
10187 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10188
10189         Use a consistent style for including <config.h>.
10190         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
10191         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
10192         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
10193         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
10194         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
10195         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
10196         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
10197         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
10198         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
10199         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
10200         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
10201         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
10202         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
10203         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
10204         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
10205         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
10206         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
10207         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
10208         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
10209         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
10210         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
10211         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
10212         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
10213         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
10214         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
10215         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
10216         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
10217         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
10218         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
10219         lib/xstrtoumax.c, lib/yesno.c:
10220         Standardize inclusion of config.h.
10221         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
10222         lib/inttostr.h:  Removed inclusion of config.h from header files.
10223         * lib/inttostr.c:  Adjusted in-tree users.
10224         * lib/timespec.h: Remove superfluous warning to include config.h.
10225         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
10226         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
10227         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
10228         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
10229         config.h with HAVE_CONFIG_H.
10230
10231 2005-09-19  Jim Meyering  <jim@meyering.net>
10232
10233         * modules/pathmax (License): Change to LGPL.
10234
10235 2005-09-19  Derek Price  <derek@ximbiot.com>
10236
10237         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
10238
10239 2005-09-19  Bruno Haible  <bruno@clisp.org>
10240
10241         * gnulib-tool (import): Provide default for --tests-base.
10242
10243 2005-09-19  Bruno Haible  <bruno@clisp.org>
10244
10245         * doc/quote.texi: New file, extracted from gnulib.texi.
10246         * doc/ctime.texi: New file, extracted from gnulib.texi.
10247         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
10248         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
10249         * doc/gnulib.texi: Include them.
10250
10251 2005-09-18  Bruno Haible  <bruno@clisp.org>
10252
10253         Portability fix.
10254         * gnulib-tool (func_readlink): New function.
10255         (func_ln_if_changed): Use it.
10256
10257 2005-09-18  Bruno Haible  <bruno@clisp.org>
10258
10259         * gnulib-tool: Support --with-tests also with --import.
10260         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
10261         (func_import): Use variables $testsbase and $inctests. Emit a
10262         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
10263         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
10264         SUBDIRS += $testsdir.
10265         (func_create_testdir): Update.
10266
10267 2005-09-18  Bruno Haible  <bruno@clisp.org>
10268
10269         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
10270         instead of $dry_run.
10271         (func_cp_if_changed, func_mv_if_changed): Remove functions.
10272         (func_ln_if_changed): Don't handle dry-run here.
10273         (func_import): In dry-run mode, detect more precisely which actions
10274         would be performed, and don't use "...ing" verbs.
10275
10276 2005-09-18  Bruno Haible  <bruno@clisp.org>
10277
10278         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
10279         (func_import): Use join on two temporary files instead of three nested
10280         loops, in order to determine which files are new or old.
10281
10282 2005-09-18  Bruno Haible  <bruno@clisp.org>
10283
10284         * gnulib-tool (func_import): Comment out code that spits out the
10285         new files with --dry-run.
10286
10287 2005-09-18  Bruno Haible  <bruno@clisp.org>
10288
10289         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
10290
10291 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10292
10293         * lib/stat-time.h: New file.
10294         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
10295         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
10296         in a different way.
10297         (timespec_cmp): New function.
10298         * lib/utimecmp.c: Include stat-time.h.
10299         (SYSCALL_RESOLUTION): Depend on whether various struct stat
10300         members exist, not on the obsolescent ST_MTIM_NSEC.
10301         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
10302
10303 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10304
10305         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
10306
10307 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10308
10309         * MODULES.html.sh (File system functions): Add stat-time.
10310         * modules/stat-time: New file.
10311         * modules/timespec (Files): Remove m4/st_mtim.m4; this
10312         is now done in a different way, by the stat-time module.
10313         * modules/utimecmp (Depends-on): Add stat-time.
10314
10315 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10316
10317         * m4/st_mtim.m4: Remove.  Superseded by...
10318         * m4/stat-time.m4: New file.
10319         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
10320         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
10321
10322 2005-09-15  Derek Price  <derek@ximbiot.com>
10323
10324         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
10325
10326 2005-09-15  Derek Price  <derek@ximbiot.com>
10327
10328         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
10329         * lib/regex_internal.c: Ditto, using this...
10330         (__GNUC_PREREQ): ...new macro.
10331         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
10332         using...
10333         (__GNUC_PREREQ): ...this new macro.
10334
10335         * lib/strstr.h: Include string.h. Define strstr as a macro here.
10336
10337 2005-09-15  Derek Price  <derek@ximbiot.com>
10338             Paul Eggert  <eggert@cs.ucla.edu>
10339
10340         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
10341         changes, consolidating in...
10342         * lib/regex_internal.h: ...this file.
10343
10344 2005-09-13  Jim Meyering  <jim@meyering.net>
10345
10346         * lib/canon-host.c: Filter through gnu indent and reword comments
10347         slightly.
10348         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
10349
10350 2005-09-13  Derek Price  <derek@ximbiot.com>
10351
10352         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
10353         failure.
10354         Reported by Jim Meyering  <jim@meyering.net>.
10355
10356 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10357
10358         * lib/base64.c: Typo.
10359         (base64_encode): Put b64str in initialized data section.
10360
10361 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
10362
10363         Merge glibc and coreutils changes into gnulib, plus a few
10364         extra fixes.
10365         * lib/md5.c: Use #error rather than a string.
10366         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
10367         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
10368         (__attribute__): Define to empty for non recent-GCC.
10369         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
10370         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
10371         Renamed from their non-__ counterparts, with new macros replacing
10372         them if not _LIBC.  Add __THROW attribute.
10373         (rol): Remove.
10374         (struct md5_ctx): Align buffer if using GCC.
10375         * lib/sha1.h (struct sha1_ctx): Likewise.
10376         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
10377         The old name was backwards.
10378         (NOTSWAP): Remove; not used.
10379         (rol): New macro, moved here from md5.h.
10380         (sha1_process_block): Remove a FIXME that doesn't make sense.
10381
10382 2005-09-12  Derek Price  <derek@ximbiot.com>
10383
10384         Return usable errors from canon-host.
10385         * lib/canon-host.h: New file.
10386         * lib/canon-host.c (canon_host): Wrap...
10387         (canon_host_r): ...this new function, which now relies exclusively on
10388         getaddrinfo.
10389         (ch_strerror): New function.
10390         (last_cherror): New global.
10391         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
10392         interface.
10393         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
10394         void *.
10395         (freeaddrinfo): Free ai->ai_canonname when set.
10396
10397 2005-09-12  Derek Price  <derek@ximbiot.com>
10398
10399         Make canon-host require getaddrinfo.
10400         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
10401         AC_LIBSOURCE canon-host.h.  Call...
10402         (gl_PREREQ_CANON_HOST): ...this new function, which requires
10403         gl_GETADDRINFO.
10404         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
10405
10406 2005-09-12  Derek Price  <derek@ximbiot.com>
10407
10408         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
10409         LGPL.
10410         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
10411
10412 2005-09-12  Derek Price  <derek@ximbiot.com>
10413
10414         * lib/gai_strerror.c: Include config.h when available.  Include
10415         getaddrinfo.h before other headers to test interface.
10416         Reported by Larry Jones <lawrence.jones@ugs.com>.
10417
10418 2005-09-12  Derek Price  <derek@ximbiot.com>
10419             Paul Eggert  <eggert@cs.ucla.edu>
10420
10421         * modules/glob (Files): Add glob-libc.h.
10422
10423 2005-09-12  Derek Price  <derek@ximbiot.com>
10424             Paul Eggert  <eggert@cs.ucla.edu>
10425
10426         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
10427         glob_.h, glob-libc.h.
10428         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
10429
10430 2005-09-12  Derek Price  <derek@ximbiot.com>
10431             Paul Eggert  <eggert@cs.ucla.edu>
10432
10433         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
10434         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
10435         protecting things that should be done only in gnulib contexts.
10436         * lib/glob_.h: New file, containing only the glob things needed for
10437         gnulib.
10438         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
10439         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
10440         (glob, globfree, glob_pattern_p): Now defined simply in terms of
10441         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
10442         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
10443         and to respect the namespace rules better.
10444
10445 2005-09-08  Simon Josefsson  <jas@extundo.com>
10446
10447         * modules/socklen: New file.
10448
10449 2005-09-08  Simon Josefsson  <jas@extundo.com>
10450
10451         * m4/socklen.m4: New file.
10452
10453 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10454
10455         * modules/utimens (Files): Add m4/utimbuf.m4, since
10456         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
10457         Reported by Sergey Poznyakoff.
10458
10459 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10460
10461         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
10462         definitions, since that's the preferred style in glibc.
10463         Fix a minor spacing issue, and update copyright notice to match
10464         glibc's.
10465
10466 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10467
10468         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
10469
10470 2005-09-06  Simon Josefsson  <jas@extundo.com>
10471
10472         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
10473         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
10474
10475 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10476
10477         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
10478         warning.
10479
10480 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10481
10482         * config/srclist.txt: Add glibc bug 1302.
10483
10484 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
10485
10486         Change bitset word type from unsigned int to unsigned long int,
10487         as this has better performance on typical 64-bit hosts.
10488         Port bitset code to hosts with unusual word sizes.
10489         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
10490         (build_collating_symbol):
10491         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
10492         argument is a bitset.  This is merely a style issue, but it makes
10493         it clearer that an entire array is expected.
10494         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
10495         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
10496         Port to the case where bitset_word is not the same as unsigned int.
10497         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
10498         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
10499         Likewise.
10500         * lib/regexec.c (check_dst_limits_calc_pos_1,
10501         check_subexp_matching_top):
10502         (build_trtable, group_nodes_into_DFAstates):
10503         Likewise.
10504         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
10505         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
10506         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
10507         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
10508         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
10509         * lib/regcomp.c (optimize_subexps, lower_subexp):
10510         Work even if bitset_word has holes in its bitwise representation.
10511         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
10512         * lib/regexec.c (check_dst_limits_calc_pos_1,
10513         check_subexp_matching_top):
10514         Likewise.
10515         * lib/regex_internal.c (re_string_reconstruct):
10516         Don't assume UCHAR_MAX == 255.
10517         * lib/regex_internal.h (bitset_set_all): Likewise.
10518         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
10519         All uses changed.
10520         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
10521         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
10522         All uses changed.
10523         (BITSET_WORD_MAX): New macro.
10524         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
10525         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
10526         (bitset_empty, bitset_copy):
10527         Prefer sizeof (bitset) to multiplying it out ourselves.
10528         (bitset_not_merge): Remove; unused.
10529         (bitset_contain): Return bool, not unsigned int with one bit on.
10530         All callers changed.
10531         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
10532         alignment than re_node_set; do this by defining a new internal
10533         type struct dests_alloc and using it to allocate memory.
10534
10535 2005-09-05  Bruno Haible  <bruno@clisp.org>
10536
10537         * gnulib-tool (func_import): Fix comparison in handling of symbolic
10538         links.
10539
10540 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
10541
10542         * modules/size_max (Makefile.am): Add size_max.h
10543
10544 2005-09-04  Derek Price  <derek@ximbiot.com>
10545
10546         * gnulib-tool (func_import): Fix reversed $symbolic logic.
10547
10548 2005-09-03  Simon Josefsson  <jas@extundo.com>
10549
10550         * gnulib-tool: Fix typo.
10551
10552 2005-09-03  Simon Josefsson  <jas@extundo.com>
10553
10554         * config/srclist.txt: Add glibc bug 1293.
10555
10556 2005-09-03  Derek Price  <derek@ximbiot.com>
10557
10558         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
10559         From Larry Jones <lawrence.jones@ugs.com>.
10560
10561 2005-09-02  Simon Josefsson  <jas@extundo.com>
10562
10563         * modules/socklen: New file.
10564
10565 2005-09-02  Simon Josefsson  <jas@extundo.com>
10566
10567         * modules/havelib: New module.
10568
10569         * modules/gettext, modules/iconv, modules/lock, modules/readline:
10570         Use havelib.
10571
10572 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10573
10574         Check for arithmetic overflow when calculating sizes, to prevent
10575         some buffer-overflow issues.  These patches are conservative, in the
10576         sense that when I couldn't determine whether an overflow was possible,
10577         I inserted a run-time check.
10578         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
10579         macros.
10580         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
10581         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
10582         (re_xnrealloc, re_x2nrealloc): New inline functions.
10583         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
10584         parse_bracket_exp):
10585         (build_equiv_class, build_charclass): Check for arithmetic overflow
10586         in size expression calculations.
10587         * lib/regex_internal.c (re_string_realloc_buffers):
10588         (build_wcs_upper_buffer, re_node_set_add_intersect):
10589         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
10590         (re_dfa_add_node, register_state): Likewise.
10591         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
10592         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
10593         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
10594         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
10595
10596 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10597
10598         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
10599         m4/ulonglong.m4.  Problem reported by Martin Lambers.
10600
10601 2005-09-02  Bruno Haible  <bruno@clisp.org>
10602
10603         Support for lib vs. lib64 distinction on biarch platforms.
10604         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
10605         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
10606         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
10607
10608 2005-09-02  Bruno Haible  <bruno@clisp.org>
10609
10610         * gnulib-tool (import): In the other first-use case, provide defaults
10611         as well.
10612
10613 2005-09-02  Bruno Haible  <bruno@clisp.org>
10614
10615         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
10616         patches not yet found in the latest gettext release.
10617
10618 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10619
10620         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
10621         to avoid a collision with bits/local_lim.h in glibc.
10622         All uses changed.  Problem reported by Dmitry V. Levin in
10623         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
10624
10625         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
10626         bugs in int versus size_t comparisons.
10627         (re_string_context_at): Fix bug where the code assumed that
10628         Idx is signed.
10629
10630         Use bool where appropriate.
10631         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
10632         All callers changed.
10633         (calc_eclosure_iter): Likewise, for ROOT arg.
10634         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
10635         (build_charclass_op): Likewise, for NON_MATCH arg.
10636         * lib/regex_internal.c (re_string_allocate, re_string_construct):
10637         (re_string_construct_common): Likewise, for ICASE arg.
10638         * lib/regexec.c (re_search_2_stub, re_search_stub):
10639         Likewise, for RET_LEN arg.
10640         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
10641         (set_regs): Likewise, for FL_BACKTRACK arg.
10642         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
10643         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
10644         (calc_eclosure_iter, parse_bracket_exp):
10645         Use bool for internal variables that are booleans.
10646         * lib/regexec.c (re_search_internal, check_matching,
10647         proceed_next_node):
10648         (set_regs, build_sifted_states, sift_states_bkref):
10649         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
10650         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
10651         (find_collation_sequence_value):
10652         Likewise.
10653         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
10654         (re_node_set_compare):
10655         Return bool, not int. All callers changed.
10656         * lib/regexec.c (check_halt_node_context, check_dst_limits):
10657         (build_trtable, check_node_accept): Likewise.
10658         * lib/regex_internal.h: Include stdbool.h.
10659
10660         Fix bugs uncovered when converting to bool.
10661         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
10662         failure instead of charging ahead blindly.
10663         * lib/regex_internal.c (register_state): Likewise.
10664         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
10665         for freeing internal storage.
10666         (group_nodes_into_DFA_states): Use unsigned int, not int, for
10667         bitset pieces used as boolean, to avoid undefined behavior
10668         on hosts that do int overflow checking.
10669
10670 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10671
10672         * config/srclist.txt: Add glibc bugs 1285-1287.
10673
10674 2005-09-01  Jim Meyering  <jim@meyering.net>
10675
10676         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
10677         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
10678         Require gl_STAT_MACROS, too.
10679
10680 2005-09-01  Bruno Haible  <bruno@clisp.org>
10681
10682         * gnulib-tool (import): In the first-use case, provide defaults.
10683
10684 2005-09-01  Bruno Haible  <bruno@clisp.org>
10685
10686         * gnulib-tool (func_import): Remove the .tmp files.
10687
10688 2005-09-01  Bruno Haible  <bruno@clisp.org>
10689
10690         * gnulib-tool (func_import): Fix handling of symbolic links.
10691
10692 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10693
10694         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
10695         old glibc regex code mishandles strings longer than 2**31 bytes.
10696         This patch fixes this when the regex code is used in gnulib
10697         (i.e., outside glibc).
10698
10699         This patch should not affect the use of the regex code inside
10700         glibc.  No doubt this problem also needs to be handled for glibc
10701         as well, but the result will be an incompatible change to the
10702         glibc ABI, and the old ABI will have to be supported too.  That
10703         can be the the subject for another patch.
10704
10705         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
10706         governing whether the rest of this patch is active.  By default,
10707         the macro is disabled and the patch has no effect.
10708         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
10709         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
10710         (struct re_pattern_buffer, re_search, re_search_2, re_match):
10711         (re_match_2, re_set_registers): Use the new types.
10712         * lib/regex_internal.h (Idx, re_hashval_t): New types.
10713         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
10714         New macros.
10715         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
10716         (re_string_context_at, bin_tree_t, re_dfastate_t):
10717         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
10718         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
10719         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
10720         (re_string_char_size_at, re_string_wchar_at):
10721         (re_string_elem_size_at):
10722         Use the new types and macros to port to 64-bit hosts.
10723         Use unsigned types for internal values, so that the code
10724         mostly works even for arrays larger than SSIZE_MAX.
10725         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
10726         (search_duplicated_node, calc_eclosure_iter, fetch_number):
10727         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
10728         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
10729         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
10730         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
10731         (calc_inveclosure, parse_dup_op, build_range_exp):
10732         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
10733         (fetch_number, create_token_tree, mark_opt_subexp):
10734         Likewise.
10735         * lib/regex_internal.c (re_string_construct_common,
10736         create_ci_newstate):
10737         (create_cd_newstate, re_string_allocate, re_string_construct):
10738         (re_string_realloc_buffers, build_wcs_upper_buffer):
10739         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
10740         (re_string_reconstruct, re_string_peek_byte_case):
10741         (re_string_fetch_byte_case, re_string_context_at):
10742         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
10743         (re_node_set_init_copy, re_node_set_add_intersect):
10744         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10745         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10746         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
10747         (re_acquire_state, re_acquire_state_context, register_state):
10748         Likewise.
10749         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
10750         search_cur_bkref_entry):
10751         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
10752         (re_search_internal, re_search_2_stub, re_search_stub)
10753         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
10754         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
10755         (update_cur_sifted_state, check_dst_limits):
10756         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
10757         (check_subexp_limits, sift_states_bkref, merge_state_array):
10758         (check_subexp_matching_top, get_subexp, get_subexp_sub):
10759         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
10760         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
10761         (expand_bkref_cache, check_node_accept_bytes):
10762         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
10763         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
10764         (acquire_init_state_context, check_halt_node_context):
10765         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
10766         (sift_states_backward, clean_state_log_if_needed):
10767         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
10768         (find_recover_state, transit_state_sb, transit_state_mb):
10769         (transit_state_bkref, build_trtable, match_ctx_clean):
10770         Likewise.
10771         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
10772         to work around an assumption that REG_MISSING is negative.
10773
10774         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
10775         (seek_collating_symbol_entry) [defined _LIBC]:
10776         (lookup_collation_sequence_value) [defined _LIBC]:
10777         (build_range_exp, build_collating_symbol) [defined _LIBC]:
10778         Use prototypes rather than old-style function definitions.
10779         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
10780         (transit_state_sb) [0]:
10781         (find_collation_sequence_value) [defined _LIBC]: Likewise.
10782
10783         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
10784         rm_eo.
10785
10786         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
10787         (optimize_subexps, lower_subexp):
10788         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
10789         since the signed shift might overflow.  Use 1u<<31 instead.
10790         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
10791         Likewise.
10792         * lib/regexec.c (check_dst_limits_calc_pos_1,
10793         check_subexp_matching_top): Likewise.
10794
10795         * lib/regcomp.c (optimize_subexps, lower_subexp):
10796         Use CHAR_BIT rather than 8, for clarity.
10797         * lib/regexec.c (check_dst_limits_calc_pos_1):
10798         (check_subexp_matching_top): Likewise.
10799         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
10800         have to worry about portability issues when shifting it left.
10801         Remove no-longer-needed test for table_size > 0.
10802         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
10803         in a word, as the resulting behavior is undefined.
10804         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
10805         in one case, a <= should have been an <, and in another case the
10806         whole test was missing.
10807         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
10808         the standard name CHAR_BIT.
10809         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
10810         this is not true on one's complement and signed-magnitude hosts.
10811
10812         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
10813         next_last_offset.
10814         (struct re_dfa_t): Remove unused member states_alloc.
10815         * lib/regcomp.c (init_dfa): Don't initialize unused members.
10816
10817 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10818
10819         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
10820         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
10821         and large-file glibc and in 32-bit large-file Solaris.
10822
10823 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10824
10825         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
10826         lengths fit in regoff_t; this isn't true if regoff_t is the same
10827         width as size_t.
10828         * lib/regex.c (re_search_internal): 5th arg is LAST_START
10829         (= START + RANGE) instead of RANGE.  This avoids overflow
10830         problems when regoff_t is the same width as size_t.
10831         All callers changed.
10832         (re_search_2_stub): Check for overflow when adding the
10833         sizes of the two strings.
10834         (re_search_stub): Check for overflow when adding START
10835         to RANGE; if it occurs, substitute the extreme value.
10836
10837 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10838
10839         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
10840
10841 2005-08-31  Jim Meyering  <jim@meyering.net>
10842
10843         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
10844         a pointer-to-const.
10845         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
10846         (register_state): Likewise.
10847         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
10848         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
10849         (group_nodes_into_DFAstates): Likewise.
10850
10851 2005-08-31  Jim Meyering  <jim@meyering.net>
10852
10853         * check-module: Add a FIXME comment.
10854
10855 2005-08-31  Eric Blake  <ebb9@byu.net>
10856
10857         * modules/unistd-safer (Files): Add unistd--.h.
10858         * modules/stdio-safer (Files): Add stdio--.h.
10859
10860 2005-08-31  Derek Price  <derek@ximbiot.com>
10861
10862         * lib/getdelim.c (getdelim): Return EOF on EOF.
10863         Reported by Larry Jones <lawrence.jones@ugs.com>.
10864
10865 2005-08-31  Bruno Haible  <bruno@clisp.org>
10866
10867         Avoid unnecessary diffs in the generated lib/Makefile.am.
10868         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
10869         the generated files.
10870         (func_import): Don't set cmd.
10871
10872 2005-08-31  Bruno Haible  <bruno@clisp.org>
10873
10874         * lib/strstr.c: Include <stddef.h>, for NULL.
10875         * lib/strcasestr.c: Likewise.
10876         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
10877
10878 2005-08-31  Bruno Haible  <bruno@clisp.org>
10879
10880         * gnulib-tool: New option --macro-prefix.
10881         (func_import): Use macro_prefix.
10882         (import): Handle option --macro-prefix.
10883
10884 2005-08-31  Bruno Haible  <bruno@clisp.org>
10885
10886         * gnulib-tool (import): Rename most ac_* variables to cached_*.
10887         Also use new variables cached_lgpl, cached_libtool.
10888
10889 2005-08-31  Bruno Haible  <bruno@clisp.org>
10890
10891         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
10892         always instantiating them.
10893
10894 2005-08-31  Bruno Haible  <bruno@clisp.org>
10895
10896         * gnulib-tool (func_import): Read the previous cached settings
10897         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
10898         earlier added by gnulib but are now dropped. Warn when a gnulib file
10899         overwrites a non-gnulib file.
10900
10901 2005-08-31  Bruno Haible  <bruno@clisp.org>
10902
10903         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
10904         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
10905         projects that don't keep autogenerated files in CVS. Put into
10906         actioncmd only the specified modules, not the transitive closure.
10907
10908 2005-08-31  Bruno Haible  <bruno@clisp.org>
10909
10910         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
10911         Create directories that shall be filled.
10912         (import): Don't look for gl_* macros in configure.ac. Recurse across
10913         all directories containing a gnulib-cache.m4 files, if meaningful.
10914
10915 2005-08-31  Bruno Haible  <bruno@clisp.org>
10916
10917         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
10918         (import): Set seen_libtool when we see gl_LIBTOOL.
10919
10920 2005-08-31  Bruno Haible  <bruno@clisp.org>
10921
10922         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
10923         declaration macro definitions from generated gnulib.m4.
10924
10925 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
10926
10927         * lib/iconvme.h: Add prototype for iconv_alloc.
10928
10929 2005-08-29  Simon Josefsson  <jas@extundo.com>
10930
10931         * lib/iconvme.c: Fix errno.
10932
10933 2005-08-29  Bruno Haible  <bruno@clisp.org>
10934
10935         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
10936         that it works when the directory contains spaces.
10937
10938 2005-08-29  Bruno Haible  <bruno@clisp.org>
10939
10940         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
10941
10942 2005-08-29  Bruno Haible  <bruno@clisp.org>
10943
10944         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
10945         Emit more advice.
10946
10947 2005-08-29  Bruno Haible  <bruno@clisp.org>
10948         and Stepan Kasal  <kasal@ucw.cz>
10949
10950         * check-module: If more parameters are given, check each of them
10951         separately; add more exceptions, as noted by Jim Meyering.
10952         (check_module): New procedure.
10953         (%exempt_header): Now contains all exceptions.
10954
10955 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
10956
10957         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
10958
10959 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
10960
10961         * lib/iconvme.c: Split iconv_string into iconv_alloc.
10962
10963 2005-08-28  Bruno Haible  <bruno@clisp.org>
10964
10965         * m4/gnulib-tool.m4: New file.
10966
10967 2005-08-27  Jim Meyering  <jim@meyering.net>
10968
10969         * modules/unistd-safer (Files): Add pipe-safer.c.
10970         * modules/fcntl-safer (Files): Add creat-safer.c.
10971
10972 2005-08-27  Jim Meyering  <jim@meyering.net>
10973
10974         * m4/stdlib-safer.m4: New file.  From coreutils.
10975         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
10976         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
10977         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
10978         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
10979         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
10980
10981 2005-08-27  Jim Meyering  <jim@meyering.net>
10982
10983         * lib/fopen-safer.c: Merge minor changes from coreutils.
10984         * lib/dup-safer.c: Likewise.
10985         * lib/fd-safer.c: Likewise.
10986
10987         Merge from coreutils.
10988         * lib/stdio--.h: New file.
10989         * lib/stdlib--.h: New file.
10990         * lib/mkstemp-safer.c: New file.
10991
10992         GNU tar needs these.
10993         * lib/pipe-safer.c: New file.
10994         * lib/creat-safer.c: New file.
10995         * lib/fcntl--.h (creat): Define to creat_safer.
10996         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
10997         * lib/unistd--.h (pipe): Define to pipe_safer.
10998         * lib/unistd-safer.h: Declare pipe_safer.
10999
11000 2005-08-26  Simon Josefsson  <jas@extundo.com>
11001
11002         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
11003         Haible <bruno@clisp.org>.
11004
11005 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
11006
11007         * lib/regex_internal.h: Remove all references to
11008         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
11009         or better.
11010         (bitset_not, bitset_merge, bitset_not_merge):
11011         (bitset_mask, re_string_allocate, re_string_construct):
11012         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
11013         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
11014         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
11015         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
11016         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11017         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11018         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
11019         (re_acquire_state_context):
11020         Remove unnecessary forward decls.
11021         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
11022         Put __attribute at function definition,
11023         now that the function decl has been removed.
11024         * lib/regex_internal.c (re_string_peek_byte_case):
11025         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
11026         Likewise.
11027
11028 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
11029
11030         * m4/regex.m4: Add AC_PREREQ(2.50).
11031         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
11032
11033 2005-08-25  Simon Josefsson  <jas@extundo.com>
11034
11035         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
11036         __fsetlocking.
11037
11038 2005-08-25  Simon Josefsson  <jas@extundo.com>
11039
11040         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
11041         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
11042         GLIBC specific code.
11043
11044 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11045
11046         Make regex safe for g++.  This fixes one real bug (an "err"
11047         that should have been "*err").  g++ problem reported by
11048         Sam Steingold.
11049         * lib/regex_internal.h (re_calloc): New macro, consistent with
11050         re_malloc etc.  All callers of calloc changed to use re_calloc.
11051         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
11052         not int.  All callers changed.
11053         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
11054         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
11055         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
11056         (find_recover_state): Change "err" to "*err"; this fixes what
11057         appears to be a real bug.
11058         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
11059         versus int.
11060
11061 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11062
11063         * modules/regex (Depends-on): Add malloc, since the code
11064         assumes that !malloc(0) means failure.
11065
11066 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11067
11068         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
11069
11070         alloca modernization/simplification for regex.
11071         * lib/regex.c: Remove portability cruft for alloca.  This no longer
11072         needs to be at the start of the file, and can be moved into
11073         regex_internal.h and simplified.
11074         * lib/regex_internal.h: Include <alloca.h>.
11075         (__libc_use_alloca) [!defined _LIBC]: New macro.
11076         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
11077         now works outside glibc.
11078
11079 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11080
11081         * config/srclist.txt: Add glibc bugs 1241, 1245.
11082
11083 2005-08-25  Jim Meyering  <jim@meyering.net>
11084
11085         * lib/open-safer.c: Include <config.h>.
11086         Otherwise, we'd lose LARGEFILE support in any file using
11087         e.g. "fcntl--.h"
11088
11089 2005-08-25  Bruno Haible  <bruno@clisp.org>
11090
11091         * m4/minmax.m4: Require autoconf 2.52.
11092         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
11093         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
11094         alternatives of translit over the alphabet.
11095         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
11096
11097 2005-08-24  Simon Josefsson  <jas@extundo.com>
11098
11099         * tests/test-getpass.c: New file.
11100
11101 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11102
11103         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
11104         for GNU regex features.
11105
11106 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11107
11108         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
11109         * lib/regex.h (regerror): Likewise.
11110
11111         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
11112         requires this.  (The code never needed it.)
11113
11114         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
11115         All uses of recently-renamed identifiers changed to use the new,
11116         POSIX-compliant names.  The code will build and run just fine
11117         without these changes, but it's better to eat our own dog food
11118         and use the standard-conforming names.
11119
11120         * lib/regex.h: Fix a multitude of POSIX name space violations.
11121         These changes have an effect only for programs that define
11122         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
11123         do not change anything for programs compiled in the normal way.
11124         Also, there is no effect on the ABI.
11125
11126         (_REGEX_SOURCE): New macro.
11127         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
11128         defined and _GNU_SOURCE is not; this fixes a name space violation.
11129
11130         Rename the following macros to obey POSIX requirements.
11131         The old names are still visible as macros if _REGEX_SOURCE is defined.
11132         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
11133         RE_BACKSLASH_ESCAPE_IN_LISTS.
11134         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
11135         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
11136         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
11137         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
11138         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
11139         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
11140         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
11141         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
11142         (REG_INTERVALS): renamed from RE_INTERVALS.
11143         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
11144         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
11145         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
11146         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
11147         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
11148         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
11149         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
11150         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
11151         RE_UNMATCHED_RIGHT_PAREN_ORD.
11152         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
11153         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
11154         (REG_DEBUG): renamed from RE_DEBUG.
11155         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
11156         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
11157         unusual, since we can't clash with the POSIX REG_ICASE.
11158         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
11159         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
11160         (REG_NO_SUB): renamed from RE_NO_SUB.
11161         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
11162         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
11163         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
11164         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
11165         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
11166         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
11167         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
11168         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
11169         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
11170         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
11171         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
11172         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
11173         RE_SYNTAX_POSIX_MINIMAL_BASIC.
11174         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
11175         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
11176         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
11177         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
11178         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
11179         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
11180         (REG_FIXED): Renamed from REGS_FIXED.
11181         (REG_NREGS): Renamed from RE_NREGS.
11182
11183         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
11184         of other REG_* macros, since POSIX says the user is allowed to
11185         #undef these macros selectively.
11186
11187         (reg_errcode_t): Update comment stating what other tables need
11188         to be consistent.
11189
11190         Rename the following enum values to obey POSIX requirements.
11191         The old names are still visible as macros.
11192         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
11193         is not defined, since GNU is supposed to be a superset of POSIX as
11194         much as possible, and since we want reg_errcode_t to be a signed
11195         type for implementation consistency.
11196         (_REG_NOERROR): Renamed from REG_NOERROR.
11197         (_REG_NOMATCH): Renamed from REG_NOMATCH.
11198         (_REG_BADPAT): Renamed from REG_BADPAT.
11199         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
11200         (_REG_ECTYPE): Renamed from REG_ECTYPE.
11201         (_REG_EESCAPE): Renamed from REG_EESCAPE.
11202         (_REG_ESUBREG): Renamed from REG_ESUBREG.
11203         (_REG_EBRACK): Renamed from REG_EBRACK.
11204         (_REG_EPAREN): Renamed from REG_EPAREN.
11205         (_REG_EBRACE): Renamed from REG_EBRACE.
11206         (_REG_BADBR): Renamed from REG_BADBR.
11207         (_REG_ERANGE): Renamed from REG_ERANGE.
11208         (_REG_ESPACE): Renamed from REG_ESPACE.
11209         (_REG_BADRPT): Renamed from REG_BADRPT.
11210         (_REG_EEND): Renamed from REG_EEND.
11211         (_REG_ESIZE): Renamed from REG_ESIZE.
11212         (_REG_ERPAREN): Renamed from REG_ERPAREN.
11213         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
11214         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
11215         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
11216         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
11217
11218         (_REG_RE_NAME, _REG_RM_NAME): New macros.
11219         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
11220         changed.  But support the old name if the new one is not defined
11221         and if _REGEX_SOURCE.
11222
11223         Change the following member names in struct re_pattern_buffer.
11224         The old names are still supported if !_REGEX_SOURCE.
11225         The new names are always supported, regardless of _REGEX_SOURCE.
11226         (re_buffer): Renamed from buffer.
11227         (re_allocated): Renamed from allocated.
11228         (re_used): Renamed from used.
11229         (re_syntax): Renamed from syntax.
11230         (re_fastmap): Renamed from fastmap.
11231         (re_translate): Renamed from translate.
11232         (re_can_be_null): Renamed from can_be_null.
11233         (re_regs_allocated): Renamed from regs_allocated.
11234         (re_fastmap_accurate): Renamed from fastmap_accurate.
11235         (re_no_sub): Renamed from no_sub.
11236         (re_not_bol): Renamed from not_bol.
11237         (re_not_eol): Renamed from not_eol.
11238         (re_newline_anchor): Renamed from newline_anchor.
11239
11240         Change the following member names in struct re_registers.
11241         The old names are still supported if !_REGEX_SOURCE.
11242         The new names are always supported, regardless of _REGEX_SOURCE.
11243         (rm_num_regs): Renamed from num_regs.
11244         (rm_start): Renamed from start.
11245         (rm_end): Renamed from end.
11246
11247         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
11248         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
11249         Prepend __ to parameter names.
11250
11251         Undo yesterday's changes.
11252
11253 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11254
11255         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
11256         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
11257         lib/regex.c.
11258
11259 2005-08-24  Jim Meyering  <jim@meyering.net>
11260
11261         Sync from coreutils.
11262         * m4/fcntl-safer.m4: New file.
11263
11264         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
11265         and object files for this module.
11266
11267 2005-08-24  Jim Meyering  <jim@meyering.net>
11268
11269         Sync from coreutils.
11270         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
11271
11272 2005-08-24  Jim Meyering  <jim@meyering.net>
11273
11274         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
11275         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
11276
11277 2005-08-24  Jim Meyering  <jim@meyering.net>
11278
11279         * modules/fcntl-safer: New module.
11280         * modules/fts (Depends-on): Add fcntl-safer.
11281         * MODULES.html.sh (File descriptor based Input/Output):
11282         Add fcntl-safer.
11283
11284 2005-08-24  Bruno Haible  <bruno@clisp.org>
11285
11286         Support for unit test modules.
11287         * modules/README: Mention tests modules.
11288         * modules/TEMPLATE-TESTS: New file.
11289         * gnulib-tool: New options --extract-tests-module, --with-tests and
11290         --tests-base (unused for the moment).
11291         (testsbase, inctests): New variables.
11292         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
11293         (func_verify_module): Exclude TEMPLATE-TESTS.
11294         (func_verify_nontests_module, func_verify_tests_module): New functions.
11295         (func_get_dependencies): Add implicit dependency for tests modules.
11296         (func_get_tests_module): New function.
11297         (func_modules_transitive_closure): When --with-tests was specified,
11298         include the unit tests as well, unless explicitly avoided.
11299         (func_emit_lib_Makefile_am): Ignore the tests modules here.
11300         (func_emit_tests_Makefile_am): New function.
11301         (func_create_testdir): When --with-tests was specified, emit a
11302         tests/ directory.
11303         * MODULES.html.sh (Future developments): Update.
11304
11305 2005-08-24  Bruno Haible  <bruno@clisp.org>
11306
11307         * modules/tls-tests: New file.
11308         * tests/test-tls.c: New file, from GNU gettext.
11309
11310 2005-08-24  Bruno Haible  <bruno@clisp.org>
11311
11312         * modules/lock-tests: New file.
11313         * tests/test-lock.c: New file, from GNU gettext.
11314
11315 2005-08-24  Bruno Haible  <bruno@clisp.org>
11316
11317         * lib/lock.h: Add multiple inclusion guard.
11318         * lib/tls.h: Add multiple inclusion guard.
11319
11320 2005-08-24  Bruno Haible  <bruno@clisp.org>
11321
11322         * gnulib-tool: Add support for the --aux-dir option to
11323         --create-testdir, --create-megatestdir, --test, --megatest.
11324         (func_create_testdir, func_create_megatestdir): Optionally emit a
11325         AC_CONFIG_AUX_DIR directive.
11326         (create-testdir, create-megatestdir, test, megatest): Provide a
11327         default value for $auxdir.
11328
11329 2005-08-24  Bruno Haible  <bruno@clisp.org>
11330
11331         * gnulib-tool (import): Use compound statement instead of subshell
11332         where possible.
11333
11334 2005-08-24  Bruno Haible  <bruno@clisp.org>
11335
11336         * gnulib-tool (import): Change --aux-dir default to "build-aux".
11337
11338 2005-08-24  Bruno Haible  <bruno@clisp.org>
11339
11340         * gnulib-tool (func_version): Update.
11341
11342 2005-08-24  Bruno Haible  <bruno@clisp.org>
11343
11344         * gnulib-tool (func_import, func_create_testdir,
11345         func_create_megatestdir): Quote all autoconf macro arguments.
11346
11347 2005-08-24  Bruno Haible  <bruno@clisp.org>
11348
11349         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
11350         option --force, because --force causes the aclocal.m4 of each
11351         subdirectory to be newer than the corresponding config.h.in.
11352
11353 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11354
11355         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
11356         All contents moved to gl_REGEX.
11357         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
11358         assume that it does.
11359
11360 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11361
11362         * lib/regex.h (REG_NOSYS)
11363         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
11364         Define, since POSIX requires it as of 2001.
11365         (_REG_ENOSYS)
11366         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
11367         New private symbol, used to keep the enum signed in all cases.
11368         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
11369         Youngman in
11370         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
11371
11372         * lib/regex_internal.c (re_string_skip_chars, register_state):
11373         (calc_state_hash):
11374         Remove forward decls; no longer needed now that we use prototypes.
11375         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
11376         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
11377         (clean_state_log_if_needed): Likewise.
11378
11379 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11380
11381         * config/srclist.txt: Add glibc bugs 1231-1233.
11382
11383 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11384
11385         Fix problems reported by Sam Steingold in
11386         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
11387         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
11388         assumed that reg_errcode_t is a signed type, which is not
11389         necessarily true if _XOPEN_SOURCE is not defined.
11390         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
11391         since some compilers warn about it otherwise.
11392
11393 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11394
11395         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
11396         (init_word_char, create_initial_state, duplicate_node_closure):
11397         (fetch_token, peek_token_bracket, build_range_exp):
11398         (build_collating_symbol): Remove forward decls; no longer needed
11399         now that we use prototypes.
11400
11401         * lib/regcomp.c:
11402         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
11403         (re_compile_fastmap_iter, regcomp, regerror, regfree):
11404         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
11405         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
11406         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
11407         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
11408         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
11409         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
11410         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
11411         (build_range_exp, build_collating_symbol, parse_bracket_exp):
11412         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
11413         (build_charclass, build_charclass_op, fetch_number, create_tree):
11414         (create_token_tree, mark_opt_subexp, duplicate_tree):
11415         Use prototypes rather than old-style definitions.
11416
11417         * lib/regex_internal.c:
11418         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
11419         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
11420         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11421         (re_string_reconstruct, re_string_peek_byte_case):
11422         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
11423         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11424         (re_node_set_init_copy, re_node_set_add_intersect):
11425         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11426         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11427         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11428         (re_acquire_state, re_acquire_state_context, register_state):
11429         (create_ci_newstate, create_cd_newstate, free_state):
11430         Likewise.
11431         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
11432         re_search_2):
11433         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
11434         (re_search_internal, prune_impossible_nodes):
11435         (acquire_init_state_context, check_matching, static):
11436         (check_halt_node_context, check_halt_state_context, proceed_next_node):
11437         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
11438         (update_regs, sift_states_backward, build_sifted_states):
11439         (clean_state_log_if_needed, merge_state_array):
11440         (update_cur_sifted_state, add_epsilon_src_nodes):
11441         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
11442         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
11443         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
11444         (find_recover_state, check_subexp_matching_top, transit_state_mb):
11445         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
11446         (check_arrival, check_arrival_add_next_nodes):
11447         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11448         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11449         (check_node_accept_bytes, check_node_accept, extend_buffers):
11450         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
11451         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
11452         (sift_ctx_init):
11453         Likewise.
11454
11455         * lib/regex_internal.h:
11456         (re_string_allocate, re_string_construct, re_string_reconstruct):
11457         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
11458         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
11459         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
11460         (re_string_context_at, re_string_peek_byte_case):
11461         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
11462         is defined, since we now use prototypes always.
11463
11464         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
11465         C89 or better.  All uses removed.
11466
11467 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11468
11469         * config/srclist.txt: Add glibc bugs 1220-1227.
11470
11471 2005-08-20  Jim Meyering  <jim@meyering.net>
11472
11473         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
11474         of unused local, dfa.
11475
11476 2005-08-20  Bruno Haible  <bruno@clisp.org>
11477
11478         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
11479
11480 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11481
11482         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
11483         (re_node_set_insert_last, re_dfa_add_node):
11484         Rename local variables to avoid GCC shadowing warnings.
11485
11486 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11487
11488         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
11489         [defined lint]: Suppress bogus uninitialized-variable warnings.
11490
11491         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
11492         and let the caller return REG_ESPACE if out of space.  This
11493         removes an uninitialied-variable warning with GCC 4.0.1, and also
11494         avoids taking the address of a local variable.  All callers
11495         changed.
11496
11497 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11498
11499         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
11500         $LIBCSRC/posix/regexec.c.
11501         Add glibc bug 1217 for regcomp.c.
11502
11503 2005-08-19  Jim Meyering  <jim@meyering.net>
11504
11505         * lib/regexec.c (proceed_next_node): Redo local variables to
11506         avoid GCC shadowing warnings.
11507
11508 2005-08-18  Bruno Haible  <bruno@clisp.org>
11509
11510         * lib/strstr.c (strstr): Fix return value in multibyte case.
11511         * lib/strcasestr.c (strcasestr): Likewise.
11512
11513 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11514
11515         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
11516
11517 2005-08-17  Jim Meyering  <jim@meyering.net>
11518
11519         Make the %s format (seconds since the epoch) work for a negative
11520         number and when used with a zero-padded field width, e.g. %015s.
11521
11522         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
11523         label so that it precedes the code to set `digits'.  Otherwise,
11524         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
11525         print `00-22'.  Now, it prints `-0022', as it should.
11526
11527 2005-08-17  Bruno Haible  <bruno@clisp.org>
11528
11529         * modules/strstr (Files): Add m4/mbrtowc.m4.
11530         (Depends-on): Add mbuiter.
11531
11532 2005-08-17  Bruno Haible  <bruno@clisp.org>
11533
11534         * modules/strcasestr: New file.
11535         * MODULES.html.sh (String handling, based on ANSI C 89): Add
11536         strcasestr.
11537
11538 2005-08-17  Bruno Haible  <bruno@clisp.org>
11539
11540         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
11541
11542 2005-08-17  Bruno Haible  <bruno@clisp.org>
11543
11544         * modules/mbuiter: New file.
11545         * MODULES.html.sh (Extended multibyte and wide character utilities):
11546         Add mbuiter.
11547
11548 2005-08-17  Bruno Haible  <bruno@clisp.org>
11549
11550         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
11551         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
11552
11553 2005-08-17  Bruno Haible  <bruno@clisp.org>
11554
11555         * m4/strcasestr.m4: New file.
11556
11557 2005-08-17  Bruno Haible  <bruno@clisp.org>
11558
11559         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
11560         * lib/strstr.c: Completely rewritten, with multibyte locale support.
11561
11562 2005-08-17  Bruno Haible  <bruno@clisp.org>
11563
11564         * lib/strcasestr.h: New file.
11565         * lib/strcasestr.c: New file.
11566
11567 2005-08-17  Bruno Haible  <bruno@clisp.org>
11568
11569         * lib/strcasecmp.c: Use mbuiter.h.
11570
11571 2005-08-17  Bruno Haible  <bruno@clisp.org>
11572
11573         * lib/mbuiter.h: New file.
11574
11575 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
11576
11577         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
11578         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
11579         and gl_GETOPT are both invoked via different paths (as happens
11580         with GNU tar CVS because it uses both argp and getopt), the former
11581         wins.
11582
11583 2005-08-16  Bruno Haible  <bruno@clisp.org>
11584
11585         * modules/tls: New file.
11586         * MODULES.html.sh (Multithreading): Add tls.
11587
11588 2005-08-16  Bruno Haible  <bruno@clisp.org>
11589
11590         * modules/strnlen1: New file.
11591         * MODULES.html.sh (String handling): Add strnlen1.
11592
11593 2005-08-16  Bruno Haible  <bruno@clisp.org>
11594
11595         * modules/strcase (Files): Add m4/mbrtowc.m4.
11596         (Depends-on): Add strnlen1, mbchar.
11597
11598 2005-08-16  Bruno Haible  <bruno@clisp.org>
11599
11600         * modules/mbiter: New file.
11601         * MODULES.html.sh (Extended multibyte and wide character utilities):
11602         Add mbiter.
11603
11604 2005-08-16  Bruno Haible  <bruno@clisp.org>
11605
11606         * modules/mbfile: New file.
11607         * MODULES.html.sh (Extended multibyte and wide character utilities):
11608         Add mbfile.
11609
11610 2005-08-16  Bruno Haible  <bruno@clisp.org>
11611
11612         * modules/mbchar: New file.
11613         * MODULES.html.sh (Extended multibyte and wide character utilities):
11614         New section.
11615
11616 2005-08-16  Bruno Haible  <bruno@clisp.org>
11617
11618         * m4/tls.m4: New file, from GNU gettext.
11619
11620 2005-08-16  Bruno Haible  <bruno@clisp.org>
11621
11622         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
11623         always.
11624         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
11625
11626 2005-08-16  Bruno Haible  <bruno@clisp.org>
11627
11628         * m4/mbiter.m4: New file.
11629
11630 2005-08-16  Bruno Haible  <bruno@clisp.org>
11631
11632         * m4/mbfile.m4: New file.
11633
11634 2005-08-16  Bruno Haible  <bruno@clisp.org>
11635
11636         * m4/mbchar.m4: New file.
11637
11638 2005-08-16  Bruno Haible  <bruno@clisp.org>
11639
11640         * lib/tls.h: New file, from GNU gettext.
11641         * lib/tls.c: New file, from GNU gettext.
11642
11643 2005-08-16  Bruno Haible  <bruno@clisp.org>
11644
11645         * lib/strnlen1.h: New file.
11646         * lib/strnlen1.c: New file.
11647
11648 2005-08-16  Bruno Haible  <bruno@clisp.org>
11649
11650         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
11651         (mbi_init): Update.
11652         (mbi_avail, mbi_advance): Let the iteration end before the terminating
11653         NUL byte, not after it.
11654
11655 2005-08-16  Bruno Haible  <bruno@clisp.org>
11656
11657         * lib/strcase.h (strcasecmp): Add note in comments.
11658         * lib/strncasecmp.c: Use code from strcasecmp.c.
11659         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
11660         (strcasecmp): Work correctly in multibyte locales.
11661
11662 2005-08-16  Bruno Haible  <bruno@clisp.org>
11663
11664         * lib/mbiter.h: New file.
11665
11666 2005-08-16  Bruno Haible  <bruno@clisp.org>
11667
11668         * lib/mbfile.h: New file.
11669
11670 2005-08-16  Bruno Haible  <bruno@clisp.org>
11671
11672         * lib/mbchar.h: New file.
11673         * lib/mbchar.c: New file.
11674
11675 2005-08-16  Bruno Haible  <bruno@clisp.org>
11676
11677         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
11678         the valid ones. Makes the comparison operations transitive:
11679         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
11680         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
11681
11682 2005-08-15  Simon Josefsson  <jas@extundo.com>
11683
11684         * modules/ssize_t (License): Change to 'unlimited'.
11685
11686         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
11687
11688 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11689
11690         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
11691         Add comments for each pending glibc patch.
11692
11693 2005-08-15  Bruno Haible  <bruno@clisp.org>
11694
11695         * lib/regex.h (__restrict_arr): Don't define to __restrict if
11696         __cplusplus is defined.
11697
11698 2005-08-14  Jim Meyering  <jim@meyering.net>
11699
11700         Sync from coreutils.
11701
11702         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
11703         Use the hash-table-based cycle-detection code not just when
11704         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
11705         Reported by James Youngman in
11706         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
11707         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
11708         FTS_TIGHT_CYCLE_CHECK.
11709         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
11710         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
11711         once again.
11712         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
11713         * lib/fts.c (fd_safer): Remove decl.
11714         Include fcntl--.h rather than unistd-safer.h
11715         (fts_safe_changedir): Don't call fd_safer; no longer needed
11716         now that we include fcntl--.h.
11717
11718 2005-08-12  Simon Josefsson  <jas@extundo.com>
11719
11720         * modules/getndelim2: Use ssize_t module.
11721         * modules/getnline: Likewise.
11722         * modules/safe-read: Likewise.
11723         * modules/xreadlink: Likewise.
11724
11725         * modules/ssize_t: New file.
11726
11727 2005-08-12  Simon Josefsson  <jas@extundo.com>
11728
11729         * m4/readline.m4: Look for termcap, curses or ncurses if required.
11730
11731 2005-08-12  Simon Josefsson  <jas@extundo.com>
11732
11733         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11734         ssize_t.
11735
11736 2005-08-12  Simon Josefsson  <jas@extundo.com>
11737
11738         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
11739         readline, getdelim and check_version.
11740         (Support for systems lacking ISO C 99: Sizes of integer types):
11741         Add size_max.
11742
11743 2005-08-12  Bruno Haible  <bruno@clisp.org>
11744
11745         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
11746
11747 2005-08-11  Simon Josefsson  <jas@extundo.com>
11748
11749         * modules/readline: New file.
11750
11751         * modules/strnlen (Files): Add strnlen.h.
11752
11753 2005-08-11  Simon Josefsson  <jas@extundo.com>
11754
11755         * m4/readline.m4: New file.
11756
11757 2005-08-11  Simon Josefsson  <jas@extundo.com>
11758
11759         * lib/readline.h, readline.c: New file.
11760
11761 2005-08-11  Simon Josefsson  <jas@extundo.com>
11762
11763         * doc/gnulib.texi (Initial import, Finishing touches): Mention
11764         gl_AVOID.
11765
11766 2005-08-11  Bruno Haible  <bruno@clisp.org>
11767
11768         * lib/strnlen.h (strnlen): Change parameter name to match comment.
11769
11770 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
11771
11772         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
11773
11774 2005-08-10  Simon Josefsson  <jas@extundo.com>
11775
11776         * tests/test-iconvme.c: New file.
11777
11778 2005-08-10  Simon Josefsson  <jas@extundo.com>
11779
11780         * m4/strnlen.m4: New file.
11781
11782         * m4/strndup.m4: Don't check for strnlen declaration, done in
11783         strnlen.m4.
11784
11785 2005-08-10  Simon Josefsson  <jas@extundo.com>
11786
11787         * lib/strndup.c: Use strnlen.h.
11788
11789         * lib/strnlen.h: New file.
11790
11791 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11792
11793         * README: Typos.
11794
11795 2005-08-02  Simon Josefsson  <jas@extundo.com>
11796
11797         * modules/readline: New file.
11798
11799 2005-08-02  Simon Josefsson  <jas@extundo.com>
11800
11801         * modules/getdelim: New file.
11802
11803         * modules/getline: Rewrite, don't use getndelim2.
11804
11805 2005-08-02  Simon Josefsson  <jas@extundo.com>
11806
11807         * m4/getline.m4: Separate out getdelim stuff into separate module.
11808
11809         * m4/getdelim.m4: New file.
11810
11811 2005-08-02  Simon Josefsson  <jas@extundo.com>
11812
11813         * lib/getline.h, getline.c: Rewrite.
11814
11815         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
11816
11817 2005-07-31  Bruno Haible  <bruno@clisp.org>
11818
11819         * lib/lock.h (gl_lock_initializer): New macro.
11820         (gl_lock_define_initialized): Use it.
11821         (gl_rwlock_initializer): New macro.
11822         (gl_rwlock_define_initialized): Use it.
11823         (gl_recursive_lock_initializer): New macro.
11824         (gl_recursive_lock_define_initialized): Use it.
11825
11826 2005-07-30  Karl Berry  <karl@gnu.org>
11827
11828         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
11829         Report from Ben Pfaff, regarding getopt.
11830
11831 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
11832
11833         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
11834         normal way.
11835         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
11836         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
11837         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
11838         (gl_GETOPT): Use the new macros.  Most of the implementation
11839         is moved to the new macros.  This is for programs like Emacs
11840         that don't want all the functionality of gl_GETOPT.
11841
11842 2005-07-26  Bruno Haible  <bruno@clisp.org>
11843
11844         * m4/lock.m4: Update from GNU gettext.
11845
11846 2005-07-26  Bruno Haible  <bruno@clisp.org>
11847
11848         * lib/lock.h: Update from GNU gettext.
11849         * lib/lock.c: Update from GNU gettext.
11850
11851 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
11852
11853         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
11854         obsolescent AC_TRY_RUN.  Include the default includes files, for
11855         'exit'.
11856
11857 2005-07-24  Bruno Haible  <bruno@clisp.org>
11858
11859         * modules/visibility: New file.
11860         * MODULES.html.sh (Misc): Add visibility.
11861
11862 2005-07-24  Bruno Haible  <bruno@clisp.org>
11863
11864         * m4/visibility.m4: New file.
11865
11866 2005-07-24  Bruno Haible  <bruno@clisp.org>
11867
11868         * doc/visibility.texi: New file.
11869
11870 2005-07-22  Bruno Haible  <bruno@clisp.org>
11871
11872         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
11873         $(ALLOCA_H), redundant through BUILT_SOURCES.
11874         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
11875         redundant through BUILT_SOURCES.
11876         * modules/byteswap (Makefile.am): Remove explicit dependency on
11877         $(BYTESWAP_H), redundant through BUILT_SOURCES.
11878         * modules/fnmatch (Makefile.am): Remove explicit dependency on
11879         $(FNMATCH_H), redundant through BUILT_SOURCES.
11880         * modules/getopt (Makefile.am): Remove explicit dependency on
11881         $(GETOPT_H), redundant through BUILT_SOURCES.
11882         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
11883         redundant through BUILT_SOURCES.
11884         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
11885         redundant through BUILT_SOURCES.
11886         * modules/stdbool (Makefile.am): Remove explicit dependency on
11887         $(STDBOOL_H), redundant through BUILT_SOURCES.
11888         * modules/stdint (Makefile.am): Remove explicit dependency on
11889         $(STDINT_H), redundant through BUILT_SOURCES.
11890         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
11891         Remove explicit dependency on $(SYSEXITS_H).
11892         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
11893
11894 2005-07-18  Simon Josefsson  <jas@extundo.com>
11895
11896         * lib/check-version.c (check_version): Accept identical versions too.
11897
11898 2005-07-18  Bruno Haible  <bruno@clisp.org>
11899
11900         * modules/lock: New file.
11901         * MODULES.html.sh (Multithreading): New section.
11902
11903 2005-07-18  Bruno Haible  <bruno@clisp.org>
11904
11905         * m4/lock.m4: New file, from GNU gettext.
11906
11907 2005-07-18  Bruno Haible  <bruno@clisp.org>
11908
11909         * lib/lock.h: New file, from GNU gettext.
11910         * lib/lock.c: New file, from GNU gettext.
11911
11912 2005-07-18  Bruno Haible  <bruno@clisp.org>
11913
11914         * lib/lock.h (gl_once_t): New type.
11915         (gl_once_define, gl_once): New macros.
11916         * lib/lock.c (fresh_once): New variable.
11917         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
11918         functions.
11919
11920 2005-07-16  Simon Josefsson  <jas@extundo.com>
11921
11922         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
11923         workaround, suggested by Bruno.
11924
11925 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11926
11927         * modules/xalloc (Depends-on): Add xalloc-die.
11928         * modules/xvasprintf (Depends-on): Add xalloc-die.
11929
11930 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11931
11932         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
11933         with a minor change.
11934
11935 2005-07-15  Bruno Haible  <bruno@clisp.org>
11936
11937         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
11938         When using lib/poll.c, define poll as rpl_poll.
11939
11940 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
11941
11942         * modules/argp (Depends-on): Remove unlocked-io.
11943
11944 2005-07-14  Derek Price  <derek@ximbiot.com>
11945
11946         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
11947         for glob symlink bug.
11948
11949 2005-07-14  Bruno Haible  <bruno@clisp.org>
11950
11951         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
11952         Instead, test for *_unlocked function declarations directly.
11953
11954 2005-07-11  Simon Josefsson  <jas@extundo.com>
11955
11956         * modules/size_max: New file.
11957
11958         * modules/xsize: Depend on size_max module for size_max.m4.
11959
11960 2005-07-11  Simon Josefsson  <jas@extundo.com>
11961
11962         * lib/size_max.h: New file.
11963
11964 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
11965
11966         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
11967         copyright symbol and the year.
11968         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
11969         (version_etc_va): Use parameterized copyright notice.
11970         Reword to conform to the current GNU coding standards.
11971
11972 2005-07-11  Karl Berry  <karl@gnu.org>
11973
11974         * doc/gnulib.texi (Quoting): new node.
11975         (Initial import): more info, from Patrice.
11976
11977 2005-07-11  Bruno Haible  <bruno@clisp.org>
11978
11979         * gnulib-tool (func_usage): Document option --avoid.
11980         (Command line options): Handle --avoid.
11981         (func_acceptable): New function.
11982         (func_modules_transitive_closure): Use it.
11983
11984 2005-07-11  Bruno Haible  <bruno@clisp.org>
11985
11986         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
11987         Reported by Jim Meyering.
11988
11989 2005-07-10  Bruno Haible  <bruno@clisp.org>
11990
11991         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
11992         Needed when size_t is smaller than 'unsigned int'.
11993         Reported by Paul Eggert.
11994
11995 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11996
11997         * modules/argp (Depends-on): Add unlocked-io
11998
11999 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12000
12001         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
12002         block of defines.
12003
12004 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12005
12006         * config/srclist.txt: Comment out regcomp.c, since we have a porting
12007         fix now.
12008
12009 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
12010         and Paul Eggert  <eggert@cs.ucla.edu>
12011
12012         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
12013         in wint_t, not wchar_t.  Remove now-unnecessary cast.
12014
12015 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12016
12017         * modules/regex (Files): Add lib/regex_internal.c,
12018         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
12019         (Depends-on): Add extensions.
12020         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
12021
12022 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12023
12024         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
12025         pathconf.
12026         * m4/same.m4 (gl_SAME): Likewise.
12027         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
12028
12029         * m4/regex.m4: Adjust to new libc regex implementation.
12030         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
12031         all the .c and .h parts of (the new) regex.
12032         Quote the m4 stuff better.
12033         Check for RE_ICASE bug of old gnulib.
12034         Check for REG_STARTEND of recent libc.
12035         Rename local variables from jm_* to gl_*.
12036         Quote operand of "test -f".
12037         Say "recent enough" version of libc, not "version 2".
12038         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
12039         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
12040         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
12041         Remove check for btowc, isascii.
12042         Require AM_LANGINFO_CODESET.
12043
12044 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12045
12046         * lib/regex.c, regex.h: Sync from libc.
12047         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
12048         * lib/regexec.c:
12049         New files, synced from libc, except that regex_internal.h
12050         currently has a small porting fix.
12051
12052 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12053
12054         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
12055         regex_internal.c, regexec.c.
12056         Add regex_internal.h too, but as a comment, since the libc version
12057         is currently broken in gnulib mode.
12058
12059 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12060
12061         Support programs like Emacs that use gnulib but not gettext.
12062         * MODULES.html.sh (Internationalization functions): Add gettext-h.
12063         * modules/gettext-h: New file.
12064         * modules/gettext (Files): Remove lib/gettext.h.
12065         (Depends-on): Add gettext-h.
12066         (Makefile.am): Remove lib_SOURCES.
12067         * modules/argmatch, modules/c-stack, modules/closeout:
12068         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
12069         * modules/execute, modules/file-type, modules/getaddrinfo:
12070         * modules/getopt, modules/human, modules/javacomp:
12071         * modules/javaexec, modules/mkdir-p, modules/obstack:
12072         * modules/openat, modules/pagealign_alloc, modules/pipe:
12073         * modules/quotearg, modules/regex, modules/rpmatch:
12074         * modules/unicodeio, modules/userspec, modules/version-etc:
12075         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
12076         * modules/xsetenv:
12077         Depend on gettext-h, not gettext.
12078
12079 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12080
12081         * gnulib-tool (func_import): Add support for 'public domain' license.
12082         * modules/alloca, modules/atexit, modules/memmove:
12083         Now public domain, not GPL.
12084         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
12085         * modules/realloc, modules/strerror, modules/strtod:
12086         Now LGPL, not GPL.
12087
12088 2005-07-05  Bruno Haible  <bruno@clisp.org>
12089
12090         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
12091         autoconf CVS. Needed for mingw.
12092
12093 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12094
12095         Remove the dependency of the strftime module on the tzset module.
12096         * modules/strftime (Depends-on): Remove dependency on tzset.
12097
12098 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12099
12100         Remove the dependency of the strftime module on the tzset module.
12101         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
12102         gl_FUNC_TZSET_CLOBBER.
12103
12104 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12105
12106         Remove the dependency of the strftime module on the tzset module.
12107         * lib/strftime.c (my_strftime)
12108         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
12109         Copy the input structure, to work around some of the bug with
12110         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
12111         Solaris releases, you should also use the tzset module, but we won't
12112         require it as a dependency any more since we don't want LGPLed code
12113         to depend on GPLed code.
12114
12115 2005-07-02  Jim Meyering  <jim@meyering.net>
12116
12117         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
12118         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
12119         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
12120         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
12121
12122 2005-07-02  Jim Meyering  <jim@meyering.net>
12123
12124         * lib/backupfile.c (backup_args): Change a `0' to NULL.
12125
12126 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12127
12128         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
12129         declares only 'struct timespec;' (!).
12130
12131 2005-07-01  Jim Meyering  <jim@meyering.net>
12132
12133         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
12134         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
12135         * lib/save-cwd.c, tempname.c:
12136         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12137         and don't include <sys/file.h>).
12138
12139 2005-06-29  Jim Meyering  <jim@meyering.net>
12140
12141         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
12142         type name.  Use the variable name instead.
12143         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
12144         Likewise.
12145
12146 2005-06-28  Simon Josefsson  <jas@extundo.com>
12147
12148         * modules/check-version (Files): Add check-version.m4.
12149
12150 2005-06-28  Simon Josefsson  <jas@extundo.com>
12151
12152         * m4/check-version.m4: New file, suggested by Jim Meyering
12153         <jim@meyering.net>.
12154
12155 2005-06-28  Simon Josefsson  <jas@extundo.com>
12156
12157         * lib/check-version.h, lib/check-version.c: New files.
12158
12159 2005-06-28  Simon Josefsson  <jas@extundo.com>
12160
12161         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
12162         collision with global variable.  Better indentation.  Don't
12163         increment buffer pointer beyond buffer end.  Based on comments
12164         from Paul Eggert <eggert@cs.ucla.edu>.
12165
12166         * lib/base64.h: Indent.
12167
12168 2005-06-28  Simon Josefsson  <jas@extundo.com>
12169
12170         * doc/gnulib.texi (Library version handling): New section.
12171
12172 2005-06-28  Jim Meyering  <jim@meyering.net>
12173
12174         * check-module (find_included_lib_files): Hard-code another
12175         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
12176         but modules/fts-lgpl (correctly) does not list those files.
12177
12178         * modules/canonicalize (Files): Add lib/pathmax.h.
12179
12180 2005-06-25  Simon Josefsson  <jas@extundo.com>
12181
12182         * modules/check-version: New file.
12183
12184 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
12185
12186         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
12187         initializer of struct addrinfo, as an indication that we don't
12188         care how many members the structure has.
12189
12190 2005-06-24  Derek Price  <derek@ximbiot.com>
12191         and Bruno Haible  <bruno@clisp.org>
12192
12193         Remove stat module & update lstat.
12194         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
12195         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
12196         * m4/stat.m4: Remove this file.
12197
12198 2005-06-24  Derek Price  <derek@ximbiot.com>
12199         and Bruno Haible  <bruno@clisp.org>
12200
12201         Remove stat module & update lstat.
12202         * lib/stat.c: Remove this file...
12203         (slash_aware_lstat): ...moving this content and its support...
12204         * lib/lstat.c (rpl_lstat): ...into here.
12205         * lib/lstat.h: New file.
12206
12207 2005-06-24  Derek Price  <derek@ximbiot.com>
12208         and Bruno Haible  <bruno@clisp.org>
12209
12210         Remove stat module & update lstat.
12211         * config/srclist.txt (libc sources): Remove stat.
12212
12213 2005-06-24  Derek Price  <derek@ximbiot.com>
12214         and Bruno Haible  <bruno@clisp.org>
12215
12216         Remove stat module & update lstat.
12217         * MODULES.html.sh (stat): Remove.
12218         * MODULES.html: Regenerated.
12219         * modules/lstat (Description): Correct function name.
12220         (Files): Add "lstat.h".
12221         (Depends-on): Remove stat, add xalloc, stat-macros.
12222         * modules/stat: Remove this file.
12223         (Include): Add "lstat.h", remove <sys/stat.h>.
12224
12225 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
12226
12227         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
12228         (ranged_convert): Don't save conversion in a temporary struct.
12229         This causes a warning with GCC 4.0.0, and anyway in the typical
12230         case it's not worth the extra 100 bytes or so of code.
12231         (ranged_convert, __mktime_internal): When calling a function via a
12232         pointer P, use P () rather than (*P) (), as we now assume C89 or
12233         better.
12234
12235 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12236
12237         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
12238         "who -r" failed to give output.  Problem reported by Tim Waugh.
12239
12240         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
12241         (xcalloc): Use it to avoid needless tests.
12242         Problem reported by Jim Meyering.
12243
12244 2005-06-20  Derek Price  <derek@ximbiot.com>
12245
12246         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
12247         unnecessary for Autoconfs > 2.59c.
12248
12249 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12250
12251         * lib/argp.h (__option_is_short): Check upper limit of
12252         __key. Isprint() requires its argument to have the value
12253         of an unsigned char or EOF.
12254
12255 2005-06-16  Jim Meyering  <jim@meyering.net>
12256
12257         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
12258         when either N or S is zero.
12259
12260 2005-06-16  Derek Price  <derek@ximbiot.com>
12261
12262         * m4/bison.m4: Declare YACC & YFLAGS precious.
12263
12264 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
12265
12266         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
12267         multibyte string or pattern, fall back on unibyte matching.
12268         Problem reported by James Youngman.
12269
12270 2005-06-08  Bruno Haible  <bruno@clisp.org>
12271
12272         * modules/csharpcomp: New file.
12273         * MODULES.html.sh (C#): Add csharpcomp.
12274
12275 2005-06-08  Bruno Haible  <bruno@clisp.org>
12276
12277         * m4/csharpcomp.m4: New file, from GNU gettext.
12278
12279 2005-06-08  Bruno Haible  <bruno@clisp.org>
12280
12281         * lib/csharpcomp.h: New file, from GNU gettext.
12282         * lib/csharpcomp.c: New file, from GNU gettext.
12283         * lib/csharpcomp.sh.in: New file, from GNU gettext.
12284
12285 2005-06-08  Bruno Haible  <bruno@clisp.org>
12286
12287         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
12288         warning on mingw.
12289
12290 2005-06-07  Derek Price  <derek@ximbiot.com>
12291
12292         Sync from CVS.
12293         * lib/glob_.h: Indent nested #ifdef.
12294
12295 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12296
12297         Sync from coreutils.
12298         Use "file name" when talking about file names, instead of "filename"
12299         or "path", as per the GNU coding standards.
12300         * lib/mkdir-p.c: Renamed from makepath.c.
12301         (make_dir_parents): Renamed from make_path.  All callers changed.
12302         * lib/mkdir-p.h: Likewise.  All includers changed.
12303         * lib/filenamecat.c: Renamed from path-concat.c.
12304         (file_name_concat): Renamed from path_concat.  All callers changed.
12305         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
12306         * lib/filenamecat.h: Likewise.  All includers changed.
12307         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
12308         in comments or local variable names.
12309         * lib/basename.c: Likewise.
12310         * lib/canonicalize.c, canonicalize.h: Likewise.
12311         * lib/dirname.c, dirname.h: Likewise.
12312         * lib/euidaccess.c: Likewise.
12313         * lib/exclude.c: Likewise
12314         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
12315         * lib/fsusage.c, fsuage.h: Likewise.
12316         * lib/fts.c, fts_.h: Likewise.
12317         * lib/getcwd.c: Likewise.
12318         * lib/getloadavg.c: Likewise.
12319         * lib/mkstemp.c: Likewise.
12320         * lib/mountlist.c, mountlist.h: Likewise.
12321         * lib/openat.c, openat.h: Likewise.
12322         * lib/readlink-stub.c: Likewise.
12323         * lib/readutmp.c, readutmp.h: Likewise.
12324         * lib/rename.c: Likewise.
12325         * lib/rmdir.c: Likewise.
12326         * lib/same.c: Likewise.
12327         * lib/savedir.c: Likewise.
12328         * lib/stripslash.c: Likewise.
12329         * lib/tempname.c: Likewise.
12330         * lib/xreadlink.c: Likewise.
12331         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
12332         All uses changed.
12333         * lib/exclude.h: Likewise.
12334
12335         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
12336         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12337         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
12338         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12339         * lib/pathmax.h: Include <limits.h> unconditionally, since other
12340         files have been getting away with it for years (MORE/BSD 4.3
12341         is extinct now).
12342         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
12343         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12344
12345         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
12346         Define to 256, not 255, as per modern POSIX.
12347
12348 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12349
12350         Sync from coreutils.
12351         Use "file name" when talking about file names, instead of "filename"
12352         or "path", as per the GNU coding standards.
12353         * MODULES.html.sh: mkdir-p renamed from makepath.
12354         filenamecat renamed from path-concat.
12355         * modules/filenamecat: Renamed from modules/path-concat.
12356         (Files): filenamecat.h and filenamecat.c renamed from
12357         path-concat.h and path-concat.c.
12358         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
12359         (Include): filenamecat.h, not path-concat.h.
12360         * modules/mkdir-p: Renamed from modules/makepath.
12361         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
12362         makepath.c.
12363         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
12364         (Include): mkdir-p.h, not makepath.h.
12365
12366 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12367
12368         Sync from coreutils.
12369         * m4/mkdir-p.m4: Renamed from makepath.m4.
12370         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
12371         Rename files from makepath.c to mkdir-p.c, and from
12372         makepath.h to mkdir-p.h.
12373         * m4/filenamecat.m4: Renamed from path-concat.m4.
12374         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
12375         Rename files from path-concat.c to filenamecat.c,
12376         and from path-concat.h to filenamecat.h.
12377         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
12378         "file name" in local variables or comments.
12379         * m4/rename.m4: Likewise.
12380
12381 2005-06-01  Bruno Haible  <bruno@clisp.org>
12382
12383         * modules/csharpexec: New file.
12384         * MODULES.html.sh (C#): New section.
12385
12386 2005-06-01  Bruno Haible  <bruno@clisp.org>
12387
12388         * m4/csharp.m4: New file, from GNU gettext.
12389         * m4/csharpexec.m4: New file, from GNU gettext.
12390
12391 2005-06-01  Bruno Haible  <bruno@clisp.org>
12392
12393         * lib/csharpexec.h: New file, from GNU gettext.
12394         * lib/csharpexec.c: New file, from GNU gettext.
12395         * lib/csharpexec.sh.in: New file, from GNU gettext.
12396
12397 2005-05-31  Derek Price  <derek@ximbiot.com>
12398             Paul Eggert  <eggert@cs.ucla.edu>
12399
12400         Sync from cvs.
12401         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12402
12403 2005-05-31  Derek Price  <derek@ximbiot.com>
12404             Paul Eggert  <eggert@cs.ucla.edu>
12405
12406         Sync from cvs.
12407         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12408
12409 2005-05-29  Derek Price  <derek@ximbiot.com>
12410
12411         * config/srclist.txt (glob_.h, glob.c): Add these files.
12412
12413 2005-05-29  Derek Price  <derek@ximbiot.com>
12414
12415         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
12416         * modules/glob: New file.
12417         * modules/getlogin_r: Add link to POSIX spec in description.
12418
12419 2005-05-29  Derek Price  <derek@ximbiot.com>
12420             Paul Eggert  <eggert@cs.ucla.edu>
12421
12422         * m4/glob.m4: New file.
12423
12424 2005-05-29  Derek Price  <derek@ximbiot.com>
12425             Paul Eggert  <eggert@cs.ucla.edu>
12426
12427         * lib/glob_.h, lib/glob.c: New files.
12428
12429 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12430
12431         * modules/fts (Files): Remove m4/inttypes-pri.m4.
12432         * modules/fts-lgpl (Depends-on): Remove gettext.
12433
12434 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12435
12436         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
12437         and don't require gt_INTTYPES_PRI.
12438
12439 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12440
12441         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
12442
12443         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
12444         the configuration hassle isn't worth it.
12445         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
12446         (LONGEST_MODIFIER, PRIuMAX): Remove.
12447
12448 2005-05-27  Bruno Haible  <bruno@clisp.org>
12449
12450         * lib/getlogin_r.h: Remove second include of <stddef.h>.
12451
12452 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
12453
12454         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
12455         _POSIX_PTHREAD_SEMANTICS for Solaris.
12456
12457 2005-05-25  Derek Price  <derek@ximbiot.com>
12458
12459         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
12460
12461 2005-05-25  Derek Price  <derek@ximbiot.com>
12462             Paul Eggert  <eggert@cs.ucla.edu>
12463
12464         * modules/getlogin_r, m4/getlogin_r.m4: New files.
12465         * lib/getlogin_r.c, getlogin_r.h: New files.
12466
12467 2005-05-25  Bruno Haible  <bruno@clisp.org>
12468             Derek Price  <derek@ximbiot.com>
12469
12470         * lib/getlogin_r.h: Simplify API documentation.
12471
12472 2005-05-23  Derek Price  <derek@ximbiot.com>
12473
12474         * modules/minmax (Files): Add m4/minmax.m4.
12475         (configure.ac): Add gl_MINMAX.
12476
12477 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
12478
12479         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
12480         so that unistd-safer.h (GPL'ed code) need not be included.
12481
12482 2005-05-22  Bruno Haible  <bruno@clisp.org>
12483
12484         * m4/minmax.m4: New file.
12485         Based on a patch by Derek Price <derek@ximbiot.com>.
12486
12487 2005-05-22  Bruno Haible  <bruno@clisp.org>
12488
12489         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
12490         (INT64_MIN): Fix definition.
12491         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
12492
12493         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
12494         NEED_SIGNED_INT_TYPES.
12495
12496         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
12497         HAVE_SYSTEM_INTTYPES.
12498
12499 2005-05-22  Bruno Haible  <bruno@clisp.org>
12500
12501         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
12502         Also include <sys/param.h> if it defines MIN, MAX.
12503         Based on a patch by Derek Price <derek@ximbiot.com>.
12504
12505 2005-05-21  Jim Meyering  <jim@meyering.net>
12506
12507         * modules/fts (Files): Add m4/inttypes-pri.m4.
12508         (Depends-on): Add lstat and remove gettext.  Alphabetize.
12509
12510 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12511
12512         New fts module.
12513         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
12514         (setup_dir, free_dir): New functions.
12515         (enter_dir, leave_dir): Define trivial
12516         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
12517         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
12518         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
12519         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
12520         Move to fts-cycle.c.
12521         (fts_open): Use setup_dir.
12522         (fts_close): Use free_dir.
12523         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
12524         This adds a label and some gotos, but the alternatives were messier.
12525         Check for memory allocation failure when entering a dir.
12526         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
12527         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
12528         (FTS): New member fts_cycle, that is a union that contains the
12529         old active_dir_ht and cycle_state.  All uses changed to mention
12530         fts_cycle.ht and fts_cycle.state.
12531         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
12532         fts.c, with the following changes:
12533         (setup_dir, free_dir): New functions.
12534         (enter_dir): Now returns bool.  Return true if successful, false
12535         if memory exhausted.  All callers changed.
12536         Do not bother partly cleaning up on
12537         memory allocation failure; that is free_dir's job.
12538         However, free ad if hash_insert fails, to avoid memory leak.
12539         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
12540         fts->fts_options to see which union member to use.
12541
12542 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12543
12544         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
12545         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
12546
12547 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12548
12549         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
12550
12551 2005-05-20  Jim Meyering  <jim@meyering.net>
12552
12553         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
12554         Now a macro, to pacify GCC.
12555
12556 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12557
12558         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
12559         of -1.
12560
12561 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12562
12563         * lib/chown.c (rpl_chown): Return -1 on failure.
12564
12565 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12566
12567         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
12568         Don't check for stddef.h.
12569         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
12570         don't use its results.
12571         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
12572         since we include them unconditionally.  Don't require
12573         AM_STDBOOL_H, since stdbool is a prerequisite.
12574         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
12575         since we assume C89 or better.
12576         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
12577         as we don't use their results.
12578         Don't check for fchdir, memmove, memset, strrchr, as we use
12579         them unconditionally.
12580         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
12581         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
12582
12583 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12584
12585         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
12586         Include <stddef.h> unconditionally, since we assume C89 now.
12587         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
12588         * lib/fts.c: Include fts_.h first, to check interface.
12589         Do not include intprops.h; no longer needed.
12590         Include cycle-check.h and hash.h, since fts_.h no longer does.
12591         Remove unnecessary casts of closedir to void.
12592         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
12593         decide whether to decrement nlinks.
12594         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
12595         (FTS): Use struct hash_table * instead of Hash_table, so that
12596         we no longer need to include hash.h here.
12597
12598 2005-05-18  Jim Meyering  <jim@meyering.net>
12599
12600         * modules/dirfd (License): Change to LGPL.  Most of the code
12601         is already in the public domain.
12602
12603 2005-05-18  Jim Meyering  <jim@meyering.net>
12604
12605         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
12606         Reported by Yoann Vandoorselaere.
12607
12608 2005-05-17  Jim Meyering  <jim@meyering.net>
12609
12610         * m4/fts.m4: New file, from coreutils.
12611
12612 2005-05-17  Jim Meyering  <jim@meyering.net>
12613
12614         * lib/fts.c, lib/fts_.h: New files, from coreutils.
12615
12616 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12617
12618         Sync from coreutils.
12619         * m4/unlinkdir.m4: New file.
12620
12621 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12622
12623         Sync from coreutils.
12624         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
12625         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
12626         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
12627         White space changes only.
12628         * lib/makepath.c (make_path): Port to hosts where leading "//" is
12629         special.
12630         * lib/yesno.c: Include getline.h, not ctype.h.
12631         (yesno): Don't remove leading white space; POSIX doesn't allow it.
12632         Use getline to remove arbitrary restriction on response length.
12633
12634 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12635
12636         * config/srclist-update: Spell out "Street" in FSF postal
12637         mail address; this is the style the FSF seems to prefer.
12638
12639         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
12640         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
12641         this updates FSF postal mail address.
12642
12643         Sync from coreutils.
12644         * modules/unlinkdir: New file.
12645         * modules/yesno (Depends-on): Add getline.
12646         * MODULES.html.sh (File system functions): Add unlinkdir.
12647
12648 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
12649
12650         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
12651         lib/strsep.h:
12652         Change the initial comment to refer to GPL, not LGPL.
12653         gnulib-tool will change it to LGPL as needed.
12654
12655         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
12656         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
12657         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
12658         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
12659         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
12660         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
12661         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
12662         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
12663         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
12664         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
12665         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
12666         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
12667         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
12668         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
12669         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
12670         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
12671         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
12672         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
12673         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
12674         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
12675         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
12676         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
12677         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
12678         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
12679         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
12680         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
12681         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
12682         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
12683         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
12684         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
12685         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
12686         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
12687         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
12688         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
12689         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
12690         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
12691         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
12692         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
12693         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
12694         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
12695         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
12696         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
12697         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
12698         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
12699         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
12700         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
12701         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
12702         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
12703         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
12704         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
12705         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
12706         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
12707         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
12708         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
12709         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
12710         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
12711         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
12712         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
12713         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
12714         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
12715         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
12716         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
12717         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
12718         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
12719         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
12720         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
12721         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
12722         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
12723         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
12724         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
12725         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
12726         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
12727         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
12728         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
12729         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
12730         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
12731         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
12732         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
12733         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
12734         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
12735         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
12736         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
12737         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
12738         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
12739         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
12740         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
12741         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
12742         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
12743         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
12744         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
12745         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
12746         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
12747         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
12748         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
12749         lib/yesno.c, lib/yesno.h:
12750         Update FSF postal mail address.
12751
12752 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
12753
12754         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
12755         tests/test-memmem.c, tests/test-stpncpy.c:
12756         Update FSF postal mail address.
12757
12758 2005-05-13  Bruno Haible  <bruno@clisp.org>
12759
12760         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
12761         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
12762         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
12763         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
12764         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
12765         Add support for 64-bit integers in the MSVC compiler.
12766
12767 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12768
12769         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
12770
12771 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
12772
12773         * gnulib-tool (func_import): Sort and uniquify recommended includes.
12774
12775 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
12776
12777         * doc/getdate.texi (General date syntax): Don't say that date
12778         date --iso-8601=ns generates acceptable dates; it doesn't yet.
12779         Problem reported by Nic Ferrier.
12780
12781 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12782
12783         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
12784         specified in ai_socktype. Fix invalid ai_protocol
12785         check. ai_protocol is usually set to 0 or depending on
12786         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
12787         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
12788         ai_socktype / ai_protocol in the returned addrinfo structure.
12789
12790 2005-05-10  Simon Josefsson  <jas@extundo.com>
12791
12792         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
12793         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12794
12795 2005-05-10  Karl Berry  <karl@gnu.org>
12796
12797         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
12798         (from http://www.gnu.org/licenses).
12799         * doc/COPYING.LIB: also rename to COPYING.LESSER.
12800         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
12801         fdl.texi suffices.
12802
12803 2005-05-10  Karl Berry  <karl@gnu.org>
12804
12805         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
12806         (COPYING.DOC): remove.
12807
12808         * config/srclist-update: new FSF address.
12809
12810 2005-05-10  Derek Price  <derek@ximbiot.com>
12811
12812         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
12813         possible.
12814
12815 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12816             Bruno Haible  <bruno@clisp.org>
12817
12818         * modules/inet_ntop: New file.
12819         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12820         inet_ntop.
12821
12822 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12823             Bruno Haible  <bruno@clisp.org>
12824
12825         * m4/inet_ntop.m4: New file.
12826
12827 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12828             Bruno Haible  <bruno@clisp.org>
12829
12830         * lib/inet_ntop.h: New file.
12831         * lib/inet_ntop.c: New file, from glibc with modifications.
12832
12833 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
12834
12835         * modules/time_r (License): Change to LGPL.
12836         * modules/extensions (License): Change to LGPL.  Actually,
12837         the license is more permissive than that, but currently gnulib-tool
12838         doesn't know how to handle more-permissive licenses.
12839
12840         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
12841         Problem reported by Dave Love.
12842
12843 2005-05-08  Jim Meyering  <jim@meyering.net>
12844
12845         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
12846         blank.
12847
12848 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
12849
12850         * modules/argmatch (Depends-on): Add stdbool.
12851         * modules/backupfile (Depends-on): Likewise.
12852         * modules/chdir-long (Depends-on): Likewise.
12853         * modules/closeout (Depends-on): Likewise.
12854         * modules/cycle-check (Depends-on): Likewise.
12855         * modules/dirname (Depends-on): Likewise.
12856         * modules/fnmatch (Depends-on): Likewise.
12857         * modules/fsusage (Depends-on): Likewise.
12858         * modules/fwriteerror (Depends-on): Likewise.
12859         * modules/getcwd (Depends-on): Likewise.
12860         * modules/getloadavg (Depends-on): Likewise.
12861         * modules/hard-locale (Depends-on): Likewise.
12862         * modules/makepath (Depends-on): Likewise.
12863         * modules/mountlist (Depends-on): Likewise.
12864         * modules/nanosleep (Depends-on): Likewise.
12865         * modules/posixtm (Depends-on): Likewise.
12866         * modules/quotearg (Depends-on): Likewise.
12867         * modules/readtokens (Depends-on): Likewise.
12868         * modules/readtokens0 (Depends-on): Likewise.
12869         * modules/readutmp (Depends-on): Likewise.
12870         * modules/save-cwd (Depends-on): Likewise.
12871         * modules/strftime (Depends-on): Likewise.
12872         * modules/userspec (Depends-on): Likewise.
12873         * modules/utimecmp (Depends-on): Likewise.
12874         * modules/xgetcwd (Depends-on): Likewise.
12875         * modules/xnanosleep (Depends-on): Likewise.
12876         * modules/xstrtod (Depends-on): Likewise.
12877         * modules/yesno (Depends-on): Likewise.
12878
12879 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
12880
12881         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
12882         needless checks.
12883
12884 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12885
12886         Merge from coreutils.  Among other things,
12887         add bulletproofing for cases where stdin, stdout, or stderr are closed.
12888         * lib/fd-safer.c: New file.
12889         * lib/fcntl-safer.h, open-safer.c: Remove.
12890         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
12891         * lib/dup-safer.c: Include unistd-safer.h first.
12892         Don't include errno.h.
12893         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
12894         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
12895         * lib/file-type.c: Rely on file-type.h change.
12896         * lib/getloadavg.c: Include unistd-safer.h.
12897         (getloadavg): Use safer open.
12898         * lib/getusershell.c: Include "stdio-safer.h".
12899         (getusershell): Use safer fopen.
12900         * lib/long-options.c (long_options): Use NULL rather than 0.
12901         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
12902         'free'.
12903         * lib/modechange.c: Likewise.
12904         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
12905         (MODE_DONE): New constant.
12906         (struct mode_change): Remove 'next' member.
12907         (make_node_op_equals): New function; like the old one of the
12908         same name, except it allocates an array.
12909         (mode_compile, mode_create_from_ref): Use it.
12910         (mode_compile): Allocate result as an array, not a linked list.
12911         Parse octal string ourself, so that we catch mistakes like "+0".
12912         (mode_adjust): Arg is an array, not a linked list.
12913         * lib/modechange.c: Include stat-macros.h, xalloc.h.
12914         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
12915         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
12916         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
12917         Remove.  This is now stat-macros.h's job.
12918         (talloc): Remove.  All callers replaced by xalloc, so that
12919         our invokers don't have to worry about reporting memory failures.
12920         (make_node_op_equals): Remove.
12921         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12922         New constants.
12923         (struct mode_change): Moved here from modechange.h.
12924         (mode_append_entry): Remove.
12925         (mode_compile): Remove MASKED_OPS arg, since it encouraged
12926         apps to have incorrect behavior.  Use simpler algorithm for head
12927         and tail.  Don't futz with umask; that's now the job of mode_adjust.
12928         Detect more invalid usages rather than having somewhat-random behavior.
12929         Don't insert an "a=" action, as that leads to incorrect behavior.
12930         (mode_compile, mode_create_from_ref): Return NULL on error instead
12931         of an enum, since now there's only one way to have an error.  All
12932         callers changed.
12933         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
12934         at the correct time.  Simplify calculation of "+u" and its ilk.
12935         Don't mishandle "+X".
12936         (mode_free): Remove "register" and localize decls.
12937         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12938         (struct mode_change): Move to modechange.c; callers don't
12939         need to see this stuff.
12940         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
12941         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
12942         (mode_change, mode_adjust): Reflect the new signatures noted above.
12943         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
12944         that might redefine system include files.
12945         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
12946         (my_usleep): Use NULL rather than (void *) 0.
12947         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
12948         Use siginterrupt to specify that system calls should be interrupted.
12949         (rpl_nanosleep): Move initialization of suspended closer to call of
12950         my_usleep.
12951         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
12952         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
12953         (desirable_utmp_entry): New function.
12954         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
12955         using x2nrealloc, to simplify logic.
12956         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
12957         size calculation.  Do not assume utmp file is a regular file.
12958         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
12959         (READ_UTMP_CHECK_PIDS): New constant.
12960         * lib/save-cwd.c: Include unistd-safer.h.
12961         (save_cwd): Use fd_safer.
12962         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
12963         [!_LIBC] Include "stat-macros.h" instead.
12964         * lib/unistd-safer.h (fd_safer): New decl.
12965
12966 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12967
12968         * modules/getloadavg (Depends-on): Add unistd-safer.
12969         * modules/getusershell (Depends-on): Add stdio-safer.
12970         * modules/lstat (Depends-on): Remove xalloc.
12971         * modules/mkstemp (Depends-on): Add stat-macros.
12972         * modules/modechange (Depends-on): Remove xstrtol.
12973         Add stat-macros, xalloc.
12974         * modules/save-cwd (Depends-on): Add unistd-safer.
12975         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
12976         * modules/unistd-safer (Files): Add lib/fd-safer.c
12977         (Makefile.am): Remove lib_SOURCES.
12978
12979         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
12980         Remove fcntl-safer; unistd-safer supersedes it.
12981
12982 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12983
12984         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
12985         AC_HEADER_STAT.
12986         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
12987         (gl_PREREQ_CHOWN): Remove.
12988         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
12989         it.  Don't require AC_HEADER_STAT.
12990         (gl_PREREQ_LSTAT): Remove.
12991         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
12992         Don't require AC_HEADER_STAT.
12993         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
12994         (gl_PREREQ_RMDIR): Remove.
12995         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
12996         mention stat-macros.h or AC_HEADER_STAT, since we'll make
12997         the stat-macros module a prerequisite.
12998         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
12999         * m4/filemode.m4 (gl_FILEMODE): Likewise.
13000         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
13001         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
13002         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
13003         variable names.
13004         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
13005         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
13006         variable prefixes.
13007         * m4/fcntl-safer.m4: Remove.
13008         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
13009         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
13010         Invoke gl_PREREQ_FD_SAFER.
13011         (gl_PREREQ_FD_SAFER): New macro.
13012         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
13013         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
13014         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
13015         Remove duplicate call to AC_LIBOBJ(readutmp).
13016         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
13017
13018         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
13019         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
13020
13021 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13022
13023         * MODULES.html.sh (Misc): Add byteswap.
13024
13025 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13026
13027         * modules/getcwd (Depends-on): Add extensions.
13028         * modules/openat (Depends-on): Likewise.
13029
13030 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13031
13032         * modules/byteswap: New file.
13033
13034 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13035
13036         * m4/byteswap.m4: New file.
13037
13038 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13039
13040         * lib/byteswap_.h: New file.
13041
13042 2005-04-25  Karl Berry  <karl@gnu.org>
13043
13044         * m4/gettext.m4: Update from GNU gettext 0.14.4.
13045
13046 2005-04-25  Albert Chin  <china@thewrittenword.com>
13047
13048         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
13049         Toolkit C bug.
13050
13051 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
13052
13053         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
13054         (func_ln_if_changed) Remove forcibly for no error message
13055         in case file does not exist.
13056
13057 2005-04-19  Simon Josefsson  <jas@extundo.com>
13058
13059         * gnulib-tool (Options): Make --symlink mean --symbolic.
13060
13061 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
13062
13063         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
13064
13065 2005-04-16  Simon Josefsson  <jas@extundo.com>
13066
13067         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
13068
13069 2005-04-15  Simon Josefsson  <jas@extundo.com>
13070
13071         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
13072
13073 2005-04-15  Simon Josefsson  <jas@extundo.com>
13074
13075         * gnulib-tool: Rename --symlink to --symbolic.
13076
13077 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
13078
13079         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
13080         symbolic links to files instead of copying/moving.  Add --aux-dir,
13081         specifying directory relative --dir where auxiliary build tools
13082         are placed.
13083
13084 2005-04-14  Bruno Haible  <bruno@clisp.org>
13085
13086         * modules/allocsa (License): Change to LGPL.
13087         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
13088
13089 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13090
13091         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
13092         that "UTC +1 second" continues to work.  Problem reported
13093         by Dmitry V. Levin.
13094         (relunit_snumber): New rule.
13095         (relunit): Use it.
13096
13097 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13098
13099         * lib/getdate.y (universal_time_zone_table): New constant.
13100         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
13101         universal_time_zone_table.
13102         (lookup_zone): Prefer universal_time_zone_table to
13103         local_time_zone_table, so that "GMT" time stamps are allowed in
13104         London during the summer.  Problem reported by Ian Abbott.
13105
13106 2005-04-12  Jim Meyering  <jim@meyering.net>
13107
13108         * lib/human.c (humblock): Set *options even when returning due to
13109         xstrtoumax conversion failure.  Thanks to a used-uninitialized
13110         warning from gcc-4.
13111
13112 2005-04-09  Jim Meyering  <jim@meyering.net>
13113
13114         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
13115         -Wuninitialized: initialize tm0.tm_year.
13116
13117 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
13118
13119         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
13120         count, since there's no maximum.  All uses changed.
13121         Add member dsts_seen.
13122         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
13123         not being INT_MAX.
13124         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
13125         Use pc_rels_seen to decide whther a date is absolute.
13126
13127         * lib/getdate.y (number): Don't overwrite year.
13128         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
13129         check.
13130
13131 2005-04-02  Simon Josefsson  <jas@extundo.com>
13132
13133         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
13134         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
13135
13136 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
13137
13138         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
13139         where no absolute path name can be longer than PATH_MAX.
13140
13141 2005-03-27  Jim Meyering  <jim@meyering.net>
13142
13143         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
13144
13145 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
13146
13147         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
13148         "one's complement" -> "ones' complement" in comment, as per Knuth.
13149         "value of type" -> "type or expression" in comment.
13150         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
13151
13152 2005-03-26  Jim Meyering  <jim@meyering.net>
13153
13154         Comment nits.
13155         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
13156         Correct typos: s/or/of/.
13157
13158 2005-03-26  Jim Meyering  <jim@meyering.net>
13159
13160         * modules/check-include-files: Move to ../ and rename to...
13161         * check-module: ...this.
13162
13163 2005-03-25  Jim Meyering  <jim@meyering.net>
13164
13165         * modules/xvasprintf (Files): Add xalloc.h.
13166
13167 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
13168
13169         * modules/gettext (Files): config/config.rpath ->
13170         build-aux/config.rpath
13171         * modules/iconv (Files): Likewise.
13172         Problem reported by Oskar Liljeblad.
13173
13174 2005-03-23  Jim Meyering  <jim@meyering.net>
13175
13176         * modules/check-include-files: New script to check for
13177         missing dependencies, multiple includes, etc.
13178
13179         * modules/c-strtold (Depends-on): Add xalloc.
13180         * modules/c-strtod (Depends-on): Add xalloc.
13181         * modules/hash (Depends-on): Add xalloc.
13182         (Files): Remove lib/xalloc.h.
13183
13184         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
13185         * modules/userspec (Files): Add lib/inttostr.h.
13186
13187 2005-03-23  Jim Meyering  <jim@meyering.net>
13188
13189         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
13190
13191 2005-03-22  Jim Meyering  <jim@meyering.net>
13192
13193         * modules/stat-macros: New module.
13194         * modules/canonicalize, modules/euidaccess, modules/file-type,
13195         * modules/filemode, modules/lchown, modules/makepath,
13196         * modules/rmdir, modules/stat: Depend on new stat-macros module
13197         rather than listing lib/stat-macros.h manually.
13198         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
13199
13200 2005-03-22  Jim Meyering  <jim@meyering.net>
13201
13202         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
13203
13204 2005-03-22  Bruno Haible  <bruno@clisp.org>
13205
13206         * config/srclist.txt: Replace target directory 'config' with
13207         'build-aux'.
13208         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
13209         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
13210         ../build-aux/.
13211
13212 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
13213
13214         * modules/chdir-long (Depends-on): Add mempcpy.
13215
13216         * modules/acl, modules/backupfile, modules/c-strtod,
13217         modules/c-strtold, modules/canon-host, modules/canonicalize,
13218         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
13219         modules/exclude, modules/exitfail, modules/file-type,
13220         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
13221         modules/getdate, modules/getline, modules/getpagesize,
13222         modules/getpass, modules/getugroups, modules/group-member,
13223         modules/hard-locale, modules/hash, modules/human, modules/idcache,
13224         modules/inttostr, modules/long-options, modules/makepath,
13225         modules/md5, modules/memcasecmp, modules/memcoll,
13226         modules/modechange, modules/mountlist, modules/path-concat,
13227         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
13228         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
13229         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
13230         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
13231         modules/strftime, modules/strndup, modules/strverscmp,
13232         modules/timespec, modules/unlocked-io, modules/userspec,
13233         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
13234         modules/yesno:
13235         Remove lib_SOURCES line from Makefile.am section, as this is now
13236         done automatically by the corresponding Autoconf macro.
13237
13238 2005-03-21  Jim Meyering  <jim@meyering.net>
13239
13240         Changes imported from coreutils.
13241
13242         * lib/cycle-check.c: Don't include xalloc.h.
13243
13244         * lib/path-concat.c: Don't include assert.h.
13245         (path_concat): Remove assertion that would have triggered
13246         for ABASE starting with more than one slash.
13247         Reported by Andreas Schwab.
13248
13249         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
13250         properly when ABASE is an absolute file name.
13251         Correct the description of this function.
13252         Include <assert.h>.
13253         Add an assertion and a test driver.
13254         This fixes a bug introduced on 2004-07-02.
13255         Andreas Schwab reported the resulting failure of cp --parents:
13256         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
13257
13258 2005-03-21  Jim Meyering  <jim@meyering.net>
13259
13260         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
13261         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
13262
13263 2005-03-21  Jim Meyering  <jim@meyering.net>
13264         and  Paul Eggert  <eggert@cs.ucla.edu>
13265
13266         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
13267         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
13268         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
13269         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
13270         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
13271         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
13272         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
13273         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
13274         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
13275         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
13276         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
13277         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
13278         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
13279         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
13280         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
13281         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
13282         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
13283         for these modules.
13284
13285 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
13286
13287         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
13288         (which shouldn't happen), generate nothing instead of returning 0
13289         immediately, so that nstrftime (NULL, ...) doesn't return 0.
13290
13291 2005-03-16  Bruno Haible  <bruno@clisp.org>
13292
13293         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
13294         HAVE_LONGLONG_64BIT.
13295
13296 2005-03-16  Bruno Haible  <bruno@clisp.org>
13297
13298         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
13299         HAVE_LONGLONG_64BIT.
13300
13301 2005-03-16  Bruno Haible  <bruno@clisp.org>
13302
13303         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
13304         HAVE_LONGLONG_64BIT.
13305
13306 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13307
13308         * lib/strftime.c (my_strftime): Prepend space to format so that we can
13309         reliably distinguish strftime failure from empty output on POSIX
13310         hosts.
13311
13312 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13313
13314         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
13315         (iconv_string): Don't guess a size-zero buffer, as that might cause
13316         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
13317         result would be 'too large', where 'too large' is (heuristically)
13318         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
13319         overflow concerns.  This will prevent some unwanted malloc failures
13320         when the inputs are very large.
13321
13322 2005-03-15  Karl Berry  <karl@gnu.org>
13323
13324         * config/srclist.txt (config.rpath): from gettext.
13325         * config/config.rpath: update.
13326
13327 2005-03-15  Bruno Haible  <bruno@clisp.org>
13328
13329         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
13330         to 'negate'.
13331
13332         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
13333         variable.
13334
13335         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
13336         results.
13337
13338 2005-03-14  Simon Josefsson  <jas@extundo.com>
13339
13340         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
13341         <fx@gnu.org>.
13342
13343 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
13344
13345         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
13346         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
13347         intprops.h.
13348         * lib/strtol.c: Likewise.
13349
13350 2005-03-14  Jim Meyering  <jim@meyering.net>
13351
13352         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
13353         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
13354         to be nonzero so that we (and caller) can detect the difference
13355         between a valid zero-length expansion and an error return, even
13356         when the underlying strftime fails before writing anything into
13357         that location.
13358
13359 2005-03-14  Bruno Haible  <bruno@clisp.org>
13360
13361         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
13362         Update from GNU gettext 0.14.3.
13363
13364 2005-03-10  Jim Meyering  <jim@meyering.net>
13365
13366         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
13367
13368 2005-03-10  Jim Meyering  <jim@meyering.net>
13369
13370         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
13371         so that this module works on systems without fchdir.
13372
13373 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
13374
13375         Factor int-properties macros into a single file, except for
13376         glibc-related files.
13377         * lib/intprops.h: New file.
13378         * lib/getloadavg.c: Include it instead of limits.h.
13379         (INT_STRLEN_BOUND): Remove.
13380         * lib/human.c: Include intprops.h.
13381         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
13382         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
13383         302/1000.
13384         * lib/inttostr.h: Include intprops.h instead of limits.h.
13385         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
13386         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
13387         for consistency with intprops.h.
13388         (time_t_is_integer, twos_complement_arithmetic): Use them.
13389         * lib/sig2str.h: Include <signal.h>, intprops.h.
13390         (INT_STRLEN_BOUND): Remove.
13391         * lib/strftime.c (TYPE_SIGNED): Remove.
13392         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
13393         * lib/strtol.c: Adjust comments to match intprops.h.
13394         * lib/userspec.c: Include intprops.h.
13395         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
13396         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
13397         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
13398         instead of rolling our own expressions.
13399         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
13400
13401         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
13402         instead of int.
13403         (my_strftime): Do not mishandle years close to INT_MAX, by doing
13404         the right thing even if adding 1900 would overflow.  Similarly
13405         for tm_mon + 1 and tm_yday + 1.
13406         Make %Y always equivalent to %C%y, and similarly for %G and %g.
13407         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
13408         (DO_SIGNED_NUMBER): New macro.
13409         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
13410
13411 2005-03-07  Bruno Haible  <bruno@clisp.org>
13412
13413         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
13414
13415 2005-03-07  Bruno Haible  <bruno@clisp.org>
13416
13417         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
13418
13419 2005-03-04  Derek R. Price  <derek@ximbiot.com>
13420
13421         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
13422         (func_import): Only replace files via --import when they have actually
13423         changed.
13424
13425 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13426
13427         * m4/mmap-anon.m4: New file.
13428         * m4/pagealign_alloc.m4: New file.
13429
13430 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13431             Bruno Haible  <bruno@clisp.org>
13432
13433         * modules/pagealign_alloc: New file.
13434         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
13435
13436 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13437             Bruno Haible  <bruno@clisp.org>
13438
13439         * lib/pagealign_alloc.h: New file.
13440         * lib/pagealign_alloc.c: New file.
13441
13442 2005-03-03  Bruno Haible  <bruno@clisp.org>
13443
13444         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
13445         Use an all-permissive copyright notice, recommended by RMS.
13446
13447 2005-03-02  Bruno Haible  <bruno@clisp.org>
13448
13449         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
13450         of AIX, the replacement has to be done only after <string.h> is
13451         included, therefore not in config.h. stpncpy.h does the replacement,
13452         and stpncpy.c uses it.
13453
13454 2005-03-02  Bruno Haible  <bruno@clisp.org>
13455
13456         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
13457         stpncpy.c uses it.
13458
13459 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13460
13461         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
13462         The workaround isn't strictly needed for POSIX conformance, and
13463         it's too much of a pain to configure and maintain.  We'll ask
13464         people to fix their kernels instead.
13465         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
13466         (NANOSLEEP_BUG_WORKAROUND): Remove.
13467         (xnanosleep): Remove the workaround.
13468
13469 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13470
13471         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
13472         Reported by Derek Price.
13473         (Include): Add "timespec.h".
13474
13475         * modules/xnanosleep (Depends-on): Remove gethrxtime.
13476
13477 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13478
13479         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
13480         to detect nanosleep bug.
13481
13482 2005-03-01  Bruno Haible  <bruno@clisp.org>
13483
13484         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
13485
13486 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
13487
13488         * modules/gethrxtime: New file.
13489         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
13490         (Depends-on): Add gethrxtime.
13491         (configure.ac): Add gl_XNANOSLEEP.
13492         (Makefile.am): Remove lib_SOURCES line.
13493
13494 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13495
13496         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
13497         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
13498
13499 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13500
13501         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
13502         * lib/timespec.h (gettime): Return void, since it always
13503         succeeds now.  All uses changed.
13504         * lib/gettime.c (gettime) Likewise.
13505         [HAVE_NANOTIME]: Prefer nanotime.
13506         Assume gettimeofday succeeds, as POSIX requires.
13507         Assime time () succeeds, since other code already does.
13508         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
13509         (timespec_subtract): Remove.
13510         (NANOSLEEP_BUG_WORKAROUND): New constant.
13511         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
13512         things considerably.  Use it only on GNU/Linux hosts, since the
13513         workaround shouldn't be needed elsewhere.
13514
13515 2005-02-24  Bruno Haible  <bruno@clisp.org>
13516
13517         * modules/gettext (Files): Add m4/glibc2.m4.
13518
13519 2005-02-24  Bruno Haible  <bruno@clisp.org>
13520
13521         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
13522         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
13523         * m4/progtest.m4:
13524         Update from GNU gettext 0.14.2.
13525         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
13526
13527 2005-02-24  Bruno Haible  <bruno@clisp.org>
13528
13529         * lib/localcharset.c: Update from GNU gettext 0.14.2.
13530         * lib/config.charset: Update from GNU gettext 0.14.2.
13531
13532 2005-02-24  Bruno Haible  <bruno@clisp.org>
13533
13534         * lib/gettext.h: Update from GNU gettext 0.14.2.
13535
13536 2005-02-23  Simon Josefsson  <jas@extundo.com>
13537
13538         * m4/iconvme.m4: New file.
13539
13540 2005-02-23  Jim Meyering  <jim@meyering.net>
13541
13542         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
13543         change.
13544         Thanks to Bruno Haible for catching it.
13545
13546 2005-02-22  Simon Josefsson  <jas@extundo.com>
13547
13548         * modules/iconvme: New file.
13549
13550         * MODULES.html.sh: Add iconvme.
13551
13552 2005-02-22  Simon Josefsson  <jas@extundo.com>
13553
13554         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
13555
13556 2005-02-22  Simon Josefsson  <jas@extundo.com>
13557
13558         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
13559
13560 2005-02-22  Jim Meyering  <jim@meyering.net>
13561
13562         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
13563         s/ifndef/ifdef/.
13564
13565 2005-02-20  Neil Conway  <neilc@samurai.com>
13566
13567         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
13568         returned by OSX/Darwin if the specified buffer is not large
13569         enough for the hostname.
13570
13571 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13572
13573         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
13574         pass it to _help, otherwise the latter coredumps trying to
13575         dereference state.root_argp.
13576
13577 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13578
13579         * modules/chdir-long (Depends-on): Add memrchr.
13580         * modules/memrchr (Files): Add lib/memrchr.h.
13581         (Include): "memrchr.h".
13582
13583 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13584
13585         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
13586
13587 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13588
13589         * lib/memrchr.h: New file.
13590         * lib/chdir-long.c: Include it.
13591         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
13592         Don't bother including stddef.h.
13593
13594 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
13595
13596         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
13597         inclusion.
13598         Include <sys/types.h>, for dev_t.
13599         (ME_DUMMY, ME_REMOTE): Move from here....
13600         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
13601         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
13602         Dmitry V. Levin.
13603         Include mountlist.h first, to test the interface.
13604
13605 2005-01-29  Bruno Haible  <bruno@clisp.org>
13606
13607         * lib/progname.c (program_name): Initialize.
13608         Needed when linking statically on MacOS X.
13609
13610 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13611
13612         Sync from coreutils.
13613         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
13614         (Depends-on): Add c-strtod.
13615         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
13616
13617 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13618
13619         Sync from coreutils.
13620         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
13621
13622         Remove files that are specific to coreutils.
13623         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
13624
13625 2005-01-28  Bruno Haible  <bruno@clisp.org>
13626
13627         * modules/javacomp: New file.
13628         * MODULES.html.sh (Java): Add javacomp.
13629
13630 2005-01-28  Bruno Haible  <bruno@clisp.org>
13631
13632         * m4/javacomp.m4: New file, from GNU gettext.
13633
13634 2005-01-28  Bruno Haible  <bruno@clisp.org>
13635
13636         * lib/javacomp.sh.in: New file, from GNU gettext.
13637         * lib/javacomp.h: New file, from GNU gettext.
13638         * lib/javacomp.c: New file, from GNU gettext.
13639
13640 2005-01-26  Simon Josefsson  <jas@extundo.com>
13641
13642         * lib/gai_strerror.c: Use GPL in header.
13643
13644 2005-01-26  Bruno Haible  <bruno@clisp.org>
13645
13646         * modules/javaexec: New file.
13647         * MODULES.html.sh (Java): Add javaexec.
13648
13649 2005-01-26  Bruno Haible  <bruno@clisp.org>
13650
13651         * m4/javaexec.m4: New file, from GNU gettext.
13652
13653 2005-01-26  Bruno Haible  <bruno@clisp.org>
13654
13655         * lib/javaexec.sh.in: New file, from GNU gettext.
13656         * lib/javaexec.h: New file, from GNU gettext.
13657         * lib/javaexec.c: New file, from GNU gettext.
13658
13659 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13660
13661         * modules/lchown (Depends-on): Remove lchown.h
13662
13663 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13664
13665         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
13666         must be defined if the header file was not found, in order
13667         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
13668
13669 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13670
13671         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
13672         initializers for struct pentry_state.
13673         (__argp_error): Check return value of __asprintf
13674         (__argp_failure): Translate error message
13675
13676         * lib/argp-parse.c: Removed braces around the expansion of N_()
13677
13678 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
13679
13680         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
13681         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
13682         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
13683         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
13684         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
13685         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
13686         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
13687         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
13688         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
13689         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
13690         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
13691         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
13692         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
13693         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
13694         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
13695         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
13696         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
13697         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
13698         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
13699         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
13700         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
13701         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
13702         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
13703         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
13704         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
13705         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
13706         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
13707         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
13708         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
13709         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
13710         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
13711         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
13712         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
13713         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
13714         xstrtol.m4, xstrtoumax.m4, yesno.m4:
13715         Use an all-permissive copyright notice, recommended by RMS.
13716
13717 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
13718
13719         * modules/chdir-long (Depends-on): Remove mempcpy.
13720
13721 2005-01-21  Jim Meyering  <jim@meyering.net>
13722
13723         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
13724         same value as for Solaris 9.
13725
13726         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
13727         component length.  This included changing the parameter to be
13728         of type `char *' rather than `char const *'.
13729         * lib/chdir-long.h (chdir_long): Update prototype.
13730
13731         * lib/openat.c (fdopendir, fstatat): New functions.
13732         * lib/openat.h: Include headers required for use of DIR and struct
13733         stat.
13734         [AT_SYMLINK_NOFOLLOW]: Define.
13735         (fdopendir, fstatat): Add prototypes.
13736
13737 2005-01-21  Bruno Haible  <bruno@clisp.org>
13738
13739         * modules/classpath: New file.
13740         * MODULES.html.sh (Java): Add classpath.
13741
13742 2005-01-21  Bruno Haible  <bruno@clisp.org>
13743
13744         * lib/classpath.h: New file, from GNU gettext.
13745         * lib/classpath.c: New file, from GNU gettext.
13746
13747 2005-01-20  Simon Josefsson  <jas@extundo.com>
13748
13749         * modules/version-etc-fsf: New file.
13750
13751 2005-01-20  Simon Josefsson  <jas@extundo.com>
13752
13753         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
13754         * lib/version-etc.c: Remove version_etc_copyright.
13755         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
13756         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
13757
13758 2005-01-20  Simon Josefsson  <jas@extundo.com>
13759
13760         * lib/base64.h (isbase64): Add.
13761
13762         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
13763         using a unsigned prototype, don't inline.
13764         (base64_decode): Use it.
13765
13766 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13767
13768         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
13769         it.
13770
13771 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13772
13773         * lib/save-cwd.c (save_cwd): Remove code to support the case
13774         where fchdir is missing or flaky.
13775
13776 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13777
13778         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
13779
13780 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
13781
13782         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
13783         AC_LIBSOURCES now does this.
13784         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
13785         with new ullong_max module.
13786
13787 2005-01-19  Bruno Haible  <bruno@clisp.org>
13788
13789         * modules/sh-quote: New file.
13790         * MODULES.html.sh (Executing programs): Add sh-quote.
13791
13792 2005-01-19  Bruno Haible  <bruno@clisp.org>
13793
13794         * lib/sh-quote.h: New file, from GNU gettext.
13795         * lib/sh-quote.c: New file, from GNU gettext.
13796
13797 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13798
13799         Merge from coreutils.
13800         * m4/ullong_max.m4: New file.
13801         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
13802         (gl_MACROS): Assume localeconv exists.
13803
13804 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13805
13806         Merge changes from coreutils, as described below in several
13807         changelogs dated today.
13808
13809         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
13810         (O_DIRECTORY): Remove; not needed here, since "." must be
13811         a directory.  All uses removed.
13812         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
13813         universal on Suns, and we also need to test for IRIX.
13814         Revamp code to use 'if' rather than '#if'.
13815         Avoid unnecessary comparison of cwd->desc to 0.
13816
13817         * lib/utimens.c (futimens): Robustify the previous patch, by checking
13818         for known valid error numbers rather than observed invalid ones.
13819
13820 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13821
13822         * modules/ullong_max: New file.
13823
13824         * modules/chdir-long, modules/openat: New files.
13825         * modules/save-cwd (Depends-on): Depend on chdir-long.
13826         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
13827
13828 2005-01-18  Jim Meyering  <jim@meyering.net>
13829
13830         Merge from coreutils.
13831         * m4/chdir-long.m4, m4/openat.m4: New files.
13832         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
13833         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
13834         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
13835         is sane and DOES follow symlinks.  Besides, testing 20 different
13836         systems found no broken chown implementations.
13837         Prompted by a change in rsync's copy of this macro.
13838         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
13839
13840         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
13841
13842         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
13843         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
13844         NULL-means-set-to-current-time semantics.
13845         Remove temporary file immediately, rather than waiting
13846         for configure's at-exit trap code to do it.
13847
13848 2005-01-18  Jim Meyering  <jim@meyering.net>
13849
13850         * lib/version-etc.c (version_etc_copyright): Update copyright date.
13851
13852         * lib/utimens.c (futimens): Account for the fact that futimes
13853         can also fail with errno == ENOSYS or errno == ENOENT.
13854         Patch from Dmitry V. Levin.
13855
13856         Change the name of the robust chdir function from chdir to chdir_long.
13857         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
13858         (restore_cwd): Use chdir_long, not chdir.
13859         * lib/chdir-long.c: Renamed from chdir.c.
13860         * lib/chdir-long.h: Renamed from chdir.h.
13861         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
13862         Hurd.
13863
13864 2005-01-18  Bruno Haible  <bruno@clisp.org>
13865
13866         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
13867         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
13868         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
13869         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
13870         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
13871         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
13872         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
13873         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
13874         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
13875         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
13876         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
13877         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
13878         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
13879         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
13880         Use an all-permissive copyright notice, recommended by RMS.
13881
13882 2005-01-18  Bob Proulx  <bob@proulx.com>
13883
13884         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
13885         simplify offsetof() macro construct to avoid compile failure with
13886         native HP-UX 11.0 ANSI C compiler.
13887
13888 2005-01-17  Bruno Haible  <bruno@clisp.org>
13889
13890         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
13891         redundant because stpncpy.m4 takes care of it.
13892
13893 2005-01-17  Bruno Haible  <bruno@clisp.org>
13894
13895         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
13896
13897 2005-01-17  Bruno Haible  <bruno@clisp.org>
13898
13899         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
13900         used.
13901
13902 2005-01-17  Bruno Haible  <bruno@clisp.org>
13903
13904         * lib/fwriteerror.h (fwriteerror): Change specification to include
13905         fclose.
13906         * lib/fwriteerror.c: Include <stdbool.h>.
13907         (fwriteerror): At the end, close the file stream. Record whether
13908         stdout was already closed.
13909
13910 2005-01-17  Bruno Haible  <bruno@clisp.org>
13911
13912         * lib/execute.c (environ): Declare if needed.
13913         * lib/pipe.c (environ): Likewise.
13914         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
13915
13916 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13917
13918         * modules/argp: Depend on vsnprintf
13919
13920 2005-01-10  Jim Meyering  <jim@meyering.net>
13921
13922         * modules/closeout (Depends-on): Add atexit.
13923
13924 2005-01-06  Bruno Haible  <bruno@clisp.org>
13925
13926         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
13927
13928 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13929
13930         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
13931         definitions to be after all include files, to avoid collisions.
13932         Problem reported by Bob Proulx.
13933
13934 2005-01-04  Jim Meyering  <jim@meyering.net>
13935
13936         Changes imported from coreutils.
13937         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
13938         as the mkstemp template, use a temporary directory and an
13939         8.3-friendly template to avoid trouble on systems like DJGPP.
13940         Reported by Juan M. Guerrero via Stepan Kasal.
13941         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
13942         close. Remove the temporary directory right away, rather than waiting
13943         for configure's at-exit trap code to do it.
13944         Suggestion from Stepan Kasal.
13945
13946 2005-01-01  Simon Josefsson  <jas@extundo.com>
13947
13948         * gnulib-tool: Print #include directives when --import'ing.
13949
13950 2004-12-28  Simon Josefsson  <jas@extundo.com>
13951
13952         * tests/test-base64.c: Include required header files.  Remove
13953         unused variables.
13954
13955 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13956
13957         * modules/error (Depends-on): Remove gettext.
13958
13959 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13960
13961         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
13962         not needed.  This removes a dependency on the gettext module.
13963         [defined _LIBC]: Do not include <libintl.h>; not needed.
13964
13965 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13966
13967         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
13968         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
13969
13970 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13971
13972         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
13973         HAVE_DECL_STRTOLD.
13974
13975 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13976
13977         * modules/getdate (Depends-on): Remove alloca-opt.
13978
13979 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13980
13981         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
13982
13983 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13984
13985         * lib/argp-parse.c: Include <stddef.h>.
13986         (alignof, alignto): New macros.
13987         (parser_init): Don't assume that void * is aligned sufficiently
13988         for struct option.
13989
13990         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
13991         need to extend the stack.
13992         (YYINITDEPTH): New macro, so that the initial stack isn't overly
13993         large.
13994
13995 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13996
13997         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
13998
13999 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14000
14001         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
14002         (2004-10-24) change.  Apparently this was a false alarm.
14003
14004         * modules/getdate: Depend on alloca-opt, not alloca.
14005
14006 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14007
14008         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
14009         Remove now-obsolete comment about AIX.
14010         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
14011         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
14012         (YYMAXDEPTH): New macro.
14013
14014 2004-12-18  Simon Josefsson  <jas@extundo.com>
14015
14016         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
14017
14018 2004-12-18  Bruno Haible  <bruno@clisp.org>
14019
14020         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
14021
14022 2004-12-18  Bruno Haible  <bruno@clisp.org>
14023
14024         * lib/fatal-signal.c (fatal_signals): Make non-const.
14025         (init_fatal_signals): New function.
14026         (uninstall_handlers, install_handlers): Ignore signals that were set to
14027         SIG_IGN.
14028         (at_fatal_signal): Call init_fatal_signals.
14029         (init_fatal_signal_set): Likewise. Ignore signals that were set to
14030         SIG_IGN.
14031         Reported by Paul Eggert.
14032
14033 2004-12-18  Bruno Haible  <bruno@clisp.org>
14034
14035         * doc/alloca.texi: New file.
14036         * doc/alloca-opt.texi: New file.
14037
14038 2004-12-17  Jim Meyering  <jim@meyering.net>
14039
14040         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
14041         Otherwise, install-sh could exit with improper exit status when
14042         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
14043
14044 2004-12-16  Simon Josefsson  <jas@extundo.com>
14045
14046         * tests/test-base64.c: Add license.
14047
14048 2004-12-15  Stepan Kasal  <address@hidden>
14049
14050         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
14051
14052 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
14053
14054         * modules/getcwd (Files): Add m4/d-ino.m4.
14055         Suggested by Mark D. Baushke.
14056
14057 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14058
14059         * lib/getdate.y (textint): New member "negative".
14060         (time_zone_hhmm): New function.
14061         Expect 14 shift-reduce conflicts, not 13.
14062         (o_colon_minutes): New rule.
14063         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
14064         (yylex): Set the "negative" member of signed numbers.
14065
14066 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14067
14068         * doc/getdate.texi (Time of day items, Time zone items):
14069         Describe new formats +00:00, UTC+00:00.
14070
14071 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14072
14073         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
14074         spurious "-l"s.  Problem reported by Stepan Kasal.
14075
14076 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
14077
14078         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
14079         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
14080
14081 2004-12-04  Simon Josefsson  <jas@extundo.com>
14082
14083         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
14084         Vandoorselaere <yoann@prelude-ids.org>.
14085
14086 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14087
14088         Changes imported from coreutils.
14089         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
14090         exist.
14091         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
14092
14093 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14094
14095         Changes imported from coreutils.
14096         * lib/hard-locale.c: Assume <locale.h> exists.
14097         Include "strdup.h".
14098         (GLIBC_VERSION): New macro.
14099         (hard_locale): Assume setlocale exists.
14100         Rewrite to avoid #ifdef.
14101         Use strdup rather than malloc + strcpy.
14102         * lib/human.c: Assume <locale.h> exists.
14103         (human_readable): Assume localeconv exists.
14104
14105 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14106
14107         * modules/hard-locale (Depends-on): Add strdup.
14108
14109 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
14110
14111         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
14112         convert T2, not T.  (Imported from libc.)
14113
14114 2004-11-30  Simon Josefsson  <jas@extundo.com>
14115
14116         * modules/restrict (License): Change to LGPL.
14117
14118 2004-11-30  Simon Josefsson  <jas@extundo.com>
14119
14120         * m4/restrict.m4: Add copyright and copying conditions.
14121
14122 2004-11-30  Simon Josefsson  <jas@extundo.com>
14123
14124         * m4/base64.m4: New file.
14125
14126 2004-11-30  Simon Josefsson  <jas@extundo.com>
14127
14128         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
14129         base64.
14130
14131         * tests/test-base64.c: New file.
14132
14133         * modules/base64: New file.
14134
14135 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14136
14137         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
14138         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
14139
14140         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
14141
14142 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14143
14144         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
14145         (__getcwd.c): Don't restore errno; glibc doesn't.
14146         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
14147         first, falling back to our code only if its results look suspicious.
14148         Ensure that the resulting buffer is only as large as necessary.
14149
14150         * lib/readutmp.c: Include readutmp.h first.
14151         Include <errno.h>, since readutmp.h no longer does that.
14152         * lib/readutmp.h: Don't include <errno.h>,
14153         <sys/param.h>, <time.h>; not needed to establish interface.
14154         (errno): Remove decl.
14155         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
14156         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
14157         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
14158
14159 2004-11-28  Simon Josefsson  <jas@extundo.com>
14160
14161         * lib/base64.h, base64.c: New file.
14162
14163 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
14164
14165         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
14166
14167 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
14168
14169         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
14170         (Depends-on): Remove pathmax, same.  Add mempcpy.
14171         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
14172         (Makefile.am): Append getcwd.h to lib_SOURCES.
14173         (Include): Add getcwd.h.
14174         (Maintainer): Change from Jim Meyering to "all, glibc",
14175         since getdate now uses intended-for-glibc code.
14176         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
14177         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
14178
14179 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14180
14181         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
14182         HP's ANSI C compiler.
14183         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
14184         Declaring int functions causes warnings on some modern systems and
14185         shouldn't be needed to compile on ancient ones.
14186         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
14187         defined.
14188
14189         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
14190         with the following changes.
14191         (__set_errno): Parenthesize properly.
14192         Include <stdbool.h>.
14193         (MIN, MAX, MATCHING_INO): New macros.
14194         (__getcwd): Define with prototype, not K&R form.
14195         Use heuristics to allocate default buffer on stack if possible.
14196         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
14197         behavior, and to avoid the PATH_MAX limit when computing
14198         ../../../../...
14199         Use MATCHING_INO to compare inode number to file.
14200         Check for arithmetic overflow in size calculations.
14201         Fix bug in reallocation of dot array that caused getcwd to fail
14202         on directories nested deeper than 75.
14203         Be more careful about saving errno on error.
14204         Do not use realloc; use only free+malloc, as this is a bit
14205         more flexible and avoids a needless copy operation.
14206         Do not inspect st_dev and st_ino for symbolic links; POSIX
14207         doesn't specify the latter.
14208         Check for closedir errors.
14209         Avoid needless casts.
14210         Use "#ifdef weak_alias" around weak_alias, to be like other
14211         glibc code.
14212         The following changes to getcwd.c have effect only when used in
14213         gnulib; they have no effect inside glibc proper.
14214         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
14215         as alloca isn't used.
14216         (alloca, __alloca): Likewise.
14217         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
14218         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
14219         unconditionally, as gnulib assumes C89 or better.
14220         Do not include <sys/param.h>.
14221         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
14222         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
14223         better.
14224         (NULL) [!defined NULL]: Remove; we assume C89 or better.
14225         Include <dirent.h> in a way that is compatible with modern Autoconf.
14226         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
14227         New macros, if not already defined.
14228         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
14229         Use "_LIBC", not "defined _LIBC", for consistency.
14230         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
14231         a mempcpy module.
14232         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
14233         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
14234         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
14235         credit only to Jim Meyering and adjust the copyright dates.
14236         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
14237         <stdlib.h>, <unistd.h>, "pathmax.h".
14238         Instead, include "xgetcwd.h" (first) and "getcwd.h".
14239         (INITIAL_BUFFER_SIZE): Remove.
14240         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
14241
14242 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14243
14244         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
14245         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
14246         Use the _ONCE methods, for efficiency.
14247         Check for fcntl.h.  In test program, include <errno.h>
14248         and <fcntl.h> if available.  Remove old K&R cruft from
14249         test program.  Check for common errors in GNU/Linux,
14250         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
14251         don't do AC_LIBOBJ, as that's getcwd.m4's job.
14252         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
14253         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
14254         name accordingly.
14255         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
14256         accommodate new getcwd.c.
14257         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
14258         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
14259         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
14260         that's all we need now.
14261
14262 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14263
14264         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
14265         argp-parse.c depends on getopt internals, that means we should
14266         always use our getopt, to be on the safe side.
14267         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
14268         order not to spoil the result of an eventual previous invocation
14269         of gl_GETOPT_SUBSTITUTE.
14270
14271 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14272
14273         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
14274         redefinition warnings. To avoid them, include the defines
14275         in `#if !defined __need_getopt ... #endif'. The only place
14276         where __getopt_argv_const is used is in definitions
14277         of getopt_long and getopt_long_only below, which are as well
14278         protected by `#ifndef __need_getopt'.
14279         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
14280         __need_getopt after including <stdio.h> and <unistd.h> These
14281         headers might have defined it.
14282
14283 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14284
14285         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
14286
14287 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14288
14289         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
14290         (futimens): New function, which uses futimes if available.
14291         (futimens, utimens): Support timespec==NULL, with same semantics
14292         as utime and utimens.
14293         * lib/utimens.h (futimens): New decl.
14294
14295 2004-11-23  Jim Meyering  <jim@meyering.net>
14296
14297         * lib/getopt_.h: Remove trailing blanks.
14298
14299 2004-11-23  Jim Meyering  <jim@meyering.net>
14300
14301         * lib/__fpending.c: Add comment.
14302
14303 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
14304
14305         * modules/canonicalize (Depends-on): Add xreadlink.
14306         Problem reported by James Youngman.
14307
14308 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
14309
14310         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
14311         New macros.
14312         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
14313         optopt): Use them instead of invoking ## directly; otherwise, the
14314         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
14315
14316 2004-11-19  Bruno Haible  <bruno@clisp.org>
14317
14318         * lib/strtok_r.c: Move comments from here...
14319         * lib/strtok_r.h: ... to here.
14320
14321 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14322
14323         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
14324         implementations that mishandle size_t overflow.
14325
14326 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14327
14328         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
14329         might fail.  Problem reported by Yoann Vandoorselaere.
14330         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
14331         implementations that mishandle size_t overflow.
14332
14333 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14334
14335         * modules/canon-host (Depends-on): Add strdup.
14336
14337 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14338
14339         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
14340
14341 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14342
14343         * lib/canon-host.c: Include "strdup.h".
14344         (canon_host): Use getaddrinfo if available, so that IPv6 works.
14345         Use strdup instead of malloc/strcpy to duplicate strings.
14346
14347         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
14348         (human_space_before_unit): New constant.
14349         * lib/human.c (human_readable): Support it.
14350
14351         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
14352         (xgetcwd): Set errno correctly when failing.
14353         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
14354         the failure is actually due to a PATH_MAX problem.
14355
14356         Further getopt changes to make it more likely that glibc will
14357         buy the changes back.
14358         * lib/getopt.c (POSIXLY_CORRECT): New constant.
14359         (getopt): Use it, so to preserve glibc semantic
14360         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
14361         when compiling for libc.
14362         * lib/getopt_.h (__getopt_argv_const): Bring it back.
14363         (getopt_long, getopt_long_only): Use it.
14364
14365         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14366         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
14367         (getopt): Argv is now char * const *, as per standard.
14368         (_getopt_internal_r, _getopt_internal): Argv is now char **,
14369         not char *__getopt_argv_const *.
14370         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14371         _getopt_long_only_r): Likewise.
14372         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
14373         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14374         _getopt_long_r, _getopt_long_only_r): Likewise.
14375         * lib/getopt_.h (__getopt_argv_const): Remove.
14376         (getopt): Argv is now char * const *, as per standard.
14377
14378         * lib/getdate.y (tORDINAL): New token.
14379         (day, relunit): Allow it for relative times.
14380         (relative_time_table): Use tORDINAL for ordinals.
14381
14382 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14383
14384         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
14385         Document that "second" isn't allowed as an ordinal number.
14386
14387 2004-11-16  Jim Meyering  <jim@meyering.net>
14388
14389         * modules/closeout (Depends-on): Add fpending.
14390
14391 2004-11-15  Jim Meyering  <jim@meyering.net>
14392
14393         * lib/closeout.c: Include "__fpending.h" once again.
14394         Include <stdbool.h>.
14395         (close_stdout): Don't fail just because stdout was closed initially,
14396         since some programs don't write to stdout in the normal course of
14397         operation (other than --version and --help), and we don't want this
14398         function to make e.g. `touch file >&-' fail.
14399         But do fail if it was closed and someone has tried to write to it.
14400         E.g., `printf foo >&-' must fail.
14401
14402 2004-11-13  Jim Meyering  <jim@meyering.net>
14403
14404         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
14405
14406 2004-11-12  Simon Josefsson  <jas@extundo.com>
14407
14408         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
14409         small doc fix is still pending.
14410
14411 2004-11-11  Simon Josefsson  <jas@extundo.com>
14412
14413         * modules/strtok_r: New file.
14414
14415         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14416         strtok_r.
14417
14418 2004-11-11  Simon Josefsson  <jas@extundo.com>
14419
14420         * m4/strtok_r.m4: New file.
14421
14422         * m4/getopt.m4: Replace opterr.
14423
14424 2004-11-11  Simon Josefsson  <jas@extundo.com>
14425
14426         * lib/strtok_r.h, strtok_r.c: New file.
14427
14428 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14429
14430         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
14431         of replacing opterr, getopt, etc.  This should handle the
14432         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
14433
14434 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14435
14436         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
14437         we can stop lying to compilers about the constness of argv when we
14438         are compiled outside glibc.
14439         (getopt, getopt_long, getopt_long_only): Use it.
14440         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14441         _getopt_internal, getopt): Likewise.
14442         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14443         _getopt_long_only_r): Likewise.
14444         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14445         _getopt_long_r, _getopt_long_only_r): Likewise.
14446
14447         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
14448         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
14449         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
14450         the other external symbols.
14451         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
14452         declaration, since the above renaming now works around collisions.
14453
14454 2004-11-11  Jim Meyering  <jim@meyering.net>
14455
14456         * lib/linebreak.c: Remove trailing blanks.
14457         * lib/alloca_.h: Likewise.
14458         * lib/acosl.c: Likewise.
14459         * lib/euidaccess.c: Likewise.
14460         * lib/allocsa.h: Likewise.
14461
14462 2004-11-10  Simon Josefsson  <jas@extundo.com>
14463
14464         * m4/getaddrinfo.m4: New file.
14465
14466 2004-11-10  Simon Josefsson  <jas@extundo.com>
14467
14468         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
14469
14470 2004-11-10  Simon Josefsson  <jas@extundo.com>
14471
14472         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14473         getaddrinfo.
14474
14475         * modules/getaddrinfo: New file.
14476
14477 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14478
14479         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
14480
14481 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14482
14483         * lib/mktime.c (SHR): New macro, which is a portable
14484         substitute for >> that should work even on Crays.
14485         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
14486         Problem reported by Mark D. Baushke in
14487         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
14488         * lib/getdate.y (SHR): Likewise.
14489         (tm_diff): Use it.
14490         * lib/strftime.c (SHR): Likewise.
14491         (tm_diff): Use it.
14492         * lib/quotearg.c (struct quoting_options): Use unsigned int for
14493         quote_these_too, so that right shifts are well defined.  All uses
14494         changed.
14495
14496 2004-11-10  Jim Meyering  <jim@meyering.net>
14497
14498         Ensure that no close failure goes unreported.
14499         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
14500         return early when it seems there's nothing to flush.
14501         Don't include __fpending.h.
14502
14503 2004-11-10  Jim Meyering  <jim@meyering.net>
14504
14505         * modules/closeout (Depends-on): Remove fpending.
14506
14507 2004-11-10  Jim Meyering  <jim@meyering.net>
14508
14509         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
14510
14511 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14512
14513         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
14514         gl_FUNC_STRFTIME.
14515         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
14516         and AC_REQUIRE when possible, to avoid duplicate checks.
14517         Check for <wchar.h>.
14518
14519 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14520
14521         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
14522
14523 2004-11-09  Bruno Haible  <bruno@clisp.org>
14524
14525         * m4/sockpfaf.m4: New file.
14526
14527 2004-11-05  Bruno Haible  <bruno@clisp.org>
14528
14529         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
14530         Reported by Mark D. Baushke <mdb@cvshome.org>.
14531
14532 2004-11-04  Bruno Haible  <bruno@clisp.org>
14533
14534         2004-09-11  Bruno Haible  <bruno@clisp.org>
14535                 * allocsa.valgrind: New file.
14536         2004-02-06  Bruno Haible  <bruno@clisp.org>
14537                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
14538                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
14539                 Reported by Christopher Seip <chris.seip@hp.com>.
14540
14541 2004-11-04  Bruno Haible  <bruno@clisp.org>
14542
14543         * modules/allocsa (Files): Add lib/allocsa.valgrind.
14544         (Makefile.am): Distribute it.
14545
14546 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
14547
14548         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
14549         with errno == ERANGE if the buffer is too small.
14550         Problem reported by Mark D. Baushke.
14551
14552 2004-11-03  Albert Chin  <china@thewrittenword.com>
14553             Paul Eggert  <eggert@cs.ucla.edu>
14554
14555         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
14556         equivalent, substitute $ac_type for equivalent type rather than
14557         blindly using uint32_t *always* which won't work if uint32_t is not
14558         available.  Define _UINT32_T to work around typedef of uint32_t if
14559         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
14560         2.5.1.
14561
14562 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14563
14564         * m4/jm-macros.m4: Sync from coreutils.
14565         (gl_MACROS): Check for mbrlen, for pathchk.
14566         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
14567
14568 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14569
14570         * lib/xreadlink.c (MAXSIZE): New macro.
14571         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
14572         size does not exceed MAXSIZE.  Avoid cast.
14573         As suggested by Mark D. Baushke in
14574         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
14575         if readlink fails with buffer size just under MAXSIZE, try again
14576         with MAXSIZE.
14577
14578 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14579
14580         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
14581
14582 2004-11-02  Derek R. Price  <derek@ximbiot.com>
14583         and  Paul Eggert  <eggert@cs.ucla.edu>
14584
14585         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
14586         (get_date): Overparenthesize to avoid GCC warning.
14587
14588 2004-11-02  Bruno Haible  <bruno@clisp.org>
14589
14590         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
14591         returns void.
14592
14593 2004-11-02  Bruno Haible  <bruno@clisp.org>
14594
14595         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
14596         function returns void.
14597
14598 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14599
14600         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
14601         fflush_unlocked, flockfile, funlockfile, funlockfile,
14602         fputs_unlocked, putc_unlocked.
14603
14604 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14605
14606         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14607         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
14608         already declared.
14609
14610 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14611
14612         * modules/getdate (Files): Add doc/getdate.texi.
14613         (Depends-on): Add setenv, xalloc.
14614
14615 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14616
14617         * lib/getdate.y: Add support for TZ="foo" within a date string.
14618         Fix some bugs near time_t boundaries.  Reject dates with
14619         out-of-range components, e.g., "Sept 31".
14620         Include <stdlib.h>, "setenv.h", "xalloc.h".
14621         (ISDIGIT_LOCALE): Remove; unused.
14622         Note that the TZ and time functions used here are not reentrant.
14623         (mktime_ok, get_tz): New functions.
14624         (TZBUFSIZE): New constant.
14625         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
14626         This requires that we sometimes generate our own TZ="XXX..." setting.
14627
14628 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14629
14630         * doc/getdate.texi: New file, from coreutils with modifications for
14631         the new TZ parsing.
14632
14633 2004-10-27  Derek R. Price  <derek@ximbiot.com>
14634
14635         * lib/mktime.c (not_equal_tm): Remove redundant check.
14636
14637 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14638
14639         * modules/regex (lib_SOURCES): Add regex.c.
14640         Reported by James Youngman in
14641         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
14642
14643 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14644
14645         * lib/getdate.y: Use Bison 1.875 features, and some minor
14646         code cleanups.  This change does not affect semantics.
14647         Don't include <stdlib.h>; no longer needed.
14648         Don't include unlocked-io.h; only the "#if TEST" code uses
14649         stdio, and performance isn't crucial there.
14650         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
14651         Bison 1.875 features as described below.
14652         All uses of "PC." replaced by "pc->".
14653         (YYSTYPE): Add a forward declaration.
14654         (yylex, yyerror): Use full prototypes in forward decls.
14655         Use "%pure-parser" rather than obsolescent "%pure_parser".
14656         Use %parse-param and %lex-param instead of obsolescent
14657         YYPARSE_PARAM and YYLEX_PARAM.
14658         (meridian_table, month_and_day_table, time_units_table,
14659         relative_time_table, time_zone_table, military_table,
14660         lookup_zone, lookup_word, get_date):
14661         Use NULL instead of 0 where appropriate.
14662         (to_hour): Avoid abort (), to avoid a dependency on
14663         stdlib.h.
14664         (yyerror, yylex): Now accepts parser_control * arg.
14665         (main) [TEST]: Use '\0' rather than 0 for char.
14666
14667 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14668
14669         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
14670
14671 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14672
14673         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
14674         It's now the caller's responsibility to handle the case where
14675         !HAVE_GETPAGESIZE && !defined getpagesize.
14676
14677         * lib/mktime.c (leapyear): Arg is long int, not int.
14678
14679 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
14680
14681         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
14682
14683 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
14684
14685         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
14686         missing.  Problem reported by James Youngman.
14687
14688 2004-10-16  Simon Josefsson  <jas@extundo.com>
14689
14690         * gnulib-tool: Fix comments.  Fix parse problem.
14691         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
14692
14693 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
14694
14695         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
14696         implementation of getopt_long.  Problem reported by Alexander Taler in:
14697         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
14698
14699 2004-10-15  Bruno Haible  <bruno@clisp.org>
14700
14701         * gnulib-tool: Untabify. Initialize supplied_libname.
14702         (func_usage): More homogenous output.
14703         (func_modules_transitive_closure, func_modules_to_filelist,
14704         func_emit_lib_Makefile_am): New functions.
14705         (func_import): New function, extracted from big case statement. Use
14706         func_get_license, func_modules_transitive_closure,
14707         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
14708         opt_lgpl. Don't use test -a, as it's not portable.
14709         (func_create_testdir): Use func_modules_transitive_closure,
14710         func_modules_to_filelist, func_emit_lib_Makefile_am.
14711
14712 2004-10-15  Bruno Haible  <bruno@clisp.org>
14713
14714         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
14715
14716 2004-10-15  Bruno Haible  <bruno@clisp.org>
14717
14718         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
14719         the portions belonging to each module.
14720         Suggested by Derek Robert Price <derek@ximbiot.com>.
14721
14722 2004-10-12  Simon Josefsson  <jas@extundo.com>
14723
14724         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14725         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
14726         to real functions.
14727
14728 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14729
14730         * modules/vsnprintf: New file.
14731
14732 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14733
14734         * m4/vsnprintf.m4: New file.
14735
14736 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14737
14738         * lib/vsnprintf.h: New file.
14739         * lib/vsnprintf.c: New file.
14740
14741 2004-10-11  Bruno Haible  <bruno@clisp.org>
14742
14743         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
14744         vsnprintf.
14745
14746 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
14747
14748         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
14749
14750 2004-10-07  Bruno Haible  <bruno@clisp.org>
14751
14752         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
14753         fits into the provided buffer.
14754
14755 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
14756
14757         * lib/diacrit.c, diacrit.h: Add GPL notice.
14758
14759         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
14760         notice.
14761         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
14762         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
14763         This avoids a potential constant-folding bug.
14764
14765 2004-10-05  Bruno Haible  <bruno@clisp.org>
14766
14767         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
14768         for the declaration of strsep.
14769
14770 2004-10-05  Bruno Haible  <bruno@clisp.org>
14771
14772         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
14773
14774 2004-10-04  Simon Josefsson  <jas@extundo.com>
14775
14776         * modules/memmem: New file.
14777         * tests/test-memmem.c: New file.
14778         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
14779
14780 2004-10-04  Simon Josefsson  <jas@extundo.com>
14781
14782         * m4/memmem.m4: New file.
14783
14784 2004-10-04  Simon Josefsson  <jas@extundo.com>
14785
14786         * lib/memmem.h: New file.
14787         * lib/memmem.c: New file, taken from glibc.
14788
14789 2004-10-04  Simon Josefsson  <jas@extundo.com>
14790
14791         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
14792         '#ifdef USE_UNLOCKED_IO'.
14793
14794 2004-10-04  Simon Josefsson  <jas@extundo.com>
14795
14796         * config/srclist.txt: Add memmem from glibc.
14797
14798 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14799
14800         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
14801
14802         * modules/argmatch, modules/argp, modules/closeout, modules/error,
14803         modules/exclude, modules/getdate, modules/getline,
14804         modules/getndelim2, modules/getpass, modules/getpass-gnu,
14805         modules/getusershell, modules/linebuffer, modules/md5,
14806         modules/mountlist, modules/posixtm, modules/readtokens,
14807         modules/readutmp, modules/regex, modules/sha1,
14808         modules/version-etc, modules/yesno:
14809         Remove dependency on unlocked-io.
14810
14811 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14812
14813         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
14814
14815         * m4/unlocked-io.m4: Add copyright notice.
14816         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
14817
14818 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14819
14820         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
14821         * lib/xmalloc.c (xmemdup): Likewise.
14822         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
14823         XFREE): Remove these long-obsolescent macros.
14824         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
14825         * lib/xstrdup.c: Remove.
14826
14827         * lib/regex.c (re_comp): Cast gettext return value to char *,
14828         Problem reported by Martin Neitzel via Mark D. Baushke.
14829
14830 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14831
14832         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
14833         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
14834         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
14835         regex.c, sha1.c, version-etc.c, yesno.c:
14836         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
14837         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
14838         the includer's responsibility.
14839
14840         Sync from coreutils.
14841
14842         * lib/modechange.c (mode_compile): Don't decrement a pointer that
14843         points to the start of a string, as the C Standard says the
14844         resulting behavior is undefined.
14845
14846         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
14847         simple -> simple_backups, numbered_existing ->
14848         numbered_existing_backups, numbered -> numbered_backups
14849         to avoid shadowing problems.  All uses changed.
14850         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
14851         * lib/backupfile.c (check_extension, numbered_backup):
14852         Rename locals to avoid shadowing 'basename'.
14853         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
14854         once.
14855
14856         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
14857         * lib/.cvsignore: Add getopt.h.
14858
14859 2004-10-04  Bruno Haible  <bruno@clisp.org>
14860
14861         * modules/README: New file.
14862         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
14863         not a module.
14864
14865 2004-10-02  Jim Meyering  <jim@meyering.net>
14866
14867         * lib/dirfd.h, getpagesize.h: Add copyright notice.
14868
14869 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14870
14871         * modules/strsep: New file.
14872
14873 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14874
14875         * m4/strsep.m4: New file.
14876
14877 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14878
14879         * lib/strsep.h: New file.
14880         * lib/strsep.c: New file.
14881
14882 2004-10-01  Simon Josefsson  <jas@extundo.com>
14883
14884         * lib/snprintf.c (snprintf): Handle size==0.
14885
14886 2004-10-01  Simon Josefsson  <jas@extundo.com>
14887             Bruno Haible  <bruno@clisp.org>
14888
14889         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
14890         (snprintf): Declare 'args'.
14891
14892 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
14893
14894         * lib/snprintf.c: Remove comments as to why each header is needed.
14895
14896 2004-10-01  Bruno Haible  <bruno@clisp.org>
14897
14898         * MODULES.html.sh: Add strsep.
14899
14900 2004-09-30  Simon Josefsson  <jas@extundo.com>
14901
14902         * modules/snprintf: New file.
14903
14904 2004-09-30  Simon Josefsson  <jas@extundo.com>
14905
14906         * m4/snprintf.m4: New file.
14907
14908 2004-09-30  Simon Josefsson  <jas@extundo.com>
14909
14910         * lib/snprintf.h, lib/snprintf.c: New files.
14911
14912 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14913
14914         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
14915         (hol_entry_help): Never translate an empty string.
14916         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
14917         * lib/argp.h (OPTION_NO_TRANS): New option.
14918
14919 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14920
14921         * modules/argp (Maintainer): Replace Simon Josefsson
14922         by Sergey Poznyakoff.
14923
14924 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14925
14926         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
14927         changes merged back into glibc.
14928
14929 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14930
14931         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
14932
14933 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
14934
14935         * lib/xvasprintf.c: Include xalloc.h.
14936         (xvasprintf): Use xalloc_die, not xmalloc_die.
14937
14938 2004-09-29  Bruno Haible  <bruno@clisp.org>
14939
14940         * modules/alloca-opt: New file, derived from modules/alloca.
14941         * modules/allocsa: Depend on alloca-opt instead of alloca.
14942         * modules/setenv: Likewise.
14943         * modules/vasnprintf: Likewise.
14944         * MODULES.html.sh: Add alloca-opt.
14945
14946 2004-09-28  Simon Josefsson  <jas@extundo.com>
14947
14948         * gnulib-tool: New parameter --lgpl, to asseert that modules are
14949         LGPL, and to replace license template from GPL to LGPL.
14950
14951 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14952
14953         * modules/dummy: Change license to LGPL.
14954
14955 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14956
14957         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
14958
14959 2004-09-24  Simon Josefsson  <jas@extundo.com>
14960
14961         * modules/minmax (License): Change from GPL to LGPL.
14962
14963 2004-09-23  Simon Josefsson  <jas@extundo.com>
14964
14965         * gnulib-tool (--import): Typo.
14966
14967 2004-09-23  Simon Josefsson  <jas@extundo.com>
14968
14969         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
14970
14971 2004-09-22  Bruno Haible  <bruno@clisp.org>
14972
14973         * modules/*: Add 'License' field.
14974         * gnulib-tool: Accept --extract-license option.
14975         (func_get_license): New function.
14976
14977 2004-09-21  Bruno Haible  <bruno@clisp.org>
14978
14979         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
14980         Reported by Simon Josefsson.
14981
14982 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14983
14984         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
14985         gl_AC_TYPE_LONG_LONG.
14986
14987 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14988
14989         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
14990
14991 2004-09-18  Simon Josefsson  <jas@extundo.com>
14992         and  Paul Eggert  <eggert@cs.ucla.edu>
14993
14994         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
14995         calls with autoreconf.  Define GL_LIB.
14996
14997 2004-09-14  Karl Berry  <karl@gnu.org>
14998
14999         * config/srclist.txt: unsync setenv.c, sigh.
15000
15001 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15002
15003         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
15004         Problem reported by Bruno Haible in:
15005         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
15006
15007 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15008
15009         * config/srclist.txt: Comment out argp-pvh.c.
15010
15011 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
15012
15013         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
15014         in case some system header has #define'd it.  Problem reported by
15015         Soeren D. Schulze in
15016         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
15017
15018 2004-09-09  Karl Berry  <karl@gnu.org>
15019
15020         * regex.[ch]: delete from the root.  These were supposed to be
15021                 synced with emacs cvs, but this has not happened for about
15022                 a year, and anyway nothing else uses emacs regex.[ch].
15023                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
15024                 lib/regex[.ch] is untouched.
15025
15026 2004-09-09  Bruno Haible  <bruno@clisp.org>
15027
15028         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
15029
15030 2004-09-09  Bruno Haible  <bruno@clisp.org>
15031
15032         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
15033         modifications.
15034         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
15035
15036 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15037
15038         * modules/xvasprintf: New file.
15039         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
15040
15041 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15042
15043         * lib/xvasprintf.h: New file.
15044         * lib/xvasprintf.c: New file.
15045         * lib/xasprintf.c: New file.
15046
15047 2004-09-08  Bruno Haible  <bruno@clisp.org>
15048
15049         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
15050
15051 2004-09-08  Bruno Haible  <bruno@clisp.org>
15052
15053         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
15054         length is > INT_MAX.
15055         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
15056         more.
15057
15058 2004-09-08  Bruno Haible  <bruno@clisp.org>
15059
15060         * lib/stdint_.h: New file, taken from GNU clisp.
15061
15062 2004-09-08  Bruno Haible  <bruno@clisp.org>
15063             Oskar Liljeblad  <oskar@osk.mine.nu>
15064
15065         * modules/stdint: New file.
15066         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
15067
15068 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15069
15070         Import from coreutils.
15071         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
15072         strings on unbounded length.  alloca's performance benefits aren't
15073         that important here.
15074         (V_STRDUP): Remove.
15075         (parse_with_separator): New function, with most of the internals
15076         of the old parse_user_spec.  Allow user to omit both user and group,
15077         for compatibility with FreeBSD.
15078         Clone only the user name, not the entire spec.
15079         Do not set *uid, *gid unless entirely successful.
15080         Avoid memory leak in some failing cases.
15081         Fix regression for USER.GROUP reported by Dmitry V. Levin in
15082         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
15083         (parse_user_spec): Rewrite to use parse_with_separator.
15084
15085 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15086
15087         * modules/userspec: Don't depend on alloca.
15088
15089 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15090
15091         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
15092
15093 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15094
15095         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
15096         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
15097         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
15098
15099 2004-08-16  Simon Josefsson  <jas@extundo.com>
15100
15101         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
15102         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
15103         Add --dry-run for --import.
15104         Let user provided command line parameters override configure.ac
15105         settings.
15106
15107 2004-08-12  Simon Josefsson  <jas@extundo.com>
15108
15109         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
15110         as discussed with Paul Eggert in threads rooted at
15111         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
15112         and
15113         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
15114         Before, the test was empty, and relied on ELIDE_CODE in source
15115         code.)
15116         (gl_PREREQ_GETOPT): New macro.
15117         (gl_GETOPT): Use them.
15118
15119 2004-08-12  Simon Josefsson  <jas@extundo.com>
15120
15121         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
15122         * lib/getopt_.h: Renamed from getopt.h.
15123
15124 2004-08-12  Simon Josefsson  <jas@extundo.com>
15125
15126         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
15127         Change default library name from libfoo to libgnu.
15128         Now, if you have a configure.ac that says:
15129                 gl_SOURCE_BASE(gl)
15130                 gl_M4_BASE(gl/m4)
15131                 gl_MODULES(error getopt etcetera)
15132                 gl_INIT
15133         you can import all you need by running:
15134                 ../gnulib/gnulib-tool --import
15135
15136         * modules/getopt (Files): Rename getopt.h to getopt_.h.
15137         (Makefile.am): Rewrite, use logic from argz.
15138         (Include): Use <getopt.h> instead of "getopt.h".
15139
15140 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15141
15142         * modules/argp (Files): Add m4/unlocked-io.m4.
15143         (Depends-on): Add extensions.
15144
15145 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15146
15147         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
15148         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
15149         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
15150         Check for program_invocation_name, program_invocation_short_name,
15151         flockfile, funlockfile, features.h, _getopt_long_only_r.
15152
15153 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15154
15155         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
15156         its complicated substitute.
15157         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
15158         and program_invocation_name.
15159         (__argp_basename) [!_LIBC]: Remove; the only use was
15160         replaced by its body.
15161         (__argp_short_program_name): Change condition from
15162         !defined __argp_short_program_name to
15163         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
15164         to match argp-namefrob.h.
15165         (__argp_failure): Don't assume strerror_r returns char *.
15166         * lib/argp-parse.c (N_): Define unconditionally.
15167         (argp_default_options): Fill out initializers with 0 to avoid
15168         gcc warnings.
15169
15170 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15171
15172         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
15173         getopt1.c.
15174
15175 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15176
15177         Merge from coreutils.
15178
15179         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
15180
15181         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
15182         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
15183
15184 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15185
15186         Merge from coreutils.
15187
15188         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
15189         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
15190         for Reliant Unix 5.43.
15191
15192         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
15193         (union fooround): Use uintmax_t, not long int.
15194         The rest is a merge from libc:
15195         [defined _LIBC]: Include <shlib-compat.h>.
15196         (_obstack) [defined _LIBC]: Remove after 2.3.4.
15197
15198         * lib/settime.c (settime): Recode to avoid warning with
15199         Sun Forte C 6U2.
15200
15201         * lib/strverscmp.c: Convert to UTF-8.
15202
15203 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15204
15205         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15206         m4/uintmax_t.m4.
15207
15208 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15209
15210         * modules/xalloc-die: New file.
15211         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
15212
15213         * modules/md5 (Files): Add m4/uint32_t.m4.
15214         * modules/sha1: Renamed from modules/sha.
15215         (Files):
15216         Rename lib/sha.h to lib/sha1.h.
15217         Rename lib/sha.c to lib/sha1.c.
15218         Rename m4/sha.m4 to m4/sha1.m4.
15219         (lib_SOURCES): Likewise.
15220         (configure.ac): Rename gl_SHA to gl_SHA1.
15221         (Include): sha.h -> sha1.h.
15222
15223 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15224
15225         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
15226         * m4/sha1.m4: Renamed from sha.m4.
15227         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
15228
15229 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15230
15231         * lib/obstack.h (obstack_empty_p):
15232         Don't assume that chunk->contents is suitably aligned.
15233         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
15234         Likewise. Problem reported by Benno in
15235         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
15236
15237         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
15238         readable.  This could be improved further but it'd take some work.
15239
15240 2004-08-08  Simon Josefsson  <jas@extundo.com>
15241
15242         * modules/xgethostname (Depends-on): Remove exit and error (not
15243         used).
15244
15245         * modules/getpass-gnu: Add getpass.h.
15246         (Depends-on): Add stdbool.
15247         * modules/getpass: Add getpass.h.
15248
15249 2004-08-08  Simon Josefsson  <jas@extundo.com>
15250
15251         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
15252         Check getpass declaration.
15253
15254 2004-08-08  Simon Josefsson  <jas@extundo.com>
15255
15256         * lib/xgethostname.c: Don't include error.h (not used).
15257
15258         * lib/getpass.h: Add.
15259         * lib/getpass.c: Include getpass.h first.
15260
15261 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
15262
15263         * lib/xalloc-die.c: New file.
15264         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
15265         All uses removed.
15266         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
15267         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
15268         xalloc-die.c.
15269         (_, N_, xalloc_die): Move to xalloc-die.c.
15270         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
15271         so that we needn't mess with xalloc_msg_memory_exhausted.
15272
15273         * lib/sha1.h: Renamed from sha.h.
15274         (SHA1_H): Renamed from _SHA_H.
15275         (sha1_ctx): Renamed from sha_ctx.
15276         (sha1_init_ctx): Renamed from sha_init_ctx.
15277         (sha1_process_block): Renamed from sha_process_block.
15278         (sha1_process_bytes): Renamed from sha_process_bytes.
15279         (sha1_finish_ctx): Renamed from sha_finish_ctx.
15280         (sha1_read_ctx): Renamed from sha_read_ctx.
15281         (sha1_stream): Renamed from sha_stream.
15282         (sha1_buffer): Renamed from sha_buffer.
15283         * lib/sha1.c: Likewise; renamed from sha.c.
15284         Do not include <sys/types.h>.
15285         Include <stddef.h> rather than <stdlib.h>.
15286
15287 2004-08-08  Bruno Haible  <bruno@clisp.org>
15288
15289         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
15290         FILESYSTEM_PREFIX_LEN.
15291         * lib/progreloc.c: Likewise.
15292         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
15293
15294 2004-08-06  Simon Josefsson  <jas@extundo.com>
15295
15296         * modules/progname (Depends-on): Don't depend on stdbool.
15297
15298 2004-08-06  Simon Josefsson  <jas@extundo.com>
15299
15300         * modules/getsubopt: New file.
15301         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15302         getsubopt.
15303
15304 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15305
15306         More merge from coreutils.
15307
15308         * m4/utimens.m4, m4/utimecmp.m4: New files.
15309         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
15310         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
15311         prereq.m4, sha.m4: Import changes from coreutils.
15312
15313 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15314
15315         More merge from coreutils.
15316         * modules/raise, modules/readtokens0, modules/utimens:
15317         * modules/utimecmp, module/xnanosleep: New files.
15318         * modules/strftime: Add lib/strftime.h.
15319         Change include from <time.h> to "strftime.h".
15320         * modules/yesno: Add lib/yesno.h.
15321         * modules/backupfile: Remove lib/addext.c.
15322         * modules/euidaccess: Add stat-macros.h.
15323         * modules/canonicalize, modules/euidaccess,
15324         modules/filemode, modules/lchown, modules/makepath,
15325         modules/rmdir, modules/stat: Likewise.
15326
15327 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15328
15329         Merge from tar.
15330         * lib/argp-help.c (make_hol, hol_append): Don't assume that
15331         SIZE_MAX is a valid preprocessor constant.
15332         (__argp_basename): Change from "#ifndef _LIBC"
15333         to "#ifndef __argp_short_program_name", so that
15334         we don't compile these functions for tar.
15335
15336         More merges from coreutils.
15337         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
15338         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
15339         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
15340         * lib/addext.c: Remove; no longer needed.
15341         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
15342         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
15343         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
15344         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
15345         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
15346         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
15347         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
15348         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
15349         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
15350         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15351         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
15352         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
15353         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
15354         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
15355         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
15356         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
15357         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
15358         Import changes from coreutils.
15359
15360 2004-08-05  Simon Josefsson  <jas@extundo.com>
15361
15362         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
15363
15364 2004-08-05  Simon Josefsson  <jas@extundo.com>
15365
15366         * m4/getsubopt.m4: New file.
15367
15368 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15369
15370         Merge from coreutils.
15371
15372         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
15373         * m4/getcwd-path-max.m4: New files.
15374
15375         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
15376         FILESYSTEM_PREFIX_LEN ->
15377         FILE_SYSTEM_PREFIX_LEN.
15378         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
15379         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
15380         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
15381         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
15382
15383         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
15384         prerequisite modules now handle the DOS stuff.
15385         Don't check for unistd.h.
15386
15387 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15388
15389         Merge from coreutils.
15390
15391         * lib/.gdb-history: Remove; this doesn't belong here.
15392
15393         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
15394         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
15395         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
15396         * lib/getcwd.c: New files.
15397
15398         * lib/dirname.h: Include <stdbool.h>.
15399         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
15400         for consistency with POSIX terminology.  All uses changed.
15401         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
15402         (strip_trailing_slashes): Use bool for booleans.
15403         * lib/stripslash.c (strip_trailing_slashes): Likewise.
15404
15405         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
15406         sometimes returns a positive errno value even when it succeeds.
15407         (print_errno_message) [!LIBC]: Fall back on strerror if
15408         __strerror_r fails.
15409
15410         * lib/path-concat.c (mempcpy): Don't define if a system header defines
15411         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
15412         (longest_relative_suffix): New function.
15413         (path_concat): Use it.  Assume first argument is not NULL.
15414         Port to DOS.  Omit redundant separators.
15415         Report an error instead of returning NULL.
15416         Use mempcpy instead of memcpy.
15417         (xpath_concat): Remove: not declared or used.
15418
15419         * lib/same.h: Include <stdbool.h>
15420         (same_name): Return bool, not int.
15421         * lib/same.c (same_name): Likewise.
15422         (errno): Don't declare; we assume C89 or better now.
15423
15424         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
15425         if not already defined.
15426
15427         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
15428         * lib/dup-safer.c (errno): Likewise.
15429
15430 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15431
15432         Merge from coreutils.
15433         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
15434         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
15435         * modules/path-concat: Don't depend on strdup.
15436
15437 2004-08-03  Simon Josefsson  <jas@extundo.com>
15438
15439         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
15440         * lib/progname.h: Don't include stdbool.h.
15441
15442 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15443
15444         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
15445         * MODULES.html.sh (func_all_modules): Remove fatal.
15446
15447 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15448
15449         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
15450
15451 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15452
15453         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
15454         working.
15455
15456 2004-08-02  Simon Josefsson  <jas@extundo.com>
15457
15458         * lib/getsubopt.h: New file, with comments from Bruno Haible.
15459         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
15460         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
15461
15462 2004-08-01  Simon Josefsson  <jas@extundo.com>
15463
15464         * lib/xgetdomainname.c: Include stdlib.h, for free().
15465
15466 2004-07-19  Bruno Haible  <bruno@clisp.org>
15467
15468         * MODULES.html.sh (func_all_modules): Add dummy.
15469
15470 2004-07-16  Simon Josefsson  <jas@extundo.com>
15471
15472         * modules/dummy: New file.
15473
15474 2004-07-16  Simon Josefsson  <jas@extundo.com>
15475
15476         * lib/dummy.c: New file.
15477
15478 2004-07-16  Bruno Haible  <bruno@clisp.org>
15479
15480         * lib/backupfile.h: Add extern "C" for C++.
15481         * lib/closeout.h: Likewise.
15482         * lib/copy-file.h: Likewise.
15483         * lib/findprog.h: Likewise.
15484         * lib/full-write.h: Likewise.
15485         * lib/pathname.h: Likewise.
15486         * lib/progname.h: Likewise.
15487         * lib/stpcpy.h: Likewise.
15488         * lib/stpncpy.h: Likewise.
15489         * lib/strcase.h: Likewise.
15490         * lib/strstr.h: Likewise.
15491         * lib/xalloc.h: Likewise.
15492
15493         * lib/mbswidth.h: Add extern "C" for C++.
15494         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
15495
15496 2004-07-13  Robert Millan  <robertmh@gnu.org>
15497
15498         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
15499
15500 2004-07-09  Simon Josefsson  <jas@extundo.com>
15501
15502         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
15503         failed without this.)
15504
15505 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15506
15507         * modules/chown (Files): Add lib/fchown-stub.c, since
15508         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
15509
15510 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15511
15512         * lib/fchown-stub.c: New file.
15513
15514 2004-06-24  Jim Meyering  <jim@meyering.net>
15515
15516         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
15517
15518 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15519
15520         * modules/argz: Omit "#include".
15521
15522         * MODULES.html.sh (func_all_modules): Add calloc, to match
15523         2004-06-01 addition of calloc module.
15524
15525 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15526
15527         * m4/argz.m4: New file, which is autoupdated from libtool.
15528
15529 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15530
15531         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
15532         libtool.
15533
15534 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15535
15536         * config/srclist-update: Don't insist on "USA." before the
15537         close-comment, as libtool omits the period and puts the */ on a
15538         separate line.
15539         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
15540         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
15541
15542 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
15543
15544         * modules/argz: New file.
15545         * MODULES.html.sh (func_all_modules): Add argz.
15546
15547 2004-06-12  Jim Meyering  <jim@meyering.net>
15548         and  Paul Eggert  <eggert@cs.ucla.edu>
15549
15550         * modules/hash (Files): Add lib/xalloc.h.
15551         * modules/pipe (Depends-on): Add wait-process.
15552         * modules/stat (Depends-on): Add xalloc.
15553         * modules/userspec (Files): Add lib/userspec.h.
15554         * modules/xstrto
15555
15556         Upgrade from gettext-0.13.
15557         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
15558         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
15559         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
15560
15561 2004-06-10  Jim Meyering  <jim@meyering.net>
15562
15563         * lib/calloc.c: New file.
15564
15565 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
15566
15567         * lib/getdate.y (yylex): Allow space between sign and number.
15568         Problem reported by Dan Jacobson.
15569
15570 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15571
15572         Merge from coreutils CVS.
15573
15574         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
15575         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
15576         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
15577         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
15578         xstrtol.m4: Fix copyright date and/or serial number.
15579
15580         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
15581         See if we need an fchown replacement.
15582         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
15583         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
15584         and use the replacement function if we detect either defect.
15585
15586         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
15587         gl_UTIMECMP.
15588
15589 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15590         and  Jim Meyering  <jim@meyering.net>
15591
15592         Merge from coreutils CVS.
15593
15594         * lib/stat-macros.h: New file, with contents from file-type.h
15595         and coreutils' system.h.
15596         * lib/file-type.c: Include "stat-macros.h".
15597         * lib/file-type.h (file_type): Move all macro definitions to new file,
15598         stat-macros.h.
15599
15600         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
15601         Wrap old code with this conditional.
15602         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
15603         function that does not dereference symlinks.
15604         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
15605
15606         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
15607         dependency problems.
15608         (xreadlink): Accept new arg SIZE, for efficiency.
15609         All decls and uses changed.
15610         * lib/xreadlink.h: Include <stddef.h>, for size_t.
15611
15612         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
15613         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
15614
15615         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
15616         sysexits.h.
15617
15618 2004-06-01  Jim Meyering  <jim@meyering.net>
15619
15620         * m4/calloc.m4: New file.
15621
15622 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
15623
15624         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
15625         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
15626         Also, fix a typo in a diagnostic.
15627
15628 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15629
15630         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
15631         or AC_FUNC_REALLOC.
15632
15633 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15634
15635         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
15636         macros to be defined.
15637         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
15638         the allocator returns NULL because the requested size is zero.
15639
15640 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15641
15642         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
15643         var.  Add comment explaining why libc still defines it.  This
15644         merges the following patch from glibc:
15645         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
15646
15647 2004-05-20  Andreas Schwab  <schwab@suse.de>
15648
15649         * m4/free.m4: Replace free if it not known to work, not the other
15650         way round.
15651
15652 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15653
15654         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
15655         present in glibc since revision 1.1 of this file.
15656         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
15657         obstack_alignment_mask, obstack_alloc, obstack_base,
15658         obstack_blank, obstack_blank_fast, obstack_chunk_size,
15659         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
15660         obstack_grow0, obstack_init, obstack_int_grow,
15661         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
15662         obstack_next_free, obstack_object_size, obstack_ptr_grow,
15663         obstack_ptr_grow_fast, obstack_room): Remove declarations of
15664         nonexistent functions.
15665
15666 2004-05-18  Karl Berry  <karl@gnu.org>
15667
15668         * config/srclist.txt: break link for vasnprintf.c.
15669
15670 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15671
15672         Port obstack to the AS/400, where pointers are 16 bytes wide and
15673         you cannot cast an integer to a valid pointer.  This patch is
15674         currently waiting to be integrated into glibc; see
15675         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
15676
15677         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
15678         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
15679         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
15680         (struct obstack): temp member is now a union of a pointer and
15681         an integer, instead of an integer.  All integer uses changed.
15682         This does not affect the physical layout of struct obstack,
15683         except on hosts (like the AS/400) where the size or alignment of
15684         void * is greater than that of ptrdiff_t.
15685         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
15686         __STDC__)]: Store temporary in pointer member of union, not
15687         integer member.
15688         * lib/obstack.c: Include <stddef.h>, for offsetof.
15689         (struct fooalign): Remove; it doesn't need a name.
15690         (union fooround): Change double to long double, and add void *.
15691         (DEFAULT_ALIGNMENT): Use offsetof to compute.
15692         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
15693         not a macro.  Hence the values are always int; so remove all
15694         casts-to-int in uses.
15695
15696 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15697
15698         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
15699         we can get this patch merged into glibc.
15700
15701 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15702             Paul Eggert  <eggert@cs.ucla.edu>
15703
15704         * m4/argp: Depend on alloca.
15705
15706 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15707             Paul Eggert  <eggert@cs.ucla.edu>
15708
15709         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
15710         freecoding.
15711
15712 2004-05-17  Bruno Haible  <bruno@clisp.org>
15713
15714         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
15715         precision that consists of a '.' followed by an empty digit string.
15716         Patch by Tor Lillqvist <tml@iki.fi>.
15717
15718 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15719
15720         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
15721         for backward compatibility with older code.  We need our own
15722         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
15723         it under some other name, and our alloca.h will define it.
15724
15725 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15726             Derek Price  <derek@ximbiot.com>
15727
15728         * lib/alloca.c: Include <alloca.h>, to get our interface.
15729         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
15730         include <alloca.h> first.  Use C89 prototype for alloca; this
15731         requires including <stddef.h> for size_t.  Use extern "C" if C++.
15732         Use #elif for simplicity, since we can assume C89 now.
15733         Don't try to source the system alloca.h since it will not be found
15734         and to prevent recursively including its replacement.
15735         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
15736         * lib/regex.c: Likewise.
15737
15738 2004-05-16  Derek Price  <derek@ximbiot.com>
15739             Paul Eggert  <eggert@cs.ucla.edu>
15740
15741         getline cleanup.  This changes the getndelim2 API: both order of
15742         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
15743         no delimiter).
15744
15745         * lib/getline.c: Don't include stddef.h or stdio.h, since our
15746         interface does that.
15747         (getline): Always use getdelim, so that we don't have two
15748         copies of this code.
15749         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
15750         if available.
15751         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
15752         (GETNDELIM2_MAXIMUM): New macro.
15753         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
15754         instead of the old practice of delim2==0.  All callers changed.
15755         Return -1 on overflow, instead of returning junk.
15756         Do not set *linesize unless allocation succeeds.
15757         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
15758         that we include sys/types.h.
15759         * lib/getnline.h: Likewise.
15760         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
15761         (getndelim2): Reorder arguments.
15762         * lib/getnline.c (getnline, getndelim):
15763         Don't discard the NMAX argument.
15764         (getnline): Invoke getndelim, to avoid code duplication.
15765         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
15766         of (size_t) -1 by callers of the getnline family.
15767
15768 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15769
15770         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
15771         Check for gettimeofday.
15772         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
15773         Check for settimeofday, stime.
15774
15775 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15776
15777         * lib/nanosleep.c (suspended): Change its type from int to
15778         sig_atomic_t volatile.
15779         (first_call): Make it private to rpl_nanosleep, and have it
15780         be zero initially as that's a bit faster.
15781         (my_usleep): Round up fractional times instead of truncating them,
15782         as this is the usual meaning for 'sleep'.
15783
15784         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
15785         doesn't work.
15786         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
15787         (ENOSYS): Define if not defined.
15788         (settime): Fall back on stime if it exists and settimeofday fails.
15789         But don't bother with fallbacks if a method fails with errno == EPERM.
15790
15791 2004-05-11  Jim Meyering  <jim@meyering.net>
15792
15793         Prior to this change, the save_cwd caller required read access to the
15794         current directory on most systems (ones with the fchdir function).
15795
15796         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
15797         fails, try write-only, and finally, resort to using xgetcwd.
15798
15799 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
15800
15801         * lib/obstack.c, obstack.h: Import changes from libc.
15802
15803 2004-04-28  Bruno Haible  <bruno@clisp.org>
15804
15805         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
15806         also implicitly appends .exe to executables.
15807         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
15808         accepts Windows pathnames.
15809         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
15810         Treat Cygwin like Windows, since it now accepts Windows pathnames.
15811         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
15812         Treat Cygwin like Windows, since it now accepts Windows pathnames.
15813         Reported by Derek Robert Price <derek@ximbiot.com>.
15814
15815 2004-04-21  Karl Berry  <karl@gnu.org>
15816
15817         * config/srclist.txt (localcharset.c): break sync.
15818
15819 2004-04-20  Paul Eggert  <eggert@twinsun.com>
15820
15821         * m4/host-os.m4: Add a copyright notice.
15822
15823 2004-04-20  Jim Meyering  <jim@meyering.net>
15824
15825         Change UTILS_ to gl_ in AC_DEFINE'd names.
15826         Change utils_- and jm_-prefixed variables, too.
15827         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
15828         UTILS_FUNC_MKDIR_TRAILING_SLASH.
15829         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
15830
15831         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
15832         Don't emit trailing blanks.
15833         Also rename jm_-prefixed variables to have gl_ prefix.
15834
15835         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
15836         Also rename jm_-prefixed variables to have gl_ prefix.
15837
15838         * m4/jm-macros.m4: Reflect the renamings.
15839         * m4/prereq.m4: Likewise.
15840
15841 2004-04-20  Jim Meyering  <jim@meyering.net>
15842
15843         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
15844         memory.
15845
15846 2004-04-20  Jim Meyering  <jim@meyering.net>
15847             Bruno Haible  <bruno@clisp.org>
15848
15849         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
15850         memory when realloc fails.
15851
15852 2004-04-19  Jim Meyering  <jim@meyering.net>
15853
15854         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
15855         now that readutmp.c may call `free (0)'.
15856
15857 2004-04-19  Bruno Haible  <bruno@clisp.org>
15858
15859         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
15860         * m4/inttypes_h.m4: Likewise.
15861         * m4/stdint_h.m4: Likewise.
15862         * m4/intmax_t.m4: Likewise.
15863         * m4/uintmax_t.m4: Likewise.
15864
15865 2004-04-18  Jim Meyering  <jim@meyering.net>
15866
15867         * m4/prereq.m4: Don't forbid jm_ prefix.
15868
15869         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
15870         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
15871         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
15872         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
15873         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
15874         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
15875         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
15876         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
15877         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
15878         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
15879         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
15880         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
15881         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
15882         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
15883         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
15884         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
15885         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
15886         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
15887         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
15888
15889 2004-04-18  Jim Meyering  <jim@meyering.net>
15890
15891         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
15892         failure, don't leak memory and do call END_UTMP_ENT.
15893
15894 2004-04-16  Jim Meyering  <jim@meyering.net>
15895
15896         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
15897         coreutils' stat program.
15898         (gl_PREREQ): Don't require jm_PREREQ_STAT.
15899
15900 2004-04-11  Paul Eggert  <eggert@twinsun.com>
15901
15902         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
15903         C89.
15904         (CHAR_BIT): Remove, since we assume C89.
15905         Include <stdint.h> if available, as per current Autoconf CVS advice.
15906
15907 2004-03-31  Jim Meyering  <jim@meyering.net>
15908
15909         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
15910         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
15911         * m4/xalloc.m4: Likewise.
15912
15913 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15914
15915         Merge from coreutils.
15916
15917         * m4/inttostr.m4: New file.
15918         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
15919         Require AM_STDBOOL_H and gl_TIMESPEC instead.
15920         Require gl_CLOCK_TIME.
15921         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
15922
15923 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15924
15925         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
15926         not bool, to be more consistent with Unix conventions.
15927         Suggested by Bruno Haible.
15928
15929         Merge from coreutils.
15930
15931         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
15932         * lib/umaxtostr.c: New files.
15933
15934         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
15935         the usual <time.h> dance.
15936         (get_date): Change signature to support fractional time stamps.
15937         All callers changed.
15938         * lib/getdate.y: Include "getdate.h" first, as we can now
15939         assume C89 and don't need to worry about 'const'.
15940         Similarly, include "unlocked-io.h" near start, not in middle.
15941         Include <limits.h>.
15942         (textint.value): Use long int rather than int.
15943         (textint.digits): Use size_t rather than int.
15944         (BILLION, LOG10_BILLION): New constants.
15945         (parser_control): New member rel_ns.  Members day_ordinal,
15946         time_zone, month, day, hour, minutes, rel_year, rel_month,
15947         rel_day, rel_hour, rel_minutes, rel_seconds
15948         are now long int, not int.  Member seconds is now struct timespec,
15949         not int.  New member timespec_seen.  Members dates_seen, days_seen,
15950         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
15951         not int.
15952         (%union.intval): Now long int, not int.
15953         New member timespec.
15954         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
15955         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
15956         (spec): Now is a timespec or an item list.
15957         (timespec, items): New nonterminals.
15958         (time, rel, relunit, number, get_date):
15959         Add support for fractional seconds.
15960         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
15961         (gmtime, localtime, mktime): Remove decls; not needed with C89.
15962         (to_hour): First arg is now long int, not int.
15963         (to_year): Returns long int, not int.
15964         Don't treat year -70 like 70.
15965         (tm_diff): Returns long int, not int.
15966         (lookup_word): Use bool instead of int when appropriate.
15967         (yylex): Use size_t for count, not int.
15968         Detect overflow when parsing large integer constants.
15969         Add support for fractions.
15970         (get_date): Make pointers 'const' if possible.
15971         Use more-portable code to detect integer overflow.
15972         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
15973         Don't use ctime; it's not reliable if the year has >4 digits.
15974
15975         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
15976         This is for compatibility with BSD.
15977
15978         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
15979         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
15980         From coreutils' system.h.
15981
15982         * lib/userspec.c: Don't include "posixver.h".
15983         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
15984         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
15985         compatible extension.  Simplify code by removing a boolean int
15986         that was always nonzero if a string was nonnull.
15987
15988 2004-03-30  Jim Meyering  <jim@meyering.net>
15989
15990         Merge from coreutils.
15991
15992         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
15993         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
15994         on some systems one must include <grp.h> before it.
15995         Reported by Christian Krackowizer.
15996
15997 2004-03-30  Jim Meyering  <jim@meyering.net>
15998
15999         Merge from coreutils.
16000
16001         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
16002
16003         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
16004         an empty input stream.
16005
16006         * lib/readtokens.c: Include <stdbool.h>.
16007         (readtoken): Use `size_t' rather than int/long.
16008         All callers adjusted.
16009         Use `bool' rather than `int' where appropriate.
16010         Use memset rather than an explicit loop.
16011         Use x2nrealloc rather than xrealloc.
16012         Allow the use of `\0' as a delimiter.
16013         (readtokens): Likewise.
16014         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
16015
16016 2004-03-30  Jim Meyering  <jim@meyering.net>
16017
16018         * m4/realloc.m4: Remove file, since now it does no more than
16019         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
16020         the `configure.ac' section of module/realloc.
16021         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
16022
16023 2004-03-30  Bruno Haible  <bruno@clisp.org>
16024
16025         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
16026         nonnull.
16027
16028 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16029
16030         Merge changes to getloadavg.c from coreutils and Emacs.
16031
16032         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
16033         Define to an expression, not to the empty string.
16034         Include cloexec.h and xalloc.h.
16035         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
16036         Use set_cloexec_flag rather than rolling our own.
16037         * lib/cloexec.c, lib/cloexec.h: New files.
16038
16039 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16040
16041         * m4/cloexec.m4: New file.
16042
16043 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16044
16045         * lib/getopt.h: Sync with libc CVS.
16046
16047 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16048             Bruno Haible  <bruno@clisp.org>
16049
16050         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
16051         mbswidth.
16052
16053 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16054             Bruno Haible  <bruno@clisp.org>
16055
16056         * lib/mbswidth.h: Include <wchar.h> only if
16057         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
16058         <wchar.h>.
16059         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
16060
16061 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16062
16063         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
16064         Sync with libc CVS.
16065         * lib/getopt_int.h: New file, also synced from libc.
16066
16067 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16068
16069         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
16070         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
16071         Bring back getopt.c, getopt.h, getopt1.c.
16072
16073 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16074
16075         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
16076         All uses changed.  Check for sa_sigaction member; this fixes
16077         a bug first reported by Jason Andrade in
16078         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16079
16080 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16081
16082         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
16083         '#if' expressions.  Unlike the code it replaces, it does not
16084         depend on (defined _SC_PAGESIZE).  However, it does depend on
16085         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
16086         first reported by Jason Andrade in
16087         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16088
16089 2004-02-25  Simon Josefsson  <jas@extundo.com>
16090
16091         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
16092
16093 2004-02-25  Simon Josefsson  <jas@extundo.com>
16094
16095         * lib/strdup.h: New file.
16096         * lib/strdup.c: Include it.
16097         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
16098         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
16099
16100 2004-02-23  Karl Berry  <karl@gnu.org>
16101
16102         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
16103         (from fencepost.gnu.org:/gd/gnuorg).
16104
16105 2004-02-23  Karl Berry  <karl@gnu.org>
16106
16107         * config/srclistvars.sh (GNUORG) [karl]: redefine.
16108         * config/srclist.txt: add maintain/standards documents.
16109
16110 2004-02-18  Bruno Haible  <bruno@clisp.org>
16111
16112         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
16113         Reported by Derek Robert Price <derek@ximbiot.com>.
16114
16115 2004-02-16  Karl Berry  <karl@gnu.org>
16116
16117         * config/mkinstalldirs, install-sh: update from automake.
16118
16119 2004-02-06  Karl Berry  <karl@gnu.org>
16120
16121         * m4/po.m4: update from gettext 0.14.1.
16122
16123 2004-02-06  Karl Berry  <karl@gnu.org>
16124
16125         * lib/config.charset: update from gettext 0.14.1.
16126
16127 2004-02-05  Paul Eggert  <eggert@twinsun.com>
16128
16129         Add comments and code, prompted by suggestions from Bruno Haible
16130         for sh-quote.
16131         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
16132         describing the enum quoting_style values.
16133         * lib/quotearg.c (quotearg_alloc): New function.
16134         (quotearg_buffer_restyled): Treat lone { and } as special.
16135         Treat = as special.  Work around bug with older shells
16136         that "see" a '\' that is really the 2nd byte of a multibyte char.
16137         Quote empty string with shell_quoting_style.
16138
16139 2004-02-03  Bruno Haible  <bruno@clisp.org>
16140
16141         * m4/pipe.m4: New file, from GNU gettext.
16142
16143 2004-02-03  Bruno Haible  <bruno@clisp.org>
16144
16145         * lib/pipe.h: New file, from GNU gettext.
16146         * lib/pipe.c: New file, from GNU gettext.
16147
16148 2004-01-27  Bruno Haible  <bruno@clisp.org>
16149
16150         * m4/execute.m4: New file, from GNU gettext.
16151
16152 2004-01-27  Bruno Haible  <bruno@clisp.org>
16153
16154         * lib/execute.h: New file, from GNU gettext.
16155         * lib/execute.c: New file, from GNU gettext.
16156         * lib/w32spawn.h: New file, from GNU gettext.
16157
16158 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16159
16160         Merge from diffutils.
16161
16162         * lib/file-type.c (file_type): Add typed memory objects.
16163         * lib/file-type.h (S_TYPEISTMO): New macro.
16164
16165         * lib/c-stack.h (c_stack_action): Remove argv argument.
16166         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
16167         (die): Don't calculate message unless segv_action returns.
16168         (get_stack_location, min_address_from_argv, max_address_from_argv,
16169         volatile stack_base, volatile_stack_size): Remove.
16170         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
16171         that every segmentation violation is a stack overflow.  (Ouch!)
16172         See Debian bug 136249 (still outstanding) for more info about why
16173         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
16174
16175 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16176
16177         Exit-status fix from coreutils.
16178
16179         Use exit_failure consistently in place of EXIT_FAILURE,
16180         so that program exit statuses are consistent on failure.
16181
16182         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
16183         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
16184         * lib/argmatch.h: Comment fix to match the above.
16185         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
16186         Now a macro referring to exit_failure, instead of a separate
16187         variable.  Include "exitfail.h" to get it.
16188         * lib/xstrtol.h: Include "exitfail.h".
16189         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
16190
16191         * lib/long-options.c (parse_long_options): Use prototype
16192         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
16193         for clarity.
16194
16195 2004-01-21  Jim Meyering  <jim@meyering.net>
16196
16197         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
16198         so as not to conflict with a different-sized __mktime_internal
16199         function in GNU libc.
16200         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
16201         Problem building statically-linked `ls' reported by Michael Brunnbauer.
16202
16203 2004-01-20  Karl Berry  <karl@gnu.org>
16204
16205         * config/config.guess: update from config.
16206
16207         * config/srclistvars.sh: GNUWWWLICENSES for karl.
16208
16209 2004-01-20  Bruno Haible  <bruno@clisp.org>
16210
16211         Safer stack allocation.
16212         * lib/setenv.c: Include allocsa.h.
16213         (alloca): Remove fallback definition.
16214         (freea): Remove macro.
16215         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
16216         instead of freea.
16217
16218 2004-01-20  Bruno Haible  <bruno@clisp.org>
16219
16220         * m4/eealloc.m4: New file, from GNU gettext.
16221
16222 2004-01-20  Bruno Haible  <bruno@clisp.org>
16223
16224         * m4/allocsa.m4: New file, from GNU gettext.
16225
16226 2004-01-20  Bruno Haible  <bruno@clisp.org>
16227
16228         * lib/xallocsa.h: New file, from GNU gettext.
16229         * lib/xallocsa.c: New file, from GNU gettext.
16230
16231 2004-01-20  Bruno Haible  <bruno@clisp.org>
16232
16233         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
16234
16235 2004-01-20  Bruno Haible  <bruno@clisp.org>
16236
16237         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
16238         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
16239         specially.
16240
16241 2004-01-20  Bruno Haible  <bruno@clisp.org>
16242
16243         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
16244         patch.
16245
16246 2004-01-20  Bruno Haible  <bruno@clisp.org>
16247
16248         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
16249
16250 2004-01-20  Bruno Haible  <bruno@clisp.org>
16251
16252         * lib/eealloc.h: New file.
16253
16254 2004-01-20  Bruno Haible  <bruno@clisp.org>
16255
16256         * lib/binary-io.h: Avoid warnings on Cygwin.
16257
16258 2004-01-20  Bruno Haible  <bruno@clisp.org>
16259
16260         * lib/allocsa.h: New file, from GNU gettext.
16261         * lib/allocsa.c: New file, from GNU gettext.
16262
16263 2004-01-18  Karl Berry  <karl@gnu.org>
16264
16265         * doc/gpl.texi, doc/lgpl.texi: new files.
16266
16267 2004-01-18  Karl Berry  <karl@gnu.org>
16268
16269         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
16270         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
16271
16272 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16273
16274         Merge from coreutils.
16275
16276         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
16277         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
16278         (gl_DEFAULT_POSIX2_VERSION): Move
16279         the documentation from 'configure' into 'config.hin',
16280         so that 'configure --help' isn't burdened by it and
16281         we don't have to worry about its formatting there.
16282         Reword the documentation so that it's more succinct
16283         and can be run together into a single paragraph.
16284         * m4/same.m4 (gl_SAME): Check for pathconf.
16285
16286 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16287
16288         Merge from coreutils.
16289
16290         * lib/posixver.c: Include posixver.h.
16291
16292         * lib/same.c: Include <stdbool.h>, <limits.h>.
16293         (_POSIX_NAME_MAX): Define if not defined.
16294         (MIN): New macro.
16295         (same_name): If file names are silently truncated, report
16296         that the file names are the same if they are the same after
16297         the silent truncation.
16298
16299         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
16300         conversion function.
16301         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
16302         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
16303         longer needed.
16304
16305 2004-01-15  Jim Meyering  <jim@meyering.net>
16306
16307         Merge from coreutils.
16308
16309         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
16310         if no library is required.
16311         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
16312         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
16313         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
16314         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
16315         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
16316         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
16317         value, $ac_cv_search_crypt, if it's "none required".
16318         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
16319         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
16320         not gl_FUNC_GETLOADAVG.
16321         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
16322         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
16323
16324 2004-01-15  Jim Meyering  <jim@meyering.net>
16325
16326         Merge from coreutils.
16327
16328         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
16329         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
16330         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
16331
16332         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
16333         optional configure-time default.
16334
16335         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16336
16337         * lib/xreadlink.c (xreadlink): Correct outdated comment.
16338
16339 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
16340
16341         Merge from coreutils.
16342
16343         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
16344         value, $ac_cv_search_nanosleep, if it's "none required".
16345
16346 2004-01-14  Paul Eggert  <eggert@twinsun.com>
16347
16348         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
16349         with like-named macro in fnmatch.c.
16350         (EXT): Use an internal constant instead.
16351
16352         Merge fnmatch patches from glibc.
16353         * lib/fnmatch.c (mbsinit): Remove define.
16354         Add libc_hidden_ver (__fnmatch, fnmatch).
16355         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
16356         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
16357
16358 2004-01-14  Karl Berry  <karl@gnu.org>
16359
16360         * config/install-sh: update from automake.
16361
16362 2004-01-13  Karl Berry  <karl@gnu.org>
16363
16364         * config/install-sh: update from automake.
16365
16366 2004-01-09  Karl Berry  <karl@gnu.org>
16367
16368         * config/install-sh: update from automake.
16369
16370 2004-01-05  Karl Berry  <karl@gnu.org>
16371
16372         * config/config.{sub,guess}: update from config.
16373
16374 2003-12-31  Karl Berry  <karl@gnu.org>
16375
16376         * config/depcomp: update from automake.
16377
16378 2003-12-14  Karl Berry  <karl@gnu.org>
16379
16380         * lib/config.charset: update from gettext-runtime.
16381
16382 2003-12-03  Paul Eggert  <eggert@twinsun.com>
16383
16384         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
16385         Bug reported by Alfred M. Szmidt.
16386
16387 2003-12-03  Bruno Haible  <bruno@clisp.org>
16388
16389         * m4/gettext.m4: Upgrade from gettext-0.13.
16390         * m4/po.m4: Upgrade from gettext-0.13.
16391         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
16392         * m4/intmax.m4: New file, from gettext-0.13.
16393         * m4/printf-posix.m4: New file, from gettext-0.13.
16394
16395 2003-11-29  Karl Berry  <karl@gnu.org>
16396
16397         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
16398
16399 2003-11-25  Paul Eggert  <eggert@twinsun.com>
16400             Bruno Haible  <bruno@clisp.org>
16401
16402         * lib/printf-parse.h: Don't include sys/types.h.
16403         (ARG_NONE): New macro.
16404         (char_directive): Change type of *arg_index fields to size_t.
16405         * lib/printf-parse.c: Don't include sys/types.h.
16406         (SSIZE_MAX): Remove macro.
16407         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
16408         Remove unnecessary overflow check.
16409         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
16410         fields.
16411
16412 2003-11-25  Bruno Haible  <bruno@clisp.org>
16413
16414         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
16415
16416 2003-11-25  Bruno Haible  <bruno@clisp.org>
16417
16418         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
16419         gt_TYPE_SSIZE_T.
16420
16421 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16422
16423         * modules/alloca: Remove dependency on xalloc.
16424
16425 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16426
16427         * lib/alloca.c: Remove dependency on xalloc module.
16428         (xalloc_die): Remove.
16429         (memory_full) [!defined emacs]: New macro.
16430         [!defined emacs]: Don't include xalloc.h.
16431         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
16432         address arithmetic overflows.  Change datatypes a bit to avoid
16433         unnecessary casts.
16434
16435 2003-11-22  Jim Meyering  <jim@meyering.net>
16436
16437         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
16438         s/size/size_t/.
16439
16440 2003-11-21  Karl Berry  <karl@gnu.org>
16441
16442         * config/config.{sub,guess}: update from config.
16443
16444 2003-11-18  Karl Berry  <karl@gnu.org>
16445
16446         * config/config.{sub,guess}: update from config.
16447
16448         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
16449
16450 2003-11-17  Paul Eggert  <eggert@twinsun.com>
16451
16452         * README: Mention that S+T cannot overflow if S is the size of
16453         an existing object and T is sufficiently small.
16454
16455 2003-11-17  Jim Meyering  <jim@meyering.net>
16456
16457         On systems without utime and without a utimes function capable of
16458         dealing with a NULL struct utimbuf* argument, this utime replacement
16459         could -- in unusual circumstances -- leak a file descriptor.
16460         * lib/utime.c: Include <unistd.h> and <errno.h>.
16461         (utime_null): Be sure to close `fd' and to preserve errno.
16462         Reported by Geoff Collyer via Arnold Robbins.
16463
16464 2003-11-17  Bruno Haible  <bruno@clisp.org>
16465
16466         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
16467         (Depends-on): Add xsize.
16468
16469 2003-11-17  Bruno Haible  <bruno@clisp.org>
16470
16471         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
16472
16473 2003-11-17  Bruno Haible  <bruno@clisp.org>
16474
16475         * lib/vasnprintf.c (alloca): Remove fallback definition.
16476         (freea): Remove definition.
16477         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
16478         Reported by Paul Eggert.
16479
16480 2003-11-16  Paul Eggert  <eggert@twinsun.com>
16481             Bruno Haible  <bruno@clisp.org>
16482
16483         Protect against address arithmetic overflow.
16484         * lib/printf-args.h: Include stddef.h.
16485         (arguments): Change type of field 'count' to size_t.
16486         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
16487         'unsigned int' where appropriate.
16488         * lib/printf-parse.h: Include sys/types.h.
16489         (char_directive): Change type of *arg_index fields to ssize_t.
16490         (char_directives): Change type of fields 'count', max_*_length to
16491         size_t.
16492         * lib/printf-parse.c: Include sys/types.h and xsize.h.
16493         (SSIZE_MAX): Define fallback value.
16494         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
16495         instead of 'int' where appropriate. Check a_allocated, d_allocated
16496         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
16497         * lib/vasnprintf.c: Include xsize.h.
16498         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
16499         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
16500         overflow. Avoid wraparound when converting a width or precision from
16501         decimal to binary.
16502
16503 2003-11-16  Bruno Haible  <bruno@clisp.org>
16504
16505         Update from GNU gettext.
16506         * lib/printf-parse.c: Generalize to it can be compiled for wide
16507         strings.
16508         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
16509         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
16510         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
16511         SNPRINTF): New macros.
16512         Don't include <alloca.h> if the file is used inside libintl.
16513         (local_wcslen): New function, for Solaris 2.5.1.
16514         (VASNPRINTF): Use it instead of wcslen.
16515
16516 2003-11-16  Bruno Haible  <bruno@clisp.org>
16517
16518         * lib/xsize.h (xmax): New function.
16519         (xsum, xsum3, xsum4): Declare as "pure" functions.
16520
16521 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16522
16523         * modules/xalloc (Files): Undo latest change, since xalloc.h
16524         no longer needs SIZE_MAX or PTRDIFF_MAX.
16525
16526 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16527
16528         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
16529         gl_PTRDIFF_MAX.
16530
16531 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16532
16533         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
16534         "return", to pacify some unknown compiler.  Problem reported
16535         by Joerg Schilling.
16536
16537 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16538
16539         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
16540         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
16541         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
16542         heuristic is just as accurate as far as we know, and it removes a
16543         dependency on size_max.m4 and ptrdiff_max.m4.
16544
16545 2003-11-11  Bruno Haible  <bruno@clisp.org>
16546
16547         * modules/xsize (Files): Add m4/size_max.m4.
16548         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
16549
16550 2003-11-11  Bruno Haible  <bruno@clisp.org>
16551
16552         * m4/size_max.m4: New file.
16553         * m4/ptrdiff_max.m4: New file.
16554         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
16555         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
16556         (gl_XALLOC): Invoke it.
16557
16558 2003-11-11  Bruno Haible  <bruno@clisp.org>
16559
16560         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
16561         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
16562         defined.
16563
16564 2003-11-10  Paul Eggert  <eggert@twinsun.com>
16565
16566         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
16567         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
16568         rejected some allocations of exactly SIZE_MAX - 2 bytes.
16569         From Bruno Haible.
16570         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
16571         not (size_t) -1, since it's defined here.
16572
16573 2003-11-09  Karl Berry  <karl@gnu.org>
16574
16575         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
16576
16577 2003-11-06  Paul Eggert  <eggert@twinsun.com>
16578
16579         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
16580         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
16581         Reject sizes of exactly SIZE_MAX bytes.
16582         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
16583         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
16584
16585 2003-11-05  Bruno Haible  <bruno@clisp.org>
16586
16587         * lib/xsize.h: Include limits.h, to avoid a possible collision with
16588         SIZE_MAX defined in <limits.h> on Solaris.
16589
16590 2003-11-04  Jim Meyering  <jim@meyering.net>
16591
16592         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
16593         variable names, rather than @VAR@.
16594         * modules/poll: Likewise.
16595
16596 2003-11-04  Bruno Haible  <bruno@clisp.org>
16597
16598         * modules/xsize: New file.
16599         * modules/linebreak: Depend on xsize.
16600         * MODULES.html.sh (func_all_modules): Add xsize.
16601
16602 2003-11-04  Bruno Haible  <bruno@clisp.org>
16603
16604         * m4/xsize.m4: New file.
16605
16606 2003-11-04  Bruno Haible  <bruno@clisp.org>
16607
16608         * lib/xsize.h: New file.
16609         * lib/linebreak.c: Include xsize.h.
16610         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
16611         argument for overflow.
16612         Suggested by Paul Eggert.
16613
16614 2003-11-03  Karl Berry  <karl@gnu.org>
16615
16616         * config/config.{guess,sub}: update from config.
16617
16618 2003-11-03  Jim Meyering  <jim@meyering.net>
16619
16620         * modules/userspec (lib_SOURCES): Add userspec.h.
16621         (Include): Add "userspec.h".
16622         Improve description.
16623
16624 2003-11-03  Jim Meyering  <jim@meyering.net>
16625
16626         * lib/userspec.c: Include "userspec.h".
16627         * lib/userspec.h: New file.
16628
16629 2003-11-03  Bruno Haible  <bruno@clisp.org>
16630
16631         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
16632
16633 2003-11-03  Bruno Haible  <bruno@clisp.org>
16634
16635         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
16636         available, to avoid (extremely rare) race condition.
16637         Suggested by Paul Eggert.
16638
16639 2003-11-02  Karl Berry  <karl@gnu.org>
16640
16641         * config/srclist.txt (vasprintf.c): sync broken, sigh.
16642
16643 2003-10-31  Paul Eggert  <eggert@twinsun.com>
16644
16645         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
16646         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
16647         (read_filesystem_list): Set and use me_type_malloced.
16648         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
16649         whatever the type happens to be), for brevity and consistency.
16650         Check for size calculation overflow on Alphas running OSF/1.
16651
16652 2003-10-31  Jim Meyering  <jim@meyering.net>
16653
16654         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
16655
16656         * lib/linebuffer.c: Include <string.h> for declaration of memset.
16657
16658 2003-10-30  Paul Eggert  <eggert@twinsun.com>
16659             Bruno Haible  <bruno@clisp.org>
16660
16661         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
16662         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
16663
16664 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16665
16666         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
16667         netbsd*-gnu*.  Suggested by Robert Millan.
16668
16669 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16670
16671         * modules/group-member: Depend on stdbool.
16672
16673 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16674
16675         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
16676
16677 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16678
16679         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
16680         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
16681         after the 'gnu' in these cases.  This fixes some bugs in the
16682         previous change, and is based on suggestions by Robert Millan.
16683
16684 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16685
16686         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
16687         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
16688         no longer needed.
16689         * lib/quotearg.c (quotearg_n_options): Use it.
16690         * lib/group-member.c: Include <stdbool.h>.
16691         (free_group_info): Arg is now const *; don't free arg.
16692         (get_group_info): Now returns bool and accepts struct group_info *,
16693         rather than returning a malloc'ed struct group_info *.
16694         All uses changed.  Check for overflow in internal size calculation.
16695
16696         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
16697         rather than xmalloc/xrealloc.
16698         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
16699         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
16700         conformance bug: the old code used a pointer after freeing the
16701         storage that it addressed.
16702         * lib/hash.c (hash_initialize): Simplify the code by using
16703         xalloc_oversized rather than doing it by hand.
16704         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
16705         the buffer preserved.  Use free and xmalloc instead.
16706         * lib/quotearg.c (quotearg_n_options): Likewise.
16707         Use a simpler test for size overflow.  Don't use xalloc_oversized
16708         because unsigned int might be wider than size_t (!); this suggests
16709         that we should switch from unsigned int to size_t for slot numbers.
16710
16711 2003-10-28  Paul Eggert  <eggert@twinsun.com>
16712
16713         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
16714         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
16715         NetBSD kernels.  Requested by Richard Stallman.
16716
16717 2003-10-27  Paul Eggert  <eggert@twinsun.com>
16718
16719         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
16720         to allocate the returned structure.  Do not allocate a subarray,
16721         as x2nrealloc will do that.
16722         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
16723         instead of xnrealloc.
16724         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
16725
16726 2003-10-27  Bruno Haible  <bruno@clisp.org>
16727
16728         * lib/stdbool_.h: Better support for BeOS.
16729
16730 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16731
16732         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
16733         now uses inline.
16734
16735 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16736
16737         * lib/xalloc.h (xalloc_oversized): New static inline function, for
16738         callers that want to do their own size-overflow checking.  Include
16739         <stdbool.h>, since xalloc_oversized returns bool.
16740         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
16741         to use xalloc_oversized.
16742
16743         Add two functions x2realloc, x2nrealloc, for programs that grow
16744         arrays dynamically by doubling their sizes.
16745         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
16746         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
16747         New functions.
16748
16749         Port to C99 semantics for 'inline' of external functions.
16750         Bug reported by Bruno Haible.
16751         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
16752         with the old contents of xnmalloc.
16753         (xnmalloc, xmalloc): Use it.
16754         (xnrealloc_inline): New static inline function,
16755         with the old contents of xnrealloc.
16756         (xnrealloc, xrealloc): Use it.
16757
16758         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
16759         that.
16760
16761 2003-10-26  Karl Berry  <karl@gnu.org>
16762
16763         * config/srclist.txt (COPYING.DOC): no longer available from
16764         /gd/gnuorg; don't know where the ultimate source is.
16765
16766 2003-10-25  Paul Eggert  <eggert@twinsun.com>
16767
16768         Fix several address-calculation bugs in the hash modules,
16769         plus some minor code cleanup.
16770
16771         * lib/hash.h: Include <stdbool.h>, for bool.
16772         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
16773         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
16774         hash_get_n_entries, hash_get_max_bucket_length,
16775         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
16776         hash_rehash): Use size_t rather than unsigned.
16777         * lib/hash.c (struct hash_table, hash_get_n_buckets,
16778         hash_get_n_buckets_used, hash_get_n_entries,
16779         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
16780         hash_get_entries, hash_do_for_each, hash_string, is_prime,
16781         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
16782         Likewise.
16783         (SIZE_MAX): Define if not defined.
16784         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
16785         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
16786         hash_print):
16787         Use const * when possible.
16788         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
16789         (check_tuning): Fix bug: if tuning parameters were very close to
16790         0 or 1, rounding errors could have caused subscript violations.
16791         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
16792         (hash_initialize): Add 'fail:' label
16793         to free table and return NULL, and use it to simplify code.
16794         Use calloc rather than clearing the storage ourself.
16795         (hash_initialize, hash_rehash): Check for arithmetic overflow in
16796         buffer size calculations.
16797         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
16798         Include <stddef.h>, for size_t.
16799         * lib/hash-pjw.c (hash_pjw): Likewise.
16800         Switch to method described by Bruno Haible.
16801         Include <limits.h>, for CHAR_BIT.
16802         (SIZE_BITS): New macro.
16803
16804 2003-10-23  Paul Eggert  <eggert@twinsun.com>
16805
16806         * m4/getline.m4 (AM_FUNC_GETLINE):
16807         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
16808         hosts.  Problem reported by Derek Robert Price in
16809         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
16810         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
16811         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
16812
16813 2003-10-21  Paul Eggert  <eggert@twinsun.com>
16814
16815         * lib/getndelim2.c (getndelim2): When size calculation overflows,
16816         ceiling the allocation at NMAX bytes rather than silently
16817         discarding input bytes before NMAX is reached.  This makes
16818         a difference only if NMAX exceeds SIZE_MAX / 2.
16819
16820         * lib/obstack.c: Merge from glibc.
16821         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
16822         Add libc_hidden_def (_obstack_newchunk).
16823         (_obstack_free) [! defined _LIBC]: Remove.
16824         [defined _LIBC]: Make a strong alias from obstack_free, rather than
16825         a clone of the function body.
16826         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
16827         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
16828
16829         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
16830         glibc.
16831         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
16832         arg to memcpy.
16833
16834         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
16835         (obstack_ptr_grow_fast, obstack_int_grow_fast):
16836         Don't use lvalue casts, as GCC plans to remove support for them
16837         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
16838         was also present in the non-GCC version, indicating that this
16839         code had always been buggy and had never been widely used.
16840         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
16841         Use the fast variant of each macro, rather than copying the
16842         definiens of the fast variant; that way, we'll be more likely to
16843         catch future bugs in the fast variants.
16844
16845 2003-10-20  Bruno Haible  <bruno@clisp.org>
16846
16847         * modules/wait-process: New file.
16848         * MODULES.html.sh (func_all_modules): Add wait-process.
16849
16850 2003-10-20  Bruno Haible  <bruno@clisp.org>
16851
16852         * m4/wait-process.m4: New file.
16853
16854 2003-10-20  Bruno Haible  <bruno@clisp.org>
16855
16856         * lib/wait-process.h: New file, from GNU gettext.
16857         * lib/wait-process.c: New file, from GNU gettext.
16858
16859 2003-10-19  Jim Meyering  <jim@meyering.net>
16860
16861         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
16862         HPUX 10.20.
16863
16864 2003-10-18  Karl Berry  <karl@gnu.org>
16865
16866         * config/config.guess: update from config.
16867
16868 2003-10-16  Paul Eggert  <eggert@twinsun.com>
16869
16870         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
16871         (getgroups): First arg is int, not size_t.
16872         Don't let 'free' mangle errno.
16873
16874 2003-10-16  Paul Eggert  <eggert@twinsun.com>
16875
16876         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
16877
16878 2003-10-16  Karl Berry  <karl@gnu.org>
16879
16880         * config/config.{guess,sub}: update from config.
16881
16882 2003-10-16  Jim Meyering  <jim@meyering.net>
16883
16884         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
16885         memcpy.
16886
16887 2003-10-15  Paul Eggert  <eggert@twinsun.com>
16888
16889         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
16890         (SIZE_MAX): Remove.
16891         (new_exclude, add_exclude_file): Initial size no longer needs to
16892         be a power of 2.
16893         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
16894         our own address arithmetic overflow checking.
16895
16896         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
16897         (fnmatch): Do not alloca more than 2000 wide characters;
16898         instead, use malloc for large buffers.
16899         Check for address arithmetic overflow, and return -1
16900         with errno set to ENOMEM in that case.
16901         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
16902         (NEW_PATTERN): Do not alloca more than 8000 bytes;
16903         instead, return -1.  Check for address arithmetic overflow.
16904
16905 2003-10-14  Paul Eggert  <eggert@twinsun.com>
16906
16907         Handle invalid suffixes and overflow independently, so that
16908         callers can treat them independently as needed.  Fix some bugs in
16909         suffix handling, e.g., "100k@" was not diagnosed as an invalid
16910         suffix for a human-readable blocksize.  The major caller-visible
16911         change is the addition of a new
16912         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
16913         that both overflow and suffix chars were found.
16914
16915         * lib/human.c (humblock): Don't check separately for invalid suffix
16916         char; that is xstrtoumax's job (now that its bug is fixed).
16917         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
16918         INTMAX_MAX]: New macros.
16919         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
16920         TYPE_MAXIMUM): New macros.
16921         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
16922         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
16923         if overflow occurs, as it's what __strtol does and it's more useful
16924         in practice.
16925         (__xstrtol): If __strtol reports some error other than ERANGE,
16926         reflect it to the caller as LONGINT_INVALID.  If it reports
16927         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
16928         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
16929         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
16930         value.
16931         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
16932         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
16933         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
16934         [defined UINTMAX_MAX]: New macros.
16935
16936 2003-10-14  Bruno Haible  <bruno@clisp.org>
16937
16938         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
16939
16940 2003-10-14  Bruno Haible  <bruno@clisp.org>
16941
16942         * m4/sig_atomic_t: New file, from GNU gettext.
16943         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
16944
16945 2003-10-14  Bruno Haible  <bruno@clisp.org>
16946
16947         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
16948         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
16949         Also use volatile where needed.
16950
16951 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16952
16953         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
16954         Change maintainer from Bruno Haible to 'all'.
16955
16956 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16957
16958         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
16959
16960 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16961
16962         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
16963         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
16964         and define in terms of the other primitives.
16965         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
16966         (SIZE_MAX): Define if not already defined.
16967         (array_size_overflow): New function.
16968         (xalloc_die): Abort instead of exiting if 'error' returns.
16969         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
16970         (xmalloc, xrealloc): Use them.
16971         (xcalloc): Check for address arithmetic overflow.
16972         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
16973         a bit faster than strcpy.
16974
16975 2003-10-10  Simon Josefsson  <jas@extundo.com>
16976
16977         * modules/argp (Depends-on): Add restrict and strcase.
16978
16979 2003-10-10  Simon Josefsson  <jas@extundo.com>
16980
16981         * m4/argp.m4: Add AC_C_INLINE.
16982
16983 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16984
16985         Merge getpass from libc, plus a few fixes.
16986
16987         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
16988         Include <stdbool.h>.
16989         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
16990         __fsetlocking to empty.
16991         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
16992         do include <bits/libc-lock.h>.
16993         Do not include <fcntl.h>; not needed.
16994         [_LIBC]: Include <wchar.h>.
16995         (NOTCANCEL_MODE): New macro.
16996         (flockfile, funlockfile) [_LIBC]: New macros.
16997         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
16998         [!_LIBC]: New macros.
16999         (call_fclose): New function.
17000         (getpass): Use it.  Save tty stream separately; this simplifies the
17001         code and makes it more reliable if stdin happens to equal stdout.
17002         Invoke __fsetlocking on tty.
17003         Handle thread cancellation if needed.
17004         Namespace cleanup (use __tcgetattr, __getline).
17005         Use bool for Booleans.
17006         [USE_IN_LIBIO]: Handle wide streams.
17007         [!_LIBC]: Unconditionally do the fseek, since we don't know what
17008         stream might go where.
17009
17010         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
17011         doesn't have to include <stdio.h> before us.
17012         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
17013         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
17014         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17015         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
17016         if not declared, so that we can use getpass.c code from libc without
17017         rewriting it.
17018         (flockfile, ftrylockfile, funlockfile): New macros.
17019
17020 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17021
17022         * modules/getpass: Depend on stdbool.
17023
17024 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17025
17026         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
17027
17028 2003-10-07  Karl Berry  <karl@gnu.org>
17029
17030         * config/config.{guess,sub}: update from config.
17031
17032 2003-10-06  Jim Meyering  <jim@meyering.net>
17033             Bruno Haible  <bruno@clisp.org>
17034
17035         This lets translators provide better translations for the
17036         "Written by ..." part of --version output.
17037         * lib/version-etc.h: Include stdarg.h.
17038         (version_etc_copyright): Declare as readonly.
17039         (version_etc): Make this function variadic with a NULL-terminated list
17040         of author name strings.
17041         (version_etc_va): New declaration.
17042         * lib/version-etc.c: Include stdarg.h, stdlib.h.
17043         (version_etc_copyright): Declare as readonly.
17044         (version_etc_va): New function. Provide a different translatable string
17045         for each possible number of authors < 10. Abbreviate when there are 10
17046         authors or more.
17047         (version_etc): Make this function variadic. Call version_etc_va.
17048         Suggestion from Gary V. Vaughan.
17049
17050         * lib/long-options.h (parse_long_options): Change prototype: the
17051         authors string is moved to the end and becomes variadic.
17052         * lib/long-options.c: Include stdarg.h.
17053         (parse_long_options): Make this function variadic, too.
17054         Call version_etc_va, not version_etc.
17055
17056 2003-10-06  Bruno Haible  <bruno@clisp.org>
17057
17058         * modules/version-etc-2: Remove file.
17059         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
17060
17061 2003-10-06  Bruno Haible  <bruno@clisp.org>
17062
17063         * modules/fatal-signal: New file.
17064         * MODULES.html.sh (func_all_modules): Add fatal-signal.
17065
17066 2003-10-06  Bruno Haible  <bruno@clisp.org>
17067
17068         * m4/fatal-signal.m4: New file.
17069         * m4/signalblocking.m4: New file, from GNU gettext.
17070
17071 2003-10-06  Bruno Haible  <bruno@clisp.org>
17072
17073         * lib/version-etc-2.h: Remove file.
17074         * lib/version-etc-2.c: Remove file.
17075
17076 2003-10-06  Bruno Haible  <bruno@clisp.org>
17077
17078         * lib/fatal-signal.h: New file, from GNU gettext.
17079         * lib/fatal-signal.c: New file, from GNU gettext.
17080
17081 2003-10-05  Paul Eggert  <eggert@twinsun.com>
17082
17083         * README: Rework advice for preventing empty .o files.
17084         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
17085         not <sys/types.h>.
17086
17087 2003-10-04  Karl Berry  <karl@gnu.org>
17088
17089         * lib/argp*: update from libc.
17090
17091 2003-10-04  Karl Berry  <karl@gnu.org>
17092
17093         * config/config.{guess,sub}: update from config.
17094
17095 2003-10-02  Bruno Haible  <bruno@clisp.org>
17096
17097         * modules/lchown (Include): Add lchown.h.
17098         * modules/time_r (Include): Use "..." syntax.
17099         * modules/xgetdomainname (Include): Add xgetdomainname.h.
17100
17101 2003-10-01  Simon Josefsson  <jas@extundo.com>
17102
17103         * MODULES.html.sh (func_all_modules): Move gethostname from section
17104         'based on' to section 'lacking' POSIX:2001.
17105
17106 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
17107
17108         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
17109         to output mode on the same stream.
17110
17111 2003-09-29  Paul Eggert  <eggert@twinsun.com>
17112
17113         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
17114         Fix arg typo in previous patch.
17115
17116 2003-09-28  Jim Meyering  <jim@meyering.net>
17117
17118         * lib/error.c: Correct cpp indentation.
17119
17120 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17121
17122         * modules/free: New file.
17123
17124 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17125
17126         * m4/free.m4: New file.
17127
17128 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17129
17130         * lib/minmax.h (MIN, MAX)
17131         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
17132         Omit the special code that used __typeof__, since we worry that
17133         it could be more trouble than it's worth.  See:
17134         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
17135         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
17136
17137         * lib/free.c: New file.
17138
17139 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
17140
17141         Trivial fixes to Makefile.am parts of module listings.
17142         * modules/strstr: Append strstr.h to lib_SOURCES.
17143         * modules/strcase: Likewise, for strcase.h.
17144
17145 2003-09-27  Karl Berry  <karl@gnu.org>
17146
17147         * config/mkinstalldirs: update from automake.
17148
17149 2003-09-26  Paul Eggert  <eggert@twinsun.com>
17150
17151         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
17152         (error_tail): Do not loop, reallocating temporary buffer, since
17153         the output cannot contain more wide characters than the input
17154         contains bytes, the size must be big enough already.  This avoids
17155         one potential size overflow calculation.  Check for size overflow
17156         when calculating temporary buffer size.  Free temporary buffer
17157         when done, if it was allocated with malloc; this plugs a memory
17158         leak.  Remove casts from void * to pointers, that are no longer
17159         needed now that we're assuming C89 or better.
17160
17161         Merge error changes from glibc.
17162
17163         * lib/error.c, error.h: Update copyright notice header to match glibc.
17164         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
17165         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
17166         Disable cancellation while printing error.
17167         * lib/error.h: Prepend __ to parameter names.
17168
17169 2003-09-26  Jim Meyering  <jim@meyering.net>
17170
17171         * lib/error.c (error_tail): Move some declarations
17172         into inner scope where the local variables are used.
17173
17174 2003-09-26  Bruno Haible  <bruno@clisp.org>
17175
17176         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
17177         stpncpy().
17178         Don't define stpncpy through config.h; it's now done through stpncpy.h.
17179
17180 2003-09-26  Bruno Haible  <bruno@clisp.org>
17181
17182         * lib/stpncpy.h (gnu_stpncpy): New declaration.
17183         (stpncpy): Define as alias for gnu_stpncpy.
17184         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
17185
17186 2003-09-25  Simon Josefsson  <jas@extundo.com>
17187
17188         * lib/xgetdomainname.h: New file.
17189         * lib/xgetdomainname.c: New file.
17190
17191 2003-09-25  Simon Josefsson  <jas@extundo.com>
17192             Bruno Haible  <bruno@clisp.org>
17193
17194         * modules/getdomainname: New file.
17195         * modules/xgetdomainname: New file.
17196         * MODULES.html.sh (func_all_modules): Add getdomainname,
17197         xgetdomainname.
17198
17199 2003-09-25  Simon Josefsson  <jas@extundo.com>
17200             Bruno Haible  <bruno@clisp.org>
17201
17202         * m4/getdomainname.m4: New file.
17203
17204 2003-09-25  Simon Josefsson  <jas@extundo.com>
17205             Bruno Haible  <bruno@clisp.org>
17206
17207         * lib/getdomainname.h: New file.
17208         * lib/getdomainname.c: New file.
17209
17210 2003-09-25  Karl Berry  <karl@gnu.org>
17211
17212         * lib/argp-fmtstream.c, argp-help.c: update from libc.
17213
17214 2003-09-25  Karl Berry  <karl@gnu.org>
17215
17216         * config/install-sh: update from automake.
17217
17218 2003-09-25  Bruno Haible  <bruno@clisp.org>
17219
17220         * modules/version-etc-2: New file, from modules/version-etc with
17221         modifications.
17222         * MODULES.html.sh (func_all_modules): Add version-etc-2.
17223
17224 2003-09-25  Bruno Haible  <bruno@clisp.org>
17225
17226         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
17227         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
17228
17229 2003-09-24  Simon Josefsson  <jas@extundo.com>
17230
17231         * modules/xgethostname: Add xgethostname.h.
17232
17233 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17234
17235         * lib/linebuffer.c (freebuffer): Don't free the argument, just
17236         the buffer associated with the argument.  Bug reported by
17237         Simon Josefsson.
17238
17239 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17240
17241         * README: Document assumptions that 'int' is at least 32 bits
17242         wide, that integer arithmetic is 2's complement without overflow,
17243         that there are no holes in integer values, that adding sizes of
17244         two nonoverlapping objects can't overflow, and that all-bits-zero
17245         yields scalar zero.  Fix spelling and capitalization typos.
17246
17247 2003-09-19  Karl Berry  <karl@gnu.org>
17248
17249         * lib/argp.h: update from libc.
17250
17251 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17252
17253         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
17254         to avoid spurious warnings like "AC_RUN_IFELSE was called before
17255         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
17256
17257 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17258
17259         * gnulib-tool: Use "test -h", not "test -L", for portability
17260         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
17261         (tags_regexp): Remove, since \| doesn't conform to POSIX.
17262         (sed_extract_prog): Issue s commands one-by-one, rather than
17263         using \| in one s command.
17264
17265 2003-09-16  Paul Eggert  <eggert@twinsun.com>
17266
17267         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
17268         input error, instead of returning NULL the next time we are called
17269         (and therefore losing track of errno).
17270
17271 2003-09-16  Bruno Haible  <bruno@clisp.org>
17272
17273         * gnulib-tool (func_create_testdir): Warn about duplicated
17274         dependencies.
17275
17276 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17277
17278         * modules/argmatch, modules/fatal, modules/obstack,
17279         modules/xalloc, modules/xgethostname: Sort dependencies by
17280         importance, not alphabetically.
17281
17282 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17283
17284         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
17285         fails, so that the caller gets the proper errno.
17286
17287         * lib/readutmp.c (read_utmp): Likewise.
17288         Check for fstat error.  Close stream and free storage
17289         when failing.
17290
17291 2003-09-14  Karl Berry  <karl@gnu.org>
17292
17293         * config/srclist.txt (strdup.c): disable for c89 changes.
17294
17295 2003-09-14  Jim Meyering  <jim@meyering.net>
17296
17297         * lib/getloadavg.c: Correct cpp indentation.
17298         * lib/strdup.c: Likewise.
17299         * lib/vasnprintf.c: Likewise.
17300
17301 2003-09-14  Bruno Haible  <bruno@clisp.org>
17302
17303         * modules/fwriteerror: New file.
17304         * MODULES.html.sh (func_all_modules): Add fwriteerror.
17305
17306 2003-09-14  Bruno Haible  <bruno@clisp.org>
17307
17308         * lib/fwriteerror.h: New file.
17309         * lib/fwriteerror.c: New file.
17310
17311 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17312
17313         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
17314         modules/xgethostname, modules/xalloc: Depend on exit.
17315
17316 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17317
17318         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
17319
17320         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
17321         and AC_MINIX, too, so that their extensions are available.
17322
17323         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
17324         This macro has been superseded by gl_BACKUPFILE.
17325
17326         More patches to assume C89 or better.
17327
17328         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
17329
17330         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
17331         unconditionally.
17332         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
17333         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
17334         Include <string.h>, <stdlib.h> unconditionally.
17335         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
17336         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
17337         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
17338         headers or for string.h.
17339         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
17340         or strtoul.
17341
17342         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
17343         headers.
17344         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
17345         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17346         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
17347         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
17348         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17349         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
17350         memcpy, memset.
17351         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
17352         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
17353         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
17354         strtol.
17355         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
17356         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
17357         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
17358         strtoul.
17359
17360 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17361
17362         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
17363         * lib/obstack.c [!defined _LIBC]: Likewise.
17364         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
17365         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
17366         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
17367
17368         More changes to assume C89 or better.
17369
17370         * lib/error.c (error_tail): Assume vprintf.
17371
17372         * lib/argmatch.c (getenv): Remove decl.
17373         * lib/progreloc.c (get_full_program_name): Define via prototype.
17374         * lib/setenv.c (clearenv): Likewise.
17375         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
17376         needed.
17377         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
17378         (malloc, memcpy): Remove decls.
17379         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
17380         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
17381         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17382         (memcpy): Remove macro.
17383         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
17384         (__P): Remove.  All uses removed.
17385         (PTR): Remove.  All uses changed to void *.
17386         (CHAR_BIT, NULL): Remove.
17387         (spaces, zeros, memset_space, memset_zero)
17388         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
17389         Remove.
17390         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
17391         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
17392         Define with prototype.
17393         Remove now-unnecessary prototype decl.
17394         (extra_args_spec): Assume ANSI C.  All uses changed.
17395         (extra_args_spec_iso): Remove.
17396         (my_strftime, emacs_strftimeu): Define via prototype.
17397         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
17398         unconditionally.
17399         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
17400         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
17401         (strtoul, strtol): Remove decls.
17402         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
17403         LONG_MAX): Remove.
17404         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17405         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
17406         (LOCALE_PARAM_PROTO): New macro.
17407         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
17408         (INTERNAL (strtol), strtol): Define with a prototype.
17409         (PARAMS): Remove.  All uses removed.
17410         * lib/tempname.c: Include <string.h> unconditionally.
17411         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
17412         * lib/xgethostname.c (main): Define with a prototype.
17413         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
17414         Include <stdlib.h> unconditionally.
17415         (calloc, malloc, realloc, free): Remove decls.
17416         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
17417         Include <stdlib.h> unconditionally.  Sort include file names.
17418         (strtod): Remove.
17419         (xstrtod): Define with a prototype.
17420         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
17421         (strtol, strtoul): Remove decls.
17422
17423 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17424
17425         More patches to assume C89 or better.
17426         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
17427         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
17428         string.h, memchr, STDC_HEADERS.
17429
17430 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17431
17432         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
17433         Include <stdlib.h>, <string.h> unconditionally.
17434         Remove now-unnecessary cast to char *.
17435         * lib/strnlen.c: Include <string.h> unconditionally.
17436         * lib/yesno.c (yesno): Define with a prototype.
17437
17438 2003-09-11  Bruno Haible  <bruno@clisp.org>
17439
17440         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
17441
17442 2003-09-10  Jim Meyering  <jim@meyering.net>
17443
17444         * lib/error.c: Correct indentation of cpp directives.
17445
17446 2003-09-10  Bruno Haible  <bruno@clisp.org>
17447
17448         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
17449         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
17450         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
17451         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
17452         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
17453         <stdlib.h> and <string.h> checks.
17454         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
17455         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
17456
17457 2003-09-10  Bruno Haible  <bruno@clisp.org>
17458
17459         * lib/strcspn.c: Include <string.h> unconditionally.
17460         * lib/strpbrk.c: Include <string.h> unconditionally.
17461         * lib/strstr.c: Include <string.h> unconditionally.
17462         * lib/unicodeio.c: Include <string.h> unconditionally.
17463         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
17464         * lib/unsetenv.c: Likewise.
17465         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
17466         * lib/yesno.c: Include <stdlib.h> unconditionally.
17467         (rpmatch): Add prototype.
17468
17469 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17470
17471         More patches to assume C89 or better.
17472         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
17473         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
17474         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
17475         or for string.h.
17476         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
17477         stdlib.h.
17478         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
17479         C headers.
17480         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
17481         string.h.
17482         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
17483         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
17484         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
17485         or for string.h.
17486         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
17487         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
17488         C headers.
17489         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
17490         memcpy.
17491         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
17492         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
17493         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
17494         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
17495         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
17496         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
17497         string.h, free.
17498         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
17499         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
17500         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
17501         C headers, or for string.h.
17502         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
17503         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
17504         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
17505         headers, memory.h, stdlib.h, string.h, strings.h.
17506         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
17507         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
17508         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
17509         strchr.
17510         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
17511         headers, memory.h, string.h.
17512         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
17513         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
17514         free.
17515         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
17516         headers.
17517         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
17518         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
17519         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
17520         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
17521         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
17522
17523 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17524
17525         More K&R removal.
17526
17527         * lib/acosl.c (main): Use a prototype.
17528         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
17529         tanl.c: Likewise.
17530
17531         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
17532
17533         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
17534         (getopt, etopt_long, getopt_long_only, _getopt_internal)
17535         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
17536         with a prototype.
17537         * lib/getopt.c (const): Remove macro.
17538         Include <string.h> unconditionally.
17539         (my_index): Remove; all uses changed to strchr.
17540         (strlen): Remove decl.
17541         (exchange): Remove forward decl; no longer needed.
17542         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
17543         Define with prototype.
17544         * lib/getopt1.c (const): Remove macro.
17545         (getopt_long, getopt_long_only, main): Define with prototype.
17546
17547         * lib/getugroups.c: Include <string.h> unconditionally.
17548
17549         * lib/getusershell.c: Include <stdlib.h> unconditionally.
17550         (getusershell, setusershell, endusershell, readname, main):
17551         Define with prototypes.
17552
17553         * lib/group-member.c: Include group-member.h first.
17554         Include <stdlib.h> unconditionally.
17555
17556         * lib/hard-locale.c: Include hard-locale.h first.
17557         Include <stdlib.h>, <string.h> unconditionally.
17558
17559         * lib/hash.c (free, malloc): Remove decls.
17560         Include <stdlib.h> unconditionally.
17561
17562         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
17563         (getenv): Do not declare.
17564
17565         * lib/idcache.c: Include <string.h> unconditionally.
17566
17567         * lib/long-options.c: Include long-options.h first, to test interface.
17568         Include <stdlib.h> unconditionally.
17569
17570         * lib/makepath.c: Include makepath.h first, to test interface.
17571         Include <stdlib.h> and <string.h> unconditionally.
17572
17573         * lib/linebuffer.c: Include <stdlib.h>.
17574         (free): Remove decl.
17575
17576         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
17577         stddef.h. rpl_malloc returns void *, not char *.
17578         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
17579         prototype.
17580
17581         * lib/md5.h: Include <limits.h> unconditionally.
17582         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
17583         (__P): Remove; all uses removed.
17584         * lib/md5.c: Include "md5.h" first.
17585         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
17586         md5_buffer, md5_process_bytes, md5_process_block):
17587         Define with prototypes.
17588         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
17589         * lib/sha.c: Include "sha.h" first.
17590         Include <stdlib.h>, <string.h> unconditionally.
17591
17592         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
17593         * lib/memcmp.c (__ptr_t): Likewise.
17594         * lib/memrchr.c (__ptr_t): Likewise.
17595         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
17596         Include <string.h> unconditionally.
17597         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
17598         * lib/memchr.c: Include <stdlib.h> unconditionally.
17599         * lib/memchr.c (LONG_MAX): Remove.
17600         * lib/memrchr.c (LONG_MAX): Likewise.
17601         * lib/memchr.c (__memchr): Define via a prototype.
17602         * lib/memrchr.c (__memrchr): Likewise.
17603         * lib/memcmp.c (__P): Remove, and remove all uses.
17604         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
17605         Remove forward decls; no longer needed.
17606         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
17607         Use types required by C89 in prototype.
17608
17609         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
17610         * lib/savedir.c: Likewise.
17611         * lib/mkdir.c (free): Remove decl.
17612         * lib/rmdir.c (rmdir): Define with a prototype.
17613         * lib/savedir.c: Include savedir.h first, to test interface.
17614
17615         * lib/mktime.c (STDC_HEADERS): Remove.
17616         Include <stdlib.h>, <string.h> unconditionally.
17617
17618         * lib/modechange.c: Include <stdlib.h> unconditionally.
17619         (malloc): Remove decl.
17620
17621         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
17622         (free): Remove decl.
17623
17624         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
17625         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
17626         (This type really should be intptr_t, but that's a C99ism.)
17627         (_obstack_memcpy): Remove: all uses changed to memcpy.
17628         Include <string.h> unconditionally.
17629         (struct obstack): Assume __STDC__ for types of members
17630         chunkfun, freefun, extra_arg.
17631         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
17632         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
17633         obstack_begin, obstack_specify_allocation,
17634         obstack_specify_allocation_with_arg, obstack_chunkfun,
17635         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
17636         Remove unprototyped decls and the macros that use them.
17637         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
17638         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
17639         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
17640         (defined __STDC__ && __STDC__)]:
17641         Remove nonprototyped code.
17642         Include <stdlib.h> unconditionally.
17643         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
17644         _obstack_allocated_p, _obstack_free, obstack_free,
17645         _obstack_memory_used, print_and_abort):
17646         Define using prototypes.
17647         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
17648         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
17649         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
17650         obstack_next_free, obstack_object_size, obstack_room) [0]:
17651         Remove unused, unprototyped code.
17652
17653         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
17654
17655         * lib/physmem.c (physmem_total, physmem_available, main): Define
17656         with prototypes.
17657
17658         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
17659         (main): Define with a prototype.
17660
17661         * lib/posixver.c (getenv): Remove decl.
17662
17663         * lib/putenv.c (malloc): Returns void *, not char *.
17664         Include <string.h> unconditionally.
17665         (strchr, memcpy, NULL): Do not define.
17666
17667         * lib/readtokens.c: Include readtokens.h first, to test interface.
17668         Include <stdlib.h>, <string.h> unconditionally.
17669         (init_tokenbuffer): Define with a prototype.
17670
17671         * lib/regex.c (PARAMS): Remove.  All uses removed.
17672         All uses of _RE_ARGS removed, too.
17673         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
17674         unconditionally.
17675         (bzero): Assume memset exists.
17676         (memcmp, memcpy, NULL): Remove.
17677         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
17678         char, or assignments to local vars of type signed char.
17679         (init_syntax_once, PREFIX(extract_number_and_incr),
17680         PREFIX(print_partial_compiled_pattern),
17681         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
17682         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
17683         PREFIX(regex_grow_registers), PREFIX(regex_compile),
17684         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
17685         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
17686         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
17687         wcs_compile_range, byte_compile_range, truncate_wchar,
17688         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
17689         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
17690         count_mbs_length, wcs_re_match_2_internal,
17691         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
17692         PREFIX(alt_match_null_string_p),
17693         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
17694         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
17695         regfree, PREFIX(extract_number)): Define with prototype.  Remove
17696         now-unnecessary declaration, if any.
17697         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
17698         regcomp, regexec):
17699         Remove now-unnecessary casts among pointer types.
17700         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
17701
17702         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
17703         (free): Remove decl.
17704
17705         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
17706
17707         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
17708         (free): Remove decl.
17709
17710         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
17711         * lib/xgetcwd.c: Likewise.
17712
17713         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
17714         (free): Remove decl.
17715
17716         * lib/strchrnul.c (strchrnul): Define with a prototype.
17717         Fix bug: c_in was not converted to char before searching.
17718
17719         The following changes are not K&R related:
17720
17721         * lib/group-member.h: Include <sys/types.h>, so that this file is
17722         self-contained.
17723         * lib/makepath.h: Likewise.
17724
17725         * lib/getusershell.c (readname, default_index, line_size, readname):
17726         Use size_t, not int, for sizes.
17727         (readname): If the size overflows, report an error instead of
17728         looping forever.
17729
17730 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17731
17732         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
17733         libc.
17734
17735 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17736
17737         * README: New section: portability guidelines.
17738
17739 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17740
17741         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
17742         C89 spec.
17743
17744 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17745
17746         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
17747
17748 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17749
17750         Assume C89 or better; remove K&R cruft.
17751         A few of these changes were first proposed by Derek Robert Price
17752         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
17753
17754         * lib/addext.c: Include <string.h> unconditionally.
17755         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
17756         Don't declare getenv or malloc.
17757
17758         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
17759         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
17760         (NULL): Remove.
17761         (find_stack_direction, alloca): Use prototypes.
17762
17763         * lib/atexit.c (atexit): Define using a prototype.
17764
17765         * lib/basename.c, dirname.c, stripslash.c:
17766         Include <string.h> unconditionally.
17767
17768         * lib/bcopy.c: Include <stddef.h>.
17769         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
17770
17771         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
17772
17773         * lib/error.h (error, error_at_line, error_print_progname)
17774         [! (defined (__STDC__) && __STDC__)]: Remove decls.
17775         * lib/error.c: Include error.h first, to check interface.
17776         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
17777         (VA_START): Remove; all uses changeed to va_start.
17778         (exit, strerror): Remove decls.
17779         (error_print_progname): Prototype uncondionally.
17780         Don't include <errno.h>; no longer needed.
17781         (private_strerror): Remove.
17782         (error_tail): Always define.
17783         (error, error_at_line): Assume C89 or better; always use prototypes.
17784         * lib/fatal.c: Include "fatal.h" first, to test interface.
17785         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
17786         (VA_START): Remove; all uses changed to va_start.
17787         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
17788         this case.
17789         (exit): Remove decl.
17790         (fatal): Prototype unconditionally.  Assume va_start works.
17791         Abort at end, to pacify gcc.
17792
17793         * lib/euidaccess.c (main): Define with a prototype.
17794
17795         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
17796
17797         * lib/exitfail.c: Include <stdlib.h> unconditionally.
17798
17799         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
17800         prototypes.
17801         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
17802         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
17803         (getenv): Remove decl.
17804         (fnmatch): Define using a prototype.
17805         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
17806         (FCT): Define using a prototype.
17807
17808         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
17809
17810         * lib/gethostname.c: Include <stddef.h>.
17811         (gethostname): Define with prototype.  Length is size_t, not int.
17812
17813 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17814
17815         Assume C89 or better; remove K&R cruft.
17816         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
17817         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
17818         string.h, getenv, malloc.
17819         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
17820         headers.
17821         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
17822         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
17823         do not check for strerror.
17824         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
17825         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
17826         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
17827         do not check for doprnt or vprintf.
17828         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
17829         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
17830
17831 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17832
17833         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
17834         getversion.c should have been removed then, but was accidentally
17835         preserved.
17836
17837         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
17838         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
17839
17840 2003-09-08  Karl Berry  <karl@gnu.org>
17841
17842         * config/config.sub, config.guess, srclistvars.sh: update from savannah
17843                 config, forget about prep.
17844
17845         * config/depcomp, missing: update from automake.
17846
17847 2003-09-07  Paul Eggert  <eggert@twinsun.com>
17848
17849         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
17850         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
17851
17852 2003-09-07  Paul Eggert  <eggert@twinsun.com>
17853
17854         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
17855         copy_tm_result.  Bug reported by Simon Josefsson in
17856         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
17857
17858 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17859
17860         * m4/time_r.m4: New file.
17861         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
17862         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
17863         is. Check for timegm declaration.
17864         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
17865         Do not check for gmtime_r.
17866         Replace mktime if __mktime_internal does not exist and if mktime
17867         hasn't been replaced already.
17868
17869 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17870
17871         * lib/time_r.c, lib/time_r.h: New files.
17872
17873         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
17874         __localtime_r.
17875         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
17876         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
17877
17878         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
17879         __gmtime_r.
17880         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
17881         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
17882         Include <time_r.h>.
17883
17884         * lib/timegm.c: Switch to glibc implementation, with the following
17885         changes:
17886         [defined HAVE_CONFIG_H]: Include <config.h>.
17887         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
17888         (__mktime_internal) [!defined _LIBC]: New decl.
17889         (__gmtime_r) [!defined _LIBC]: New macro and function.
17890         (timegm): Use a prototype, since gnulib assumes C89.
17891         Do not bother declaring tmp to be const, as it's not really usefu.
17892         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
17893         (timegm): Declare only if HAVE_DECL_TIMEGM.
17894
17895 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17896
17897         * MODULES.html.sh (func_all_modules): Add time_r.
17898         * modules/time_r: New file.
17899         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
17900         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
17901
17902 2003-09-03  Paul Eggert  <eggert@twinsun.com>
17903
17904         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
17905         Bug reported by Lute Kamstra in
17906         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
17907
17908         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
17909         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
17910         course with correspondingly smaller numbers for tomorrow and
17911         yesterday.  From Tadayoshi Funaba.  Originally installed into
17912         sh-utils on 1999-08-07, but the patch got lost (I guess during the
17913         coreutils merge?).
17914
17915 2003-08-31  Simon Josefsson  <jas@extundo.com>
17916
17917         * modules/timegm: New file.
17918         * MODULES.html.sh (func_all_modules): Add timegm.
17919
17920 2003-08-31  Simon Josefsson  <jas@extundo.com>
17921
17922         * m4/timegm.m4: New file.
17923
17924 2003-08-31  Simon Josefsson  <jas@extundo.com>
17925
17926         * lib/timegm.h: New file.
17927         * lib/timegm.c: New file.  Based on
17928         wget-1.8.2/src/http.c:mktime_from_utc.
17929
17930 2003-08-31  Karl Berry  <karl@gnu.org>
17931
17932         * lib/argp.h: update from libc.
17933
17934 2003-08-28  Bruno Haible  <bruno@clisp.org>
17935
17936         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
17937         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
17938         followed by '#define fnmatch fnmatch_posix' gives an error.
17939
17940 2003-08-28  Bruno Haible  <bruno@clisp.org>
17941
17942         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
17943         warning on QNX, which defines O_BINARY to 000000.
17944
17945 2003-08-27  Jim Meyering  <jim@meyering.net>
17946
17947         * m4/mkstemp.m4: Require that the system mkstemp be able to create
17948         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
17949         would fail after 32.  Reported by Danny Levinson.  Details here:
17950         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
17951
17952 2003-08-24  Bruno Haible  <bruno@clisp.org>
17953
17954         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
17955         MSVC7 <stdio.h> is included later.
17956
17957 2003-08-22  Simon Josefsson  <jas@extundo.com>
17958
17959         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
17960
17961 2003-08-20  Karl Berry  <karl@gnu.org>
17962
17963         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
17964
17965 2003-08-20  Bruno Haible  <bruno@clisp.org>
17966
17967         * modules/progname: New file.
17968         * MODULES.html.sh (func_all_modules): Add progname.
17969
17970 2003-08-20  Bruno Haible  <bruno@clisp.org>
17971
17972         * lib/progname.h: New file, from GNU gettext.
17973         * lib/progname.c: New file, from GNU gettext.
17974         * lib/progreloc.c: New file, from GNU gettext.
17975
17976 2003-08-19  Jim Meyering  <jim@meyering.net>
17977
17978         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
17979         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
17980
17981 2003-08-19  Bruno Haible  <bruno@clisp.org>
17982
17983         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
17984         more.
17985
17986 2003-08-19  Bruno Haible  <bruno@clisp.org>
17987
17988         * lib/xstrdup.c: Assume <string.h> exists.
17989
17990 2003-08-18  Paul Eggert  <eggert@twinsun.com>
17991
17992         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
17993         in makefile rules.
17994
17995 2003-08-18  Jim Meyering  <jim@meyering.net>
17996
17997         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
17998         * m4/lib-ld.m4: Likewise.
17999
18000 2003-08-18  Jim Meyering  <jim@meyering.net>
18001
18002         * lib/setenv.h: Indent nested cpp directive.
18003         * lib/vasnprintf.c: Remove trailing blanks.
18004
18005 2003-08-17  Simon Josefsson  <jas@extundo.com>
18006
18007         * modules/xstrndup: New file.
18008         * MODULES.html.sh (func_all_modules): Add xstrndup.
18009
18010 2003-08-17  Simon Josefsson  <jas@extundo.com>
18011
18012         * modules/argp: Fix autoconf macro name. Add more dependencies.
18013
18014 2003-08-17  Simon Josefsson  <jas@extundo.com>
18015
18016         * m4/xstrndup.m4: New file.
18017
18018 2003-08-17  Simon Josefsson  <jas@extundo.com>
18019
18020         * m4/argp.m4: New file.
18021
18022 2003-08-17  Simon Josefsson  <jas@extundo.com>
18023             Bruno Haible  <bruno@clisp.org>
18024
18025         * lib/xstrndup.h: New file.
18026         * lib/xstrndup.c: New file.
18027
18028 2003-08-17  Bruno Haible  <bruno@clisp.org>
18029
18030         * modules/strndup (Files, Include): Add lib/strndup.h.
18031
18032 2003-08-17  Bruno Haible  <bruno@clisp.org>
18033
18034         * modules/euidaccess (Files): Add lib/euidaccess.h.
18035
18036 2003-08-17  Bruno Haible  <bruno@clisp.org>
18037
18038         * lib/strndup.h: New file.
18039
18040 2003-08-17  Bruno Haible  <bruno@clisp.org>
18041
18042         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
18043         like AC_GNU_SOURCE.
18044         * modules/extensions (configure.ac): Comment out the invocation of
18045         gl_USE_SYSTEM_EXTENSIONS.
18046
18047 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18048
18049         Merges from coreutils, etc.
18050         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
18051         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
18052         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
18053         fixing a typo.
18054         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
18055         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
18056
18057 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18058
18059         Document merge from coreutils.
18060         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
18061         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
18062         * modules/utime: Add m4/utimes-null.m4.
18063
18064 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18065
18066         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
18067         space, undoing this 2003-08-12 change:
18068         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18069
18070 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18071
18072         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
18073         strtoul.c from libc, undoing this 2003-08-12 change:
18074         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18075
18076 2003-08-16  Jim Meyering  <jim@meyering.net>
18077
18078         Merges from coreutils.
18079         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
18080         prefix.  Adjust cache variables similarly.  Create 500 rather than
18081         just 300 files, to exercise bug on Darwin6.5, too.
18082         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
18083         $missing_dir.
18084         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
18085         AM_SYS_POSIX_TERMIOS.
18086         Reported by mkc@mathdogs.com.
18087         Also change use of $am_cv_sys_posix_termios
18088         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
18089         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
18090         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
18091         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
18092         in /proc/mounts until it finds one with matching device number.  This
18093         is unnecessary when the FILE argument *is* a mount point.  No stat call
18094         is necessary in that case.  So, disable the statvfs-testing code on
18095         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
18096         as RedHat bug# 84846.
18097         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18098         to 1MB, so as not to render systems with no stack size limit (e.g.,
18099         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18100         Include <unistd.h>.  On some systems,
18101         it is required for the definition of _SC_PAGESIZE.
18102
18103 2003-08-16  Jim Meyering  <jim@meyering.net>
18104
18105         Merge from coreutils.
18106         * lib/xstrtoimax.c: #else #if -> #elif.
18107         * lib/xstrtoumax.c: Likewise.
18108
18109 2003-08-16  Jim Meyering  <jim@meyering.net>
18110
18111         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
18112         * m4/utimes.m4: Removed.
18113         * m4/utimes-null.m4: Renamed from utimes.m4.
18114
18115         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18116         to 1MB, so as not to render systems with no stack size limit (e.g.,
18117         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18118         Include <unistd.h>.  On some systems,
18119         it is required for the definition of _SC_PAGESIZE.
18120
18121 2003-08-16  Jim Meyering  <jim@meyering.net>
18122         and Paul Eggert  <eggert@cs.ucla.edu>
18123
18124         Merges from coreutils, etc.
18125
18126         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
18127         using the latest version from cvs.  This avoids problems with #line
18128         directives using a vendor (Sun) compiler.
18129         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
18130         Don't set GETGROUPS_LIB here; now it's
18131         done via getgroups.m4's wrapper function.
18132         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
18133         rather than just in sh-util/configure.in, so that the
18134         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
18135         same.
18136         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
18137         AC_FUNC_GETLOADAVG where to find getloadavg.c.
18138         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
18139         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
18140         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
18141         Remove code that is now done by the newly-required macros.
18142         Append $(EXEEXT) to DF_PROG.
18143         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
18144         Do not invoke or require the following here,
18145         since prereq.m4 or some gnulib .m4 now does this for us:
18146         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
18147         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
18148         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
18149         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
18150         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
18151         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
18152         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
18153         AC_FUNC_OBSTACK.
18154         Do not replace the following functions, as this is now the job
18155         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
18156         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
18157         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
18158         atexit getpass, strdup, getpagesize.
18159         Replace 'raise'.
18160         Do not check for the following functions, as this is now the job
18161         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
18162         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
18163         setregid.
18164         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
18165         Check for sys/sysctl.h.
18166         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
18167         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
18168         of checking for ssize_t ourselves.
18169
18170         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
18171         Require every macro that gnulib/modules/* suggests for us.
18172         (jm_PREREQ_ADDEXT): New macro.
18173         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
18174         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
18175
18176         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
18177         (gl_PHYSMEM): Use it.
18178         Also check for `table' function.
18179         Check for new headers and functions.
18180         Add check for sys/sysmp.h.
18181         With suggestions from Kaveh Ghazi.
18182         Ignore headers that are present but cannot be compiled.  This
18183         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
18184         C 5.4.
18185
18186 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18187
18188         Document merge from coreutils.
18189         * modules/userspec: Depend on posixver.
18190         * modules/strftime: Depend on tzset.
18191
18192 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18193
18194         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
18195         rather than tab, after '#' in shell-script copyright notices.
18196         Suggested by Bruno Haible.
18197
18198 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18199
18200         * config/srclist-update: Use three spaces, rather than tab, after '#'
18201         in shell-script copyright notices.  Suggested by Bruno Haible.
18202         Remove unnecessary parenthesization in regular expression.
18203
18204 2003-08-15  Jim Meyering  <jim@meyering.net>
18205
18206         Merge from coreutils.
18207         * lib/xgethostname.c: Include <stdlib.h>.
18208         (xghostname): Don't exit for anything other than memory-related
18209         failure; just return NULL.
18210         * lib/userspec.c: Include "posixver.h".
18211         (parse_user_spec): Accept `.' as a separator only
18212         in pre-POSIX-200112 mode.
18213         * lib/strtoimax.c: Use #elif rather than #else #if.
18214         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
18215         Remove function, now that we can rely on a working tzset function.
18216         [!_LIBC]: Ensure that the required autoconf test has been run.
18217         [!defined _NL_CURRENT && HAVE_STRFTIME]:
18218         Use underlying_strftime for %r.
18219         * lib/sha.c: Merge in some clean-up and optimization changes from
18220         glibc.
18221         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
18222         Ensure that it is a multiple of 64.
18223         Rearrange loop exit tests so as to avoid performing an
18224         additional fread after encountering an error or EOF.
18225         * lib/realloc.c: Update copyright date.
18226
18227 2003-08-15  Jim Meyering  <jim@meyering.net>
18228         and Paul Eggert  <eggert@twinsun.com>
18229
18230         Merge from coreutils.
18231         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
18232         member but strut utmpx does not.  Needed for AIX 4.3.3.
18233         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
18234
18235 2003-08-15  Jim Meyering  <jim@meyering.net>
18236         and Paul Eggert  <eggert@cs.ucla.edu>
18237
18238         Merges from coreutils, etc.
18239         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
18240         Require gl_FUNC_TZSET_CLOBBER.
18241         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
18242         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
18243         members.
18244
18245 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18246
18247         Help the merge from coreutils.
18248         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
18249         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
18250         * m4/tzset.m4: Use it too.
18251
18252 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18253
18254         * modules/tzset: New file.
18255
18256 2003-08-14  Jim Meyering  <jim@meyering.net>
18257
18258         Merges from coreutils.
18259         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
18260         variable names, rather than @FNMATCH_H@.
18261         * modules/alloca: Likewise for $(ALLOCA_H).
18262
18263         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
18264         the three copies of the literal target, `fnmatch.h'.
18265         * modules/alloca (alloca.h): Likewise.
18266
18267 2003-08-14  Jim Meyering  <jim@meyering.net>
18268
18269         Merge from coreutils.
18270         * m4/tzset.m4: New file.
18271         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
18272         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
18273         otherwise, AIX 5.1 systems would end up using the latter.
18274         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
18275         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
18276         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
18277         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
18278
18279 2003-08-14  Jim Meyering  <jim@meyering.net>
18280
18281         Merge from coreutils.
18282         * lib/obstack.h: Whitespace changes.
18283         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
18284         and xcalloc return values.
18285         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
18286         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
18287         hang on OSF/1 5.1 for DIR on both local and remote file systems.
18288         Reported by (and fix confirmed by) Nelson H. F. Beebe.
18289         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18290         error from mntctl.
18291         Use mntctl's return value to drive the entry-processing loop, since
18292         we can't rely on the value of the vmt_length member in the last
18293         entry.  On some systems doing so could result in exhausting
18294         virtual memory.  Based in part on a patch from Mike Jetzer.
18295
18296 2003-08-14  Jim Meyering  <jim@meyering.net>
18297         and Paul Eggert  <eggert@twinsun.com>
18298
18299         Merges from coreutils, plus other fixes.
18300         * lib/physmem.c: Merge in portability changes from gcc/libiberty
18301         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
18302         for credits and details.  Thanks to Kaveh Ghazi for helping
18303         to keep these files in sync.
18304         (ARRAY_SIZE): Define it.
18305         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
18306         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
18307         (memcasecmp): Don't assume size_t fits in unsigned int.
18308         Remove casts and duplicate code.
18309         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
18310         (memcpy): Remove definition.
18311         Merge in some clean-up and optimization changes from glibc.
18312         [BLOCKSIZE]: Move definition to top of file.
18313         Ensure that it is a multiple of 64.
18314         Rearrange loop exit tests so as to avoid performing an
18315         additional fread after encountering an error or EOF.
18316         * lib/md5.h (md5_uintptr): Define.
18317         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
18318         return to the initial working directory.  Preserve errno
18319         for caller.
18320         * lib/idcache.c: Include "xalloc.h".
18321         (xmalloc, xrealloc): Remove decls.
18322         (getuser): Remove casts no longer required in C89.
18323         * lib/human.c: Include stdio.h, for sprintf.
18324         * lib/group-member.c: Include "xalloc.h".
18325         (xmalloc, xrealloc): Remove decls.
18326         (get_group_info): Remove casts no longer required in C89.
18327         * lib/getusershell.c (readname): Remove casts no longer required in
18328         C89.
18329         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
18330         * lib/getline.c: Whitespace fix, from coreutils.
18331
18332 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18333
18334         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
18335         Check for isascii.
18336
18337         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18338         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18339         Undo previous (whitespace-only) change.
18340
18341 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18342
18343         * lib/exclude.c: Include <ctype.h>
18344         (IN_CTYPE_DOMAIN): New macro.
18345         (is_space): New fn.
18346         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
18347         and empty lines.
18348
18349         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18350         Undo previous (whitespace-only) change.
18351
18352 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18353
18354         * config/srclist-update: Change update back to the old behavior,
18355         leaving whitespace alone.  Use one 'sed' command rather than a
18356         pipeline.
18357         (fixlicense): Now a variable, not a function.
18358         (remove_trailing_blanks): Remove.
18359         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
18360         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18361         Undo previous (whitespace-only) change.
18362
18363 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18364
18365         Merge from coreutils.
18366         * modules/euidaccess: Add lib_SOURCES, include for new
18367         file euidaccess.h
18368
18369 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18370
18371         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18372         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18373         Normalize leading white space and remove trailing white space.
18374
18375         Merge from coreutils
18376         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
18377
18378         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
18379         0.12.1.  These files are now being upgraded automatically by
18380         ../config/srclist-update.
18381
18382 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18383
18384         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18385         Normalize leading white space and remove trailing white space.
18386         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
18387         notice, as per ../config/srclist-update.
18388
18389         Merge from coreutils.
18390         * lib/euidaccess.h: New file.
18391         * lib/euidaccess.c: Include it.
18392         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
18393         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
18394         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
18395
18396 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18397
18398         * config/srclist-update: Add copyright notice.
18399         (remove_id_lines, remove_trailing_blanks): New constants.
18400         (fixfile): Use them to normalize spacing a bit in copied files.
18401         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18402         Normalize leading white space and remove trailing white space.
18403
18404         * config/texinfo.tex: Sync with texinfo.
18405
18406         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
18407         strtoul.c from libc, to merge coreutils whitespace changes.
18408
18409         * config/srclist.txt: Get the following m4 files from gettext:
18410         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
18411         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
18412         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
18413         wint_t.m4.
18414
18415 2003-08-12  Karl Berry  <karl@gnu.org>
18416
18417         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
18418         been made.
18419
18420 2003-08-11  Paul Eggert  <eggert@twinsun.com>
18421
18422         * modules/gnu-source, m4/gnu-source.m4:
18423         Remove; we're assuming Autoconf 2.54 or later now.
18424         Suggested by Bruno Haible.
18425         * MODULES.html.sh (func_all_modules): Remove gnu-source.
18426
18427 2003-08-11  Bruno Haible  <bruno@clisp.org>
18428
18429         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
18430
18431 2003-08-11  Bruno Haible  <bruno@clisp.org>
18432
18433         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
18434         (vasnprintf): Use it instead of wcslen.
18435
18436 2003-08-11  Bruno Haible  <bruno@clisp.org>
18437
18438         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
18439         value to ensure that _Bool promotes to int. Use #define for _Bool when
18440         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
18441
18442 2003-08-10  Karl Berry  <karl@gnu.org>
18443
18444         * lib/regex.h: update from libc (whitespace fix).
18445
18446 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18447
18448         Merge some files from coreutils.  These changes were
18449         originally made by Jim Meyering.
18450         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
18451         many older Unixes require this.
18452         * lib/alloca.c (alloca): Remove cast to argument of free;
18453         no longer needed in C89.
18454         * lib/alloca_.h, regex.h: Fix white space to match
18455         what GNU indent does.
18456
18457 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18458
18459         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
18460         apparently Emacs's Unicode mode got confused before my 2003-08-05
18461         checkin.
18462
18463 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18464
18465         * m4/extensions.m4: New file.
18466         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
18467         Require gl_USE_SYSTEM_EXTENSIONS.
18468         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
18469         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
18470
18471 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18472
18473         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
18474         * modules/extensions, modules/gnu-source: New files.
18475         * modules/timespec, modules/unlocked-io: Depend on extensions.
18476
18477 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18478
18479         * modules/restrict: New file.
18480         * MODULES.html.sh (func_all_modules): Add restrict.
18481         * modules/regex: Depend on restrict.
18482
18483 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18484
18485         * m4/restrict.m4: New file.
18486         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
18487
18488 2003-08-07  Bruno Haible  <bruno@clisp.org>
18489
18490         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
18491         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
18492
18493 2003-08-07  Bruno Haible  <bruno@clisp.org>
18494
18495         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
18496         makes the module 'getndelim2' compatible with the module 'getline'.
18497
18498 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18499
18500         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
18501         byte with "\201" to avoid glitches when editing that source file
18502         with multi-gnome-terminal.
18503
18504 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18505
18506         * lib/bumpalloc.h: Remove.
18507
18508 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18509
18510         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
18511         * modules/bumpalloc: Remove.
18512
18513 2003-08-04  Paul Eggert  <eggert@twinsun.com>
18514
18515         * lib/getloadavg.c: Change copyright notice and spacing to conform to
18516         GNU coding style.
18517
18518         Merge from coreutils.
18519         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
18520         1. From glibc.
18521         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
18522         from Karl Berry, implemented by Jim Meyering.
18523         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
18524         from Dmitry V. Levin.
18525         Remove anachronistic cast of xrealloc.
18526         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
18527         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
18528         type. Otherwise, it wouldn't compile with at least /bin/cc on
18529         ymp-cray-unicos9.0.2.X.
18530         Combine two mostly-identical uses of alloca into one.
18531         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
18532
18533 2003-08-04  Dave Love  <d.love@dl.ac.uk>
18534
18535         [From Emacs.]
18536
18537         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
18538         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
18539         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
18540         obsolete NLIST_NAME_UNION.
18541         [__GNU__]: Undef BSD and FSCALE.
18542         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
18543
18544 2003-08-03  Paul Eggert  <eggert@twinsun.com>
18545
18546         * lib/stdbool_.h (_Bool): Make it signed char, instead of
18547         an enum type, so that it's guaranteed to promote to int.  See:
18548         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
18549
18550 2003-08-03  Karl Berry  <karl@gnu.org>
18551
18552         * config/depcomp: update from automake.
18553
18554 2003-07-31  Paul Eggert  <eggert@twinsun.com>
18555
18556         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
18557         (strerror): Don't assume that a printable int fits in 14 bytes.
18558
18559 2003-07-31  Bruno Haible  <bruno@clisp.org>
18560
18561         * modules/getpass-gnu: New file.
18562         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
18563
18564 2003-07-31  Bruno Haible  <bruno@clisp.org>
18565
18566         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
18567
18568 2003-07-24  Karl Berry  <karl@gnu.org>
18569
18570         * config/missing: update from automake.
18571
18572 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
18573             Bruno Haible  <bruno@clisp.org>
18574
18575         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
18576         * lib/getline.c (getline, getdelim): Likewise.
18577         Remove _GNU_SOURCE define; now it's defined in config.h through
18578         m4/getline.m4.
18579
18580 2003-07-23  Karl Berry  <karl@gnu.org>
18581
18582         * config/config.sub: update from prep.
18583
18584 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18585
18586         * modules/xalloc (Depends-on): Add exitfail.
18587         * modules/xmemcoll: Likewise.
18588
18589 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18590
18591         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
18592         over-parenthesization in macros.
18593
18594         Sync with coreutils.
18595
18596         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
18597         required by C99.
18598
18599         Use `exit_failure' for xalloc and xmemcoll instead of their own
18600         private exit-failure variables.
18601         * lib/xalloc.h (xalloc_exit_failure): Remove.
18602         * lib/xmalloc.c: Likewise.  Include exitfail.h.
18603         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
18604         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
18605         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
18606         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
18607
18608 2003-07-20  Jim Meyering  <jim@meyering.net>
18609
18610         * modules/closeout (Depends-on): Add exitfail.
18611         Suggestion from Bruno Haible.
18612
18613 2003-07-19  Karl Berry  <karl@gnu.org>
18614
18615         * config/config.sub: update from prep.
18616
18617 2003-07-18  Paul Eggert  <eggert@twinsun.com>
18618
18619         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
18620         Remove.
18621         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
18622         to test that it can stand by itself.  Include "exitfail.h".
18623         Clients should set exit_failure instead.
18624         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
18625
18626 2003-07-18  Bruno Haible  <bruno@clisp.org>
18627
18628         * modules/getndelim2: New file.
18629         * modules/getline: Share files with module getndelim2.
18630         * modules/getnline: Depend on getndelim2 instead of sharing files with
18631         it. Add getnline.c to lib_SOURCES.
18632         * MODULES.html.sh (func_all_modules): Add getndelim2.
18633
18634 2003-07-18  Bruno Haible  <bruno@clisp.org>
18635
18636         * m4/getndelim2.m4: New file.
18637         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
18638         invoke gl_PREREQ_GETNDELIM2.
18639         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
18640         gl_PREREQ_GETNDELIM2.
18641         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
18642         gl_GETNDELIM2.
18643
18644 2003-07-18  Bruno Haible  <bruno@clisp.org>
18645
18646         * lib/getndelim2.h: New file.
18647         * lib/getndelim2.c: Make into a module of its own. Include config.h,
18648         getndelim2.h.
18649         (getndelim2): Make non-static. Change return type to ssize_t.
18650         * lib/getline.h: Change argument names.
18651         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
18652         * lib/getnline.c: Include getndelim2.h.
18653
18654 2003-07-18  Andreas Schwab  <schwab@suse.de>
18655
18656         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
18657
18658 2003-07-17  Karl Berry  <karl@gnu.org>
18659
18660         * config/config.sub: update from prep.
18661
18662 2003-07-17  Bruno Haible  <bruno@clisp.org>
18663
18664         * modules/getnline: New file.
18665         * modules/getline: Add lib/getndelim2.c to source file list.
18666         * MODULES.html.sh (func_all_modules): Add getnline.
18667
18668 2003-07-17  Bruno Haible  <bruno@clisp.org>
18669
18670         * m4/getnline.m4: New file.
18671
18672 2003-07-17  Bruno Haible  <bruno@clisp.org>
18673
18674         * m4/Makefile.am.in: Remove file.
18675         * m4/Makefile.am: Remove file.
18676         * m4/Makefile.in: Remove file.
18677
18678 2003-07-17  Bruno Haible  <bruno@clisp.org>
18679
18680         * lib/getnline.h: New file.
18681         * lib/getnline.c: New file.
18682         * lib/getndelim2.c: New file, extracted from getline.c.
18683         (getndelim2): Renamed from getdelim2, with added nmax argument.
18684         * lib/getline.c: Include getndelim2.c.
18685         (getdelim2): Moved out to getndelim2.c.
18686         (getline, getdelim): Update.
18687
18688 2003-07-17  Bruno Haible  <bruno@clisp.org>
18689
18690         * lib/Makefile.am: Remove file.
18691         * lib/Makefile.in: Remove file.
18692
18693 2003-07-17  Bruno Haible  <bruno@clisp.org>
18694
18695         * configure.in: Remove file.
18696         * Makefile.in: Remove file.
18697
18698 2003-07-17  Bruno Haible  <bruno@clisp.org>
18699
18700         * MODULES.html.sh: Put the </BODY> right before </HTML>.
18701
18702 2003-07-16  Karl Berry  <karl@gnu.org>
18703
18704         * config/srclist-update: was running fixlicense twice, which caused
18705                 texinfo.tex to be nullified for some reason.  Simplify,
18706                 $gplsrc is no longer needed as far as I can see?
18707
18708 2003-07-16  Jim Meyering  <jim@meyering.net>
18709
18710         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
18711
18712 2003-07-15  Paul Eggert  <eggert@twinsun.com>
18713
18714         * config/srclist.txt: Get the following files from gettext-runtime/intl
18715         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
18716         ref-del.sin.  From Bruno Haible.
18717         * config/srclist-update (fixfile): Change grep pattern again, since the
18718         previous fix didn't work (there was another trailing $).  Use
18719         '[$]' to escape the $s.
18720
18721 2003-07-15  Karl Berry  <karl@gnu.org>
18722
18723         * lib/vasnprintf.c: update from gettext.
18724
18725 2003-07-15  Karl Berry  <karl@gnu.org>
18726
18727         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
18728         gets expanded when surrounded by '$'.
18729
18730 2003-07-15  Jim Meyering  <jim@meyering.net>
18731
18732         * modules/save-cwd: Don't depend on error.  From Derek Price.
18733
18734 2003-07-15  Jim Meyering  <jim@meyering.net>
18735
18736         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
18737
18738 2003-07-14  Simon Josefsson  <jas@extundo.com>
18739
18740         * modules/mempcpy: New file.
18741         * MODULES.html.sh (func_all_modules): Add mempcpy.
18742
18743 2003-07-14  Simon Josefsson  <jas@extundo.com>
18744
18745         * m4/mempcpy.m4: New file.
18746
18747 2003-07-14  Simon Josefsson  <jas@extundo.com>
18748
18749         * lib/mempcpy.h: New file.
18750         * lib/mempcpy.c: New file.
18751
18752 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18753
18754         * modules/getdate, modules/posixtm: Depend on mktime.
18755
18756 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18757
18758         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
18759         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
18760         unicodeio.c, unicodeio.h, unlocked-io.h:
18761         Switch from LGPL to GPL.
18762
18763 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18764
18765         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
18766         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
18767         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
18768         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
18769         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
18770         updated automatically by ../config/srclist-update.  This changes
18771         their license from LPGL to GPL.
18772
18773 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18774
18775         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
18776         assumed to refer to the root of the most recent stable gettext version.
18777         * config/srclistvars.sh: Add defaults for eggert.
18778         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
18779         Match "This program" as well as "The program".  This is needed
18780         for gettext.
18781
18782 2003-07-14  Jim Meyering  <jim@meyering.net>
18783
18784         Don't emit diagnostics.  Let callers do that.
18785         * lib/save-cwd.c: Don't include "error.h".
18786         (save_cwd): Don't call error.  Ensure that errno is valid
18787         when returning nonzero.
18788
18789         * lib/save-cwd.h (restore_cwd): Update prototype.
18790         * lib/save-cwd.c (restore_cwd): Remove two parameters.
18791         Simplify.  Don't call error upon failure.  Let callers do that.
18792         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
18793         when auditing is enabled.  But don't bother updating the #if.
18794
18795 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
18796
18797         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
18798         it breaks C++ compilation.
18799         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
18800
18801 2003-07-10  Simon Josefsson  <jas@extundo.com>
18802
18803         * modules/strchrnul (Makefile.am): Add strchrnul.h.
18804
18805 2003-07-10  Jim Meyering  <jim@meyering.net>
18806
18807         * m4/clock_time.m4: Remove trailing blank.
18808         * m4/intmax_t.m4: Likewise.
18809
18810 2003-07-10  Jim Meyering  <jim@meyering.net>
18811
18812         * lib/vasnprintf.c: Remove trailing blanks.
18813         Make cpp indentation consistent.
18814
18815 2003-07-09  Paul Eggert  <eggert@twinsun.com>
18816
18817         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
18818         posixver.c, strftime.c, strnlen.c, strverscmp.c:
18819         Switch from LGPL to GPL.
18820
18821 2003-07-09  Paul Eggert  <eggert@twinsun.com>
18822
18823         * config/srclist.txt: Sort sublists.  Add
18824         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
18825         that differ from gnulib for one reason or another; we'd like this list
18826         to be smaller but for now let's document what we have.
18827
18828 2003-07-08  Paul Eggert  <eggert@twinsun.com>
18829
18830         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
18831         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
18832         and sweeter "eval x=$x".
18833         * config/srclist.txt: Get lib/argp* from glibc.
18834
18835 2003-07-07  Paul Eggert  <eggert@twinsun.com>
18836
18837         * lib/mktime.c: Fix some boundary cases and remove need for floating
18838         point.
18839
18840         Issue a compile-time diagnostic if time_t is floating point, or if
18841         two's complement arithmetic is not in effect, or if arithmetic
18842         right shift does not propagate the sign.  These assumptions were
18843         all in the original code but they weren't checked.
18844
18845         (TIME_T_MIDPOINT, verify): New macros.
18846         (__isleap): Remove; it has integer overflow problems.
18847         (leapyear): New function, without those problems.
18848         (ydhms_tm_diff): Remove; splitting into two parts.
18849         (ydhms_diff): New function, containing the arithmetic part of
18850         the old ydhms_tm_diff function.  Issue a compile-time
18851         diagnostic if we are not using C99 integer division.
18852         Avoid casts when possible.
18853         (guess_time_tm): New function, containing the checking part of
18854         the old ydhms_tm_diff function.  Return the new value, rather than
18855         the difference between it and the old.  Accept a new argument T
18856         so that *T specifies the old value.  Check for overflow in the result.
18857
18858         (__mktime_internal): Use a time_t offset, not a long int offset.
18859         This undoes the 2003-06-04 change, which is no longer needed now
18860         that we have better overflow checking.
18861         (localtime_offset): Likewise.
18862
18863         (__mktime_internal): Avoid harmful overflow on hosts where time_t
18864         and long are 64-bit but int is only 32-bit.
18865         (ydhms_diff): Use long int to store year1 and yday1.
18866         Issue a compile-time diagnostic if long int is not wide enough.
18867
18868         (__mktime_internal): Use long int to store adjusted year and yday.
18869         Use plain C rather than preprocessor commands, if that doesn't
18870         affect efficiency.
18871         Check for overflow (and try to repair) after each probe
18872         rather than checking only at the very end.  This avoids some bugs
18873         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
18874         does not equal GMT offset at maximum time).
18875         Use integer to check for overflow rather than floating point; this
18876         is more portable to non-IEEE hosts, and is a tad faster.
18877         When we detect that we are oscillating between two values,
18878         don't check whether tm_isdst has the requested value, since
18879         we already know the answer.  When tm_isdst has the wrong value,
18880         use a different heuristic to find the right one, based on the
18881         extreme values actually observed in practice in tz2003a,
18882         rather than the (overly optimistic) "previous 3 calendar quarters".
18883
18884         (not_equal_tm, print_tm, check_result): Use "const T" rather than
18885         "T const" to accommodate glibc style.
18886         (check_result): Use less-confusing report format.  "long" -> "long int.
18887         (main): Likewise.
18888         Don't loop if the iteration overflows time_t.
18889         Allow a negative step in the iteration.
18890
18891 2003-07-06  Karl Berry  <karl@gnu.org>
18892
18893         * config/depcomp: update from automake.
18894         * config/config.sub: update from prep.
18895
18896 2003-07-03  Karl Berry  <karl@gnu.org>
18897
18898         * config/config.guess: update from prep.
18899
18900 2003-07-01  Paul Eggert  <eggert@twinsun.com>
18901
18902         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
18903         xreadlink.c now includes it unconditionally.
18904
18905 2003-07-01  Paul Eggert  <eggert@twinsun.com>
18906
18907         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
18908         having it depend on HAVE_SYS_TYPES_H.
18909
18910 2003-07-01  Bruno Haible  <bruno@clisp.org>
18911
18912         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
18913         <sys/types.h> should be sufficient.
18914         Reported by Paul Eggert.
18915
18916 2003-06-26  Karl Berry  <karl@gnu.org>
18917
18918         * config/depcomp: update from automake.
18919
18920 2003-06-26  Bruno Haible  <bruno@clisp.org>
18921
18922         * modules/human: Depend on module stdbool.
18923
18924 2003-06-25  Bruno Haible  <bruno@clisp.org>
18925
18926         * modules/readlink: New file.
18927         * modules/xreadlink: Depend on it.
18928         * MODULES.html.sh (func_all_modules): Add readlink.
18929
18930 2003-06-25  Bruno Haible  <bruno@clisp.org>
18931
18932         * m4/readlink.m4: New file.
18933
18934 2003-06-25  Bruno Haible  <bruno@clisp.org>
18935
18936         * lib/readlink.c: New file.
18937
18938 2003-06-22  Karl Berry  <karl@gnu.org>
18939
18940         * config/srclist.txt: update mkinstalldirs from automake.
18941         * config/mkinstalldirs: update.
18942
18943 2003-06-22  Bruno Haible  <bruno@clisp.org>
18944
18945         Portability to mingw32.
18946         * m4/ssize_t.m4: New file, from GNU gettext.
18947         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
18948         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
18949
18950 2003-06-22  Bruno Haible  <bruno@clisp.org>
18951
18952         * modules/safe-read: Add m4/ssize_t.m4.
18953         * modules/xreadlink: Add m4/ssize_t.m4.
18954
18955 2003-06-20  Bruno Haible  <bruno@clisp.org>
18956
18957         Assume C89, so PARAMS isn't needed.
18958         * lib/unicodeio.h (PARAMS): Remove.
18959         * lib/unicodeio.c: Don't use PARAMS.
18960
18961 2003-06-18  Karl Berry  <karl@gnu.org>
18962
18963         * config/config.{guess,sub}: update from prep.
18964
18965 2003-06-18  Jim Meyering  <jim@meyering.net>
18966
18967         Merge changes from coreutils.
18968         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
18969         Remove explicit declarations of xmalloc and realloc.
18970         Include xalloc.h.
18971         (read_utmp): Remove anachronistic cast of xmalloc.
18972
18973 2003-06-17  Paul Eggert  <eggert@twinsun.com>
18974
18975         Assume C89, so PARAMS isn't needed.
18976         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
18977         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
18978         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
18979         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
18980         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
18981         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
18982         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
18983         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
18984         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
18985         lib/xstrtod.h, lib/xstrtol.h: Likewise.
18986         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
18987         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
18988         no longer needed. Anyway, config.h should always be included before any
18989         other file.
18990
18991 2003-06-11  Simon Josefsson  <jas@extundo.com>
18992
18993         * modules/sysexits: New file.
18994         * MODULES.html.sh (func_all_modules): Add sysexits.
18995
18996 2003-06-11  Simon Josefsson  <jas@extundo.com>
18997
18998         * lib/sysexit_.h: New file.
18999
19000 2003-06-11  Derek Price  <derek@ximbiot.com>
19001
19002         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
19003         necessary.
19004
19005 2003-06-11  Bruno Haible  <bruno@clisp.org>
19006
19007         * m4/sysexits.m4: New file.
19008
19009 2003-06-10  Simon Josefsson  <jas@extundo.com>
19010
19011         * lib/argp.h: New file, from glibc.
19012         * lib/argp-ba.c: New file, from glibc.
19013         * lib/argp-eexst.c: New file, from glibc.
19014         * lib/argp-fmtstream.c: New file, from glibc.
19015         * lib/argp-fmtstream.h: New file, from glibc.
19016         * lib/argp-fs-xinl.c: New file, from glibc.
19017         * lib/argp-help.c: New file, from glibc.
19018         * lib/argp-namefrob.h: New file, from glibc.
19019         * lib/argp-parse.c: New file, from glibc.
19020         * lib/argp-pv.c: New file, from glibc.
19021         * lib/argp-pvh.c: New file, from glibc.
19022         * lib/argp-xinl.c: New file, from glibc.
19023
19024 2003-06-10  Simon Josefsson  <jas@extundo.com>
19025
19026         * modules/strchrnul: New file.
19027
19028 2003-06-10  Simon Josefsson  <jas@extundo.com>
19029
19030         * modules/argp: New file.
19031
19032 2003-06-10  Simon Josefsson  <jas@extundo.com>
19033
19034         * m4/strchrnul.m4: New file.
19035
19036 2003-06-10  Simon Josefsson  <jas@extundo.com>
19037
19038         * lib/strchrnul.h: New file.
19039         * lib/strchrnul.c: New file.
19040
19041 2003-06-10  Bruno Haible  <bruno@clisp.org>
19042
19043         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
19044
19045 2003-06-07  Karl Berry  <karl@gnu.org>
19046
19047         * config/config.{guess,sub}: update from prep.
19048
19049 2003-06-07  Jim Meyering  <jim@meyering.net>
19050
19051         * modules/strtod: Use $(...) notation, not @...@ for
19052         AC_REPLACE'd variables.
19053         * modules/localcharset: Likewise.
19054
19055 2003-06-07  Jim Meyering  <jim@meyering.net>
19056
19057         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
19058         in place of my name in the copyright comment.
19059         Remove definition and uses of __P.
19060
19061         From coreutils.
19062         * lib/stat.c: Don't declare xmalloc explicitly.
19063         Instead, include "xalloc.h".
19064         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
19065         xrealloc, and xcalloc return values.
19066         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
19067         Improve comment.
19068         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
19069
19070 2003-06-07  Bruno Haible  <bruno@clisp.org>
19071
19072         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
19073         avoid AC_CONFIG_LINKS.
19074         * modules/fnmatch (Makefile.am): Use explicit creation rule for
19075         fnmatch.h, to avoid AC_CONFIG_LINKS.
19076         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
19077
19078 2003-06-07  Bruno Haible  <bruno@clisp.org>
19079
19080         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
19081         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
19082         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19083         directory.
19084         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
19085         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19086         directory.
19087
19088 2003-06-06  Jim Meyering  <jim@meyering.net>
19089
19090         Merge from coreutils.
19091         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
19092         Consolidate declarations and initializations of *_base* locals.
19093
19094         Merge from coreutils.
19095         This avoids a core dump on systems without GNU putenv,
19096         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
19097         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
19098         (unsetenv): New static function, from GNU libc.
19099         (rpl_putenv): Use it.
19100
19101         * lib/modechange.c: Remove trailing blanks.
19102
19103         Merge from coreutils.
19104         * lib/fsusage.c: Remove declaration of statfs.
19105         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
19106
19107         * lib/posixtm.c: Include <stdbool.h> unconditionally.
19108
19109 2003-06-06  Jim Meyering  <jim@meyering.net>
19110
19111         * lib/stdbool_.h: Renamed from stdbool.h.in.
19112
19113 2003-06-06  Jim Meyering  <jim@meyering.net>
19114             Bruno Haible  <bruno@clisp.org>
19115
19116         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
19117         Adjust Makefile.am snippet not to redirect directly to target.
19118         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
19119
19120 2003-06-05  Paul Eggert  <eggert@twinsun.com>
19121
19122         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
19123         mismatch, look in future quarters as well as past.  This fixes a
19124         bug when processing fall-backwards gaps immediately after a long
19125         period of daylight-saving time.
19126
19127         * lib/mktime.c: Assume freestanding C89 or better.
19128         (HAVE_LIMITS_H): Remove.  Assume it's 1.
19129         (__P): Remove; not used.
19130         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
19131         (mktime, not_equal_tm, print_tm, check_result,
19132         main): Use prototypes.  Use const * where appropriate.
19133         (main): Fix typo in testing code that uncovered by above changes.
19134         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
19135
19136 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19137
19138         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
19139         locale.h, localeconv.  This merges changes from coreutils.
19140
19141         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
19142         It can be removed after the next Autoconf is released.
19143         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
19144         needed.
19145
19146 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19147
19148         * lib/mktime.c: Fix Debian bug 177940
19149         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
19150         (localtime_offset): Now long int, not time_t, because we want it
19151         to be guaranteed to be signed.  All uses changed.
19152         (__mktime_internal): If overflow would occur when adding offset,
19153         don't add it.
19154
19155         Merge 'human' changes from coreutils.  Rewrite to support
19156         locale-specific notations like thousands separators.
19157         * lib/human.c: Simplify authorship notice.
19158         Include human.h immediately after config.h.
19159         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
19160         <limits.h>: Do not include, since human.h does.
19161         (SIZE_MAX, UINTMAX_MAX): New macros.
19162         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
19163         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
19164         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
19165         (power_letter): Renamed from suffixes.
19166         (generate_suffix_backwards): Remove.
19167         (adjust_value): Now takes int style (because of human.h changes)
19168         and long double value (for greater precision on some platforms).
19169         (group_number): New function.
19170         (human_readable): Use it.  Use integer options, not enum.
19171         Put the options before the sizes in the arg list.
19172         Support all the new options.
19173         The old human_readable function has been removed;
19174         use inttostr.h instead.
19175         (human_readable, default_block_size, humblock):
19176         Use uintmax_t, not int, for block sizes.
19177         (human_readable_inexact, block_size_types): Remove.
19178         (block_size_opts): New constant.
19179         (human_options): Renamed from human_block_size, with new signature
19180         that allows block sizes up to UINTMAX_MAX.  All callers changed.
19181         * lib/human.h: Add copyright and authorship notice.
19182         Include <limits.h> and <stdbool.h> unconditionally.
19183         (PARAMS): Remove.  All uses removed.
19184         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
19185         (enum human_inexact_style): Remove tag; now a nameless enum.
19186         (human_floor, human_ceiling, human_round_to_even): Now have
19187         values 2, 0, 1 rather than -1, 1, 0.
19188         (human_group_digits, human_suppress_point_zero, human_autoscale,
19189         human_base_1024, human_SI, human_B): New constants.
19190         (human_readable_inexact, human_block_size): Remove.
19191         (human_readable): Size args are now uintmax_t, not int.
19192         (human_options): New decl.
19193
19194         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
19195         unnecessary now that we assume C89 or better.  This change
19196         imported from coreutils.
19197
19198         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19199         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
19200         in the 2003-05-30 sync from glibc.
19201
19202         .h files should stand alone, but we shouldn't include <sys/types.h>
19203         if we can get away with just <stddef.h>.
19204
19205         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
19206         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
19207         rather than <sys/types.h>, as we merely need size_t.
19208         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
19209         to get size_t.
19210         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
19211         Include <stdio.h>, to get FILE.
19212         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
19213         memcasecmp.h has included <stddef.h> and all we need is size_t.
19214         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
19215         our interface, instead of including <sys/types.h>
19216
19217 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19218
19219         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
19220         now, as glibc mktime is buggy on non-glibc systems.
19221
19222 2003-06-03  Karl Berry  <karl@gnu.org>
19223
19224         * config/config.sub: update from prep.
19225
19226 2003-06-02  Paul Eggert  <eggert@twinsun.com>
19227
19228         [from coreutils]
19229         Fix some minor time-related bugs with POSIX time arguments.
19230         Some valid time stamps were being rejected (notably -1, and
19231         time stamps before 1900 on 64-bit hosts).  And some invalid
19232         time stamps were being accepted, e.g. September 31.
19233
19234         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
19235         that we can return (time_t) -1 successfully.
19236         * lib/posixtm.c: Likewise.
19237         [HAVE_STDBOOL_H]: Include <stdbool.h>.
19238         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
19239         (t): Remove static var.
19240         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
19241         of static var.  All uses changed.
19242         (year): Do not reject years before 1900; they can occur with
19243         64-bit time_t.
19244         (posix_time_parse): Do not check for out-of-range components;
19245         that is now the caller's responsibility, since our checks were
19246         only approximations.
19247         (posixtime): Use mktime to check for out-of-range components,
19248         since it knows them exactly.
19249         If mktime returns (time_t) -1, check whether an error actually occurred
19250         by invoking localtime on -1.
19251         (main) [TEST_POSIXTIME]: Check for input data errors, and report
19252         posixtime failures better.
19253         Improve the test data (in comments only).
19254
19255 2003-06-02  Karl Berry  <karl@gnu.org>
19256
19257         * config/mkinstalldirs (version): new variable.
19258         (--version): new option.
19259         (usage): improve message.
19260
19261 2003-05-30  Karl Berry  <karl@gnu.org>
19262
19263         * lib/mktime.c: update from libc.
19264
19265 2003-05-30  Bruno Haible  <bruno@clisp.org>
19266
19267         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
19268         * config/config.rpath: Upgrade to gettext-0.12.1.
19269
19270 2003-05-30  Bruno Haible  <bruno@clisp.org>
19271
19272         * m4/gettext.m4: Upgrade to gettext-0.12.1.
19273         * m4/nls.m4: New file, from gettext-0.12.1.
19274         * m4/po.m4: New file, from gettext-0.12.1.
19275         * m4/progtest.m4: Upgrade to gettext-0.12.1.
19276
19277 2003-05-30  Bruno Haible  <bruno@clisp.org>
19278
19279         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
19280         * lib/localcharset.h: Likewise.
19281         * lib/localcharset.c: Likewise.
19282
19283 2003-05-29  Karl Berry  <karl@gnu.org>
19284
19285         * config/config.rpath: update from gettext.
19286
19287 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19288
19289         Assume the headers required for C89 freestanding compilers.
19290         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
19291         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
19292         * m4/human.m4 (gl_HUMAN): Likewise.
19293         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
19294         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
19295         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19296         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
19297         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19298         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
19299
19300 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19301
19302         Assume the headers required for C89 freestanding compilers.
19303         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
19304         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
19305         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
19306         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
19307         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
19308         define, since <limits.h> is guaranteed to do that.
19309         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
19310         * lib/exclude.c: Include <stdbool.h> unconditionally.
19311         * lib/tempname.c: Include <stddef.h> unconditionally.
19312         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
19313         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
19314         <stddef.h> does that.
19315         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
19316         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
19317         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
19318         needed.
19319         * lib/xstrtol.c: Likewise.
19320         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
19321         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
19322
19323         * lib/addext.c (addext): Use assignment rather than cast, to avoid
19324         warnings on some platforms.
19325
19326         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19327         arbitrarily.
19328
19329 2003-05-26  Jim Meyering  <jim@meyering.net>
19330
19331         Merge in a change from coreutils:
19332         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
19333         that is guaranteed to be `no'.  Use `no_such_member' to indicate
19334         that condition, rather than `-1' which is slightly misleading.
19335         Change the name of the cache variable to have the gl_ prefix.
19336         Prompted by a patch from Richard Dawe for DJGPP.
19337
19338 2003-05-24  Karl Berry  <karl@gnu.org>
19339
19340         * config/config.guess: update from prep.
19341
19342 2003-05-22  Karl Berry  <karl@gnu.org>
19343
19344         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
19345
19346 2003-05-20  Karl Berry  <karl@gnu.org>
19347
19348         * config/config.guess: update from prep.
19349
19350 2003-05-18  Karl Berry  <karl@gnu.org>
19351
19352         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
19353         might actually be set by the user.
19354
19355         * config/depcomp, install-sh, mdate-sh: update from automake.
19356
19357 2003-05-17  Bruno Haible  <bruno@clisp.org>
19358
19359         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
19360         invalid expansion for AC_EGREP_CPP.
19361         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
19362         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
19363         Suggested by Akim Demaille <akim@epita.fr> in
19364         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
19365
19366 2003-05-12  Jim Meyering  <jim@meyering.net>
19367
19368         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
19369         the space-padded-by-default conversion specifiers, %e, %k, %l.
19370
19371 2003-05-12  Bruno Haible  <bruno@clisp.org>
19372
19373         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
19374         the string is longer than 4 KB.
19375
19376 2003-05-11  Karl Berry  <karl@gnu.org>
19377
19378         * config/config.{guess,sub}: update from prep.
19379
19380 2003-05-09  Bruno Haible  <bruno@clisp.org>
19381
19382         * modules/error: Add m4/strerror_r.m4 to file list.
19383
19384 2003-05-03  Bruno Haible  <bruno@clisp.org>
19385
19386         Upgrade to Unicode-4.0.
19387         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
19388         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
19389         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
19390         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
19391         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
19392         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
19393         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
19394         Change width of U+E0100..U+E01EF from 1 to 0.
19395
19396 2003-04-25  Jim Meyering  <jim@meyering.net>
19397
19398         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
19399         of type size_t, not int.
19400
19401 2003-04-25  Bruno Haible  <bruno@clisp.org>
19402
19403         * lib/copy-file.c: Include <stddef.h>, for size_t.
19404
19405 2003-04-21  Paul Eggert  <eggert@twinsun.com>
19406
19407         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
19408         code which expansion is under static control.  Patch imported from
19409         Akim Demaille's patch to Bison; see
19410         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
19411
19412 2003-04-14  Bruno Haible  <bruno@clisp.org>
19413
19414         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
19415
19416 2003-04-11  Jim Meyering  <jim@meyering.net>
19417
19418         Merge changes from Coreutils.
19419
19420         2003-03-22  Jim Meyering  <jim@meyering.net>
19421
19422         * lib/strftime.c (widen): Cast alloca return value to proper type.
19423
19424         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
19425
19426         From GNU libc.
19427         * lib/strftime.c (my_strftime): Handle very large width
19428         specifications for numeric values correctly.  Improve checks for
19429         overflow.
19430
19431         2003-01-19  Jim Meyering  <jim@meyering.net>
19432
19433         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
19434         definitions.
19435         (nl_get_alt_digit) [! defined my_strftime]: Define.
19436         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
19437         _nl_get_alt_digit and _nl_get_walt_digit.
19438
19439         * lib/strftime.c (my_strftime): Merge in locale-related changes from
19440         libc. These changes have no effect outside of _LIBC.
19441
19442 2003-04-10  Bruno Haible  <bruno@clisp.org>
19443
19444         * modules/findprog: New file.
19445         * MODULES.html.sh (func_all_modules): Add it.
19446
19447 2003-04-10  Bruno Haible  <bruno@clisp.org>
19448
19449         * m4/findprog.m4: New file.
19450         * m4/eaccess.m4: New file.
19451
19452 2003-04-10  Bruno Haible  <bruno@clisp.org>
19453
19454         * lib/findprog.h: New file, from GNU gettext.
19455         * lib/findprog.c: New file, from GNU gettext.
19456
19457 2003-04-05  Jim Meyering  <jim@meyering.net>
19458
19459         Merge changes from Coreutils.
19460
19461         * lib/exclude.h (PARAMS): Remove definition and uses.
19462         * lib/exclude.c: Remove uses of `PARAMS'.
19463
19464         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
19465         Add test-cases for DOS filenames. Declare program_name.
19466         (main): Set up program_name.  Patch by Rich Dawe.
19467
19468         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19469         error from mntctl.
19470         Use mntctl's return value to drive the entry-processing loop, since
19471         we can't rely on the value of the vmt_length member in the last
19472         entry.  On some systems doing so could result in exhausting
19473         virtual memory.  Based in part on a patch from Mike Jetzer.
19474
19475 2003-04-04  Bruno Haible  <bruno@clisp.org>
19476
19477         * modules/linebreak: New file.
19478         * MODULES.html.sh (func_all_modules): Add it.
19479
19480 2003-04-04  Bruno Haible  <bruno@clisp.org>
19481
19482         * m4/linebreak.m4: New file.
19483
19484 2003-04-04  Bruno Haible  <bruno@clisp.org>
19485
19486         * lib/linebreak.h: New file, from GNU gettext.
19487         * lib/linebreak.c: New file, from GNU gettext with slight
19488         modifications.
19489         * lib/lbrkprop.h: New file, from GNU gettext.
19490
19491 2003-04-03  Bruno Haible  <bruno@clisp.org>
19492
19493         * modules/utf8-ucs4: New file.
19494         * modules/utf16-ucs4: New file.
19495         * modules/ucs4-utf8: New file.
19496         * modules/ucs4-utf16: New file.
19497         * MODULES.html.sh (func_all_modules): Add them.
19498
19499 2003-04-03  Bruno Haible  <bruno@clisp.org>
19500
19501         * m4/utf-ucs4.m4: New file.
19502         * m4/ucs4-utf.m4: New file.
19503
19504 2003-04-03  Bruno Haible  <bruno@clisp.org>
19505
19506         * lib/utf8-ucs4.h: New file, from GNU gettext.
19507         * lib/utf16-ucs4.h: New file, from GNU gettext.
19508         * lib/ucs4-utf8.h: New file, from GNU gettext.
19509         * lib/ucs4-utf16.h: New file, from GNU gettext.
19510
19511 2003-04-02  Bruno Haible  <bruno@clisp.org>
19512
19513         * modules/binary-io: New file.
19514         * MODULES.html.sh (func_all_modules): Add it.
19515
19516 2003-04-02  Bruno Haible  <bruno@clisp.org>
19517
19518         * lib/binary-io.h: New file, from GNU gettext.
19519
19520 2003-04-01  Bruno Haible  <bruno@clisp.org>
19521
19522         * modules/pathname: New file.
19523         * MODULES.html.sh (func_all_modules): Add it.
19524
19525 2003-04-01  Bruno Haible  <bruno@clisp.org>
19526
19527         * lib/pathname.h: New file, from GNU gettext.
19528         * lib/concatpath.c: New file, from GNU gettext.
19529
19530 2003-03-30  Bruno Haible  <bruno@clisp.org>
19531
19532         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
19533
19534 2003-03-30  Bruno Haible  <bruno@clisp.org>
19535
19536         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
19537         function chown() doesn't exist.
19538
19539 2003-03-28  Bruno Haible  <bruno@clisp.org>
19540
19541         * modules/copy-file: New file.
19542         * MODULES.html.sh (func_all_modules): Add it.
19543
19544 2003-03-28  Bruno Haible  <bruno@clisp.org>
19545
19546         * m4/copy-file.m4: New file.
19547
19548 2003-03-28  Bruno Haible  <bruno@clisp.org>
19549
19550         * lib/copy-file.h: New file, from GNU gettext.
19551         * lib/copy-file.c: New file, from GNU gettext.
19552
19553 2003-03-18  Jim Meyering  <jim@meyering.net>
19554
19555         * lib/quote.c (quote_n): Fix typo in comment.
19556
19557 2003-03-18  Bruno Haible  <bruno@clisp.org>
19558
19559         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
19560         checking.
19561         * m4/onceonly_2_57.m4: Likewise.
19562
19563 2003-03-17  Bruno Haible  <bruno@clisp.org>
19564
19565         * m4/onceonly.m4: Require autoconf 2.54 or newer.
19566         (m4_quote): Remove macro.
19567         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
19568
19569 2003-03-14  Jim Meyering  <jim@meyering.net>
19570
19571         Merge changes from Coreutils.
19572         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
19573         to be const, in order to avoid warnings.
19574         (obstack_room): Likewise.
19575         (obstack_empty_p): Likewise.
19576
19577 2003-03-14  Bruno Haible  <bruno@clisp.org>
19578
19579         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
19580         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
19581
19582 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19583
19584         Merge changes from Bison.
19585         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
19586         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
19587         when compiling Bison 1.875's `bitset bset = obstack_alloc
19588         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
19589         * lib/hash.c: Include <stdbool.h> unconditionally.
19590
19591 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19592
19593         * m4/onceonly.m4 (m4_quote): New macro.
19594         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
19595         Quote AC_FOREACH variable-expansions properly.
19596
19597 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19598
19599         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
19600
19601 2003-03-09  Paul Eggert  <eggert@twinsun.com>
19602
19603         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
19604         Reported by Bruce Becker; see:
19605         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
19606
19607 2003-03-03  Paul Eggert  <eggert@twinsun.com>
19608             Bruno Haible  <bruno@clisp.org>
19609
19610         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
19611         Reported by John Hughes, see
19612         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
19613
19614 2003-02-20  Bruno Haible  <bruno@clisp.org>
19615
19616         * MODULES.html.sh (func_all_modules): Add poll.
19617
19618 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19619
19620         * modules/poll: New file.
19621
19622 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19623
19624         * lib/poll_.h: New file.
19625         * lib/poll.c: New file.
19626
19627 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19628
19629         * m4/poll.m4: New file.
19630
19631 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19632
19633         * modules/mathl: New file.
19634
19635 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19636
19637         * lib/mathl.h: New file.
19638         * lib/acosl.c: New file.
19639         * lib/asinl.c: New file.
19640         * lib/atanl.c: New file.
19641         * lib/ceill.c: New file.
19642         * lib/cosl.c: New file.
19643         * lib/expl.c: New file.
19644         * lib/floorl.c: New file.
19645         * lib/frexpl.c: New file.
19646         * lib/ldexpl.c: New file.
19647         * lib/logl.c: New file.
19648         * lib/sincosl.c: New file.
19649         * lib/sinl.c: New file.
19650         * lib/sqrtl.c: New file.
19651         * lib/tanl.c: New file.
19652         * lib/trigl.c: New file.
19653         * lib/trigl.h: New file.
19654
19655 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19656
19657         * m4/mathl.m4: New file.
19658
19659 2003-02-18  Bruno Haible  <bruno@clisp.org>
19660
19661         * MODULES.html.sh (func_all_modules): Add mathl.
19662
19663 2003-02-17  Bruno Haible  <bruno@clisp.org>
19664
19665         * modules/mkdtemp: New module.
19666         * MODULES.html.sh (func_all_modules): Add it.
19667
19668 2003-02-17  Bruno Haible  <bruno@clisp.org>
19669
19670         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
19671
19672 2003-02-17  Bruno Haible  <bruno@clisp.org>
19673
19674         * lib/mkdtemp.h: New file, from GNU gettext.
19675         * lib/mkdtemp.c: New file, from GNU gettext.
19676
19677 2003-02-02  Jim Meyering  <jim@meyering.net>
19678
19679         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
19680         e.g. glibc-2.2.93.
19681
19682 2003-01-31  Bruno Haible  <bruno@clisp.org>
19683
19684         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
19685         'rpl_rename'.
19686         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
19687         'rpl_strnlen'.
19688         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
19689         'rpl_strtod'.
19690         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
19691         'rpl_utime'.
19692
19693 2003-01-31  Bruno Haible  <bruno@clisp.org>
19694
19695         * lib/rename.c: #undef rename before defining rpl_rename.
19696         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
19697
19698 2003-01-30  Bruno Haible  <bruno@clisp.org>
19699
19700         * modules/vasnprintf, modules/vasprintf: New modules.
19701         * MODULES.html.sh (func_all_modules): Add them.
19702
19703 2003-01-30  Bruno Haible  <bruno@clisp.org>
19704
19705         * m4/signed.m4: New file, from GNU gettext.
19706         * m4/longdouble.m4: New file, from GNU gettext.
19707         * m4/wchar_t.m4: New file, from GNU gettext.
19708         * m4/wint_t.m4: New file, from GNU gettext.
19709         * m4/vasnprintf.m4: New file.
19710         * m4/vasprintf.m4: New file.
19711
19712 2003-01-30  Bruno Haible  <bruno@clisp.org>
19713
19714         * lib/printf-args.h: New file, from GNU gettext.
19715         * lib/printf-args.c: New file, from GNU gettext.
19716         * lib/printf-parse.h: New file, from GNU gettext.
19717         * lib/printf-parse.c: New file, from GNU gettext.
19718         * lib/vasnprintf.h: New file, from GNU gettext.
19719         * lib/vasnprintf.c: New file, from GNU gettext.
19720         * lib/asnprintf.c: New file, from GNU gettext.
19721         * lib/vasprintf.h: New file, from GNU gettext with modifications.
19722         * lib/vasprintf.c: New file, from GNU gettext.
19723         * lib/asprintf.c: New file, from GNU gettext.
19724
19725 2003-01-29  Bruno Haible  <bruno@clisp.org>
19726
19727         * modules/stpncpy: New module.
19728         * MODULES.html.sh (func_all_modules): Add it.
19729
19730 2003-01-29  Bruno Haible  <bruno@clisp.org>
19731
19732         * m4/stpncpy.m4: New file.
19733
19734 2003-01-29  Bruno Haible  <bruno@clisp.org>
19735
19736         * lib/stpncpy.h: New file, from GNU gettext with modifications.
19737         * lib/stpncpy.c: New file, from GNU gettext with modifications.
19738
19739 2003-01-28  Bruno Haible  <bruno@clisp.org>
19740
19741         * modules/c-ctype: New module.
19742         * MODULES.html.sh (func_all_modules): Add it.
19743
19744 2003-01-28  Bruno Haible  <bruno@clisp.org>
19745
19746         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
19747         Paul Eggert.
19748         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
19749         Paul Eggert.
19750
19751 2003-01-27  Bruno Haible  <bruno@clisp.org>
19752
19753         * modules/xsetenv: New module.
19754         * MODULES.html.sh (func_all_modules): Add it.
19755
19756 2003-01-27  Bruno Haible  <bruno@clisp.org>
19757
19758         * lib/xsetenv.h: New file, from GNU gettext.
19759         * lib/xsetenv.c: New file, from GNU gettext.
19760
19761 2003-01-23  Jim Meyering  <jim@meyering.net>
19762
19763         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
19764         from working on systems without dirfd (at least Irix and OSF1/Tru64).
19765
19766 2003-01-23  Bruno Haible  <bruno@clisp.org>
19767
19768         * modules/minmax: New module.
19769         * MODULES.html.sh (func_all_modules): Add it.
19770
19771 2003-01-23  Bruno Haible  <bruno@clisp.org>
19772
19773         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
19774         Eggert.
19775
19776 2003-01-22  Bruno Haible  <bruno@clisp.org>
19777
19778         * modules/exit: New module.
19779         * MODULES.html.sh (func_all_modules): Add it.
19780
19781 2003-01-22  Bruno Haible  <bruno@clisp.org>
19782
19783         * lib/exit.h: New file, from GNU gettext.
19784
19785 2003-01-19  Bruno Haible  <bruno@clisp.org>
19786
19787         * gnulib-tool: Recognize option --extract-maintainer.
19788         (func_get_maintainer): New function.
19789         * modules/*: Add Maintainer entry.
19790
19791 2003-01-16  Jim Meyering  <jim@meyering.net>
19792
19793         * m4/regex.m4: The `regex' struct is both input and output.
19794         Initialize it before each use.  Patch by Tim Waugh.
19795
19796 2003-01-16  Bruno Haible  <bruno@clisp.org>
19797
19798         * MODULES.html.sh: Add a table of contents. Add the module name as
19799         leftmost column. Add hyperlinks.
19800
19801 2003-01-15  Bruno Haible  <bruno@clisp.org>
19802
19803         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
19804
19805 2003-01-15  Bruno Haible  <bruno@clisp.org>
19806
19807         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
19808         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
19809         suffix.
19810
19811 2003-01-15  Bruno Haible  <bruno@clisp.org>
19812
19813         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
19814
19815 2003-01-15  Bruno Haible  <bruno@clisp.org>
19816
19817         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
19818         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
19819
19820 2003-01-14  Jim Meyering  <jim@meyering.net>
19821
19822         * lib/same.c (same_name): Tweak a comment.
19823
19824 2003-01-14  Bruno Haible  <bruno@clisp.org>
19825
19826         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
19827         when a string comparison is sufficient.
19828
19829 2003-01-14  Bruno Haible  <bruno@clisp.org>
19830
19831         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
19832         'unsigned int'.
19833
19834 2003-01-14  Bruno Haible  <bruno@clisp.org>
19835
19836         * lib/hash-pjw.c: Add comment about low quality of this function.
19837
19838 2003-01-13  Bruno Haible  <bruno@clisp.org>
19839
19840         * modules/stpcpy: Distribute lib/stpcpy.h.
19841         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
19842
19843 2003-01-13  Bruno Haible  <bruno@clisp.org>
19844
19845         * modules/*: Add a description.
19846         * modules/strpbrk: Fix Makefile.am snippet.
19847         * modules/strtoimax: Fix dependencies.
19848         * modules/strtoumax: Likewise.
19849
19850 2003-01-13  Bruno Haible  <bruno@clisp.org>
19851
19852         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
19853         * modules/alloca (Makefile.am): All object files depend on alloca.h.
19854         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
19855
19856 2003-01-13  Bruno Haible  <bruno@clisp.org>
19857
19858         * gnulib-tool (func_create_testdir): Store config/* files in the main
19859         directory.
19860         * config.rpath: Move to ...
19861         * config/config.rpath: ... here.
19862         * modules/gettext: Contains config/config.rpath, not config.rpath.
19863         * modules/iconv: Likewise.
19864
19865 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19866
19867         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19868         to avoid collisions with libcurses and libreadline.
19869
19870         * m4/getstr.m4: Remove.
19871         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
19872
19873 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19874
19875         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19876         to avoid collisions with libcurses and libreadline.
19877
19878         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
19879         * lib/getstr.h, getstr.c: Remove.
19880         * lib/getline.c: Include "getline.h", to check interface.
19881         Move body of old getstr.c here: this defines MIN_CHUNK and
19882         declares getdelim2, which is renamed from getstr.
19883         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
19884
19885         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
19886         All uses changed.
19887         * lib/linebuffer.h: Likewise.
19888         (readline): Remove backward-compatibility macro.
19889
19890 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19891
19892         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19893         to avoid collisions with libcurses and libreadline.
19894         * getstr: Remove.
19895         * MODULES.html.sh: Remove getstr.
19896         * modules/getline: Depend on unlocked-io, not getstr.
19897
19898 2003-01-12  Jim Meyering  <jim@meyering.net>
19899
19900         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
19901
19902 2003-01-10  Bruno Haible  <bruno@clisp.org>
19903
19904         * modules/alloca: Change Makefile.am requirements. Simplify Include
19905         requirements. Add lib/alloca_.h to file list.
19906
19907 2003-01-10  Bruno Haible  <bruno@clisp.org>
19908
19909         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
19910
19911 2003-01-10  Bruno Haible  <bruno@clisp.org>
19912
19913         * lib/alloca_.h: New file.
19914         * lib/getdate.y: Unconditionally include alloca.h.
19915         * lib/makepath.c: Likewise.
19916         * lib/setenv.c: Likewise.
19917         * lib/userspec.c: Likewise.
19918
19919 2003-01-09  Karl Berry  <karl@gnu.org>
19920
19921         * MODULES.html.sh: include `dirname $0` in PATH, to find
19922         gnulib-tool.
19923
19924 2003-01-09  Bruno Haible  <bruno@clisp.org>
19925
19926         * modules/stdbool: Change configure.ac, Makefile.am requirements.
19927         Simplify Include requirements. Add lib/stdbool.h.in to file list.
19928
19929 2003-01-09  Bruno Haible  <bruno@clisp.org>
19930
19931         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
19932
19933 2003-01-09  Bruno Haible  <bruno@clisp.org>
19934
19935         * lib/stdbool.h.in: New file.
19936
19937 2003-01-09  Bruno Haible  <bruno@clisp.org>
19938
19939         * gnulib-tool (func_all_modules): Ignore files ending in ~.
19940         * MODULES.html.sh: Likewise.
19941
19942 2003-01-08  Jim Meyering  <jim@meyering.net>
19943
19944         * lib/full-write.c: Undefine and define-away `const' after inclusion
19945         of errno.h, not before.  Suggestion from Bruno Haible.
19946
19947 2003-01-08  Bruno Haible  <bruno@clisp.org>
19948
19949         * modules/full-read: Depend on full-write.
19950
19951 2003-01-08  Bruno Haible  <bruno@clisp.org>
19952
19953         * lib/safe-read.c: Include specification header first, to ensure its
19954         selfcontainedness.
19955         * lib/full-write.c: Likewise.
19956
19957 2003-01-07  Jim Meyering  <jim@meyering.net>
19958
19959         * lib/full-write.c: Rework so that it may serve to define full_read,
19960         too.
19961         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
19962
19963 2003-01-07  Bruno Haible  <bruno@clisp.org>
19964
19965         * lib/strtoimax.c: Include <stdint.h> as an alternative to
19966         <inttypes.h>.
19967         * lib/xstrtol.h: Likewise.
19968         * lib/xstrtoimax.c: Likewise.
19969         * lib/xstrtoumax.c: Likewise.
19970         * lib/human.h: Likewise.
19971
19972         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
19973         on systems that have <inttypes.h> but not <stdint.h>.
19974
19975 2003-01-07  Bruno Haible  <bruno@clisp.org>
19976
19977         * MODULES.html.sh: Add copyright notice.
19978         (missed_files): Omit CVS directory entries.
19979         (func_module): Make it work with sed-3.02.
19980         * MODULES.txt: Remove file.
19981
19982 2003-01-06  Jim Meyering  <jim@meyering.net>
19983
19984         * lib/version-etc.c: Update year in translatable copyright string.
19985
19986 2003-01-03  Karl Berry  <karl@gnu.org>
19987
19988         * config/config.{guess,sub}: update from prep.
19989
19990 2003-01-02  Karl Berry  <karl@gnu.org>
19991
19992         * doc/COPYING.DOC: belatedly updated to 1.2.
19993
19994 2003-01-01  Karl Berry  <karl@gnu.org>
19995
19996         * gnulib-tool (func_verify_module): report module name $module in
19997         error message, not $1.
19998         * gnulib-tool (create-testdir): don't complain if destdir couldn't
19999         be created, only if it doesn't exist.
20000         * gnulib-tool (last_checkin_date): don't expand the $Date here.
20001
20002 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20003
20004         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
20005
20006 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20007
20008         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
20009         memcmp if strcoll doesn't work.
20010
20011 2002-12-31  Bruno Haible  <bruno@clisp.org>
20012
20013         * lib/utime.c (utime_null): No need to call ftruncate if the file was
20014         nonempty.
20015
20016 2002-12-31  Bruno Haible  <bruno@clisp.org>
20017
20018         * lib/memcoll.c (STRCOLL): New macro.
20019         (memcoll): Use it.
20020
20021 2002-12-31  Bruno Haible  <bruno@clisp.org>
20022
20023         * lib/localcharset.h: New file.
20024         * lib/localcharset.c: Include it.
20025         * lib/unicodeio.c: Likewise.
20026
20027 2002-12-31  Bruno Haible  <bruno@clisp.org>
20028
20029         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
20030         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
20031
20032 2002-12-31  Bruno Haible  <bruno@clisp.org>
20033
20034         * lib/getline.h: Include <stddef.h>, for size_t.
20035
20036         * lib/unicodeio.h: Include <stddef.h>, for size_t.
20037         * lib/unicodeio.c: Don't include <stddef.h>.
20038
20039 2002-12-31  Bruno Haible  <bruno@clisp.org>
20040
20041         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
20042         HAVE_TM_ZONE.
20043
20044 2002-12-24  Karl Berry  <karl@gnu.org>
20045
20046         * config/config.guess: update from prep.
20047
20048 2002-12-24  Bruno Haible  <bruno@clisp.org>
20049
20050         General infrasructure.
20051         * m4/README: Rewritten.
20052         * m4/onceonly.m4: New file.
20053         * m4/onceonly_2_57.m4: New file.
20054
20055         Module atexit.
20056         * m4/atexit.m4: New file.
20057
20058         Module strtod.
20059         * m4/strtod.m4: New file.
20060
20061         Module strtol.
20062         * m4/strtol.m4: New file.
20063
20064         Module strtoul.
20065         * m4/strtoul.m4: New file.
20066
20067         Module memchr.
20068         * m4/memchr.m4: New file.
20069
20070         Module memcmp.
20071         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
20072         (jm_FUNC_MEMCMP): Invoke it.
20073
20074         Module memcpy.
20075         * m4/memcpy.m4: New file.
20076
20077         Module memmove.
20078         * m4/memmove.m4: New file.
20079
20080         Module memset.
20081         * m4/memset.m4: New file.
20082
20083         Module strcspn.
20084         * m4/strcspn.m4: New file.
20085
20086         Module strpbrk.
20087         * m4/strpbrk.m4: New file.
20088
20089         Module strstr.
20090         * m4/strstr.m4: New file.
20091
20092         Module strerror.
20093         * m4/strerror.m4: New file.
20094
20095         Module mktime.
20096         * m4/mktime.m4: Renamed from jm-mktime.m4.
20097         (gl_PREREQ_MKTIME): New macro.
20098         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
20099
20100         Module malloc.
20101         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
20102         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
20103         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
20104
20105         Module realloc.
20106         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
20107         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
20108         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
20109
20110         Module strftime.
20111         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
20112         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
20113         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
20114         gl_TM_GMTOFF.
20115         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
20116
20117         Module xalloc.
20118         * m4/xalloc.m4: New file.
20119
20120         Module alloca.
20121         * m4/alloca.m4: New file.
20122
20123         Module putenv.
20124         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
20125         (jm_FUNC_PUTENV): Invoke it.
20126
20127         Module setenv.
20128         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
20129         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
20130         when invoked twice.
20131         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
20132         gt_FUNC_SETENV.
20133
20134         Module memrchr.
20135         * m4/memrchr.m4: New file.
20136
20137         Module stpcpy.
20138         * m4/stpcpy.m4: New file.
20139
20140         Module strcase.
20141         * m4/strcase.m4: New file.
20142
20143         Module strdup.
20144         * m4/strdup.m4: New file.
20145
20146         Module strnlen.
20147         * m4/strnlen.m4: New file.
20148
20149         Module strndup.
20150         * m4/strndup.m4: New file.
20151
20152         Module xstrtod.
20153         * m4/xstrtod.m4: New file.
20154
20155         Module xstrtol.
20156         * m4/xstrtol.m4: New file.
20157
20158         Module getdate.
20159         * m4/getdate.m4: New file.
20160
20161         Module unlocked-io.
20162         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
20163         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
20164         * m4/jm-glibc-io.m4n: Remove file.
20165
20166         Module long-options.
20167         * m4/long-options.m4: New file.
20168
20169         Module md5.
20170         * m4/md5.m4: New file.
20171
20172         Module sha.
20173         * m4/sha.m4: New file.
20174
20175         Module getstr.
20176         * m4/getstr.m4: New file.
20177
20178         Module getline.
20179         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
20180         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
20181         <sys/types.h>, for size_t. Use the function name gnu_getline, not
20182         simply getline. Infoke gl_PREREQ_GETLINE.
20183
20184         Module obstack.
20185         * m4/obstack.m4: New file.
20186
20187         Module hash.
20188         * m4/hash.m4: New file.
20189
20190         Module readtokens.
20191         * m4/readtokens.m4: New file.
20192
20193         Module strverscmp.
20194         * m4/strverscmp.m4: New file.
20195
20196         Module stdbool.
20197         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
20198         OSF/1.
20199
20200         Module strtoll.
20201         * m4/strtoll.m4: New file.
20202
20203         Module strtoull.
20204         * m4/strtoull.m4: New file.
20205
20206         Module strtoimax.
20207         * m4/strtoimax.m4: New file.
20208
20209         Module strtoumax.
20210         * m4/strtoumax.m4: New file.
20211
20212         Module xstrtoimax.
20213         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
20214         jm_AC_PREREQ_XSTRTOIMAX.
20215         Moved the strtol prerequisites to strtol.m4.
20216         Moved the strtoll prerequisites to strtoll.m4.
20217         Moved the strtoimax prerequisites to strtoimax.m4.
20218
20219         Module xstrtoumax.
20220         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
20221         jm_AC_PREREQ_XSTRTOUMAX.
20222         Moved the strtoul prerequisites to strtoul.m4.
20223         Moved the strtoull prerequisites to strtoull.m4.
20224         Moved the strtoumax prerequisites to strtoumax.m4.
20225
20226         Module chown.
20227         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
20228         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
20229
20230         Module dup2.
20231         * m4/dup2.m4: New file.
20232
20233         Module ftruncate.
20234         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
20235         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
20236
20237         Module getgroups.
20238         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
20239         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
20240
20241         Module gettimeofday.
20242         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
20243         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
20244         gl_PREREQ_GETTIMEOFDAY.
20245
20246         Module mkdir.
20247         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
20248         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
20249
20250         Module mkstemp.
20251         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
20252         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
20253         jm_AC_TYPE_UINTMAX_T.
20254         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
20255
20256         Module stat.
20257         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
20258         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
20259
20260         Module lstat.
20261         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
20262         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
20263
20264         Module timespec.
20265         * m4/timespec.m4 (gl_TIMESPEC): New macro.
20266         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
20267         * m4/st_mtim.m4: Indentation.
20268
20269         Module nanosleep.
20270         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
20271         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
20272         gl_PREREQ_NANOSLEEP.
20273
20274         Module regex.
20275         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
20276         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
20277         (gl_REGEX): New macro.
20278
20279         Module rename.
20280         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
20281         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
20282
20283         Module rmdir.
20284         * m4/rmdir.m4: New file.
20285
20286         Module utime.
20287         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
20288         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
20289         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
20290
20291         Module dirname.
20292         * m4/dirname.m4: New file.
20293
20294         Module getopt.
20295         * m4/getopt.m4: New file.
20296
20297         Module unistd-safer.
20298         * m4/unistd-safer.m4: New file.
20299
20300         Module fnmatch.
20301         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
20302         declaration.
20303         (gl_PREREQ_FNMATCH_EXTRA): New macro.
20304         (gl_FUNC_FNMATCH_POSIX): New macro.
20305         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
20306         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
20307         simply fnmatch.
20308
20309         Module exclude.
20310         * m4/exclude.m4: New file.
20311
20312         Module human.
20313         * m4/human.m4: New file.
20314
20315         Module acl.
20316         * m4/acl.m4: Nop.
20317
20318         Module backupfile.
20319         * m4/backupfile.m4: New file.
20320         * m4/d-ino.m4: Indentation.
20321
20322         Module fsusage.
20323         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
20324         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
20325         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
20326
20327         Module dirfd.
20328         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
20329         requirements.
20330
20331         Module euidaccess.
20332         * m4/euidaccess.m4: New file.
20333
20334         Module file-type.
20335         * m4/file-type.m4: New file.
20336
20337         Module fileblocks.
20338         * m4/fileblocks.m4: New file.
20339
20340         Module filemode.
20341         * m4/filemode.m4: New file.
20342
20343         Module isdir.
20344         * m4/isdir.m4: New file.
20345
20346         Module lchown.
20347         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
20348         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
20349
20350         Module makepath.
20351         * m4/makepath.m4: New file.
20352
20353         Module modechange.
20354         * m4/modechange.m4: New file.
20355
20356         Module mountlist.
20357         * m4/mountlist.m4: New file.
20358         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
20359         Indentation.
20360
20361         Module path-concat.
20362         * m4/path-concat.m4: New file.
20363
20364         Module pathmax.
20365         * m4/pathmax.m4: New file.
20366
20367         Module same.
20368         * m4/same.m4: New file.
20369
20370         Module save-cwd.
20371         * m4/save-cwd.m4: New file.
20372
20373         Module savedir.
20374         * m4/savedir.m4: New file.
20375
20376         Module xgetcwd.
20377         * m4/xgetcwd.m4: New file.
20378         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
20379
20380         Module xreadlink.
20381         * m4/xreadlink.m4: New file.
20382
20383         Module safe-read.
20384         * m4/safe-read.m4: New file.
20385
20386         Module safe-write.
20387         * m4/safe-write.m4: New file.
20388
20389         Module closeout.
20390         * m4/closeout.m4: New file.
20391
20392         Module stdio-safer.
20393         * m4/stdio-safer.m4: New file.
20394
20395         Module getpass.
20396         * m4/getpass.m4: New file.
20397
20398         Module getugroups.
20399         * m4/getugroups.m4: New file.
20400
20401         Module group-member.
20402         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
20403         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
20404
20405         Module idcache.
20406         * m4/idcache.m4: New file.
20407
20408         Module userspec.
20409         * m4/userspec.m4: New file.
20410
20411         Module gettime.
20412         * m4/clock_time.m4: New file.
20413         * m4/gettime.m4: New file.
20414
20415         Module settime.
20416         * m4/settime.m4: New file.
20417
20418         Module posixtm.
20419         * m4/posixtm.m4: New file.
20420
20421         Module gethostname.
20422         * m4/gethostname.m4: New file.
20423
20424         Module canon-host.
20425         * m4/canon-host.m4: New file.
20426
20427         Module gettext.
20428         * m4/codeset.m4: New file, from gettext-0.11.5.
20429         * m4/gettext.m4: New file, from gettext-0.11.5.
20430         * m4/glibc21.m4: New file, from gettext-0.11.5.
20431         * m4/iconv.m4: New file, from gettext-0.11.5.
20432         * m4/intdiv0.m4: New file, from gettext-0.11.5.
20433         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
20434         * m4/inttypes.m4: New file, from gettext-0.11.5.
20435         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
20436         * m4/isc-posix.m4: New file, from gettext-0.11.5.
20437         * m4/lcmessage.m4: New file, from gettext-0.11.5.
20438         * m4/lib-ld.m4: New file, from gettext-0.11.5.
20439         * m4/lib-link.m4: New file, from gettext-0.11.5.
20440         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
20441         * m4/progtest.m4: New file, from gettext-0.11.5.
20442         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
20443         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
20444         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
20445
20446         Module localcharset.
20447         * m4/localcharset.m4: New file.
20448
20449         Module hard-locale.
20450         * m4/hard-locale.m4: New file.
20451
20452         Module mbswidth.
20453         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
20454         onceonly macros.
20455         * m4/mbrtowc.m4: Add comment.
20456
20457         Module memcasecmp.
20458         * m4/memcasecmp.m4: New file.
20459
20460         Module memcoll.
20461         * m4/memcoll.m4: New file.
20462
20463         Module unicodeio.
20464         * m4/unicodeio.m4: New file.
20465
20466         Module rpmatch.
20467         * m4/rpmatch.m4: New file.
20468
20469         Module yesno.
20470         * m4/yesno.m4: New file.
20471
20472         Module exitfail.
20473         * m4/exitfail.m4: New file.
20474
20475         Module c-stack.
20476         * m4/c-stack.m4 (gl_C_STACK): New macro.
20477         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
20478
20479         Module error.
20480         * m4/error.m4 (gl_ERROR): New macro.
20481         (jm_PREREQ_ERROR): Use onceonly macros.
20482
20483         Module fatal.
20484         * m4/fatal.m4: New file.
20485
20486         Module getloadavg.
20487         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
20488         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
20489
20490         Module getpagesize.
20491         * m4/getpagesize.m4: New file.
20492
20493         Module getusershell.
20494         * m4/getusershell.m4: New file.
20495
20496         Module physmem.
20497         * m4/physmem.m4: New file.
20498
20499         Module posixver.
20500         * m4/posixver.m4: New file.
20501
20502         Module quotearg.
20503         * m4/quotearg.m4: New file.
20504
20505         Module quote.
20506         * m4/quote.m4: New file.
20507
20508         Module readutmp.
20509         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
20510
20511         Module sig2str.
20512         * m4/sig2str.m4: New file.
20513
20514         Other.
20515         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
20516         ulonglong.m4.
20517         * m4/intmax_t.m4: New file.
20518         * m4/d-type.m4: Indentation.
20519         * m4/jm-macros.m4: Update.
20520         * m4/prereq.m4 (jm_PREREQ): Update.
20521         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
20522         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
20523         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
20524         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
20525         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
20526         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
20527         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
20528         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
20529         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
20530         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
20531         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
20532         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
20533         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
20534         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
20535         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
20536         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
20537         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
20538         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
20539         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
20540
20541 2002-12-24  Bruno Haible  <bruno@clisp.org>
20542
20543         * MODULES.txt: Update according to m4/ changes.
20544
20545         Module gettext.
20546         * config.rpath: New file, from gettext-0.11.5.
20547
20548         * modules/*: New module descriptions.
20549         * gnulib-tool: New file.
20550         * MODULES.html.sh: New file.
20551
20552 2002-12-21  Karl Berry  <karl@gnu.org>
20553
20554         * doc/fdl.texi: update to version 1.2.
20555
20556 2002-12-19  Karl Berry  <karl@gnu.org>
20557
20558         * config/config.guess: update from prep.
20559
20560 2002-12-18  Bruno Haible  <bruno@clisp.org>
20561
20562         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
20563         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
20564
20565 2002-12-17  Bruno Haible  <bruno@clisp.org>
20566
20567         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
20568         stdlib.h, string.h.
20569
20570 2002-12-17  Bruno Haible  <bruno@clisp.org>
20571
20572         * lib/canon-host.c (strdup): Remove unused declaration.
20573
20574         * lib/fsusage.c: Include full_read.h.
20575         (get_fs_usage): Use full_read instead of safe_read.
20576
20577         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
20578
20579 2002-12-12  Karl Berry  <karl@gnu.org>
20580
20581         * config/config.guess: update from prep.
20582
20583 2002-12-11  Bruno Haible  <bruno@clisp.org>
20584
20585         * m4/setenv.m4: New file, from gettext-0.11.5.
20586
20587 2002-12-11  Bruno Haible  <bruno@clisp.org>
20588
20589         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
20590         not unsetenv().
20591         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
20592         modifications:
20593
20594         2002-12-11  Bruno Haible  <bruno@clisp.org>
20595
20596                 * setenv.c (alloca): Fall back to malloc.
20597                 (freea): New macro.
20598                 (setenv): Use freea() to free memory allocated with alloca().
20599
20600         2002-11-13  Bruno Haible  <bruno@clisp.org>
20601
20602                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
20603                 function declarations.
20604                 * unsetenv.c (unsetenv): Likewise.
20605
20606         2002-03-04  Bruno Haible  <bruno@clisp.org>
20607
20608                 Portability to AIX 4.3.3.
20609                 * unsetenv.c: New file, extracted from setenv.c.
20610                 * setenv.c: Move the unsetenv() function to unsetenv.c.
20611
20612         2001-12-20  Bruno Haible  <bruno@clisp.org>
20613
20614                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
20615                 use malloc instead. For SunOS 4.
20616
20617         2001-12-11  Bruno Haible  <bruno@clisp.org>
20618
20619                 * setenv.c: Declare alloca.
20620                 (compar_fn_t): New typedef.
20621                 (KNOWN_VALUE, STORE_VALUE): Use it.
20622
20623         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
20624         setenv.h.
20625
20626 2002-12-10  Paul Eggert  <eggert@twinsun.com>
20627
20628         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
20629         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
20630         Choose values that are less likely to collide with system fnmatch
20631         options.
20632         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
20633         defined (e.g., a pure POSIX system).
20634         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
20635         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
20636
20637 2002-12-06  Paul Eggert  <eggert@twinsun.com>
20638
20639         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
20640         a pain in practice to deal with generated m4 files.  This change
20641         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
20642
20643         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
20644         and jm-glibc-io.m4, as they are no longer a special case.
20645         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
20646         kludge and the auto-generation stuff.  Check only whether the
20647         functions are declared, not whether they exist, since older hosts
20648         that don't declare the functions can't use the optimization anyway.
20649
20650 2002-12-06  Jim Meyering  <jim@meyering.net>
20651
20652         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
20653
20654         Merge in changes from libc's misc/error.c, in preparation
20655         for the merge of gnulib's changes back into libc.
20656
20657         * lib/error.c (_): Define only if not already defined.
20658         Move definition to follow all #include directives.
20659         Include unlocked-io.h only if !_LIBC.
20660         [_LIBC]: Include <libio/libioP.h>.
20661         [USE_IN_LIBIO]: Include <libio/iolibio.h>
20662         (fflush): Tweak definition to use INTUSE.
20663         (putc): Define.
20664
20665 2002-12-05  Paul Eggert  <eggert@twinsun.com>
20666
20667         * lib/alloca.c [defined emacs]: Include "lisp.h".
20668         (xalloc_die) [defined emacs]: New macro.
20669         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
20670         [! defined emacs]: Include <xalloc.h>.
20671         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
20672         (pointer): Typedef to POINTER_TYPE *.
20673         (malloc): Remove decl; we now always use xmalloc.
20674         (alloca): Use old-style definition, since Emacs needs this.
20675         Check for arithmetic overflow when computing combined size.
20676
20677 2002-12-04  Paul Eggert  <eggert@twinsun.com>
20678
20679         Do not generate unlocked-io.h automatically, since it's easier to
20680         maintain it by hand.
20681
20682         * lib/unlocked-io.h: New file, from GNU diffutils,
20683         but with proper copyright notice and attribution.
20684         * lib/gen-uio: Remove.
20685         * lib/Makefile.am: Add copyright notice.
20686         (libfetish_a_SOURCES): Add unlocked-io.h.
20687         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
20688         (DISTCLEANFILES, io_functions): Remove macros.
20689         (EXTRA_DIST): Remove gen_uio.
20690         (unlocked-io.h): Remove rule.
20691
20692 2002-12-04  Jim Meyering  <jim@meyering.net>
20693
20694         Reflect the fact that stat.c and lstat.c are no longer generated.
20695         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
20696         (DISTCLEANFILES): Likewise.
20697         (EXTRA_DIST): Likewise.
20698         (all_local): Don't depend on stat.c or lstat.c.
20699         (stat.c, lstat.c): Remove rules.
20700         (EXTRA_DIST): Remove xstat.in.
20701
20702         * lib/xstat.in: Remove file.  Contents moved into stat.c.
20703         * lib/stat.c: New file.  Contents mostly from xstat.in.
20704         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
20705         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
20706
20707         * lib/safe-read.c: Rework so that it may serve to define safe_write,
20708         too.
20709         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
20710
20711 2002-12-03  Jim Meyering  <jim@meyering.net>
20712
20713         * lib/safe-read.c, safe-write.c: Change variable names and comments,
20714         but not semantics, to minimize the differences between these two files.
20715         (safe_read): Change comment to mention SAFE_READ_ERROR.
20716
20717         * lib/safe-read.c (IS_EINTR): Define.
20718         (safe_read): Use IS_EINTR in place of in-function cpp directives.
20719
20720 2002-12-02  Jim Meyering  <jim@meyering.net>
20721
20722         * lib/safe-read.c (EINTR): Define.
20723         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
20724         (INT_MAX): Provide fallback.
20725         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
20726
20727         * lib/safe-read.h (SAFE_READ_ERROR): Define.
20728
20729 2002-12-02  Bruno Haible  <bruno@clisp.org>
20730
20731         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
20732         Define, taken from safe-read.c.
20733         (INT_MAX): Provide fallback.
20734         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
20735         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
20736
20737         * lib/safe-read.c (EINTR): Remove definition.
20738         (safe_read): Don't use EINTR if it is absent.
20739
20740 2002-12-01  Jim Meyering  <jim@meyering.net>
20741
20742         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
20743         zero.
20744         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
20745
20746 2002-11-27  Paul Eggert  <eggert@twinsun.com>
20747
20748         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
20749         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
20750         with `if (! (value < limit)) abort ();', for readability.
20751
20752 2002-11-26  Karl Berry  <karl@gnu.org>
20753
20754         * lib/strdup.c: copy from libc again, with jim's ok.
20755         * lib/.cppi-disable: re-add strdup.c
20756
20757 2002-11-25  Karl Berry  <karl@gnu.org>
20758
20759         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
20760         instead of "strtol.c".
20761
20762 2002-11-25  Karl Berry  <karl@gnu.org>
20763
20764         * config/install-sh: update from automake for variable quoting, $0 in
20765         error msgs, etc.
20766
20767         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
20768         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
20769         entry.
20770
20771 2002-11-25  Jim Meyering  <jim@meyering.net>
20772
20773         * lib/mktime.c: Sync from libc, now that it has the latest fix.
20774
20775 2002-11-24  Karl Berry  <karl@gnu.org>
20776
20777         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
20778         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
20779
20780 2002-11-24  Jim Meyering  <jim@meyering.net>
20781
20782         Update from coreutils:
20783
20784         * lib/mktime.c: Merge in changes from libc.
20785
20786         Avoid a link-time failure on some Linux systems.
20787         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
20788         (otherwise).
20789         (__mon_yday): Declare with the STATIC attribute.
20790         (__mktime_internal): Likewise.
20791         Based on a report from Greg Schafer.
20792
20793 2002-11-23  Jim Meyering  <jim@meyering.net>
20794
20795         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
20796         Use `unsigned', not `int', as type of index.
20797
20798         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
20799
20800         * lib/fsusage.c: Remove unneeded parentheses around operands of
20801         `defined'.
20802
20803 2002-11-22  Paul Eggert  <eggert@twinsun.com>
20804
20805         * lib/quotearg.h: Allow multiple inclusion by surrounding with
20806         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
20807         so that we can be included first.
20808         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
20809         * lib/quotearg.c: Include quotearg.h immediately after config.h.
20810         No need to include stddef.h or sys/types.h any more.
20811         Surround local include files with "", not "<>".
20812         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
20813         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
20814         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
20815         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20816         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20817         (ISPRINT): Remove; no longer needed now that we assume C89.
20818
20819         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
20820         Preserve errno.
20821
20822         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
20823         quotearg_char): Use SIZE_MAX rather than
20824         (size_t) -1 when we are talking about "infinity".
20825
20826         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
20827
20828 2002-11-22  Paul Eggert  <eggert@twinsun.com>
20829
20830         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
20831         hint that one should use `if (! x) abort ();' rather than `assert
20832         (x);', and anyway it's one less thing to worry about configuring.
20833         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
20834         hash_rehash, hash_insert): Use abort rather than assert.
20835
20836 2002-11-22  Bruno Haible  <bruno@clisp.org>
20837
20838         * lib/safe-read.h: Assume C89. Add comments.
20839         (safe_read): Change return type to size_t.
20840         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
20841         byte counts > SSIZE_MAX correctly.
20842         * lib/safe-write.h: New file.
20843         * lib/safe-write.c: New file.
20844         * lib/full-read.h: New file.
20845         * lib/full-read.c: New file.
20846         * lib/full-write.h: Assume C89. Add comments.
20847         * lib/full-write.c: Include safe-write.h.
20848         (full_write): Rewritten to use safe_write.
20849         Suggested by Jim Meyering and Paul Eggert.
20850
20851 2002-11-21  Jim Meyering  <jim@meyering.net>
20852
20853         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
20854
20855         Merge in changes from the coreutils.
20856
20857         2002-09-25  Paul Eggert  <eggert@twinsun.com>
20858         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
20859         <stdint.h>.
20860         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
20861         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
20862         int.  Work more efficiently if X is the same width as uintmax_t.
20863         Do not compare X to -1, to avoid bogus compiler warning.
20864         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
20865         Don't assume that f_frsize and f_bsize are the same type.
20866
20867         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
20868         warning on FreeBSD.
20869
20870         * lib/makepath.c (make_path): Restore umask *before* creating the final
20871         component.
20872         (make_path): Minor reformatting.
20873
20874         * lib/xmalloc.c: Adjust to work with new autoconf macros,
20875         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
20876         HAVE_MALLOC/HAVE_REALLOC.
20877
20878         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
20879         dummy ones.  At least on GNU/Linux systems, `auto' means something
20880         else.
20881         From Michael Stone.
20882
20883 2002-11-21  Bruno Haible  <bruno@clisp.org>
20884
20885         Remove case insensitive option matching.
20886         * lib/argmatch.h (argcasematch): Remove declaration.
20887         (ARGCASEMATCH): Remove macro.
20888         (__xargmatch_internal): Remove case_sensitive argument.
20889         (XARGMATCH): Update.
20890         (XARGCASEMATCH): Remove macro.
20891         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
20892         case_sensitive argument.
20893         (argcasematch): Remove function.
20894         (__xargmatch_internal): Remove case_sensitive argument.
20895         (main): Use XARGMATCH instead of XARGCASEMATCH.
20896
20897         * lib/xmalloc.c: Change compile-time error message. Add comment about
20898         required autoconf version.
20899
20900 2002-11-20  Paul Eggert  <eggert@twinsun.com>
20901
20902         Merge argmatch cleanups from Bison.  Assume C89.
20903
20904         * lib/argmatch.c: Include config.h here, not in argmatch.h.
20905         Include stdlib.h, for EXIT_FAILURE.
20906         Always include <string.h>, since we assume C89.
20907         (EXIT_FAILURE): Remove pre-C89 bug workaround.
20908         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
20909         Include <stddef.h> instead, since it's all we need for size_t.
20910         (PARAMS): Remove.  All uses removed.
20911         (ARRAY_CARDINALITY): Do not bother to #undef.
20912         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
20913         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20914         Remove unnecessary parentheses.
20915         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20916         Insert necessary parentheses.
20917         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
20918         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
20919
20920 2002-11-19  Bruno Haible  <bruno@clisp.org>
20921
20922         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
20923         * lib/mbswidth.h: Include <stddef.h>, for size_t.
20924
20925         * lib/mbswidth.h (PARAMS): Remove macro.
20926         (mbswidth, mbsnwidth): Use ANSI C function declarations.
20927         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
20928
20929         * lib/gcd.h (PARAMS): Remove macro.
20930         (gcd): Use ANSI C function declarations.
20931         * lib/gcd.c (gcd): Likewise.
20932
20933 2002-11-15  Bruno Haible  <bruno@clisp.org>
20934
20935         * lib/strcspn.c: Include <stddef.h>.
20936         (strcspn): Use ANSI C function declaration. Change return type to
20937         size_t. Use NULL.
20938         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
20939         (strpbrk): Use NULL.
20940         * lib/strpbrk.h (PARAMS): Remove macro.
20941         (strpbrk): Use ANSI C function declaration.
20942         * lib/strstr.c: Don't include <sys/types.h>.
20943         * lib/strstr.h (PARAMS): Remove macro.
20944         (strstr): Use ANSI C function declarations.
20945
20946 2002-11-14  Karl Berry  <karl@gnu.org>
20947
20948         * config/mkinstalldirs: `do' on separate line, instead of
20949         `for var; do'.
20950
20951 2002-11-06  Bruno Haible  <bruno@clisp.org>
20952
20953         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
20954         * lib/gcd.c (gcd): Likewise.
20955
20956 2002-11-05  Bruno Haible  <bruno@clisp.org>
20957
20958         * lib/gcd.h: New file, from gettext-0.11.5.
20959         * lib/gcd.c: New file, from gettext-0.11.5.
20960
20961 2002-11-05  Bruno Haible  <bruno@clisp.org>
20962
20963         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20964         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20965         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20966         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20967
20968         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
20969         <libintl.h>.
20970         * lib/makepath.c: Include gettext.h instead of <locale.h> and
20971         <libintl.h>.
20972
20973         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
20974         * lib/human.c: Include gettext.h instead of <libintl.h>.
20975         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
20976         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
20977         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
20978         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
20979         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
20980         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
20981         (textdomain): Remove definition.
20982         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
20983
20984         * lib/long-options.c: Remove include of <libintl.h> and definition of
20985         _.
20986         * lib/same.c: Remove include of <libintl.h> and definition of _.
20987
20988 2002-11-04  Owen Taylor  <otaylor@redhat.com>
20989
20990         * lib/config.charset: A few additions for Solaris.
20991
20992 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20993
20994         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
20995         * lib/localcharset.c (locale_charset): Declare as extern "C".
20996
20997 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20998
20999         * lib/config.charset: msdos in uk_UA uses CP1125.
21000
21001 2002-11-04  Bruno Haible  <bruno@clisp.org>
21002
21003         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
21004         * lib/strcase.h: New file, from GNU gettext-0.11.5.
21005         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
21006         * lib/strstr.h: New file, from GNU gettext-0.11.5.
21007         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
21008
21009 2002-11-04  Bruno Haible  <bruno@clisp.org>
21010
21011         * lib/localcharset.c (locale_charset): Don't return an empty string.
21012
21013 2002-11-04  Bruno Haible  <bruno@clisp.org>
21014
21015         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
21016         aliases.
21017
21018 2002-11-04  Bruno Haible  <bruno@clisp.org>
21019
21020         * lib/config.charset: Update for newest glibc. Add canonical names
21021         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
21022
21023 2002-11-04  Bruno Haible  <bruno@clisp.org>
21024
21025         * lib/config.charset: Add support for NetBSD.
21026
21027 2002-11-04  Bruno Haible  <bruno@clisp.org>
21028
21029         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
21030
21031 2002-11-01  Bruno Haible  <bruno@clisp.org>
21032
21033         * configure.in: Add AC_CONFIG_AUX_DIR call.
21034         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
21035         test/Makefile.
21036         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
21037
21038 2002-09-28  Karl Berry  <karl@gnu.org>
21039
21040         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
21041         installed automake until the next release, since changes have been
21042         made.
21043
21044 2002-09-25  Karl Berry  <karl@gnu.org>
21045
21046         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
21047         * lib/getopt*: copy from libc/posix.
21048         * lib/gettext.h: copy from gettext.
21049         * lib/.cppi-disable: add strdup.c, gettext.h.
21050
21051 2002-09-25  Karl Berry  <karl@gnu.org>
21052
21053         * config/srclist.txt: enable gettext.h check.
21054         * config/config.{guess,sub}: update from prep.
21055         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
21056                 from automake 1.6.3.
21057         See srclist*.
21058
21059 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
21060
21061         * regex.c (PATFETCH): Remove the translating fetch.
21062         (PATFETCH_RAW): Rename to PATFETCH.
21063         (set_image_of_range): New fun.
21064         (SET_RANGE_TABLE_WORK_AREA): Use it.
21065         (regex_compile): Don't translate the pattern chars so eagerly.
21066         Only do it when inserting an `exactn' bytecode or when handling
21067         a char-range.
21068         (mutually_exclusive_p): Avoid empty statement.
21069
21070 2002-07-06  Jim Meyering  <meyering@lucent.com>
21071
21072         * m4/README: Don't mention Makefile.am.in.
21073         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
21074
21075 2002-07-01  Jim Meyering  <meyering@lucent.com>
21076
21077         * lib/c-stack.c: Include sys/time.h.
21078         From Volker Borchert.
21079
21080 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21081
21082         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
21083
21084 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21085
21086         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
21087         New macro.  Use it uniformly instead of
21088         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
21089         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
21090         reported by Vin Shelton.
21091
21092 2002-06-22  Paul Eggert  <eggert@twinsun.com>
21093
21094         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
21095         Do not assume SA_SIGINFO behavior.
21096         Bug reported by Jim Meyering on NetBSD 1.5.2.
21097
21098 2002-06-22  Jim Meyering  <meyering@lucent.com>
21099
21100         * m4/c-stack.m4: New file, from diffutils-2.8.2.
21101         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
21102
21103         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
21104         now that configure.ac uses AC_GNU_SOURCE.
21105         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
21106         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
21107
21108         Update to latest tools.  Suggestions from Paul Eggert.
21109         * m4/stdbool.m4: New file, from diffutils-2.8.2.
21110         * m4/gnu-source.m4: Update from diffutils-2.8.2.
21111         * m4/fnmatch.m4: Likewise.
21112         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
21113         to AC_HEADER_STDBOOL
21114
21115 2002-06-22  Jim Meyering  <meyering@lucent.com>
21116
21117         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
21118         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
21119
21120 2002-06-22  Jim Meyering  <meyering@lucent.com>
21121
21122         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
21123
21124         * lib/exitfail.c, exitfail.h: Likewise.
21125         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
21126
21127         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
21128         of fnmatch.h.
21129         (EXTRA_DIST): Add fnmatch_loop.c.
21130         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
21131
21132         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
21133         * lib/fnmatch.c: Update from diffutils-2.8.2.
21134         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
21135         * lib/fnmatch.h: Remove file.
21136
21137 2002-06-21  Jim Meyering  <meyering@lucent.com>
21138
21139         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
21140         * m4/mbrtowc.m4: Likewise.
21141
21142         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
21143         * m4/mbswidth.m4: Reflect name change:
21144         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
21145         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21146
21147         * m4/lib-link.m4: Update from gettext-0.11.2.
21148         * m4/gettext.m4: Likewise.
21149
21150         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
21151         From Alfred M. Szmidt.
21152
21153 2002-06-18  Paul Eggert  <eggert@twinsun.com>
21154
21155         * lib/file-type.h: Report an error if neither S_ISREG nor
21156         S_IFREG is defined, instead of using a test specific to glibc
21157         2.2.  This should be safe, since POSIX requires S_ISREG and
21158         Unix Version 7 had S_IFREG.  We don't need to check for
21159         <sys/types.h> since we don't use any symbols that it defines.
21160
21161 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
21162
21163         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
21164         $@-t, so that each temporary file name is unique and valid in the first
21165         8 characters, for operation under DOS.
21166
21167 2002-06-15  Paul Eggert  <eggert@twinsun.com>
21168
21169         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
21170
21171 2002-06-15  Jim Meyering  <meyering@lucent.com>
21172
21173         Work even with DJGPP 2.03, which lacks support for symlinks.
21174         From Richard Dawe.
21175         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
21176         is defined.
21177         * lib/lchown.c (S_ISLNK): Likewise.
21178
21179 2002-06-15  Jim Meyering  <meyering@lucent.com>
21180
21181         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
21182         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
21183         have been included before this file.
21184
21185 2002-06-14  Jim Meyering  <meyering@lucent.com>
21186
21187         * lib/file-type.h: Use the version from diffutils-2.8.2.
21188         * lib/file-type.c: Likewise.
21189
21190 2002-06-07  Jim Meyering  <meyering@lucent.com>
21191
21192         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
21193         They're needed at least for NetBSD 1.5.2.
21194         ($statxfs_includes): Include those same headers.
21195         ($statxfs_includes): Include sys/vfs.h if available.
21196         ($statxfs_includes): Likewise for sys/statvfs.h.
21197         Check for the following members in both structs statfs and statvfs:
21198         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
21199
21200 2002-06-01  Jim Meyering  <meyering@lucent.com>
21201
21202         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
21203         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
21204
21205 2002-05-28  Jim Meyering  <meyering@lucent.com>
21206
21207         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
21208         Reported by Volker Borchert.
21209
21210 2002-05-27  Jim Meyering  <meyering@lucent.com>
21211
21212         Fix a problem seen only on nonconforming systems whereby ls.c's
21213         use of localtime, and then of gettimeofday would cause trouble:
21214         the localtime call used to initialize rpl_gettimeofday's save
21215         mechanism would clobber ls's current local time information so
21216         that in any long listing the first file would always be listed
21217         with date 1970-01-01.  Analysis by Volker Borchert.
21218
21219         * lib/gettimeofday.c (localtime): Undefine.
21220         (rpl_localtime): New function.
21221
21222 2002-05-27  Jim Meyering  <meyering@lucent.com>
21223
21224         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
21225         localtime.
21226
21227         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
21228         use the replacement function; it wouldn't resolve at link time.
21229         Reported by Volker Borchert.
21230
21231 2002-05-22  Jim Meyering  <meyering@lucent.com>
21232
21233         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
21234         file-type.h.
21235         * lib/file-type.h: New file.
21236         * lib/file-type.c (file_type): New file/function.  Extracted from
21237         diffutils.
21238
21239 2002-04-30  Jim Meyering  <meyering@lucent.com>
21240
21241         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
21242
21243 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21244
21245         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
21246
21247 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21248
21249         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
21250         Do not check for alloca.h (no longer used) or stdbool.h (was never
21251         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
21252
21253 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21254
21255         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
21256
21257 2002-04-29  Jim Meyering  <meyering@lucent.com>
21258
21259         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
21260         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
21261         Use AC_FUNC_STRNLEN here instead.
21262
21263         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
21264         With autoconf-2.53a, it's part of AC_PROG_CC.
21265
21266 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21267
21268         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
21269         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
21270
21271 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21272
21273         * lib/sig2str.h, lib/sig2str.c: New files.
21274         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
21275
21276 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21277
21278         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
21279         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
21280         of 127, since 64 is the largest conceivable number for ancient
21281         nonstandard hosts.
21282         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
21283
21284 2002-04-28  Jim Meyering  <meyering@lucent.com>
21285
21286         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
21287
21288 2002-04-24  Jim Meyering  <meyering@lucent.com>
21289
21290         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
21291         (jm_PREREQ): Use it.
21292
21293         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
21294         mach/mach.h fcntl.h.
21295         Check for this function: setlocale.
21296
21297 2002-04-24  Jim Meyering  <meyering@lucent.com>
21298
21299         * lib/gettext.h: New file, from Gettext.
21300         * lib/Makefile.am (INCLUDES): Remove -I../intl.
21301         (libfetish_a_SOURCES): Add gettext.h.
21302
21303 2002-04-16  Jim Meyering  <meyering@lucent.com>
21304
21305         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
21306         ut_pid, ut_id, ut_exit.
21307
21308 2002-04-16  Jim Meyering  <meyering@lucent.com>
21309
21310         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
21311         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
21312         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
21313
21314 2002-04-12  Jim Meyering  <meyering@lucent.com>
21315
21316         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
21317         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
21318         existence of the getmntinfo function.  Needed for Darwin 5.3.
21319
21320         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
21321         This is necessary at least on Darwin 5.3.
21322
21323         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
21324         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
21325         strnlen.o in the library, and that makes some versions of ranlib
21326         object.
21327
21328 2002-04-12  Jim Meyering  <meyering@lucent.com>
21329
21330         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
21331
21332 2002-04-09  Jim Meyering  <meyering@lucent.com>
21333
21334         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
21335         to be more precise.  Rather than saying we're checking whether the
21336         function `works', say what we're testing.
21337         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
21338         Reported by Bruno Haible.
21339
21340 2002-03-10  Jim Meyering  <meyering@lucent.com>
21341
21342         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
21343         Suggestion from Santiago Vila.
21344
21345 2002-03-08  Jim Meyering  <meyering@lucent.com>
21346
21347         * lib/rename.c: Mention that this wrapper is needed also on
21348         mips-dec-ultrix4.4 systems.
21349
21350 2002-03-02  Jim Meyering  <meyering@lucent.com>
21351
21352         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
21353         not HAVE_CLOCK_SETTIME.
21354
21355 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21356
21357         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
21358         Check for clock_settime.
21359
21360 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21361
21362         * lib/nanosleep.h: Rename to....
21363         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
21364
21365         * lib/gettime.c: New file.
21366         * lib/settime.c: New file.
21367         * lib/stime.c: Remove.
21368
21369         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
21370         timespec.h.  Remove nanosleep.h.
21371
21372 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21373
21374         * m4/acl.m4: New file.
21375         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
21376         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
21377
21378 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21379
21380         * lib/acl.c, lib/acl.h: New files.
21381         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
21382
21383 2002-02-24  Jim Meyering  <meyering@lucent.com>
21384
21385         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
21386         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
21387         cause trouble.  Reported by Nelson Beebe.
21388
21389 2002-02-23  Paul Eggert  <eggert@twinsun.com>
21390
21391         * lib/path-concat.c (xpath_concat): Reorder code to pacify
21392         compilers that don't know that xalloc_die never returns.
21393
21394 2002-02-20  Jim Meyering  <meyering@lucent.com>
21395
21396         * lib/getdate.c: Regenerate using bison-1.33.
21397
21398 2002-02-17  Jim Meyering  <meyering@lucent.com>
21399
21400         * config/config.guess (main): Don't use `head -1'; it's no longer
21401         portable. Use `sed 1q' instead.
21402
21403 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
21404
21405         * m4/codeset.m4: Upgrade to gettext-0.11.
21406         * m4/gettext.m4: Upgrade to gettext-0.11.
21407         * m4/glibc21.m4: Upgrade to gettext-0.11.
21408         * m4/iconv.m4: Upgrade to gettext-0.11.
21409         * m4/isc-posix.m4: Upgrade to gettext-0.11.
21410         * m4/lcmessage.m4: Upgrade to gettext-0.11.
21411         * m4/lib-ld.m4: New file, from gettext-0.11.
21412         * m4/lib-link.m4: New file, from gettext-0.11.
21413         * m4/lib-prefix.m4: New file, from gettext-0.11.
21414         * m4/progtest.m4: Upgrade to gettext-0.11.
21415
21416 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21417
21418         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
21419         (jm_PREREQ): Use it.
21420
21421 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21422
21423         * lib/posixver.c, lib/posixver.h: New files.
21424         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21425
21426 2002-02-02  Paul Eggert  <eggert@twinsun.com>
21427             Bruno Haible  <bruno@clisp.org>
21428
21429         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
21430         (fwrite_success_callback): New declaration.
21431         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
21432         print_unicode_char. Call failure callback instead of error.
21433         (fwrite_success_callback): New function.
21434         (exit_failure_callback): New function.
21435         (fallback_failure_callback): New function.
21436         (print_unicode_char): Call unicode_to_mb.
21437
21438 2002-01-26  Jim Meyering  <meyering@lucent.com>
21439
21440         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
21441         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
21442
21443 2002-01-26  Jim Meyering  <meyering@lucent.com>
21444
21445         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
21446
21447 2002-01-22  Paul Eggert  <eggert@twinsun.com>
21448
21449         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
21450
21451 2002-01-22  Jim Meyering  <meyering@lucent.com>
21452
21453         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
21454         Otherwise, some versions of automake would omit the rule that makes
21455         Makefile from Makefile.in.
21456
21457 2002-01-21  Paul Eggert  <eggert@twinsun.com>
21458
21459         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
21460         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21461         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
21462         (memcoll): Set errno to zero if there is no error.
21463
21464         * lib/quotearg.c (quotearg_buffer_restyled):
21465         Fix bug with quoting buffers containing NUL when backslashing escapes.
21466         This bug was exposed by the other changes in this patch.
21467         (quotearg_n_options): New arg ARGSIZE.
21468         All callers changed.
21469         (quoting_options_from_style): New function.
21470         (quotearg_n_style): Use it.
21471         (quotearg_n_style_mem): New function.
21472
21473         * lib/quotearg.h (quotearg_n_style_mem): New function.
21474
21475 2002-01-19  Jim Meyering  <meyering@lucent.com>
21476
21477         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
21478         Remove useless quotes: DF_PROG="df".
21479         * m4/strnlen.m4: New file.
21480
21481 2002-01-16  Paul Eggert  <eggert@twinsun.com>
21482
21483         * lib/backupfile.c (ISDIGIT): Comment fix.
21484         * lib/getdate.y (ISDIGIT): Likewise.
21485         * lib/posixtm.c (ISDIGIT, year): Likewise.
21486         * lib/strverscmp.c (ISDIGIT): Likewise.
21487         * lib/userspec.c (ISDIGIT): Likewise.
21488
21489 2002-01-16  Jim Meyering  <meyering@lucent.com>
21490
21491         * lib/getdate.y: Add three semicolons, each just before a closing
21492         brace. Bison (as of version 1.31) no longer papers over that mistake.
21493
21494 2002-01-05  Jim Meyering  <meyering@lucent.com>
21495
21496         * lib/version-etc.c (version_etc_copyright): Update copyright year.
21497
21498 2001-12-19  Paul Eggert  <eggert@twinsun.com>
21499
21500         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
21501         not silently exit merely because the output buffer happens to
21502         have nothing pending.
21503
21504 2001-12-18  Paul Eggert  <eggert@twinsun.com>
21505
21506         See the big note in ../ChangeLog.
21507         * lib/human.c (suffixes): Prefer K to k for 1024.
21508         (generate_suffix_backwards): New function.
21509         (human_readable_inexact): Use it.
21510         * lib/xstrtol.c (__xstrtol): If there is no number but there
21511         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
21512         Accept 'K' as well as 'k'.
21513
21514 2001-12-15  Jim Meyering  <meyering@lucent.com>
21515
21516         * lib/regex.h (__restrict_arr): Update from libc.
21517
21518         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
21519         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
21520         (STREQ): Define.
21521
21522 2001-12-14  Jim Meyering  <meyering@lucent.com>
21523
21524         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
21525         Suggestion from Bruno Haible.
21526
21527 2001-12-10  Jim Meyering  <meyering@lucent.com>
21528
21529         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
21530         xrealloc, Instead, include "xalloc.h".
21531         (initbuffer): Don't cast xmalloc return value to char*.
21532         (readline): Reword comment.
21533         Don't cast xrealloc return value to char*
21534         Return NULL, not 0.
21535
21536 2001-12-09  Jim Meyering  <meyering@lucent.com>
21537
21538         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
21539         about `signed and unsigned type in conditional expression'.
21540         * lib/posixtm.c (posix_time_parse): Likewise.
21541
21542         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
21543
21544         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
21545         to avoid a pedantic warning.
21546
21547         * lib/getstr.c: Don't include assert.h.
21548         (getstr): Remove warning-evoking assertions.
21549         Return -1 if offset parameter is out of bounds.
21550         Change the type of a local from int to size_t.
21551
21552         * lib/strftime.c (my_strftime_localtime_r): Include this function
21553         definition in the `#if ! HAVE_TM_GMTOFF' block.
21554
21555         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
21556         Include xalloc.h instead.
21557
21558 2001-12-02  Jim Meyering  <meyering@lucent.com>
21559
21560         * lib/tempname.c: Don't declare getenv, thus reverting the change of
21561         2001-11-18.  It's no longer necessary, now that stdlib.h is always
21562         included.
21563
21564         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
21565         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
21566
21567 2001-11-30  Akim Demaille  <akim@epita.fr>
21568
21569         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
21570         before being defined.
21571
21572 2001-11-27  Paul Eggert  <eggert@twinsun.com>
21573
21574         * lib/quotearg.h (quotearg_n, quotearg_n_style):
21575         First arg is int, not unsigned.
21576         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21577         (SIZE_MAX, UINT_MAX): New macros.
21578         (quotearg_n_options): Abort if N is negative.
21579         Avoid overflow check on hosts where size_t is 64 bits and int
21580         is 32 bits, as overflow is impossible there.
21581         Fix off-by-one typo that caused unnecessary reallocation.
21582
21583 2001-11-27  Jim Meyering  <meyering@lucent.com>
21584
21585         * lib/tempname.c: Merge with version from libc.
21586         * lib/regex.c: Likewise.
21587
21588         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
21589         systems for which STDC_HEADERS is 0, it was not included, resulting in
21590         a warning about an integer-to-pointer conversion problem with getenv.
21591         Reported by Volker Borchert.
21592
21593 2001-11-26  Jim Meyering  <meyering@lucent.com>
21594
21595         * lib/gtod.h: Remove file.
21596         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
21597         * lib/gettimeofday.c: Don't include gtod.h.
21598         (GTOD_init): Remove function.
21599         (rpl_gettimeofday): Do its job here instead, rather than aborting.
21600         Suggestion from Volker Borchert.
21601
21602 2001-11-23  Jim Meyering  <meyering@lucent.com>
21603
21604         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
21605         it.
21606         * lib/hash.c (struct hash_table): Define it here instead.
21607
21608 2001-11-22  Jim Meyering  <meyering@lucent.com>
21609
21610         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
21611
21612 2001-11-20  Jim Meyering  <meyering@lucent.com>
21613
21614         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
21615         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
21616
21617 2001-11-19  Jim Meyering  <meyering@lucent.com>
21618
21619         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
21620         directory.  Use "conftestXXXXXX" as the template.
21621         Suggestion from Paul Eggert.
21622
21623         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
21624         immediately, so the test doesn't mistakenly hit the max-open-files
21625         limit.
21626
21627 2001-11-18  Paul Eggert  <eggert@twinsun.com>
21628
21629         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
21630         (TEMPORARIES): New macro.
21631         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
21632         removes an artificial limitation (e.g. HP-UX 10.20, where
21633         TMP_MAX is 17576).
21634
21635 2001-11-18  Jim Meyering  <meyering@lucent.com>
21636
21637         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
21638
21639 2001-11-18  Jim Meyering  <meyering@lucent.com>
21640
21641         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
21642         on SunOS 4.
21643
21644         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
21645         files will be created before anything else.
21646
21647 2001-11-17  Paul Eggert  <eggert@twinsun.com>
21648
21649         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
21650         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
21651
21652 2001-11-17  Jim Meyering  <meyering@lucent.com>
21653
21654         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
21655         Prompted by a report from Bob Proulx.
21656
21657         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
21658         Instead, require UTILS_FUNC_MKSTEMP.
21659
21660 2001-11-17  Jim Meyering  <meyering@lucent.com>
21661
21662         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
21663         Now, that's done as part of AC_FUNC_STRTOD.
21664
21665 2001-11-17  Jim Meyering  <meyering@lucent.com>
21666
21667         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
21668         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
21669         rather than group writable.  Patch by Juan F. Codagnone.
21670
21671         * lib/readtokens.c: Remove explicit declarations of xmalloc and
21672         xrealloc, Instead, include "xalloc.h".
21673
21674         * lib/mountlist.c: Include unlocked-io.h after all system headers.
21675         Remove explicit declarations of xmalloc, xrealloc,
21676         and xstrdup.  Instead, include "xalloc.h".
21677
21678         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
21679         unlocked-io.h.
21680         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
21681         Likewise.
21682         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
21683
21684         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
21685         Reported by Padraig Brady.
21686
21687         * lib/mkstemp.c: #undef mkstemp.
21688         Include config.h.
21689         (rpl_mkstemp): Rename from mkstemp.
21690         Protoize.
21691
21692 2001-11-16  Jim Meyering  <meyering@lucent.com>
21693
21694         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
21695         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
21696         determine the amount of total physical memory, use pstat_getstatic.
21697         HPUX-11 doesn't define _SC_PHYS_PAGES.
21698         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
21699         If sysconf couldn't be used to determine the amount of available
21700         physical memory, use both pstat_getstatic and pstat_getdynamic.
21701         Based on a patch from Bob Proulx.
21702
21703 2001-11-10  Jim Meyering  <meyering@lucent.com>
21704
21705         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
21706         (jm_PREREQ): Use it.
21707
21708 2001-11-09  Jim Meyering  <meyering@lucent.com>
21709
21710         * m4/jm-macros.m4: Require autoconf-2.52f.
21711         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
21712         Use these AC_-prefixed names, not the AM_-prefixed ones.
21713
21714         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
21715
21716 2001-11-05  Jim Meyering  <meyering@lucent.com>
21717
21718         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
21719
21720 2001-11-04  Jim Meyering  <meyering@lucent.com>
21721
21722         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
21723         $DEFS.
21724
21725 2001-11-03  Jim Meyering  <meyering@lucent.com>
21726
21727         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
21728         of AC_DEFUN.
21729
21730         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
21731         know the name of the variable in the macro definition.
21732
21733 2001-11-03  Jim Meyering  <meyering@lucent.com>
21734
21735         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
21736         in argmatch_to_argument call.
21737
21738         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
21739         argument.
21740
21741         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
21742         e.g., a fault due to an attempt to free a NULL pointer.
21743
21744 2001-11-01  Jim Meyering  <meyering@lucent.com>
21745
21746         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
21747         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
21748
21749 2001-11-01  Jim Meyering  <meyering@lucent.com>
21750
21751         * lib/dirfd.c, lib/dirfd.h: New files.
21752         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
21753
21754         * lib/hash.c (hash_print) [TESTING]: Clean up.
21755
21756 2001-10-22  Paul Eggert  <eggert@twinsun.com>
21757
21758         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
21759         to avoid a warning if -Wall.
21760
21761 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
21762
21763         * README: New file
21764         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
21765         (per RMS's instructions, this is now the canonical source)
21766         * lgpl/, gpl/: New directories.
21767
21768 2001-10-21  Paul Eggert  <eggert@twinsun.com>
21769
21770         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
21771
21772 2001-10-21  Jim Meyering  <meyering@lucent.com>
21773
21774         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
21775         this code would end up calling gettext even in packages built
21776         with --disable-nls.
21777         * lib/getopt.c (_): Likewise.
21778         * lib/regex.c (_): Likewise.
21779
21780 2001-10-20  Paul Eggert  <eggert@twinsun.com>
21781
21782         * m4/error.m4 (jm_PREREQ_ERROR):
21783         Do not invoke AC_CHECK_FUNCS with strerror_r, as
21784         AC_FUNC_STRERROR_R does that.
21785         Check for strerror declaration.
21786
21787         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
21788         are supposed to have them these days.
21789         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
21790         Merge changes from latest Autoconf CVS.
21791         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
21792         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
21793         POSIX decided to standardize on the int flavor of strerror_r.
21794
21795 2001-10-20  Paul Eggert  <eggert@twinsun.com>
21796
21797         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
21798         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
21799         Use strerror_r that is only a macro, even if it is not a function.
21800         (strerror): Check for HAVE_DECL_STRERROR before declaring.
21801         (private_strerror): Use prototypes, not old-style function definition.
21802         (print_errno_message): New function.
21803         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
21804         char*-flavored one.
21805         (error_tail, error, error_at_line): Use it.
21806
21807 2001-10-11  Jim Meyering  <meyering@lucent.com>
21808
21809         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
21810         and quote_n (1, ... to avoid clobbering a buffer.
21811
21812 2001-10-05  Jim Meyering  <meyering@lucent.com>
21813
21814         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
21815         hash-pjw.h.
21816         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
21817         * lib/hash-pjw.h: New file.
21818
21819 2001-09-30  Jim Meyering  <meyering@lucent.com>
21820
21821         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
21822         `struct fsstat' has the `f_fstypename' member.
21823         Use that to define FS_TYPE, which is now used to make
21824         the getfsstat link test tighter.
21825
21826 2001-09-30  Jim Meyering  <meyering@lucent.com>
21827
21828         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
21829         Include <sys/ucred.h>, for Apple Darwin.
21830         Include sys/mount.h and sys/fs_types.h only if available.
21831         (FS_TYPE): Define.
21832         (read_filesystem_list): Use FS_TYPE.
21833
21834 2001-09-29  Paul Eggert  <eggert@twinsun.com>
21835
21836         * lib/exclude.c (excluded_filename): 0 -> false, since it's
21837         a boolean context.
21838
21839 2001-09-29  Jim Meyering  <meyering@lucent.com>
21840
21841         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
21842         [one-argument getmntent function]): Include stdio.h before mntent.h.
21843         SunOS 4.1.x needs it for the declaration of `FILE'.
21844         Patch by Volker Borchert.
21845
21846         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
21847         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
21848         sys/fs_types.h, and make the link-test for getfsstat guard #include
21849         directives with appropriate #if HAVE_*_H tests so that we can
21850         detect getfsstat on Apple Darwin1.3.7 systems.
21851         Reported by Nelson Beebe.
21852         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
21853
21854 2001-09-28  Paul Eggert  <eggert@twinsun.com>
21855
21856         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
21857         #defines strtoimax.  Also treat the other strto* functions
21858         like strtoimax.
21859
21860         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
21861         Check for strtoul and strtoumax,
21862         as those declarations are made even in the signed case.
21863         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
21864         Likewise, for strtol and strtoimax.
21865
21866 2001-09-28  Paul Eggert  <eggert@twinsun.com>
21867
21868         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
21869         #defines strtoimax.  Also treat the other strto* functions
21870         like strtoimax.
21871
21872         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
21873         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
21874         (strtoimax, strtoumax): Do not declare if already defined as a macro.
21875
21876 2001-09-26  Jim Meyering  <meyering@lucent.com>
21877
21878         Most macros in unlocked-io.h had the wrong number of arguments.
21879         * lib/gen-uio: New script.
21880         (USE_UNLOCKED_IO): Define to 1 if not already defined.
21881         * lib/unlocked-io.hin: Remove file.
21882         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
21883         rather than trying to embed it here.
21884         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
21885         Reported by Padraig Brady.
21886
21887 2001-09-25  Volker Borchert  <bt@teknon.de>
21888
21889         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
21890         `result'.
21891
21892 2001-09-24  Jim Meyering  <meyering@lucent.com>
21893
21894         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
21895
21896 2001-09-23  Jim Meyering  <meyering@lucent.com>
21897
21898         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
21899         instead of the mere test for existence of mntent.h.  The latter
21900         would get a false-positive on AIX 3.4 systems.
21901         In the outer getmntent if-block, don't die if neither of the getmntent
21902         tests succeeds.  Instead, just fall through and continue with the
21903         remaining tests.
21904
21905 2001-09-23  Jim Meyering  <meyering@lucent.com>
21906
21907         * lib/mountlist.c: Remove useless parentheses in #if directives.
21908         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
21909         the deprecated MOUNTED symbol is no longer defined in mntent.h.
21910
21911 2001-09-22  Jim Meyering  <meyering@lucent.com>
21912
21913         * m4/gettext.m4: New file.  From gettext.
21914         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
21915         * m4/progtest.m4: Likewise
21916         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
21917         * m4/glibc21.m4: Likewise.
21918
21919         * m4/libintl.m4: Remove.  No longer used.
21920
21921 2001-09-22  Jim Meyering  <meyering@lucent.com>
21922
21923         * lib/localcharset.c: Update from latest gettext.
21924         * lib/config.charset: Likewise.
21925
21926 2001-09-20  Jim Meyering  <meyering@lucent.com>
21927
21928         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
21929         strtoimax.
21930         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
21931         strtoumax.
21932
21933 2001-09-20  Jim Meyering  <meyering@lucent.com>
21934
21935         * lib/xstrtol.c (strtoimax): Guard declaration with
21936         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
21937         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
21938         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
21939         (strtoumax): Likewise, for completeness (it wasn't necessary).
21940
21941 2001-09-17  Paul Eggert  <eggert@twinsun.com>
21942
21943         * lib/strtoimax.c (HAVE_LONG_LONG):
21944         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
21945         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
21946         to work around bug in IBM C compiler.
21947
21948 2001-09-17  Jim Meyering  <meyering@lucent.com>
21949
21950         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
21951         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
21952         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
21953         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
21954         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
21955         whenever the right hand side need not be expanded by the shell.
21956
21957 2001-09-16  Paul Eggert  <eggert@twinsun.com>
21958
21959         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
21960         library.  It's not correct, as some older glibcs are buggy.
21961         fnmatch wasn't fixed until glibc 2.2.
21962
21963         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
21964         special shell magic here.
21965
21966 2001-09-16  Jim Meyering  <meyering@lucent.com>
21967
21968         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
21969         * m4/jm-macros.m4: Require it.
21970
21971 2001-09-16  Jim Meyering  <meyering@lucent.com>
21972
21973         * lib/mkdir.c: New file.
21974
21975 2001-09-15  Jim Meyering  <meyering@lucent.com>
21976
21977         * m4/jm-macros.m4: Check for help2man.
21978
21979 2001-09-11  Jim Meyering  <meyering@lucent.com>
21980
21981         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
21982         The body, by Paul Eggert, was moved here from configure.in.
21983         * m4/jm-macros.m4: Require UTILS_HOST_OS.
21984
21985 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21986
21987         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
21988         (jm_PREREQ): Use it.
21989
21990 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21991
21992         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
21993         Use ssize_t, not int, to store result of readlink.
21994         Check for ssize_t overflow as well as size_t overflow,
21995         as POSIX says the result of readlink is implementation-defined
21996         when ssize_t overflows.
21997         Remove unnecessary cast to char*.
21998         Use free+malloc instead of realloc, as the storage doesn't need
21999         to be preserved and it's clearer and can be more efficient that way.
22000         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
22001         * lib/xreadlink.h (xreadlink): Update prototype.
22002
22003 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22004
22005         * lib/xgetcwd.c: Revert some of the previous change; intead,
22006         fix the HAVE_GETCWD_NULL code to behave more like the
22007         !HAVE_GETCWD_NULL code used to.
22008
22009         Include "xalloc.h".
22010         (xgetcwd): Do not return NULL when memory is exhausted; instead,
22011         invoke xalloc_die.
22012
22013 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22014
22015         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
22016         sys/param.h, as pathmax.h includes them.
22017
22018 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22019
22020         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
22021         (jm_PREREQ_XGETCWD): New macro.
22022
22023         * m4/getcwd.m4: New file.
22024
22025 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22026
22027         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
22028         like the HAVE_GETCWD_NULL code.
22029         Include pathmax.h if not HAVE_GETCWD.
22030         Do not include xalloc.h.
22031         (INITIAL_BUFFER_SIZE): New symbol.
22032         Do not use xmalloc / xrealloc, since the caller is responsible for
22033         handling errors.  Preserve errno around `free' during failure.
22034         Do not overrun buffer when using getwd.
22035
22036 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22037
22038         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
22039         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
22040         getcwd (NULL, 0).
22041
22042 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22043
22044         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
22045         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
22046         spotted by Jim Meyering.
22047
22048 2001-09-03  Jim Meyering  <meyering@lucent.com>
22049
22050         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
22051         failure.
22052
22053 2001-09-02  Jim Meyering  <meyering@lucent.com>
22054
22055         * lib/error.c: Update from GNU libc.
22056
22057 2001-09-01  Jim Meyering  <meyering@lucent.com>
22058
22059         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
22060         Used by df.
22061
22062 2001-09-01  Jim Meyering  <meyering@lucent.com>
22063
22064         * lib/xreadlink.c: New file.
22065         * lib/xreadlink.h: New file.
22066         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
22067         xreadlink.h.
22068
22069         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
22070         doesn't conflict with sparc Solaris 7's definition in
22071         /usr/include/sys/int_types.h.
22072
22073         * lib/exclude.c: Use `""', not `<>' to #include non-system header
22074         files.
22075         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
22076         and strncasecmp as r-values.  Unixware didn't have declarations.
22077
22078 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22079
22080         * lib/xstrtol.h: Add copyright notice.
22081         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
22082         LONGINT_INVALID_SUFFIX_CHAR.
22083
22084 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22085
22086         * lib/xstrtol.c (strtoimax): New decl.
22087
22088 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22089
22090         * lib/xgetcwd.c: Don't include pathmax.h.
22091         Include stdlib.h and unistd.h if available.
22092         Include xalloc.h.
22093         (xmalloc, xstrdup, free): Remove decls.
22094         (xgetcwd): Don't assume sizes fit in unsigned.
22095         Check for overflow when computing sizes.
22096         Simplify reallocation code.
22097
22098 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22099
22100         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
22101         a directory's st_size can have an arbitrary value, so the old
22102         usage could waste an arbitrary amount of memory.  All uses
22103         changed.
22104         * lib/savedir.h: Update prototype.
22105
22106 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22107
22108         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
22109
22110         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
22111         old strtoimax.c.
22112
22113         Also, make the following further changes to make this file's
22114         configuration more similar to that of strtol.c:
22115         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
22116         (strtoumax, uintmax_t, strtoull, strtol): Remove.
22117         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
22118         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
22119         changed to signed values.
22120
22121         And make the following changes as well:
22122         Fix copyright notice, as 1999 was missing.
22123         (verify): New macro.
22124         (strtoimax): Check sizes at compile-time, not run-time.
22125         Prefer strtol to strtoll if both work.
22126         (main): Remove; it was not that useful and was a pain to maintain.
22127
22128         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
22129
22130 2001-08-31  Jim Meyering  <meyering@lucent.com>
22131
22132         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
22133         Use an initial, malloc'd, buffer of length 128 rather than
22134         a statically allocated one of length 1024.
22135
22136 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22137
22138         Simplify code, partly by assuming autoconf 2.52 semantics.
22139
22140         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
22141
22142         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
22143         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
22144         All uses removed.
22145         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
22146         Move AC_REQUIRE to next-to-top level, to avoid confusion.
22147         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
22148         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
22149         jm_AC_HEADER_INTTYPES_H.
22150         * m4/jm-macros.m4 (jm_MACROS): Likewise.
22151
22152         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
22153
22154         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22155         Quote first arg of AC_DEFUN.
22156         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
22157         since they are needed to parse the include file even if we need
22158         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
22159         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
22160         but with opposite signedness.
22161
22162 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22163
22164         Merge 'exclude' changes from tar 1.13.22.
22165         This fixes one or two unlikely storage allocation overflow bugs,
22166         but doesn't change user-visible behavior otherwise.
22167
22168 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22169
22170         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
22171         (jm_PREREQ_EXCLUDE): New macro.
22172
22173 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22174
22175         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22176         tm to be declared.
22177
22178 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22179
22180         * lib/hash.c: Remove '2001' from copyright notice.
22181
22182 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22183
22184         * lib/full-write.h: New file.
22185         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
22186         * lib/full-write.c: Correct credits, as cccp.c no longer
22187         exists and anyway it was so heavily changed from the old cccp
22188         code as to be unrecognizable.  Include full-write.h.
22189         (full_write) Return size_t, with short writes meaning failure.
22190         All callers changed.  This fixes a bug with large buffers
22191         on 64-bit hosts.
22192         * lib/utime.c: Include full-write.h.
22193
22194 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22195
22196         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
22197         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
22198         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
22199         Include if available.
22200         (<xalloc.h>): Include
22201         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
22202         (verify): New macro.  Use it to verify that EXCLUDE macros do not
22203         collide with FNM macros.
22204         (struct patopts): New struct.
22205         (struct exclude): Use it, as exclude patterns now come with options.
22206         (new_exclude): Support above changes.
22207         (new_exclude, add_exclude_file):
22208         Initial size must now be a power of two to simplify overflow checking.
22209         (free_exclude, fnmatch_no_wildcards): New function.
22210         (excluded_filename): No longer requires options arg, as the options
22211         are determined by add_exclude.  Now returns bool, not int.
22212         (excluded_filename, add_exclude):
22213         Add support for the fancy new exclusion options.
22214         (add_exclude, add_exclude_file): Now takes int options arg.
22215         Check for arithmetic overflow when computing sizes.
22216         (add_exclude_file): xrealloc might modify errno, so don't
22217         realloc until after errno might be used.
22218
22219         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
22220         New macros.
22221         (free_exclude): New decl.
22222         (add_exclude, add_exclude_file): Now takes int options arg.
22223         (excluded_filename): No longer requires options arg, as the options
22224         are determined by add_exclude.  Now returns bool, not int.
22225
22226 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22227
22228         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
22229
22230 2001-08-27  Jim Meyering  <meyering@lucent.com>
22231
22232         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
22233
22234         * lib/version-etc.c (N_): Remove definition.
22235         Revert most of last change.
22236         Instead, simply don't mark the `Copyright...' string for translation.
22237         Based on advice from Paul Eggert.
22238
22239         * lib/strtoxmax.c: Tweak comment.
22240
22241 2001-08-26  Jim Meyering  <meyering@lucent.com>
22242
22243         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
22244
22245         * m4/xstrtoimax.m4: New file.
22246         * m4/xstrtoumax.m4: Add comments explaining why we
22247         AC_REPLACE_FUNCS(strtol).
22248
22249 2001-08-26  Jim Meyering  <meyering@lucent.com>
22250
22251         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
22252         of copyright with `%s' so translators don't get an untranslated
22253         message in 2002.
22254         (COPYRIGHT_YEAR): Define.
22255         (version_etc): Use fprintf rather than fputs.
22256         Suggestion from Ulrich Drepper.
22257
22258         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
22259
22260         * lib/strtoll.c: New file, from GNU libc.
22261         * lib/xstrtoimax.c: New file.
22262
22263         * lib/xstrtol.h: Add xstrtoimax.
22264         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
22265         * lib/strtoimax.c: New file.  Likewise, but first define
22266         STRTOUXMAX_SIGNED.
22267
22268         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
22269         ...
22270         * lib/strtoxmax.c: ... then renamed to this.
22271
22272 2001-08-18  Paul Eggert  <eggert@twinsun.com>
22273
22274         * m4/inttypes.m4: Add AC_PREREQ(2.13).
22275         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
22276         (jm_AC_TYPE_INTMAX_T): New macro.
22277         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
22278
22279         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
22280
22281         * m4/longlong.m4: Renamed from ulonglong.m4.
22282         * m4/inttypes.m4: Renamed from inttypes_h.m4.
22283         * m4/uintmax_t.m4: Removed.
22284
22285 2001-08-13  Paul Eggert  <eggert@twinsun.com>
22286
22287         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
22288         Port to Solaris 8, where 'sed' requires a space after the 'r'
22289         command, and where sh dislikes "$/".  Clean up the spacing a bit.
22290         Redirect output to $tmp just once.
22291
22292 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
22293
22294         * lib/addext.c (<errno.h>): Include.
22295         (errno): Declare if not defined.
22296         (addext): Work correctly when pathconf returns -1 and leaves
22297         errno alone because there is no limit.  Also, work even if
22298         pathconf returns a value greater than SIZE_MAX.
22299
22300 2001-08-12  Jim Meyering  <meyering@lucent.com>
22301
22302         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
22303         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
22304         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
22305         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
22306         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
22307         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
22308         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
22309         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
22310         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
22311         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
22312         utime.m4, utimes.m4, xstrtoumax.m4:
22313         Quote the first argument in each use of AC_DEFUN.
22314
22315 2001-08-12  Jim Meyering  <meyering@lucent.com>
22316
22317         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
22318         Simply `return getcwd (NULL, 0);'.
22319         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
22320         Use 1300 as initial value for length, not PATH_MAX.
22321
22322         * lib/pathmax.h: Clean up cpp syntax.
22323
22324 2001-08-12  Jim Meyering  <meyering@lucent.com>
22325
22326         * lib/gettimeofday.c: New file.
22327         * lib/gtod.h: New file.
22328         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
22329
22330 2001-08-05  Jim Meyering  <meyering@lucent.com>
22331
22332         * m4/jm-macros.m4: Require autoconf-2.52.
22333
22334 2001-08-04  Jim Meyering  <meyering@lucent.com>
22335
22336         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
22337         stmt, to get in sync with glibc.
22338
22339 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22340
22341         The following changes are from gettext 0.10.39 as maintained by
22342         Bruno Haible.
22343
22344         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
22345         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
22346         with inverted sense.  All uses changed.
22347
22348         * lib/mbswidth.c: Don't include <limits.h>.
22349         Include <stdlib.h> and <string.h> unconditionally.
22350         (iswcntrl, mbsinit, ISCNTRL): New macros.
22351         (mbsnwidth): Use K&R style function declarations.
22352         Don't bother checking for MB_LEN_MAX == 1, since the compiler
22353         can optimize it when MB_CUR_MAX == 1.
22354         The width of control characters is zero, not 1.
22355
22356 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22357
22358         The following changes are from gettext 0.10.39 as maintained by
22359         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
22360
22361         * m4/codeset.m4: Upgrade to serial AM1.
22362         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
22363         all uses changed.  Quote first arg of AC_DEFUN.
22364         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
22365
22366         * m4/iconv.m4: Upgrade to serial AM2.
22367         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
22368         Add --with-libconv-prefix.
22369         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
22370         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
22371         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
22372         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
22373         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
22374
22375         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
22376         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
22377         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
22378         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
22379         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
22380         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
22381         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
22382         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
22383         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
22384
22385         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
22386         string.h any more.
22387
22388         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
22389         not the default value.
22390
22391         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
22392         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
22393         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
22394         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
22395         Also check for iswcntrl, used for wcwidth fallback.
22396         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
22397         to Autoconf 2.13.
22398
22399 2001-08-03  Jim Meyering  <meyering@lucent.com>
22400
22401         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
22402         as it was in the original.  Reported by Paul Eggert.
22403
22404 2001-07-16  Jim Meyering  <meyering@lucent.com>
22405
22406         * m4/gettimeofday.m4: New file.
22407         Prompted by a report from Bernhard Baehr.
22408
22409 2001-07-15  Jim Meyering  <meyering@lucent.com>
22410
22411         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
22412         stuff. Now it's in ../Makefile.cfg.
22413
22414 2001-07-15  Jim Meyering  <meyering@lucent.com>
22415
22416         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
22417         (BUILT_SOURCES): Add unlocked-io.h.
22418         (io_functions): Define.
22419         (unlocked-io.h): New rule.
22420         (DISTCLEANFILES): Add unlocked-io.h.
22421         (all-local): Depend on unlocked-io.h, to ensure it is created.
22422
22423         * lib/unlocked-io.hin: New file
22424
22425         * lib/regex.c: Update from glibc.
22426
22427 2001-07-05  Jim Meyering  <meyering@lucent.com>
22428
22429         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
22430         recommendation.
22431         (libfetish_a_SOURCES): Put all .h files here instead.
22432         Remove a thus-exposed (better checks in automake) duplicate and
22433         two unnecessary .h files.
22434
22435 2001-07-04  Jim Meyering  <meyering@lucent.com>
22436
22437         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
22438         that generates jm-glibc-io.m4 so that it doesn't trigger any make
22439         distcheck failure.
22440
22441 2001-07-02  Jim Meyering  <meyering@lucent.com>
22442
22443         The following changes were prompted by suggestions from Bruno Haible.
22444
22445         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
22446         is now generated.
22447         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
22448         definition of EXTRA_DIST.
22449         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
22450         ensure that the generated file is created/updated whenever the list
22451         of $(unlocked_functions) is changed.
22452         (jm-glibc-io.m4): New rule.
22453         (unlocked-io.h): New rule -- currently unused.
22454
22455 2001-06-24  Jim Meyering  <meyering@lucent.com>
22456
22457         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
22458         unmatched right bracket, rather than kludging it with an extra,
22459         falsely-matching quote in a comment.  Patch by Akim Demaille.
22460
22461 2001-06-11  Jim Meyering  <meyering@lucent.com>
22462
22463         * lib/regex.c: Update from GNU libc.
22464
22465 2001-05-27  Jim Meyering  <meyering@lucent.com>
22466
22467         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
22468         Check for ut_type in struct utmp.
22469
22470 2001-05-27  Jim Meyering  <meyering@lucent.com>
22471
22472         * lib/readutmp.h (UT_TYPE): Define.
22473
22474 2001-05-24  Jim Meyering  <meyering@lucent.com>
22475
22476         * lib/argmatch.c: Include "quote.h".
22477         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
22478         quote function.  Reported by Göran Uddeborg.
22479
22480 2001-05-22  Jim Meyering  <meyering@lucent.com>
22481
22482         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
22483         now that we use the package-supplied version unconditionally.
22484         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
22485
22486 2001-05-21  Jim Meyering  <meyering@lucent.com>
22487
22488         * m4/regex.m4: Change a couple backticks to single quotes to avoid
22489         shell syntax errors.
22490
22491 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22492
22493         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
22494
22495 2001-05-20  Paul Eggert  <eggert@twinsun.com>
22496
22497         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
22498         Don't bother to check library strftime, since
22499         we'll be using our own my_strftime function anyway.
22500         Define my_strftime instead of strftime.
22501
22502 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
22503
22504         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
22505         which is not yet declared.
22506
22507 2001-05-15  Jim Meyering  <meyering@lucent.com>
22508
22509         * m4/regex.m4: Use proper quoting so brackets appear in the test
22510         program.
22511         Reported by, and with help from, Bruno Haible.
22512
22513 2001-05-13  Jim Meyering  <meyering@lucent.com>
22514
22515         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
22516         undefined.
22517
22518 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22519
22520         dirname code cleanup.  base_name now behaves more compatibly
22521         with POSIX basename when given file names that have trailing
22522         slashes, and similarly for dir_name.  Add new primitives
22523         base_len and dir_len.  Put the directory-name-related decls
22524         into dirname.h.
22525
22526         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
22527         * lib/backupfile.c (base_name): Likewise.
22528         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
22529         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
22530         * lib/makepath.c (strip_trailing_slashes): Likewise.
22531         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
22532         ISSLASH): Likewise.
22533         * lib/rename.c (strip_trailing_slashes): Likewise.
22534         * lib/same.c (base_name): Likewise.
22535         * lib/stripslash.c (ISSLASH): Likewise.
22536
22537         * lib/addext.c: Include <dirname.h> after size_t is defined.
22538         * lib/backupfile.c: Likewise.
22539
22540         * lib/addext.c (addext): Use base_len to trim redundant
22541         trailing slashes instead of doing it ourselves.
22542         But do not trim the last slash if it is not redundant.
22543
22544         * lib/backupfile.c (find_backup_file_name,
22545         max_backup_version): Use base_len instead of rolling it ourselves.
22546         Handle the case of "" and (on DOS) "C:" correctly.
22547
22548         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
22549         needed. Include <string.h>, <dirname.h>.
22550         (base_name): Allow file names ending in slashes, other than names
22551         that are all slashes.  In this case, return the basename followed
22552         by the slashes.  This is more general, and can be used in places
22553         where the original base_name purposely had an assertion failure.
22554         (base_len): New function.
22555
22556         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
22557         Do not include <assert.h>; no longer needed.
22558         Include xalloc.h.
22559         (memrchr): Remove decl.
22560         (dir_name_r): Remove.
22561         (dir_len): Renamed from dirlen.  All callers changed.
22562         Rewrite in terms of base_name, for simplicity and consistency.
22563         (dir_name): Never return NULL.  All callers changed.
22564         Do not include <stdlib.h> in test program; no longer needed.
22565         return 0; is fine for test program.
22566
22567         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
22568         New macros.
22569         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
22570
22571         * lib/path-concat.c (path_concat): Use base_len to compute
22572         base length, not strlen; this means we cannot rely on memcpy
22573         to null-terminate.
22574
22575         * lib/same.c (STREQ): Remove.
22576         (same_name): Handle the case where the basename ends in trailing '/'.
22577
22578         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
22579         a slash was stripped.  Do not strip the last slash after a
22580         file system prefix.
22581
22582 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22583
22584         * lib/Makefile.am (libfetish_a_SOURCES):
22585         Add strftime.c, since we now compile it on all hosts.
22586
22587         * lib/strftime.c (my_strftime):
22588         Define to nstrftime if emacs, but only if my_strftime is not defined.
22589         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
22590         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
22591         Add one more extra argument: a nanoseconds value.
22592         All uses changed.
22593         (ns): New macro.
22594         (my_strftime function): Add %N format.
22595         (emacs_strftimeu): Renamed from emacs_strftime,
22596         with extra ut argument.
22597
22598 2001-05-09  Paul Eggert  <eggert@twinsun.com>
22599
22600         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
22601
22602 2001-04-21  Jim Meyering  <meyering@lucent.com>
22603
22604         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
22605         doesn't interfere.
22606
22607 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22608
22609         * m4/ftruncate.m4: Check for chsize.
22610         Link with ftruncate.o unconditionally if ftruncate is missing.
22611         This was required when cross-compiling to i586-mingw32msvc.
22612
22613 2001-04-08  Jim Meyering  <meyering@lucent.com>
22614
22615         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
22616         recomputed; that's necessary when the offset spans a DST transition.
22617         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
22618
22619 2001-04-02  Jim Meyering  <meyering@lucent.com>
22620
22621         * lib/regex.h, regex.c: Update from GNU libc.
22622
22623 2001-03-24  Jim Meyering  <meyering@lucent.com>
22624
22625         * m4/jm-macros.m4: Require autoconf-2.49d.
22626
22627 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
22628
22629         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
22630
22631 2001-03-19  Paul Eggert  <eggert@twinsun.com>
22632
22633         * lib/version-etc.c (version_etc_copyright): Update to 2001.
22634
22635 2001-03-17  Jim Meyering  <meyering@lucent.com>
22636
22637         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
22638         now that the version in autoconf is equivalent.
22639         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
22640
22641         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
22642         Suggestion from Akim Demaille.
22643
22644         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
22645         (jm_PREREQ_TEMPNAME): New function.
22646
22647 2001-03-16  Paul Eggert  <eggert@twinsun.com>
22648
22649         * lib/tempname.c (uint64_t): Define to uintmax_t if
22650         not defined, and if UINT64_MAX is not defined.
22651         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
22652         Reported by John David Anglin.
22653
22654 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
22655
22656         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
22657         resolve alias if codeset is empty.
22658         * lib/config.charset (BeOS): Use wildcard syntax.
22659
22660 2001-03-13  Jim Meyering  <meyering@lucent.com>
22661
22662         * lib/path-concat.c (path_concat)
22663         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
22664         concatenating e.g., `C:' and `foo'.
22665         From Bruno Haible.
22666
22667 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22668
22669         * lib/localcharset.c (locale_charset): Don't use
22670         setlocale(LC_CTYPE,NULL). Don't return NULL.
22671         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
22672
22673 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22674
22675         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
22676         support for DOS/DJGPP.
22677
22678 2001-03-01  Paul Eggert  <eggert@twinsun.com>
22679
22680         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
22681         lacks mkstemp.  Compile our own tempname.c if we compile our own
22682         mkstemp.c, as mkstemp relies on tempname.
22683
22684 2001-03-01  Jim Meyering  <meyering@lucent.com>
22685
22686         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
22687         AH_VERBATIM really does output its argument verbatim.
22688
22689 2001-02-28  Paul Eggert  <eggert@twinsun.com>
22690
22691         * lib/Makefile.am (libfetish_a_SOURCES):
22692         Add dup-safer.c, fopen-safer.c.
22693         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
22694
22695         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
22696         * lib/unistd-safer.h: New files.
22697
22698 2001-02-25  Paul Eggert  <eggert@twinsun.com>
22699
22700         The mkstemp replacement is taken from glibc 2.2.2, with some
22701         portability fixes for use outside glibc, as follows:
22702
22703         * lib/tempname.c (struct_stat64): New macro.
22704         (direxists, __gen_tempname): Use it.
22705         This avoids a portability problem with Solaris 8.
22706
22707         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
22708         (<stddef.h>, <stdint.h>, <string.h>):
22709         Include only if STDC_HEADERS || _LIBC.
22710         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
22711         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
22712         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
22713         (__set_errno): Define this macro if <errno.h> doesn't.
22714         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
22715         Define these macros if <stdio.h> doesn't.
22716         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
22717         Define these macros if <sys/stat.h>
22718         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
22719         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
22720         __xstat64): Define if not _LIBC.
22721         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
22722         (__gen_tempname): Invoke gettimeofday only if
22723         HAVE_GETTIMEOFDAY || _LIBC;
22724         otherwise, fall back on plain "time".
22725         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
22726
22727         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
22728
22729         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
22730
22731 2001-02-18  Paul Eggert  <eggert@twinsun.com>
22732
22733         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
22734
22735 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22736
22737         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
22738         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
22739         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
22740         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22741
22742 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22743
22744         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
22745         Remove workaround macros for hosts that have mbrtowc but not
22746         mbstate_t, as we now insist on proper declarations for both
22747         before using mbrtowc.
22748
22749 2001-02-17  Jim Meyering  <meyering@lucent.com>
22750
22751         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
22752         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
22753         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
22754         UnixWare 7.1.1.
22755
22756         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
22757         rather than AC_CACHE_VAL.
22758
22759 2001-02-17  Jim Meyering  <meyering@lucent.com>
22760
22761         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
22762         around included file name.
22763
22764         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
22765
22766         * lib/strftime.c: Update from GNU libc (the only changes were to
22767         comments).
22768
22769 2001-02-17  Jim Meyering  <meyering@lucent.com>
22770
22771         * lib/regex.c: Update from libc.
22772
22773 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
22774
22775         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
22776         clash.
22777
22778 2001-02-16  Paul Eggert  <eggert@twinsun.com>
22779
22780         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
22781         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
22782         Reported by Mark Hounschell via Paul Eggert.
22783
22784 2001-02-07  Jim Meyering  <meyering@lucent.com>
22785
22786         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
22787
22788 2001-02-05  Jim Meyering  <meyering@lucent.com>
22789
22790         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
22791         it includes the patch required for `large file' support with at least
22792         HP-UX's 10.20 /bin/cc.
22793
22794 2001-02-03  Jim Meyering  <meyering@lucent.com>
22795
22796         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
22797         AS_IF, now that it works once again (mysteriously).
22798         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
22799
22800 2001-01-30  Jim Meyering  <meyering@lucent.com>
22801
22802         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
22803         * m4/chown.m4: Rename conftestchown to conftest.chown.
22804         * m4/rename.m4: s/conftestdir/conftest.d1/ and
22805         s/conftestdir2/conftest.d2/.
22806         * m4/utimes.m4: s/conftestdata/conftest.data/
22807         Inspired by Pavel Roskin's change in autoconf.
22808
22809 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
22810
22811         * lib/config.charset: Update for FreeBSD 4.2.
22812
22813 2001-01-27  Jim Meyering  <meyering@lucent.com>
22814
22815         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
22816         a use of AS_IF.
22817         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
22818
22819 2001-01-26  Jim Meyering  <meyering@lucent.com>
22820
22821         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
22822         quotearg.c includes it.
22823
22824 2001-01-26  Jim Meyering  <meyering@lucent.com>
22825
22826         * lib/quotearg.c: Include stddef.h.
22827         * lib/quote.c: Include stddef.h.
22828         Reported by Axel Kittenberger.
22829
22830         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
22831         line in double quotes so that it evokes a better diagnostic.
22832         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
22833         Reported by Axel Kittenberger.
22834
22835 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
22836
22837         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
22838         as if it was a `charset'.
22839
22840 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
22841
22842         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
22843         has const.
22844
22845 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
22846
22847         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
22848         to avoid a warning.  Add back 'const' to inptr.
22849
22850 2001-01-20  Jim Meyering  <meyering@lucent.com>
22851
22852         Be sure that headers are checked before used in code compiled
22853         for the type checks.
22854         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
22855         In place of that, invoke jm_CHECK_ALL_TYPES.
22856         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
22857         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
22858         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
22859         The check for ssize_t was mistakenly run before the test for unistd.h.
22860
22861         The configure-time check for stdbool.h was missing.
22862         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
22863         (jm_PREREQ_HASH): New function.
22864
22865 2001-01-17  Jim Meyering  <meyering@lucent.com>
22866
22867         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
22868         for autoconf-2.49c.
22869         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
22870
22871 2001-01-16  Jim Meyering  <meyering@lucent.com>
22872
22873         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
22874         From Bruno Haible.
22875
22876 2001-01-14  Jim Meyering  <meyering@lucent.com>
22877
22878         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
22879         foo and bar.  Create conftestdir/ in the script, not in the C code.
22880         Remove directories in the script, not in the C code.
22881         Remove conftestdir{,2} before trying to create the directory.
22882         Make the entire configure script fail if the mkdir fails.
22883
22884 2001-01-14  Jim Meyering  <meyering@lucent.com>
22885
22886         * lib/rename.c: New file.  From Volker Borchert.
22887         Include stdlib.h, string.h or strings.h, and xalloc.h.
22888         Use strip_trailing_slashes rather than open-coding it.
22889
22890 2001-01-03  Paul Eggert  <eggert@twinsun.com>
22891
22892         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
22893
22894 2001-01-03  Jim Meyering  <meyering@lucent.com>
22895
22896         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
22897         of local `inptr' to avoid warning with some system declarations of
22898         iconv.
22899
22900 2001-01-02  Volker Borchert  <bt@teknon.de>
22901
22902         * m4/rename.m4: New file.
22903         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
22904
22905 2001-01-01  Jim Meyering  <meyering@lucent.com>
22906
22907         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
22908         even on systems with utmpx.h.  It's necessary for the declaration of
22909         utmp's ut_user member.  Reported by Andreas Jaeger.
22910
22911         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
22912         available. They are required for the declarations of getgrgid and
22913         getpwuid resp.
22914         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
22915         Reported by Andreas Jaeger.
22916
22917 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
22918
22919         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
22920         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
22921         so `make install' also works in VPATH builds.
22922
22923 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
22924
22925         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
22926         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
22927         can be used in subdirectories.
22928
22929 2000-12-29  Paul Eggert  <eggert@twinsun.com>
22930
22931         * lib/modechange.c: Do not assume that mode_t uses the
22932         traditional octal encoding.  E.g. "chmod 1 FOO" should set
22933         the other-execute bit of FOO even if S_IXOTH != 1.
22934
22935         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
22936         WOTH, XOTH, ALLM): New macros.
22937         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
22938          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
22939         Use them.
22940         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
22941         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
22942         (mode_compile):
22943         No need to use uintmax_t; unsigned long is long enough.
22944         Don't bother to get suffix since we don't use it.
22945
22946 2000-12-26  Jim Meyering  <meyering@lucent.com>
22947
22948         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
22949         better with autoheader.
22950
22951 2000-12-24  Jim Meyering  <meyering@lucent.com>
22952
22953         * lib/hash.c (is_prime): Return explicit boolean values.
22954         (hash_get_first): Return NULL to appease Irix5.6's 89.
22955         Reported by Nelson Beebe.
22956
22957 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
22958
22959         * lib/localcharset.c (locale_charset): Add support for Win32.
22960
22961 2000-12-18  Paul Eggert  <eggert@twinsun.com>
22962
22963         * lib/physmem.h, lib/physmem.c: New files.
22964
22965         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
22966         (noinst_HEADERS): Add physmem.h.
22967
22968         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
22969         't' for compatibility with Solaris 8 sort.
22970
22971 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
22972
22973         * lib/config.charset: Add support for BeOS.
22974
22975 2000-12-17  Jim Meyering  <meyering@lucent.com>
22976
22977         * m4/dos.m4 (jm_AC_DOS): New file and macro.
22978         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
22979
22980 2000-12-16  Jim Meyering  <meyering@lucent.com>
22981
22982         This bug had a serious impact on chown: `chown N:M FILE' (for integer
22983         N and M) would have treated it like `chown N:N FILE'.
22984
22985         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
22986
22987 2000-12-16  Jim Meyering  <meyering@lucent.com>
22988
22989         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
22990         SHELLS_FILE to a file name that's useful on djgpp systems.
22991         Include stdlib.h.
22992         (ADDITIONAL_DEFAULT_SHELLS): Define.
22993         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
22994         Based mostly on a patch from Prashant TR.
22995
22996 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
22997
22998         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
22999         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
23000         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
23001
23002 2000-12-08  Andreas Schwab  <schwab@suse.de>
23003
23004         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
23005         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
23006
23007 2000-12-07  Jim Meyering  <meyering@lucent.com>
23008
23009         * lib/stripslash.c (ISSLASH): Define.
23010         (strip_trailing_slashes): Use ISSLASH rather than comparing against
23011         `/'.
23012         From Prashant TR.
23013
23014         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
23015         (dir_name_r): Declare this function as static.
23016         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
23017         manifest itself on a name containing a mix of slashes and
23018         backslashes.
23019         Make this function work with names starting with a DOS-style
23020         drive letter and colon prefix.
23021         (dir_name): Append `.' if necessary.
23022         Based mostly on patches from Prashant TR and Eli Zaretskii.
23023
23024         * lib/dirname.h (dir_name_r): Remove prototype.
23025
23026 2000-12-06  Paul Eggert  <eggert@twinsun.com>
23027
23028         * m4/off_t-format.m4: Remove this file.
23029         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
23030
23031 2000-12-06  Jim Meyering  <meyering@lucent.com>
23032
23033         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
23034         replacement strtoull, we may well need the replacement strtoul, too.
23035         Check for declarations of strtoul and strtoull.
23036         Check for strtol.  Mainly as a cue to cause automake to include
23037         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
23038         Check for limits.h -- strtol.c needs it.
23039
23040 2000-12-05  Jim Meyering  <meyering@lucent.com>
23041
23042         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
23043
23044 2000-12-04  Jim Meyering  <meyering@lucent.com>
23045
23046         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
23047         Also include memory.h, stdlib.h, unistd.h if appropriate.
23048         Reported by Andreas Jaeger (conflicting declaration of malloc).
23049
23050 2000-12-02  Jim Meyering  <meyering@lucent.com>
23051
23052         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
23053         * m4/jm-macros.m4 (jm_MACROS): require it.
23054
23055 2000-12-02  Jim Meyering  <meyering@lucent.com>
23056
23057         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
23058
23059 2000-12-01  Paul Eggert  <eggert@twinsun.com>
23060
23061         * lib/memrchr.c: Include <config.h> before any system include file.
23062
23063 2000-11-30  Jim Meyering  <meyering@lucent.com>
23064
23065         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
23066
23067 2000-11-30  Jim Meyering  <meyering@lucent.com>
23068
23069         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
23070
23071 2000-11-29  Paul Eggert  <eggert@twinsun.com>
23072
23073         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
23074
23075 2000-11-26  Jim Meyering  <meyering@lucent.com>
23076
23077         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
23078
23079 2000-11-22  Paul Eggert  <eggert@twinsun.com>
23080
23081         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
23082         size of (size_t) -1; it's not portable.
23083
23084 2000-11-17  Jim Meyering  <meyering@lucent.com>
23085
23086         * lib/strstr.c: Update from GNU libc.
23087
23088 2000-11-17  Akim Demaille  <akim@epita.fr>
23089
23090         * lib/obstack.h: Formatting changes.
23091         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
23092         prevent type checking.
23093         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23094         cast the value to (void *): assigning a `foo *' to a `void *'
23095         variable is valid.
23096         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23097
23098 2000-11-16  Jim Meyering  <meyering@lucent.com>
23099
23100         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
23101
23102 2000-11-11  Jim Meyering  <meyering@lucent.com>
23103
23104         * lib/error.c: Add a couple #includes, merging from GNU libc version.
23105
23106 2000-11-10  Jim Meyering  <meyering@lucent.com>
23107
23108         * lib/obstack.h: Update from GNU libc.
23109         * lib/obstack.c: Likewise.
23110
23111 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
23112
23113         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
23114
23115 2000-11-06  Paul Eggert  <eggert@twinsun.com>
23116
23117         * lib/getusershell.c (setusershell): Use rewind rather than
23118         fseek/fseeko, to avoid configuration hassles with fseeko.
23119         Don't bother opening SHELLS_FILE if shellstream is NULL;
23120         it's not necessary.
23121
23122 2000-11-05  Jim Meyering  <meyering@lucent.com>
23123
23124         * lib/makepath.h (make_dir): Declare.
23125         * lib/makepath.c (make_dir): Remove `static' attribute.
23126         Tweak a comment.
23127
23128 2000-11-04  Jim Meyering  <meyering@lucent.com>
23129
23130         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
23131
23132 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
23133
23134         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
23135         last one in a bucket, advance to the next bucket.
23136
23137 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
23138
23139         * lib/fnmatch.c: Do not comment out all the code if we are using
23140         the GNU C library, because in some cases we are replacing buggy
23141         code in the GNU C library itself.
23142
23143 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
23144
23145         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
23146         (regex_compile): Catch bogus \(\1\).
23147
23148 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23149
23150         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
23151         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
23152         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
23153
23154 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23155
23156         * lib/error.h, getline.h, modechange.h:
23157         Remove "2000" from Copyright line, as the file hasn't been
23158         changed this year other than in the copyright notice.
23159
23160         * lib/xalloc.h: Add "2000" to Copyright line, as this file
23161         was changed this year.
23162
23163 2000-10-29  Jim Meyering  <meyering@lucent.com>
23164
23165         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
23166         renaming.
23167         * m4/ls-mntd-fs.m4: Likewise
23168
23169 2000-10-29  Jim Meyering  <meyering@lucent.com>
23170
23171         * lib/xstat.in: Fix grammar in comment.
23172
23173 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
23174
23175         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
23176         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
23177         doesn't define __restrict_arr.
23178
23179 2000-10-28  Jim Meyering  <meyering@lucent.com>
23180
23181         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
23182         (jm_PREREQ_MEMCHR): New function.
23183
23184 2000-10-28  Jim Meyering  <meyering@lucent.com>
23185
23186         * lib/memchr.c: Update from libc.
23187         Adjust for portability:
23188         [HAVE_STDLIB_H]: Include stdlib.h.
23189         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
23190         Undef __memchr, too.
23191         [!weak_alias]: Define __memchr to memchr.
23192
23193         * lib/regex.c: Update from libc.
23194         * lib/regex.h: Likewise.
23195         * lib/getopt1.c: Likewise.
23196         * lib/memcmp.c: Likewise.
23197
23198         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
23199         Avoid using fseek, when possible -- it's broken by design.
23200         Patch by Ulrich Drepper.
23201
23202 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
23203
23204         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
23205         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
23206         Giving in to popular pressure to shut up the compiler with casts.
23207
23208 2000-10-26  Jim Meyering  <meyering@lucent.com>
23209
23210         * lib/strftime.c: Update from libc.
23211
23212 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
23213
23214         * regex.c: More `unsigned char' -> `re_char' changes.
23215         Also change several `int' into `re_wchar_t'.
23216         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
23217         (PUSH_FAILURE_POINTER): Don't cast any more.
23218         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
23219         We want GCC to complain, since this piece of code makes
23220         re_match non-reentrant, which *should* be fixed.
23221         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
23222         (EXTEND_BUFFER): Use RETALLOC.
23223         (SET_LIST_BIT): Don't cast.
23224         (re_wchar_t): New type.
23225         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
23226         that those two functions will always properly return.
23227         (IMMEDIATE_QUIT_CHECK): Cast to void.
23228         (analyse_first): Use recursion rather than an explicit stack.
23229         (re_compile_fastmap): Can't fail anymore.
23230         (re_search_2): Don't check re_compile_fastmap for failure.
23231         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
23232         Now also sets the new value (passed in a new argument).
23233         (re_match_2_internal): Use it.
23234         Also, use a new var `reg' of type size_t when looping through regs
23235         rather than reuse the inappropriate `mcnt'.
23236
23237 2000-10-25  Jim Meyering  <meyering@lucent.com>
23238
23239         * lib/obstack.c: Update from libc.
23240
23241 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
23242
23243         * regex.c (regex_compile): Change the way of handling a range from
23244         a char less than 256 to a char not less than 256.
23245
23246 2000-10-24  Andrew Innes  <andrewi@gnu.org>
23247
23248         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
23249         NT-Emacs only.
23250         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
23251         so that re_search functions only quit when callers expect them to.
23252
23253 2000-10-23  Jim Meyering  <meyering@lucent.com>
23254
23255         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
23256         wrong.  That set_locale call must not have any side effects.
23257         From Paul Eggert.
23258
23259 2000-10-22  Jim Meyering  <meyering@lucent.com>
23260
23261         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
23262         [CYCLIC]: Remove now-unused definition.
23263
23264         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
23265         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
23266         Suggestion from Ulrich Drepper.
23267
23268 2000-10-21  Jim Meyering  <meyering@lucent.com>
23269
23270         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
23271         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
23272         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
23273
23274 2000-10-21  Jim Meyering  <meyering@lucent.com>
23275
23276         * lib/dirname.c (memrchr): Declare if necessary.
23277         (dir_name): Remove the restriction that there be no
23278         trailing slashes.  Now, this code skips past them, effectively
23279         ignoring them.
23280         [TEST_DIRNAME] (main): New unit tests.
23281
23282         * lib/memrchr.c: New file from GNU libc.
23283         Undef __memrchr, too.
23284         [!weak_alias]: Define __memrchr to memrchr.
23285         Guard weak_alias use with `#ifdef weak_alias'.
23286
23287 2000-10-21  Jim Meyering  <meyering@lucent.com>
23288
23289         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
23290         (dir_name): Use dir_name_r.
23291         * lib/dirname.h (dir_name_r): Declare it.
23292
23293 2000-10-17  Jim Meyering  <meyering@lucent.com>
23294
23295         * lib/quote.h (PARAMS): Define and use.
23296         Reported by Akim Demaille.
23297
23298         * lib/getopt.c: Update from libc.
23299
23300 2000-10-16  Jim Meyering  <meyering@lucent.com>
23301
23302         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
23303         setlocale.
23304         From Jan Fedak.
23305
23306 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
23307
23308         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
23309
23310 2000-09-25  Jim Meyering  <meyering@lucent.com>
23311
23312         * lib/md5.h (rol): Define (from GnuPG).
23313
23314         * lib/sha.c: Give credit (GnuPG) where due.
23315         (M): Use rol rather than open-coding it.
23316         Add a FIXME comment.
23317
23318 2000-09-21  Jim Meyering  <meyering@lucent.com>
23319
23320         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
23321         Reported by Michael Stone.
23322
23323 2000-09-20  Jim Meyering  <meyering@lucent.com>
23324
23325         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
23326         (noinst_HEADERS): Add sha.h.
23327         Based on code from Scott G. Miller and from GnuPG.
23328
23329 2000-09-18  Jim Meyering  <meyering@lucent.com>
23330
23331         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
23332         LIBS. Otherwise, everyone ends up linking with -lelf for some
23333         configurations.
23334         Reported by Mike Stone.
23335
23336 2000-09-15  Jim Meyering  <meyering@lucent.com>
23337
23338         * lib/regex.c: Update from libc.
23339
23340 2000-09-10  Jim Meyering  <meyering@lucent.com>
23341
23342         * lib/getopt.c (_getopt_internal): Update from glibc.
23343
23344 2000-09-09  Jim Meyering  <meyering@lucent.com>
23345
23346         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
23347         think it should be used as a general replacement for isascii.
23348         * lib/fnmatch.c: Likewise.
23349         * lib/mbswidth.c: Likewise
23350         * lib/regex.c: Likewise.
23351
23352         Don't use atoi.
23353         * lib/userspec.c: Include sys/param.h and limits.h.
23354         Include xstrtol.h.
23355         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23356         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
23357         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
23358         UID, GID.  Check range.
23359
23360 2000-09-06  Jim Meyering  <meyering@lucent.com>
23361
23362         * lib/getopt.c (_getopt_internal): Update from glibc.
23363
23364 2000-08-30  Jim Meyering  <meyering@lucent.com>
23365
23366         * lib/strftime.c: Merge in changes from GNU libc.
23367
23368 2000-08-26  Jim Meyering  <meyering@lucent.com>
23369
23370         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
23371         * m4/fpending.m4: New file.
23372
23373 2000-08-26  Jim Meyering  <meyering@lucent.com>
23374
23375         * lib/closeout.c: Include "__fpending.h".
23376         (close_stdout_status): Return right away if there's nothing to flush.
23377
23378         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
23379         * lib/__fpending.c: New file.
23380         * lib/__fpending.h: New file.
23381
23382 2000-08-20  Jim Meyering  <meyering@lucent.com>
23383
23384         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
23385         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
23386         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
23387
23388 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
23389
23390         Improve fileutils installation on systems where running
23391         programs (like install) can't be unlinked.
23392         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
23393         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
23394
23395 2000-08-07  Paul Eggert  <eggert@twinsun.com>
23396
23397         Standardize on "memory exhausted" instead of "Memory exhausted"
23398         or "virtual memory exhausted".
23399         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
23400         "virtual memory exhausted".
23401         * lib/same.c (same_name): Invoke xalloc_die instead of printing
23402         our own message.
23403         * lib/userspec.c (parse_user_spec): Likewise.
23404         * lib/bumpalloc.h: comment fix
23405         * lib/same.c, userspec.c: Include xalloc.h.
23406
23407         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
23408         not char *const and pointing to a constant array.
23409         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
23410         (xrealloc): Comment fix.
23411
23412         * lib/userspec.c (parse_user_spec):
23413         Don't translate a message until just before returning,
23414         to avoid unnecessary translation.
23415
23416 2000-08-07  Jim Meyering  <meyering@lucent.com>
23417
23418         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
23419         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
23420         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
23421         getgroups.c, gethostname.c, getopt.h, group-member.c,
23422         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
23423         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
23424         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
23425         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
23426         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
23427         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
23428         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
23429         yesno.c: Back out Copyright date changes for each file with no change
23430         this year.  This eases coordination with other programs using the same
23431         source code modules.  From Paul Eggert.
23432
23433 2000-08-06  Paul Eggert  <eggert@twinsun.com>
23434
23435         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
23436         not char, for compatibility with glibc 2.1.3 strftime.c.
23437
23438 2000-08-03  Greg McGary  <greg@mcgary.org>
23439
23440         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
23441         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
23442         (EXTEND_BUFFER): Use them.
23443
23444 2000-08-01  Jim Meyering  <meyering@lucent.com>
23445
23446         * lib/dirname.c (ISSLASH): Define.
23447         (BACKSLASH_IS_PATH_SEPARATOR): Define.
23448         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
23449         both `\' and `/' may be use as path separators.
23450         Based on a patch from Prashant TR.
23451
23452 2000-07-31  Paul Eggert  <eggert@twinsun.com>
23453
23454         * lib/quotearg.c (quotearg_n_options): Don't make the initial
23455         slot vector a constant, since it might get modified.
23456
23457 2000-07-31  Jim Meyering  <meyering@lucent.com>
23458
23459         * lib/xmalloc.c: Use `virtual memory exhausted', not
23460         `Memory exhausted'.
23461         * lib/obstack.c (print_and_abort): Likewise.
23462
23463 2000-07-30  Paul Eggert  <eggert@twinsun.com>
23464
23465         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
23466         buffer, so that the caller can always quote one small
23467         component of a "memory exhausted" message in slot 0.
23468         From a suggestion by Jim Meyering.
23469
23470 2000-07-30  Jim Meyering  <meyering@lucent.com>
23471
23472         * lib/makepath.c (make_path): Quote the other instance, too.
23473
23474         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
23475         (STATIC_BUF_SIZE): Define.
23476         (quotearg_n_options): Use only statically allocated storage when
23477         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
23478         than STATIC_BUF_SIZE.
23479
23480 2000-07-29  Jim Meyering  <meyering@lucent.com>
23481
23482         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
23483         * lib/dirname.c (dir_name): Likewise.
23484
23485         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
23486         `/'.
23487
23488         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
23489         (dir_name): Assert that there are no trailing slashes.
23490
23491 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
23492
23493         * lib/mbswidth.h (mbswidth): Add a flags argument.
23494         (mbswidth): New declaration.
23495         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
23496         * lib/mbswidth.c (mbswidth): Add a flags argument.
23497         (mbsnwidth): New function.
23498
23499 2000-07-24  Jim Meyering  <meyering@lucent.com>
23500
23501         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
23502
23503 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23504
23505         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
23506
23507 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23508
23509         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
23510         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
23511         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
23512         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
23513         invoke multibyte primitives.
23514
23515 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23516
23517         * lib/quotearg.c:
23518         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
23519         so that mbstate_t is always defined.
23520
23521         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
23522         be 1 in at least one GCC installation, and this configuration
23523         error is likely to be common.  Ignoring MB_LEN_MAX hurts
23524         performance on hosts that have mbrtowc but have only unibyte
23525         locales, but I assume these hosts are rare.
23526
23527 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23528
23529         * lib/mbswidth.c (_XOPEN_SOURCE):
23530         Don't define; this causes problems on Solaris 7.
23531         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
23532
23533 2000-07-23  Jim Meyering  <meyering@lucent.com>
23534
23535         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
23536         too: getgrgid, getpwuid, getuid.
23537
23538 2000-07-23  Jim Meyering  <meyering@lucent.com>
23539
23540         * lib/basename.c (base_name): Add an assertion.
23541
23542 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
23543
23544         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
23545         shadow its mbsinit function.
23546
23547 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23548
23549         * lib/mbswidth.h: New file.
23550         * lib/mbswidth.c: New file.
23551         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
23552         (noinst_HEADERS): Add mbswidth.h.
23553
23554 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23555
23556         * lib/config.charset: Add support for FreeBSD. Improve support for
23557         HP-UX and IRIX 6.
23558
23559 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
23560
23561         * m4/mbswidth.m4: New file.
23562         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
23563
23564 2000-07-15  Jim Meyering  <meyering@lucent.com>
23565
23566         * lib/makepath.c: Include quote.h.
23567         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
23568         corresponding argument in a `quote (...)' call.
23569         Give better diagnostics.
23570
23571         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
23572         (noinst_HEADERS): Add quote.h.
23573
23574         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
23575         from tar's src/misc.c.
23576         * lib/quote.h: New file.  Prototypes for same.
23577
23578 2000-07-14  Paul Eggert  <eggert@twinsun.com>
23579
23580         From a suggestion by Bruno Haible.
23581         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
23582         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
23583         to decide whether to define the BeOS workaround macro;
23584         this adjusts to the change to AC_MBSTATE_T.
23585
23586 2000-07-14  Jim Meyering  <meyering@lucent.com>
23587
23588         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
23589         jm_AC_TYPE_UINTMAX_T.
23590
23591 2000-07-13  Paul Eggert  <eggert@twinsun.com>
23592
23593         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
23594
23595         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
23596         quotearg_buffer_restyled): Add support for
23597         clocale_quoting_style.  Undo previous change to
23598         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
23599         and "{RIGHT QUOTATION MARK}" msgids.
23600
23601 2000-07-10  Paul Eggert  <eggert@twinsun.com>
23602
23603         From a suggestion by Bruno Haible.
23604         * m4/mbstate_t.m4 (AC_MBSTATE_T):
23605         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
23606         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
23607         and mbstate_t, to a single-part test that simply defines mbstate_t.
23608         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
23609         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
23610
23611 2000-07-10  Jim Meyering  <meyering@lucent.com>
23612
23613         * m4/strerror_r.m4: Mirror the correction made in autoconf.
23614
23615         * m4/gnu-source.m4: Output to confdefs.h directly.
23616         Suggestion from Akim Demaille.
23617
23618 2000-07-09  Paul Eggert  <eggert@twinsun.com>
23619
23620         The old behavior of quoting `like this' doesn't look good with
23621         newer, ISO-style fonts.  See:
23622         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
23623
23624         Instead, quote "like this" by default.  Let the translator
23625         tailor the locale-specific quoting behavior by providing
23626         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
23627
23628         * lib/quotearg.c (N_): New macro.
23629         (gettext_default): New function.
23630         (quotearg_buffer_restyled): Use
23631         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
23632         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
23633
23634 2000-07-09  Jim Meyering  <meyering@lucent.com>
23635
23636         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
23637         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
23638
23639         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
23640         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
23641
23642 2000-07-09  Jim Meyering  <meyering@lucent.com>
23643
23644         * lib/Most files: Update copyright dates to include 2000.
23645
23646 2000-07-08  Jim Meyering  <meyering@lucent.com>
23647
23648         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
23649         if not defined.
23650         (xgethostname): Remove now-unnecessary #ifdef.
23651         Move declaration of `err' into loop where it's used.
23652
23653 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23654         and Bruno Haible  <haible@clisp.cons.org>
23655
23656         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
23657         only if the test for an object-type mbstate_t fails.  This
23658         prevents us from mistakenly reporting that mbstate_t is a
23659         system object type after we "#define mbstate_t int" to work
23660         around its lack.
23661
23662 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23663         and Bruno Haible  <haible@clisp.cons.org>
23664
23665         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
23666
23667 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23668
23669         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
23670         to strerror_r.
23671         Include <ctype.h> for use of isalpha.
23672
23673 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23674
23675         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
23676         by allocating a larger buffer. Test the gethostname return value for
23677         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
23678         returns an error and ENAMETOOLONG isn't defined.
23679
23680 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23681
23682         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
23683         dimension.
23684
23685 2000-07-04  Jim Meyering  <meyering@lucent.com>
23686
23687         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
23688         of the deprecated AC_CHECKING.
23689
23690 2000-07-04  Jim Meyering  <meyering@lucent.com>
23691
23692         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
23693         Reported by Bruno Haible.
23694
23695 2000-07-04  Jim Meyering  <meyering@lucent.com>
23696
23697         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
23698         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
23699         lacks mbrtowc.
23700
23701 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23702
23703         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
23704         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
23705
23706 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23707         and Bruno Haible  <haible@clisp.cons.org>
23708
23709         * lib/quotearg.c (mbrtowc):
23710         Assign to *pwc, and return 1 only if result is nonzero.
23711         (iswprint): Use ISPRINT when substituting our own mbrtowc.
23712
23713 2000-07-03  Jim Meyering  <meyering@lucent.com>
23714
23715         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
23716
23717 2000-07-03  Jim Meyering  <meyering@lucent.com>
23718
23719         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
23720         This is necessary to get a definition of e.g., UTMP_FILE on
23721         HP-UX 10.20.
23722         From Bob Proulx.
23723
23724 2000-07-02  Jim Meyering  <meyering@lucent.com>
23725
23726         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
23727
23728         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
23729         AC_LIBOBJ(function_name).
23730         * m4/chown.m4: Likewise.
23731         * m4/fnmatch.m4: Likewise.
23732         * m4/ftruncate.m4: Likewise.
23733         * m4/getgroups.m4: Likewise.
23734         * m4/getline.m4: Likewise.
23735         * m4/group-member.m4: Likewise.
23736         * m4/jm-macros.m4: Likewise.
23737         * m4/lstat.m4: Likewise.
23738         * m4/malloc.m4: Likewise.
23739         * m4/memcmp.m4: Likewise.
23740         * m4/nanosleep.m4: Likewise.
23741         * m4/putenv.m4: Likewise.
23742         * m4/realloc.m4: Likewise.
23743         * m4/regex.m4: Likewise.
23744         * m4/stat.m4: Likewise.
23745         * m4/strftime.m4: Likewise.
23746
23747 2000-07-02  Jim Meyering  <meyering@lucent.com>
23748
23749         * lib/quotearg.c (mbstate_t): Don't define here.
23750
23751 2000-07-02  Jim Meyering  <meyering@lucent.com>
23752
23753         * lib/nanosleep.c (SIGCONT): Define if not already defined.
23754
23755 2000-07-01  Jim Meyering  <meyering@lucent.com>
23756
23757         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
23758
23759 2000-07-01  Jim Meyering  <meyering@lucent.com>
23760
23761         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
23762         problem.
23763
23764 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
23765
23766         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
23767         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
23768
23769 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
23770
23771         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
23772         per change in ../m4/ls-mntd-fs.m4.
23773         (read_filesystem_list): Ignore symbolic links.
23774
23775 2000-06-29  Jim Meyering  <meyering@lucent.com>
23776
23777         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
23778         for declaration of strcmp.
23779
23780         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
23781
23782         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
23783         Avoid warning by casting result to `char *' to remove `const'.
23784
23785 2000-06-28  Jim Meyering  <meyering@lucent.com>
23786
23787         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
23788         included by quotearg.c, for which we perform this test.  From
23789         Bruno Haible.
23790
23791 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
23792
23793         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
23794         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
23795         <utmpx.h> exists, put readutmp.o into LIBOBJS.
23796
23797 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
23798
23799         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
23800
23801 2000-06-26  Paul Eggert  <eggert@twinsun.com>
23802
23803         savedir now sets errno on failure and invokes xmalloc to get memory.
23804         Fix a couple of other minor bugs while we're at it.
23805
23806         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
23807         (NAMLEN): Remove macro.
23808         (malloc, realloc): Remove decls.
23809         (stpcpy): Likewise.
23810         ("xalloc.h"): Include.
23811         (NAME_SIZE_DEFAULT): New macro.
23812         (savedir): Use xmalloc / xrealloc to allocate memory.
23813         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
23814         Skip "" directory entries.
23815         Use strlen to calculate directory entry length, since the old method
23816         is rarely used these days and isn't worth supporting.
23817         Don't use a pointer after freeing it.
23818         Check for integer overflow when calculating allocation size.
23819         Use memcpy to copy entries, instead of stpcpy.
23820         Set errno properly when returning NULL.
23821         Check for readdir error.
23822
23823 2000-06-26  Jim Meyering  <meyering@lucent.com>
23824
23825         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
23826
23827 2000-06-25  Jim Meyering  <meyering@lucent.com>
23828
23829         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
23830         Linux header bug when _XOPEN_SOURCE is defined to 500.
23831
23832 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
23833
23834         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
23835         deficiency.
23836
23837 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
23838
23839         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
23840         Include xalloc.h.
23841         Don't include <stdlib.h>.  Don't declare malloc, realloc.
23842
23843 2000-06-24  Jim Meyering  <meyering@lucent.com>
23844
23845         * m4/strerror_r.m4: Revive this file -- to try out an experimental
23846         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
23847         for which strerror does return char*, but which lacks a conveniently
23848         accessible declaration of the function.  If the compile-test says
23849         strerror_r doesn't work, then resort to a `run'-test that works on
23850         BeOS and segfaults on DEC Unix.
23851
23852 2000-06-24  Jim Meyering  <meyering@lucent.com>
23853
23854         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
23855
23856 2000-06-23  Paul Eggert  <eggert@twinsun.com>
23857
23858         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
23859         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
23860
23861 2000-06-23  Paul Eggert  <eggert@twinsun.com>
23862
23863         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
23864         (mbrtowc, mbstate_t): Define substitutes if
23865         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
23866         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
23867         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
23868
23869 2000-06-23  Jim Meyering  <meyering@lucent.com>
23870
23871         * m4/afs.m4: Add missing AC_MSG_RESULT.
23872         Reported by Bruno Haible.
23873
23874         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
23875         Suggestion from Bruno Haible.
23876
23877 2000-06-23  Jim Meyering  <meyering@lucent.com>
23878
23879         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
23880
23881 2000-06-21  Jim Meyering  <meyering@lucent.com>
23882
23883         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
23884
23885 2000-06-21  Jim Meyering  <meyering@lucent.com>
23886
23887         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
23888         (noinst_HEADERS): Add getstr.h.
23889
23890         * lib/getline.c (getstr): Move into a separate file.
23891         * lib/getstr.c (getstr): New file, extracted from getline.c, with
23892         the following changes: new parameter, delim2; both delim[12]
23893         parameters have type `int', not `char'.  The latter would lose
23894         with 8-bit delimiters.
23895         * lib/getstr.h: New file.
23896
23897 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23898
23899         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
23900         than 1024, return a memory chunk of least possible size, instead
23901         of size PATH_MAX + 2. In the loop, increment the size proportionally.
23902         Use free/xmalloc instead of xrealloc to avoid copying for very long
23903         paths.
23904
23905 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23906
23907         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
23908         the empty string.
23909
23910 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23911
23912         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
23913         address, not strdup.  Include <stdlib.h> and don't declare free().
23914
23915 2000-06-19  Jim Meyering  <meyering@lucent.com>
23916
23917         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
23918
23919 2000-06-18  Jim Meyering  <meyering@lucent.com>
23920
23921         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
23922
23923         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
23924         `checking whether...' message to be consistent with that of the
23925         lstat test.
23926
23927 2000-06-18  Jim Meyering  <meyering@lucent.com>
23928
23929         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
23930         Besides, these days every porting target provides a mkdir function.
23931
23932         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
23933         needed. (this snippet comes from src/system.h).
23934
23935 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
23936
23937         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
23938
23939 2000-06-15  Paul Eggert  <eggert@twinsun.com>
23940
23941         * lib/human.c (adjust_value): New function.
23942         (human_readable_inexact): Apply rounding style even when
23943         printing approximate values.
23944
23945 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23946
23947         * lib/human.c (human_readable_inexact): Allow an input block
23948         size that is not a multiple of the output block size, and vice versa.
23949         Reported by Piergiorgio Sartor.
23950
23951 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23952
23953         * lib/getdate.y (get_date): Apply relative times after time
23954         zone indicator, not before.  Reported by Todd A. Jacobs.
23955
23956 2000-06-13  Jim Meyering  <meyering@lucent.com>
23957
23958         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
23959
23960         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
23961
23962 2000-06-12  Paul Eggert  <eggert@twinsun.com>
23963
23964         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
23965
23966 2000-06-12  Jim Meyering  <meyering@lucent.com>
23967
23968         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
23969         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
23970         optional argument.
23971         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
23972         the optional argument, `lib'.
23973
23974 2000-06-08  Jim Meyering  <meyering@lucent.com>
23975
23976         * m4/largefile.m4: Remove file (now that it's part of autoconf).
23977
23978 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23979
23980         Rewrite largefile configuration so that we don't need to run
23981         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
23982         AC_CANONICAL_HOST in configure.in -- jmm]
23983
23984         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
23985         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
23986         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
23987         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
23988         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
23989         All uses changed.
23990         Instead of inspecting the output of getconf, try to compile the
23991         test program without and with the macro definition.
23992         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
23993         for getconf.  Instead, check for the needed flags by compiling
23994         test programs.
23995
23996 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23997
23998         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
23999
24000 2000-06-04  Jim Meyering  <meyering@lucent.com>
24001
24002         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
24003         SunOS 4.1.4 for which gid_t is an unsigned type.
24004
24005 2000-06-03  Jim Meyering  <meyering@lucent.com>
24006
24007         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
24008         now that autoconf requires that.
24009
24010         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
24011         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
24012         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
24013
24014 2000-06-03  Jim Meyering  <meyering@lucent.com>
24015
24016         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
24017
24018 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24019
24020         * m4/glibc21.m4: New file.
24021         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
24022
24023 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24024
24025         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
24026         newer, don't install charset.alias.
24027         * lib/config.charset: Change the Linux/glibc rules so they become empty
24028         on glibc-2.1 or newer.
24029
24030 2000-06-02  Jim Meyering  <meyering@lucent.com>
24031
24032         * lib/mountlist.c: Back out last change.  Instead, do this...
24033         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
24034         me_dummy member using the same `ignore'-testing code.
24035         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
24036         fs_type strings.
24037         From Mark D. Roth.
24038
24039 2000-05-29  Jim Meyering  <meyering@lucent.com>
24040
24041         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
24042         mounts with the `ignore' attribute.  Based on a patch from
24043         Mark D. Roth.
24044
24045 2000-05-28  Jim Meyering  <meyering@lucent.com>
24046
24047         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
24048         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24049         * m4/stat.m4: Likewise.
24050         * m4/lstat.m4: Likewise.
24051         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
24052
24053         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
24054         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
24055
24056 2000-05-26  Jim Meyering  <meyering@lucent.com>
24057
24058         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
24059
24060 2000-05-24  Jim Meyering  <meyering@lucent.com>
24061
24062         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
24063         autoconf requires that.
24064         * m4/lib-check.m4: Likewise.
24065         * m4/jm-macros.m4: Likewise.
24066         * m4/strftime.m4: Likewise.
24067
24068         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
24069         AC_CHECK_DECLS, now that autoconf requires that.
24070
24071 2000-05-22  Jim Meyering  <meyering@lucent.com>
24072
24073         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24074         * m4/lstat.m4: Likewise.
24075
24076 2000-05-22  Jim Meyering  <meyering@lucent.com>
24077
24078         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
24079
24080 2000-05-20  Jim Meyering  <meyering@lucent.com>
24081
24082         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
24083         (jm_PREREQ): Use it.
24084
24085 2000-05-18  Jim Meyering  <meyering@lucent.com>
24086
24087         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
24088         back, too, since it may have been modified by allocate_entry.
24089         (hash_delete): Rewrite to use neither the assignment operator
24090         nor the comma operator in an if-expression.
24091
24092 2000-05-15  Paul Eggert  <eggert@twinsun.com>
24093
24094         * lib/closeout.c:
24095         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
24096         Remove; no longer needed.
24097         "quotearg.h": Add include.
24098         (file_name): Do not bother to explicitly initialize to NULL; it's less
24099         efficient on some hosts.
24100         (close_stdout_status): Remove test as to whether stdout was already
24101         closed; it breaks for the case "echo x | sort >&-".
24102         Quote file name colons.
24103         Do not assume that _("write error") lacks format strings.
24104
24105 2000-05-15  Jim Meyering  <meyering@lucent.com>
24106
24107         * lib/version-etc.c (version_etc_copyright): Update the copyright
24108         string used in all --version output.
24109
24110 2000-05-14  Jim Meyering  <meyering@lucent.com>
24111
24112         * lib/closeout.c (close_stdout_set_file_name): New function.
24113         (close_stdout_status): Use new file-scoped global.
24114         Return right away if fstat says the stdout file descriptor is invalid.
24115         * lib/closeout.h (close_stdout_set_file_name): Declare.
24116
24117 2000-05-10  Jim Meyering  <meyering@lucent.com>
24118
24119         * lib/closeout.c [default_exit_status]: New file-scoped variable.
24120         (close_stdout_set_status): New function.
24121         * lib/closeout.h (close_stdout_set_status): Declare.
24122
24123 2000-05-09  Jim Meyering  <meyering@lucent.com>
24124
24125         * m4/gettext.m4: Rename this...
24126         * m4/libintl.m4: ...to this.
24127
24128 2000-05-08  Jim Meyering  <meyering@lucent.com>
24129
24130         * lib/long-options.c: Don't include closeout.h.
24131         (parse_long_options): Don't call close_stdout for --version.
24132
24133 2000-05-06  Paul Eggert  <eggert@twinsun.com>
24134
24135         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
24136         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
24137         2.1.3 bug.  This avoids a clash when files like regex.c define
24138         _GNU_SOURCE.
24139
24140 2000-05-06  Jim Meyering  <meyering@lucent.com>
24141
24142         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
24143         (AC_REPLACE_FUNCS): Add strnlen.
24144
24145         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
24146         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
24147
24148         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
24149         AC_SEARCH_LIBS call for nanosleep.
24150         (LIB_NANOSLEEP): Set and AC_SUBST.
24151
24152 2000-05-06  Jim Meyering  <meyering@lucent.com>
24153
24154         * lib/strnlen.c: Undefine __strnlen and strnlen.
24155         [!weak_alias]: Define __strnlen to strnlen.
24156
24157         * lib/atexit.c: New file, from libiberty.
24158
24159 2000-05-06  Jim Meyering  <meyering@lucent.com>
24160
24161         * lib/closeout.c (close_stdout_status): Also check for errors on the
24162         stderr stream.
24163
24164 2000-05-05  Jim Meyering  <meyering@lucent.com>
24165
24166         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
24167         AC_SEARCH_LIBS call for clock_gettime.
24168         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
24169
24170         * m4/search-libs.m4: Update from autoconf.
24171
24172         su doesn't work on Solaris 2.6.
24173         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
24174         <shadow.h>.  Reported by Dragos Harabor.
24175
24176 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
24177
24178         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
24179         memcpy instead of xmalloc, xrealloc, path_concat.
24180         (locale_charset): Treat empty environment variables as absent.
24181         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
24182
24183 2000-05-04  Jim Meyering  <meyering@lucent.com>
24184
24185         * lib/getopt.c: Update from glibc.
24186         * lib/obstack.c: Likewise.
24187         * lib/obstack.h: Likewise.
24188         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
24189         file
24190
24191         * lib/regex.h: Likewise.
24192         * lib/strndup.c: Likewise.
24193         * lib/strnlen.c: New file, from glibc.
24194
24195 2000-05-03  Jim Meyering  <meyering@lucent.com>
24196
24197         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
24198
24199 2000-05-02  Paul Eggert  <eggert@twinsun.com>
24200
24201         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
24202         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
24203         compile-time test, rather than inspecting host and OS, to
24204         decide whether to define _LARGEFILE_SOURCE.
24205
24206 2000-05-01  Jim Meyering  <meyering@lucent.com>
24207
24208         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
24209
24210         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
24211         Based on a patch from Bruno Haible.
24212
24213 2000-05-01  Jim Meyering  <meyering@lucent.com>
24214
24215         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
24216
24217 2000-04-29  Jim Meyering  <meyering@lucent.com>
24218
24219         * lib/path-concat.c: Declare strdup only if it's not defined.
24220         * lib/canon-host.c: Likewise.
24221
24222 2000-04-28  Jim Meyering  <meyering@lucent.com>
24223
24224         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
24225         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
24226         is included first, then limits.h is included by locale.h by libintl.h.
24227         From John David Anglin.
24228
24229 2000-04-25  Jim Meyering  <meyering@lucent.com>
24230
24231         * lib/makepath.c (S_IRWXUGO): Define.
24232         (make_path): Always perform explicit chmod if MODE specifies any
24233         of the `special' permission bits.  Prompted by a bug report against
24234         install from Mate Wierdl and Joost van Baal.
24235
24236 2000-04-18  Jim Meyering  <meyering@lucent.com>
24237
24238         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
24239         (jm_PREREQ): Use it.
24240
24241 2000-04-18  Jim Meyering  <meyering@lucent.com>
24242
24243         * lib/README: New file.
24244
24245         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
24246         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
24247
24248 2000-04-17  Jim Meyering  <meyering@lucent.com>
24249
24250         Get it right :-)
24251         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
24252         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
24253         Suggestion from Akim Demaille.
24254
24255 2000-04-17  Jim Meyering  <meyering@lucent.com>
24256
24257         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
24258         the definition of it to rpl_strftime also defined-away the system's
24259         declaration.
24260
24261 2000-04-15  Jim Meyering  <meyering@lucent.com>
24262
24263         Use `C' to denote so-called `contiguous' files, the same way
24264         that tar does.
24265         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
24266         (ftypelet): Use S_ISCTG.
24267         From Michael Deutschmann.
24268
24269 2000-04-14  Jim Meyering  <meyering@lucent.com>
24270
24271         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
24272         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
24273         clobbered.
24274
24275 2000-04-14  Jim Meyering  <meyering@lucent.com>
24276
24277         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
24278
24279 2000-04-13  Jim Meyering  <meyering@lucent.com>
24280
24281         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
24282         AH_VERBATIM to insert required #ifndef into config.h.in.
24283         Suggestion from Akim Demaille.
24284
24285 2000-04-12  Jim Meyering  <meyering@lucent.com>
24286
24287         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
24288         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
24289         Christian Krackowizer.
24290
24291         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
24292         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
24293         (AC_SYS_LARGEFILE): Require.
24294         (AM_C_PROTOTYPES): Require.
24295
24296 2000-04-08  Jim Meyering  <meyering@lucent.com>
24297
24298         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
24299         names don't conflict.  Reported by Eli Zaretskii.
24300
24301 2000-04-07  Jim Meyering  <meyering@lucent.com>
24302
24303         * lib/putenv.c: Move inclusion of errno.h so it follows that of
24304         sys/types.h, to work around system header problems on AIX 3.2.5.
24305         From Bruno Haible.
24306
24307 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
24308
24309         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
24310         bug.  Deal with the different error behavior of Irix iconv.
24311
24312 2000-04-05  Paul Eggert  <eggert@twinsun.com>
24313
24314         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
24315         IRIX if the installer said otherwise.
24316
24317 2000-04-05  Jim Meyering  <meyering@lucent.com>
24318
24319         Portability tweaks required for ultrix4.3.
24320         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
24321         (jm_CHECK_DECLS): Add getutent to the list of functions.
24322         (_jm_DECL_HEADERS): Add utmpx.h.
24323         From John David Anglin.
24324
24325         * m4/strftime.m4: Back out the 2000-04-02 change.
24326         Instead of that change, simply undefine putenv in the test program.
24327
24328 2000-04-05  Jim Meyering  <meyering@lucent.com>
24329
24330         Portability tweaks required for ultrix4.3.
24331         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
24332         getutent.
24333         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
24334         * lib/canon-host.c: Declare strdup.
24335         * lib/path-concat.c: Likewise.
24336         From John David Anglin.
24337
24338 2000-04-04  Jim Meyering  <meyering@lucent.com>
24339
24340         Be more DOS 8.3-friendly.
24341         * lib/ref-add.sin: Renamed from ref-add.sed.in.
24342         * lib/ref-del.sin: Renamed from ref-del.sed.in.
24343         * lib/Makefile.am: Reflect renaming.
24344         Reported by Eli Zaretskii.
24345
24346         Use a temporary file name that won't clash with `charset.alias'
24347         in the DOS 8.3 name space.
24348         * lib/Makefile.am (charset_tmp): Define.
24349         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
24350         (uninstall-local): Likewise.
24351         Reported by Eli Zaretskii.
24352
24353 2000-04-03  Jim Meyering  <meyering@lucent.com>
24354
24355         * m4/gettext.m4: Fix typo in comment.
24356
24357         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
24358         textutils/configure.in).  Suggestion from Paul Eggert.
24359         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
24360
24361 2000-04-02  Paul Eggert  <eggert@twinsun.com>
24362
24363         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
24364         variable in the shell rather than using putenv, which isn't
24365         portable.  This avoids the configure-time inter-test dependency
24366         on the potentially-renamed putenv function.
24367
24368 2000-03-30  Paul Eggert  <eggert@twinsun.com>
24369
24370         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
24371         before checking struct stat.st_blksize, so that
24372         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
24373
24374 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24375
24376         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
24377         since strftime.c uses HAVE_STRFTIME to decide whether to use
24378         the underlying strftime.
24379
24380 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24381
24382         * lib/time/strftime.c (my_strftime): Make sure we call the system
24383         strftime, not ourselves, when invoking the underlying strftime.
24384
24385 2000-03-24  Jim Meyering  <meyering@lucent.com>
24386
24387         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
24388         (charset_alias): Define.
24389         (install-exec-local): Factor out common code.
24390         (uninstall-local): Split lines longer than 80.
24391         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
24392         (SUFFIXES): Define.
24393         (.sed.in.sed): New rule.  Don't redirect directly to $@.
24394         (CLEANFILES): Add ref-add.sed and ref-del.sed.
24395
24396 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
24397
24398         * lib/config.charset: Output a line containing "Packages using this
24399         file".
24400         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
24401         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
24402         ref-del.sed): New rules.
24403
24404 2000-03-17  Jim Meyering  <meyering@lucent.com>
24405
24406         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
24407         Otherwise, include <strings.h>
24408
24409 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
24410
24411         * lib/unicodeio.c (utf8_wctomb): New function.
24412         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
24413         format instead of in UCS-4 with platform dependent endianness.
24414
24415 2000-03-10  Jim Meyering  <meyering@lucent.com>
24416
24417         * m4/lib-check.m4: Look for getspnam in -lgen, too.
24418         From Marco Franzen.
24419
24420 2000-03-07  Paul Eggert  <eggert@twinsun.com>
24421
24422         * lib/savedir.c (savedir): Work even if directory size is
24423         negative; this can happen with some screwy NFS configurations.
24424
24425 2000-03-06  Jim Meyering  <meyering@lucent.com>
24426
24427         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
24428         if it's NULL (because we ran out of memory).  From Bruno Haible.
24429
24430 2000-03-05  Jim Meyering  <meyering@lucent.com>
24431
24432         * lib/localcharset.c ("path-concat.h"): Include.
24433         (get_charset_aliases): Use path_concat instead of ANSI string
24434         concatenation.
24435
24436         * lib/unicodeio.h (PARAMS): Define.
24437         Use it to guard prototype.
24438
24439 2000-03-04  Jim Meyering  <meyering@lucent.com>
24440
24441         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
24442         for lib/localcharset.c.
24443
24444 2000-03-04  Jim Meyering  <meyering@lucent.com>
24445
24446         * lib/Makefile.am (install-exec-local): Create $(libdir) before
24447         installing into it.
24448         (uninstall-local): Uncomment this rule so `make distcheck' works
24449         once again.
24450
24451         * lib/unicodeio.c (<errno.h>): Include it.
24452         (errno): Declare if not defined.
24453
24454         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
24455
24456         * lib/config.charset: New version, incorporating remarks from a linux
24457         i18n mailing list.  From Bruno Haible.
24458
24459 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
24460
24461         * m4/codeset.m4: New file.
24462         * m4/iconv.m4: New file.
24463         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
24464
24465 2000-03-03  Jim Meyering  <meyering@lucent.com>
24466
24467         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
24468
24469 2000-03-02  Jim Meyering  <meyering@lucent.com>
24470
24471         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
24472         the messages come out on separate lines.
24473
24474         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
24475         rather than jm_CHECK_DECLARATIONS.
24476         * m4/decl.m4: Remove now-unused file.
24477
24478         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
24479         geteuid.
24480
24481 2000-03-02  Jim Meyering  <meyering@lucent.com>
24482
24483         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
24484
24485 2000-03-01  Jim Meyering  <meyering@lucent.com>
24486
24487         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
24488         * lib/unicodeio.c: Likewise.
24489
24490 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
24491
24492         * lib/config.charset: New file.
24493         * lib/localcharset.c: New file.
24494         * lib/unicodeio.h, lib/unicodeio.c: New files.
24495         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
24496         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
24497         (noinst_HEADERS): Add unicodeio.h.
24498         (all-local, install-exec-local, charset.alias): New targets.
24499
24500 2000-02-28  Paul Eggert  <eggert@twinsun.com>
24501
24502         * lib/quotearg.c (ALERT_CHAR): New macro.
24503         (quotearg_buffer_restyled): Use it.
24504
24505 2000-02-27  Jim Meyering  <meyering@lucent.com>
24506
24507         * m4/check-decl.m4: Add getenv to the list.
24508
24509 2000-02-27  Jim Meyering  <meyering@lucent.com>
24510
24511         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
24512         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
24513
24514         * lib/backupfile.c: Guard inclusion of stdlib.h with
24515         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
24516         Declare malloc if needed.
24517
24518         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
24519         `#ifndef HAVE_DECL..'
24520         now that autoconf always defines the HAVE_DECL_ symbols.
24521         * lib/human.c: Likewise.
24522         * lib/same.c: Likewise.
24523         * lib/strtoumax.c: Likewise.
24524
24525         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
24526         declaration check was not run.
24527         * lib/hash.c: Likewise.
24528         * lib/human.c: Likewise.
24529         * lib/same.c: Likewise.
24530         * lib/strtoumax.c: Likewise.
24531
24532         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
24533         `.', then first look up the entire `.'-containing string as a login
24534         name.
24535
24536 2000-02-23  Jim Meyering  <meyering@lucent.com>
24537
24538         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
24539         in place of my hack.
24540
24541 2000-02-18  Paul Eggert  <eggert@twinsun.com>
24542
24543         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
24544         (textint): New typedef.
24545         (parser_control): Member year changed from int to textint.
24546         All uses changed.
24547         (YYSTYPE): Removed; replaced by %union with int and textint members.
24548         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
24549         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
24550         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
24551         (tSNUMBER, tUNUMBER): Now of type <textintval>.
24552         (date, number, to_year): Use width of number in digits, not its value,
24553         to determine whether it's a 2-digit year, or a 2-digit time.
24554         (yylex): Store number of digits of numeric tokens.
24555         Reported by John Kendall.
24556
24557         (parser_control): Changed from struct parser_control to typedef (for
24558         consistency).  All uses changed.
24559
24560         (tID): Removed; not used.
24561         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
24562
24563 2000-02-14  Paul Eggert  <eggert@twinsun.com>
24564
24565         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
24566         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
24567
24568 2000-02-12  Jim Meyering  <meyering@lucent.com>
24569
24570         * lib/userspec.c (ISDIGIT): Define it.
24571         (isdigit): Remove definition.
24572         (is_number): Use ISDIGIT, not isdigit.
24573         <libintl.h>: Include.
24574         (_ and N_): Define.
24575         (parse_user_spec): Mark translatable strings.
24576
24577 2000-02-10  Jim Meyering  <meyering@lucent.com>
24578
24579         With these changes, nanosleep.[ch] are finally enough like the other
24580         lib/* replacement files to compile on a few more losing systems.
24581
24582         * lib/nanosleep.h: Don't include config.h.
24583         Remove prototype from declaration of nanosleep.
24584         (PARAMS): Remove now-unneeded definition.
24585         * lib/nanosleep.c: #undef nanosleep.
24586         (rpl_nanosleep): Rename from nanosleep.
24587
24588 2000-02-10  Jim Meyering  <meyering@lucent.com>
24589
24590         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
24591         gnu_nanosleep to rpl_nanosleep.
24592
24593 2000-02-09  Jim Meyering  <meyering@lucent.com>
24594
24595         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
24596         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
24597
24598 2000-02-08  Akim Demaille  <akim@epita.fr>
24599
24600         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
24601         `[' and `]' and remove uses of `changequote'.
24602         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
24603         (AC_SYS_LARGEFILE): Likewise.
24604         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
24605         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
24606         of changequote.
24607         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
24608         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
24609         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
24610         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
24611
24612 2000-02-05  Jim Meyering  <meyering@lucent.com>
24613
24614         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
24615         Remove explicit use of AC_HEADER_TIME.  It is required by
24616         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
24617         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
24618         in autoconf whereby the expansion of the latter ended up preceding
24619         the expansion of its prerequisite, AC_HEADER_TIME.
24620         Reported by Volker Borchert.
24621
24622 2000-02-03  Jim Meyering  <meyering@lucent.com>
24623
24624         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
24625
24626 2000-02-03  Jim Meyering  <meyering@lucent.com>
24627
24628         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
24629         rather than with `#if HAVE_UTMPNAME'.
24630
24631 2000-02-02  Jim Meyering  <meyering@lucent.com>
24632
24633         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
24634         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
24635         Reported by Eli Zaretskii.
24636
24637 2000-02-01  Jim Meyering  <meyering@lucent.com>
24638
24639         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
24640
24641 2000-01-31  Jim Meyering  <meyering@lucent.com>
24642
24643         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
24644         functions.  Add the time.h and sys/time.h headers along with the
24645         AC_REQUIRE'ment of AC_HEADER_TIME.
24646
24647 2000-01-31  Jim Meyering  <meyering@lucent.com>
24648
24649         * lib/nanosleep.h (nanosleep): Guard declaration with
24650         `#if ! HAVE_DECL_NANOSLEEP'.
24651         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
24652         the declaration in that vendor's sys/timers.h.
24653         Reported by Christian Krackowizer.
24654
24655         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
24656         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
24657         (ISPRINT): Likewise.
24658         Reported by Tom Tromey.
24659
24660 2000-01-30  Jim Meyering  <meyering@lucent.com>
24661
24662         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
24663
24664         * m4/prereq.m4 (utmp_includes): Define.
24665         Check for ut_user and ut_name members in both struct utmpx
24666         and struct utmp.
24667
24668 2000-01-30  Jim Meyering  <meyering@lucent.com>
24669
24670         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
24671         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
24672         header files where only utmpx.ut_user is declared.
24673
24674         * lib/readutmp.h (UT_USER): Define.
24675
24676 2000-01-29  Jim Meyering  <meyering@lucent.com>
24677
24678         * m4/lib-check.m4: New file containing library-related checks from
24679         fileutils and sh-utils (textutils had none).
24680
24681 2000-01-28  Jim Meyering  <meyering@lucent.com>
24682
24683         * m4/perl.m4: Change format of warning message to look more like that
24684         from the missing script.  Suggestion from François Pinard.
24685
24686 2000-01-25  Jim Meyering  <meyering@lucent.com>
24687
24688         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
24689         well as time.h in the compile check.
24690         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
24691         Fix typo in cross-compiling case: s/yes/no/.
24692
24693 2000-01-23  Jim Meyering  <meyering@lucent.com>
24694
24695         * m4/jm-macros.m4: Move df-related tests here from
24696         fileutils/configure.in
24697
24698         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
24699         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
24700
24701         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
24702         s/space/ac_fsusage_space/.
24703         (jm_FILE_SYSTEM_USAGE): Take two parameters.
24704
24705         * m4/ftruncate.m4: New file (derived from part of
24706         fileutils/configure.in).
24707         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
24708         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
24709
24710         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
24711         AC_SUBST these here, rather than just in sh-util/configure.in, so
24712         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
24713         all the same.
24714         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
24715         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
24716         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
24717         (AC_SUBST(POW_LIBM)): Likewise.
24718         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
24719
24720 2000-01-23  Jim Meyering  <meyering@lucent.com>
24721
24722         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
24723         obstack.c.
24724
24725 2000-01-22  Jim Meyering  <meyering@lucent.com>
24726
24727         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
24728
24729         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
24730
24731         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
24732         configure.in
24733         (AC_CHECK_HEADERS): Likewise for sh-utils.
24734         (AC_CHECK_HEADERS): Likewise for textutils.
24735         Merge the three lists of headers.
24736
24737         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
24738         from fileutils' configure.in.
24739
24740         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
24741         code. Moved tests into their own function (_jm_DECL_HEADERS) in
24742         check-decl.m4.
24743
24744         * m4/check-decl.m4: Use #if rather than #ifdef.
24745         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
24746         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
24747         (_jm_DECL_HEADERS): Define new function.
24748         (jm_CHECK_DECLARATIONS): Require it.
24749
24750 2000-01-22  Jim Meyering  <meyering@lucent.com>
24751
24752         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
24753         [! HAVE_DECL_STRTOULL]: Declare strtoull.
24754         Required for some AIX systems.  Reported by Christian Krackowizer.
24755         [TESTING] (main): New function.
24756
24757         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
24758         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
24759         letters.
24760
24761         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
24762         iswprint.
24763
24764         * lib/strverscmp.c (ISDIGIT): Define.
24765         (strverscmp): Use ISDIGIT, not isdigit.
24766
24767 2000-01-19  Jim Meyering  <meyering@lucent.com>
24768
24769         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
24770         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
24771         defines `struct timespec' in <sys/time.h>
24772
24773         * m4/c-bs-a.m4: Remove uses of changequote altogether.
24774         Thanks to Akim for explaining.
24775
24776 2000-01-17  Paul Eggert  <eggert@twinsun.com>
24777
24778         * lib/nanosleep.c (nanosleep):
24779         Don't use SA_INTERRUPT to decide whether to call sigaction, as
24780         POSIX.1 doesn't require SA_INTERRUPT and some systems
24781         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
24782         it's been part of POSIX.1 since day 1 (in 1988).
24783
24784 2000-01-17  Jim Meyering  <meyering@lucent.com>
24785
24786         * lib/interlock: Remove unused file.  Reported by François Pinard.
24787
24788 2000-01-16  Paul Eggert  <eggert@twinsun.com>
24789
24790         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
24791         alert, backslash, formfeed, and vertical tab unnecessarily in
24792         shell quoting style.
24793
24794 2000-01-16  Jim Meyering  <meyering@lucent.com>
24795
24796         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
24797         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
24798         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
24799         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
24800
24801 2000-01-16  Jim Meyering  <meyering@lucent.com>
24802
24803         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
24804         because the latter didn't work.
24805
24806 2000-01-15  Jim Meyering  <meyering@lucent.com>
24807
24808         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
24809         (AC_REPLACE_FUNCS): Add memcpy and memset.
24810         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
24811         Add strpbrk.
24812         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
24813
24814 2000-01-12  Jim Meyering  <meyering@lucent.com>
24815
24816         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
24817         (jm_PREREQ): Use it.
24818         (jm_PREREQ_READUTMP): New macro.
24819         (jm_PREREQ): Use it.
24820
24821 2000-01-11  Paul Eggert  <eggert@twinsun.com>
24822
24823         Quote multibyte characters correctly.
24824         * m4/c-bs-a.m4: New file.
24825         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
24826         (jm_PREREQ): Use it.
24827
24828 2000-01-11  Paul Eggert  <eggert@twinsun.com>
24829
24830         * m4/uintmax_t.m4: Port to autoconf 2.13.
24831
24832 2000-01-08  Jim Meyering  <meyering@ascend.com>
24833
24834         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
24835         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
24836
24837 2000-01-04  Jim Meyering  <meyering@ascend.com>
24838
24839         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
24840         jm_STRUCT_DIRENT_D_TYPE.
24841         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
24842         jm_STRUCT_DIRENT_D_INO.
24843         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
24844         jm_STRUCT_UTIMBUF.
24845         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
24846         renamings.
24847         * m4/utime.m4: Likewise.
24848
24849         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
24850         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
24851
24852 2000-01-03  Paul Eggert  <eggert@twinsun.com>
24853
24854         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
24855         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
24856
24857 2000-01-02  Jim Meyering  <meyering@ascend.com>
24858
24859         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
24860         remember if this is necessary.
24861
24862 1999-12-26  Jim Meyering  <meyering@ascend.com>
24863
24864         * m4/jm-macros.m4: Use it here.
24865         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
24866
24867 1999-12-23  Jim Meyering  <meyering@ascend.com>
24868
24869         * m4/jm-macros.m4: Check for clock_gettime (moved from
24870         fileutils/configure.in)
24871         Check for gettimeofday.
24872
24873 1999-12-20  Jim Meyering  <meyering@ascend.com>
24874
24875         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
24876         autoconf-2.14a-1999-12-20.
24877
24878 1999-12-19  Jim Meyering  <meyering@ascend.com>
24879
24880         * m4/lstat-slash.m4: New file.
24881         * m4/jm-macros.m4: Use the new macro:
24882         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24883
24884 1999-12-07  Jim Meyering  <meyering@ascend.com>
24885
24886         * m4/perl.m4: Require that File::Compare be available, too.
24887         Too many systems seem to lack it.
24888
24889         * m4/strftime.m4: Add checks for most of the cpp macros tested in
24890         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
24891
24892 1999-11-18  Paul Eggert  <eggert@twinsun.com>
24893
24894         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
24895         problem with the QNX 4.25 shell, which doesn't propagate exit
24896         status of failed commands inside shell assignments.
24897
24898 1999-11-17  Jim Meyering  <meyering@ascend.com>
24899
24900         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
24901
24902 1999-11-07  Jim Meyering  <meyering@ascend.com>
24903
24904         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
24905
24906 1999-11-06  Jim Meyering  <meyering@ascend.com>
24907
24908         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
24909         * m4/jm-macros.m4 (jm_MACROS): Use it here.
24910
24911 1999-11-05  Jim Meyering  <meyering@ascend.com>
24912
24913         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
24914         configure.in of textutils, fileutils, and sh-utils into this one
24915         (shared between those packages) file.
24916         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
24917         AC_STRUCT_ST_BLKSIZE.
24918
24919 1999-11-03  Jim Meyering  <meyering@ascend.com>
24920
24921         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
24922         of AC_CHECK_TYPE checks includes unistd.h.
24923         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
24924         Suggestion from Akim Demaille.
24925
24926 1999-10-30  Jim Meyering  <meyering@ascend.com>
24927
24928         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
24929         m4-quoted string.
24930         * m4/ls-mntd-fs.m4: Likewise.
24931         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
24932         * m4/jm-winsz1.m4: Likewise.
24933
24934         * m4/const.m4: Remove file, since the fix made it into the experimental
24935         version of autoconf.
24936         * m4/mktime.m4: Likewise.
24937
24938         * m4/check-type.m4: Remove file, now that the latest version of
24939         AC_CHECK_TYPE takes a third arg to specify additional #includes.
24940
24941         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
24942         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
24943         AC_CHECK_TYPE.
24944
24945 1999-10-04  Jim Meyering  <meyering@ascend.com>
24946
24947         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
24948
24949 1999-09-22  Paul Eggert  <eggert@twinsun.com>
24950
24951         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
24952         2.95.1 bug with HP-UX 10.20.
24953
24954 1999-09-17  Jim Meyering  <meyering@ascend.com>
24955
24956         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
24957         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
24958         due to missing strdup (against sh-utils-2.0).
24959
24960 1999-08-29  Jim Meyering  <meyering@ascend.com>
24961
24962         * m4/jm-macros.m4: Require jm_BISON.
24963         * m4/bison.m4: New file.
24964
24965 1999-08-17  Paul Eggert  <eggert@twinsun.com>
24966
24967         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
24968         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
24969
24970 1999-08-05  Jim Meyering  <meyering@ascend.com>
24971
24972         * m4/getline.m4: Rename test file from conftestdata to conftest.data
24973         to avoid conflicts with `conftest' on 8+3 filesystems.
24974         Suggestion from Eli Zaretskii.
24975
24976 1999-08-04  Jim Meyering  <meyering@ascend.com>
24977
24978         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
24979         fileutils and sh-utils (textutils's getline test was inadequate).
24980         (AM_FUNC_GETLINE): Run this test.
24981         (AC_CHECK_FUNCS): Check for getdelim.
24982         Reported by Bob Proulx.
24983
24984 1999-08-02  Jim Meyering  <meyering@ascend.com>
24985
24986         * m4/jm-macros.m4: Add a comment.
24987
24988 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24989
24990         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
24991         <inttypes.h> defines strtoumax as a macro (and not as a
24992         function).
24993
24994 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24995
24996         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
24997         that we can shift, multiply and divide unsigned long long
24998         values; Ultrix cc can't do it.
24999
25000 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25001
25002         * m4/mktime.m4: New file, which is a preview of what should appear
25003         in the next public autoconf release.
25004
25005 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25006
25007         * m4/lfs.m4: Remove this file.
25008         * m4/largefile.m4: New file.  It contains the old contents of
25009         lfs.m4, except that all names with prefix AC_LFS have been
25010         changed to use the prefix AC_SYS_LARGEFILE instead, to be
25011         compatible with future autoconf versions.  Also, some minor m4
25012         quoting problems have been fixed.
25013
25014 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25015
25016         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
25017         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
25018         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
25019         and simplify the shell code.
25020
25021 1999-08-01  Jim Meyering  <meyering@ascend.com>
25022
25023         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
25024         m4.
25025
25026 1999-07-20  Jim Meyering  <meyering@ascend.com>
25027
25028         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
25029
25030 1999-07-15  Jim Meyering  <meyering@ascend.com>
25031
25032         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
25033
25034 1999-05-22  Jim Meyering  <meyering@ascend.com>
25035
25036         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
25037
25038 1999-05-20  Jim Meyering  <meyering@ascend.com>
25039
25040         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
25041         Add a colon after each `then' in case $4 is empty.
25042
25043 1999-05-16  Jim Meyering  <meyering@ascend.com>
25044
25045         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
25046
25047 1999-05-10  Jim Meyering  <meyering@ascend.com>
25048
25049         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
25050
25051         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
25052         AC_FUNC_MKTIME.
25053
25054 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
25055
25056         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
25057
25058 1999-05-04  Paul Eggert  <eggert@twinsun.com>
25059
25060         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
25061         not CPPFLAGS, so that linking works correctly in IRIX.
25062
25063 1999-04-30  Paul Eggert  <eggert@twinsun.com>
25064
25065         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
25066
25067 1999-04-20  Paul Eggert  <eggert@twinsun.com>
25068
25069         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
25070         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
25071         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
25072         jm_AC_TYPE_UNSIGNED_LONG_LONG.
25073         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
25074
25075         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
25076
25077 1999-04-20  Jim Meyering  <meyering@ascend.com>
25078
25079         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
25080         AC_REPLACE xstroull if necessary.  From Paul Eggert.
25081         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
25082
25083 1999-04-18  Jim Meyering  <meyering@ascend.com>
25084
25085         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
25086         * m4/jm-macros.m4: Use it.
25087
25088 1999-04-06  Jim Meyering  <meyering@ascend.com>
25089
25090         * m4/strftime.m4: Remove test for %f.
25091
25092 1999-03-29  Jim Meyering  <meyering@ascend.com>
25093
25094         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
25095         superset of the AC_TYPE_* checks in the textutils, fileutils,
25096         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
25097         AC_TYPE_PID_T.
25098
25099 1999-03-28  Jim Meyering  <meyering@ascend.com>
25100
25101         * m4/jm-macros.m4: Define GNU_PACKAGE here.
25102         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
25103         replaced e.g., in the *.sh files of the sh-utils.
25104
25105 1999-03-20  Jim Meyering  <meyering@ascend.com>
25106
25107         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
25108         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
25109         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
25110
25111 1999-03-19  Jim Meyering  <meyering@ascend.com>
25112
25113         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
25114
25115 1999-03-12  Jim Meyering  <meyering@ascend.com>
25116
25117         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
25118
25119 1999-03-07  Jim Meyering  <meyering@ascend.com>
25120
25121         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
25122         declared.
25123
25124 1999-02-17  Jim Meyering  <meyering@ascend.com>
25125
25126         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
25127         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
25128
25129 1999-02-07  Jim Meyering  <meyering@ascend.com>
25130
25131         * m4/group-member.m4: New file -- extracted from sh-utils'
25132         configure.in.
25133
25134         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
25135         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
25136
25137 1999-02-06  Jim Meyering  <meyering@ascend.com>
25138
25139         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
25140         * m4/fnmatch.m4: Likewise.
25141         * m4/getgroups.m4: Likewise.
25142         * m4/lstat.m4: Likewise.
25143         * m4/malloc.m4: Likewise.
25144         * m4/putenv.m4: Likewise.
25145         * m4/realloc.m4: Likewise.
25146         * m4/regex.m4: Likewise.
25147         * m4/stat.m4: Likewise.
25148         * m4/strftime.m4: Likewise.
25149         Suggestion from Alain Magloire.
25150
25151         * m4/chown.m4: Use `.$ac_objext', not `.o'.
25152         * m4/fnmatch.m4: Likewise.
25153         * m4/getgroups.m4: Likewise.
25154         * m4/getline.m4: Likewise.
25155         * m4/lstat.m4: Likewise.
25156         * m4/malloc.m4: Likewise.
25157         * m4/memcmp.m4: Likewise.
25158         * m4/putenv.m4: Likewise.
25159         * m4/realloc.m4: Likewise.
25160         * m4/regex.m4: Likewise.
25161         * m4/stat.m4: Likewise.
25162         * m4/strftime.m4: Likewise.
25163         Suggestion from Alain Magloire.
25164
25165         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
25166         an argument.
25167
25168         * m4/regex.m4: Add a run-time Test for proper operation of
25169         re_compile_pattern.
25170
25171 1999-01-31  Jim Meyering  <meyering@ascend.com>
25172
25173         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
25174
25175 1999-01-30  Jim Meyering  <meyering@ascend.com>
25176
25177         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
25178
25179         * m4/jm-mktime.m4: Make this a wrapper around the official
25180         AM_FUNC_MKTIME rather than my private copy, now that the official one
25181         is up to date.
25182         * m4/mktime.m4: Remove file.
25183
25184         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
25185         * m4/uptime.m4: Likewise.
25186         * m4/uintmax_t.m4: Likewise.
25187
25188 1999-01-28  Jim Meyering  <meyering@ascend.com>
25189
25190         * m4/jm-macros.m4: Use jm_AFS.
25191         * m4/afs.m4: New file (from fileutils' configure.in).
25192
25193         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
25194         * m4/chown.m4: Likewise.
25195         * m4/d-ino.m4: Likewise.
25196         * m4/d-type.m4: Likewise.
25197         * m4/fnmatch.m4: Likewise.
25198         * m4/getgroups.m4: Likewise.
25199         * m4/gettext.m4: Likewise.
25200         * m4/jm-mktime.m4: Likewise.
25201         * m4/jm-winsz2.m4: Likewise.
25202         * m4/lcmessage.m4: Likewise.
25203         * m4/ls-mntd-fs.m4: Likewise.
25204         * m4/malloc.m4: Likewise.
25205         * m4/memcmp.m4: Likewise.
25206         * m4/putenv.m4: Likewise.
25207         * m4/realloc.m4: Likewise.
25208         * m4/st_mtim.m4: Likewise.
25209         * m4/strftime.m4: Likewise.
25210
25211 1999-01-16  Jim Meyering  <meyering@ascend.com>
25212
25213         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
25214         (ARGMATCH_DIE_DECL): Define.
25215
25216 1999-01-12  Jim Meyering  <meyering@ascend.com>
25217
25218         * m4/Makefile.am.in: Rewrite to avoid using fmt.
25219         Reported by Lars Hecking.
25220
25221 1999-01-10  Jim Meyering  <meyering@ascend.com>
25222
25223         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
25224         gross kludge.
25225         * m4/inttypes_h.m4: Likewise.
25226         * m4/lstat.m4: Likewise.
25227         * m4/malloc.m4: Likewise.
25228         * m4/readdir.m4: Likewise.
25229         * m4/realloc.m4: Likewise.
25230         * m4/st_dm_mode.m4: Likewise.
25231         * m4/stat.m4: Likewise.
25232         * m4/utimbuf.m4: Likewise.
25233         * m4/utimes.m4: Likewise.
25234
25235         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
25236         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
25237         comments in config.h.in are meaningful.
25238
25239         * m4/jm-macros.m4: Require autoconf-2.13 here.
25240
25241         * m4/regex.m4: By default, don't use the included regex.c on systems
25242         with glibc 2.  Suggestion from Uli Drepper.
25243
25244 1999-01-02  Jim Meyering  <meyering@ascend.com>
25245
25246         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
25247
25248 1998-12-18  Jim Meyering  <meyering@ascend.com>
25249
25250         * m4/Makefile.am.in (Makefile.am): Simplify rule.
25251         Based on a suggestion from Lars Hecking.
25252
25253 1998-11-16  Paul Eggert  <eggert@twinsun.com>
25254
25255         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
25256
25257 1998-11-16  Jim Meyering  <meyering@ascend.com>
25258
25259         * m4/lfs.m4: Double-quote the `uname...` expression.
25260
25261 1998-11-14  Jim Meyering  <meyering@ascend.com>
25262
25263         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
25264         * m4/stat.m4: Likewise.
25265
25266 1998-11-03  Jim Meyering  <meyering@ascend.com>
25267
25268         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
25269         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
25270
25271 1998-10-18  Jim Meyering  <meyering@ascend.com>
25272
25273         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
25274
25275 1998-10-17  Jim Meyering  <meyering@ascend.com>
25276
25277         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
25278         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
25279         calls for those previously hard-coded headers.  Instead, take a new
25280         parameter.
25281         (jm_CHECK_DECLARATIONS): Reflect interface change.
25282         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
25283         (jm_CHECK_DECL_LOCALTIME_R): New macro.
25284
25285         * m4/mktime.m4: Test for spring-forward gap before long-running test.
25286
25287 1998-10-14  Jim Meyering  <meyering@ascend.com>
25288
25289         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
25290         instead of "TZ=America/Vancouver".  From Paul Eggert.
25291
25292 1998-10-11  Jim Meyering  <meyering@ascend.com>
25293
25294         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
25295         This adds a test for a recently added compatibility fix for mktime.c.
25296         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
25297
25298 1998-09-27  Jim Meyering  <meyering@ascend.com>
25299
25300         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
25301
25302         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
25303         ../configure.in, including a change from Gordon Matzigkeit to allow
25304         cross-compiling for the Hurd.
25305
25306         * m4/glibc.m4: New file/macro to test for the GNU C Library
25307         versions 1 and 2.  From Gordon Matzigkeit.
25308         Indent.
25309
25310 1998-09-21  Jim Meyering  <meyering@ascend.com>
25311
25312         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
25313
25314 1998-08-18  Paul Eggert  <eggert@twinsun.com>
25315
25316         Port nanosecond-resolution times to UnixWare 2.1.2 and
25317         pedantic Solaris 2.6.
25318
25319         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
25320         AC_STRUCT_ST_MTIM.
25321         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
25322         Generate name of ns member, instead of just 1 or undef.
25323         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
25324
25325 1998-08-15  Jim Meyering  <meyering@ascend.com>
25326
25327         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
25328         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
25329         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
25330         instead of jm_TYPE_SSIZE_T.
25331
25332 1998-08-12  Jim Meyering  <meyering@ascend.com>
25333
25334         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
25335
25336 1998-08-02  Jim Meyering  <meyering@ascend.com>
25337
25338         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
25339         in acconfig.h manually.
25340
25341 1998-07-31  Paul Eggert  <eggert@twinsun.com>
25342
25343         * m4/st_mtim.m4: New file.
25344
25345 1998-07-28  Jim Meyering  <meyering@ascend.com>
25346
25347         * m4/utimes.m4: Undef stat.
25348
25349 1998-07-25  Jim Meyering  <meyering@ascend.com>
25350
25351         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
25352         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
25353
25354 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
25355
25356         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
25357         uid and gid actually remain unchanged.
25358
25359 1998-07-07  Jim Meyering  <meyering@ascend.com>
25360
25361         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
25362
25363 1998-07-04  Jim Meyering  <meyering@ascend.com>
25364
25365         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
25366         to prove that this macro can be used in packages without regex.c.
25367
25368 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
25369
25370         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
25371         is to be used.
25372
25373 1998-07-03  Jim Meyering  <meyering@ascend.com>
25374
25375         * m4/gettext.m4: Add -lintl if it's found to be necessary.
25376
25377         * m4/gettext.m4: New file -- from gettext-0.10.35.
25378         * m4/lcmessage.m4: Likewise.
25379         * m4/progtest.m4: Likewise.
25380
25381         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
25382         * m4/jm-macros.m4: Require the new macro.
25383
25384 1998-06-29  Jim Meyering  <meyering@ascend.com>
25385
25386         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
25387         for the definition of NGROUPS (used in a system header included
25388         by sys/mount.h).
25389
25390 1998-06-28  Jim Meyering  <meyering@ascend.com>
25391
25392         * m4/ls-mntd-fs.m4: New file.
25393         * m4/fstypename.m4: New file.
25394
25395         * m4/jm-macros.m4: Require the new macro.
25396         * m4/jm-glibc-io.m4: New file.
25397
25398 1998-05-19  Jim Meyering  <meyering@ascend.com>
25399
25400         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
25401         * m4/lchown.m4: New file.
25402
25403         * m4/Makefile.am.in: New file.
25404         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
25405
25406 1998-05-14  Jim Meyering  <meyering@ascend.com>
25407
25408         * m4/Makefile.am (EXTRA_DIST): Add them.
25409         * m4/jm-macros.m4: New file.
25410         * m4/utimbuf.m4: New file.
25411
25412 1998-05-12  Jim Meyering  <meyering@ascend.com>
25413
25414         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
25415
25416 1998-05-11  Jim Meyering  <meyering@ascend.com>
25417
25418         * m4/isc-posix.m4: New file.
25419
25420 1998-05-10  Jim Meyering  <meyering@ascend.com>
25421
25422         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
25423
25424 1998-05-09  Jim Meyering  <meyering@ascend.com>
25425
25426         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
25427         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
25428         with automake.
25429
25430         * m4/ssize_t.m4: New file.
25431         * m4/mktime.m4: Remove file -- the new automake has this now.
25432
25433 1998-04-26  Jim Meyering  <meyering@ascend.com>
25434
25435         * m4/assert.m4: New file.
25436         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
25437
25438 1998-04-05  Jim Meyering  <meyering@ascend.com>
25439
25440         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
25441         (jm_PREREQ): Use it here.
25442
25443 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
25444
25445         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
25446         in acconfig.h.
25447
25448 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
25449
25450         * m4/prereq.m4: New file.
25451         * m4/error.m4: New file.
25452         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
25453
25454 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
25455
25456         * m4/getline.m4: Don't set am_cv_func_working_getline before the
25457         cache-check for the same variable -- that defeated the purpose of
25458         the test; the test program was never run.  This was a problem only
25459         on systems with losing getline functions -- HP-UX 10.20 is one.
25460         Reported by Bjorn Helgaas.
25461
25462 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
25463
25464         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
25465
25466 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
25467
25468         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
25469
25470         * m4/const.m4: New file.  Use an initializer in this declaration
25471         typedef int charset[2]; const charset x;
25472         Reported by Bob Glickstein.
25473
25474 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
25475
25476         * m4/chown.m4: Fix reversed types on -1 args to chown.
25477         From Kaveh Ghazi.
25478
25479 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
25480
25481         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
25482         Add lseek and memchr.
25483
25484         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
25485         T.E.Dickey <dickey@clark.net> said that some older preprocessors
25486         have a 20-character limit on names.
25487
25488 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
25489
25490         * m4/inttypes_h.m4: New file.
25491         * m4/uintmax_t.m4: New file.
25492         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
25493
25494 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
25495   Free Software Foundation, Inc.
25496 Copying and distribution of this file, with or without modification,
25497 are permitted provided the copyright notice and this notice are preserved.