Undo the last change; it caused a compilation error when cross-compiling to
[pspp] / ChangeLog
1 2007-01-18  Bruno Haible  <bruno@clisp.org>
2
3         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
4         last change; it caused a compilation error when cross-compiling to
5         Cygwin.
6
7 2007-01-18  Jim Meyering  <jim@meyering.net>
8
9         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
10         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
11         than the race-prone "test -d sys || mkdir sys".
12         (configure.ac): Use AC_PROG_MKDIR_P.
13         * modules/sys_select: Likewise.
14         * modules/sys_socket: Likewise.
15         * modules/sys_time: Likewise.
16
17 2007-01-18  Eric Blake  <ebb9@byu.net>
18
19         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
20         replace gettimeofday.
21         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
22         name, to avoid infinite recursion.
23
24 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
25
26         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
27         module sys_time.
28         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
29         assume timespec.h defines struct timeval.
30         * lib/settime.c: Likewise.
31         * lib/utimens.c: Likewise.
32         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
33         since we now assume the gettimeofday module.
34         * lib/tempname.c (__gen_tempname): Likewise.
35         * lib/gettimeofday.h: Remove.
36         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
37         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
38         Include <time.h>, for 'time()'.
39         (localtime_buffer_addr): Also use this workaround if
40         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
41         to simplify the uses.  All uses changed.
42         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
43         that #undef is inside {}, and 'const' follows type name consistently.
44         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
45         (gettimeofday): Do not use the maximum possible value for
46         tv->tv_usec, since that might break usages other than ls.c.
47         Instead, we'll leave ls.c alone.  This undoes today's patch
48         by Bruno.  Add a compile-time warning for 1s-clock resolution;
49         we've never observed the problem but might as well keep the
50         canary.
51         * lib/nanosleep.c: Include timespec.h first, for interface check.
52         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
53         now assume the sys_time module.
54         * lib/tempname.c: Likewise.
55         * lib/timespec.h: Likewise.
56         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
57         needed.
58         * lib/strftime.c: Likewise.
59         * lib/timespec.h: Likewise.
60         * lib/posixtm.c: Include posixtm.h first, for interface check.
61         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
62         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
63         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
64         * lib/sys_time_.h: New file.
65         * lib/timespec.h (struct timespec): Use long int, not long.
66         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
67         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
68         Remove obsolescent call to AC_HEADER_TIME.
69         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
70         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
71         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
72         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
73         Likewise.
74         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
75         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
76         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
77         into the sys_time module.  Check for gettimeofday just once.
78         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
79         for gettimeofday signature to just check the signature.  Merely
80         compile it, since linking doesn't test signature.  Improve test for
81         whether gettimeofday.o is actually needed.
82         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
83         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
84         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
85         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
86         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
87         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
88         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
89         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
90         than worrying about sys/time.h.
91         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
92         Don't bother worrying about TIME_WITH_SYS_TIME.
93         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
94         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
95         * m4/sys_time_h.m4: New file.
96         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
97         Don't include sys/time.h.  Return from main rather than exiting.
98         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
99         all uses changed.
100         * modules/gethrxtime (Depends-on): Add sys_time.
101         * modules/gettime (Depends-on): Likewise.
102         * modules/gettimeofday (Depends-on): Likewise.
103         * modules/nanosleep (Depends-on): Likewise.
104         * modules/settime (Depends-on): Likewise.
105         * modules/tempname (Depends-on): Likewise.
106         * modules/utimens (Depends-on): Likewise.
107         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
108         (Include:) Change back to <sys/time.h>.
109         (Maintainer:) Add self.
110         * modules/sys_time: New file.
111         * modules/tempname (Depends-on): Add gettimeofday.
112         * tests/test-gettimeofday.c: Include <sys/time.h>
113         rather than gettimeofday.h.
114
115 2007-01-17  Bruno Haible  <bruno@clisp.org>
116
117         * gnulib-tool (func_get_license): Revert last patch. Instead, let
118         the license default to GPL.
119         (func_create_testdir): Don't complain if a module is LGPL and its
120         tests module depends on GPLed modules.
121
122 2007-01-17  Bruno Haible  <bruno@clisp.org>
123
124         * lib/gettimeofday.c (gettimeofday): Add code for the case
125         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
126         maximum possible value for tv->tv_usec, rather than the minimum one.
127
128 2005-10-08  Martin Lambers  <marlam@marlam.de>
129 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
130 2007-01-16  Bruno Haible  <bruno@clisp.org>
131
132         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
133         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
134         gl_FUNC_GETTIMEOFDAY.
135         (Include): Add gettimeofday.h.
136         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
137         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
138         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
139         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
140         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
141         * lib/gettimeofday.h: New file.
142         * lib/gettimeofday.c: Include <sys/timeb.h>.
143         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
144         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
145         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
146         fall back on time().
147
148         * tests/test-gettimeofday.c: New file.
149         * modules/gettimeofday-tests: New file.
150
151 2007-01-16  Eric Blake  <ebb9@byu.net>
152
153         * modules/fnmatch (Depends-on): Depend on wchar.
154         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
155         * m4/fnmatch.m4: Likewise.
156         * modules/mbchar (Makefile.am): Assume <wchar.h>.
157         * m4/mbchar.m4: Likewise.
158         * modules/mbswidth (Depends-on): Depend on wchar.
159         * lib/mbswidth.c: Assume <wchar.h>.
160         * m4/mbswidth.m4: Likewise.
161         * modules/quotearg (Depends-on): Depend on wchar.
162         * lib/quotearg.c: Assume <wchar.h>.
163         * m4/quotearg.m4: Likewise.
164         * modules/regex (Depends-on): Depend on wchar.
165         * lib/regex_internal.h: Assume <wchar.h>.
166         * m4/regex.m4: Likewise.
167         * modules/stdint (Depends-on): Depend on wchar.
168         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
169         * m4/stdint.m4: Likewise.
170         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
171         * modules/strftime (Depends-on): Depend on wchar.
172         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
173         * modules/strtol (Depends-on): Depend on wchar.
174         * lib/strtol.c: Assume <wchar.h>.
175         * modules/wcwidth (Depends-on): Depend on wchar.
176         * lib/wcwidth.h: Assume <wchar.h>.
177         * m4/wcwidth.m4: Likewise.
178
179 2007-01-16  Bruno Haible  <bruno@clisp.org>
180
181         * modules/csharpexec-script: New, created from...
182         * modules/csharpexec: ... this.
183
184 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
185
186         * modules/javaexec-script: New, created from...
187         * modules/javaexec: ... this.
188
189 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
190
191         * modules/poll (Dependencies): Add sys_select.
192
193 2007-01-15  Jim Meyering  <jim@meyering.net>
194
195         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
196         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
197         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
198         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
199
200 2007-01-15  Bruno Haible  <bruno@clisp.org>
201
202         * modules/striconveh: New file.
203         * lib/striconveh.h: New file.
204         * lib/striconveh.c: New file.
205         * MODULES.html.sh (Internationalization functions): Add striconveh.
206
207         * modules/striconveh-tests: New file.
208         * tests/test-striconveh.c: New file.
209
210 2007-01-15  Bruno Haible  <bruno@clisp.org>
211
212         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
213         not from GNU libiconv or GNU libc.
214
215 2007-01-15  Bruno Haible  <bruno@clisp.org>
216
217         * doc/gnulib-intro.texi (Copyright): Explain the different license
218         terms for module descriptions, autoconf macros, tests, documentation.
219
220 2007-01-14  Bruno Haible  <bruno@clisp.org>
221
222         * modules/striconv-tests: New file.
223         * tests/test-striconv.c: New file.
224
225 2007-01-14  Bruno Haible  <bruno@clisp.org>
226
227         * modules/iconv-tests: New file.
228         * tests/test-iconv.c: New file.
229
230 2007-01-14  Bruno Haible  <bruno@clisp.org>
231
232         * gnulib-tool (func_get_license): For test modules, use the license of
233         the main module.
234
235 2007-01-14  Bruno Haible  <bruno@clisp.org>
236
237         * modules/iconv (Include): Clarify that <iconv.h> can only be included
238         if iconv is found to exist.
239
240 2007-01-14  Bruno Haible  <bruno@clisp.org>
241
242         * modules/c-ctype-tests: New file.
243         * tests/test-c-ctype.c: New file.
244
245 2007-01-14  Bruno Haible  <bruno@clisp.org>
246
247         * modules/binary-io-tests: New file.
248         * tests/test-binary-io.sh: New file.
249         * tests/test-binary-io.c: New file.
250
251 2007-01-14  Bruno Haible  <bruno@clisp.org>
252
253         * modules/array-oset-tests: New file.
254         * tests/test-array_oset.c: New file.
255
256 2007-01-14  Bruno Haible  <bruno@clisp.org>
257
258         * modules/array-list-tests: New file.
259         * tests/test-array_list.c: New file.
260
261 2007-01-14  Bruno Haible  <bruno@clisp.org>
262
263         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
264         and make.
265         Reported by Simon Josefsson in
266         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
267
268 2007-01-14  Bruno Haible  <bruno@clisp.org>
269
270         * modules/allocsa-tests: New file.
271         * tests/test-allocsa.c: New file.
272
273 2007-01-14  Bruno Haible  <bruno@clisp.org>
274
275         * modules/fchdir (Depends-on): Add absolute-header.
276         * modules/unistd (Depends-on): Likewise.
277
278 2006-12-30  Bruno Haible  <bruno@clisp.org>
279
280         * modules/fchdir: New file.
281         * modules/unistd (Files): Add lib/unistd_.h.
282         (Makefile.am): Generate unistd.h from unistd_.h.
283         * lib/fchdir.c: New file.
284         * lib/dirent_.h: New file.
285         * lib/unistd_.h: New file.
286         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
287         * m4/fchdir.m4: New file.
288         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
289         (gl_HEADER_UNISTD): Invoke it.
290         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
291         function.
292         * lib/backupfile.c (opendir, closedir): Undefine.
293         * lib/chown.c (open, close): Undefine.
294         * lib/clean-temp.c (open, close): Undefine.
295         * lib/copy-file.c (open, close): Undefine.
296         * lib/execute.c (open, close): Undefine.
297         * lib/fsusage.c (open, close): Undefine.
298         * lib/gc-gnulib.c (open, close): Undefine.
299         * lib/getcwd.c (opendir, closedir): Undefine.
300         * lib/glob.c (opendir, closedir): Undefine.
301         * lib/javacomp.c (open, close): Undefine.
302         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
303         * lib/openat-proc.c (open, close): Undefine.
304         * lib/pagealign_alloc.c (open, close): Undefine.
305         * lib/pipe.c (open, close): Undefine.
306         * lib/progreloc.c (open, close): Undefine.
307         * lib/savedir.c (opendir, closedir): Undefine.
308         * lib/utime.c (open, close): Undefine.
309         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
310
311 2007-01-10  Bruno Haible  <bruno@clisp.org>
312
313         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
314
315 2007-01-12  Eric Blake  <ebb9@byu.net>
316
317         Provide a robust <wchar.h>.  Further simplifications are now
318         possible in other modules, but not included here.
319         * modules/wchar: New module.
320         * m4/wchar.m4: New file.
321         * lib/wchar_.h: Likewise.
322         * modules/mbchar (Depends-on): Depend on wchar, as the first use
323         of the new module.
324         * MODULES.html.sh (Extended multibyte and wide character utilities):
325         New section.
326
327 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
328
329         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
330         to a reasonable default for memory allocation.
331         (xreadlink): Don't allocate a huge buffer, to work around a buggy
332         file system that reports garbage st_size values for symlinks.
333         Problem reported by Liyang Hu.
334
335 2007-01-11  Simon Josefsson  <simon@josefsson.org>
336
337         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
338         Emacs .#* auto-save files).
339
340 2007-01-11  Bruno Haible  <bruno@clisp.org>
341
342         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
343         directory.
344
345 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
346
347         Use @...@ consistently in lib/wctype_.h.
348         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
349         on it being set to 1 or 0.
350         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
351         go back to AC_SUBSTing it.
352         * modules/wctype (Makefile.am): Undo previous change.
353
354 2007-01-10  Eric Blake  <ebb9@byu.net>
355
356         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
357         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
358         * modules/wctype (Makefile.am): Likewise.
359         Reported by Chris McGuire.
360
361 2007-01-10  Jim Meyering  <jim@meyering.net>
362
363         fts.c: a small readability/maintainability improvement
364         * lib/fts.c (fts_read): Make this code slightly more readable and
365         maintainable by hoisting the "sp->fts_cur = p" assignments to
366         immediately follow the statements that set P.  Derived from
367         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
368
369 2007-01-10  Eric Blake  <ebb9@byu.net>
370
371         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
372         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
373         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
374         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
375         Reported by Chris McGuire.
376
377 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
378
379         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
380         in sed script.
381
382 2007-01-09  Bruno Haible  <bruno@clisp.org>
383
384         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
385         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
386         variables.
387         (func_module): Use them.
388
389 2007-01-09  Bruno Haible  <bruno@clisp.org>
390
391         * modules/unistr/base: New file.
392         * lib/unistr.h: New file.
393
394         * modules/unistr/u8-to-u16: New file.
395         * lib/unistr/u8-to-u16.c: New file.
396
397         * modules/unistr/u8-to-u32: New file.
398         * lib/unistr/u8-to-u32.c: New file.
399
400         * modules/unistr/u16-to-u8: New file.
401         * lib/unistr/u16-to-u8.c: New file.
402
403         * modules/unistr/u16-to-u32: New file.
404         * lib/unistr/u16-to-u32.c: New file.
405
406         * modules/unistr/u32-to-u8: New file.
407         * lib/unistr/u32-to-u8.c: New file.
408
409         * modules/unistr/u32-to-u16: New file.
410         * lib/unistr/u32-to-u16.c: New file.
411
412         * modules/unistr/u8-check: New file.
413         * modules/unistr/u16-check: New file.
414         * modules/unistr/u32-check: New file.
415         * lib/unistr/u8-check.c: New file.
416         * lib/unistr/u16-check.c: New file.
417         * lib/unistr/u32-check.c: New file.
418
419         * modules/unistr/u8-chr: New file.
420         * modules/unistr/u16-chr: New file.
421         * modules/unistr/u32-chr: New file.
422         * lib/unistr/u8-chr.c: New file.
423         * lib/unistr/u16-chr.c: New file.
424         * lib/unistr/u32-chr.c: New file.
425
426         * modules/unistr/u8-cmp: New file.
427         * modules/unistr/u16-cmp: New file.
428         * modules/unistr/u32-cmp: New file.
429         * lib/unistr/u8-cmp.c: New file.
430         * lib/unistr/u16-cmp.c: New file.
431         * lib/unistr/u32-cmp.c: New file.
432
433         * modules/unistr/u8-cpy: New file.
434         * modules/unistr/u16-cpy: New file.
435         * modules/unistr/u32-cpy: New file.
436         * lib/unistr/u8-cpy.c: New file.
437         * lib/unistr/u16-cpy.c: New file.
438         * lib/unistr/u32-cpy.c: New file.
439         * lib/unistr/u-cpy.h: New file.
440
441         * modules/unistr/u8-cpy-alloc: New file.
442         * modules/unistr/u16-cpy-alloc: New file.
443         * modules/unistr/u32-cpy-alloc: New file.
444         * lib/unistr/u8-cpy-alloc.c: New file.
445         * lib/unistr/u16-cpy-alloc.c: New file.
446         * lib/unistr/u32-cpy-alloc.c: New file.
447         * lib/unistr/u-cpy-alloc.h: New file.
448
449         * modules/unistr/u8-endswith: New file.
450         * modules/unistr/u16-endswith: New file.
451         * modules/unistr/u32-endswith: New file.
452         * lib/unistr/u8-endswith.c: New file.
453         * lib/unistr/u16-endswith.c: New file.
454         * lib/unistr/u32-endswith.c: New file.
455         * lib/unistr/u-endswith.h: New file.
456
457         * modules/unistr/u8-mblen: New file.
458         * modules/unistr/u16-mblen: New file.
459         * modules/unistr/u32-mblen: New file.
460         * lib/unistr/u8-mblen.c: New file.
461         * lib/unistr/u16-mblen.c: New file.
462         * lib/unistr/u32-mblen.c: New file.
463
464         * modules/unistr/u8-mbtouc: New file.
465         * modules/unistr/u16-mbtouc: New file.
466         * modules/unistr/u32-mbtouc: New file.
467         * lib/unistr/u8-mbtouc.c: New file.
468         * lib/unistr/u16-mbtouc.c: New file.
469         * lib/unistr/u32-mbtouc.c: New file.
470
471         * modules/unistr/u8-mbtouc-safe: New file.
472         * modules/unistr/u16-mbtouc-safe: New file.
473         * modules/unistr/u32-mbtouc-safe: New file.
474         * lib/unistr/u8-mbtouc-safe.c: New file.
475         * lib/unistr/u16-mbtouc-safe.c: New file.
476         * lib/unistr/u32-mbtouc-safe.c: New file.
477
478         * modules/unistr/u8-move: New file.
479         * modules/unistr/u16-move: New file.
480         * modules/unistr/u32-move: New file.
481         * lib/unistr/u8-move.c: New file.
482         * lib/unistr/u16-move.c: New file.
483         * lib/unistr/u32-move.c: New file.
484         * lib/unistr/u-move.h: New file.
485
486         * modules/unistr/u8-next: New file.
487         * modules/unistr/u16-next: New file.
488         * modules/unistr/u32-next: New file.
489         * lib/unistr/u8-next.c: New file.
490         * lib/unistr/u16-next.c: New file.
491         * lib/unistr/u32-next.c: New file.
492
493         * modules/unistr/u8-prev: New file.
494         * modules/unistr/u16-prev: New file.
495         * modules/unistr/u32-prev: New file.
496         * lib/unistr/u8-prev.c: New file.
497         * lib/unistr/u16-prev.c: New file.
498         * lib/unistr/u32-prev.c: New file.
499
500         * modules/unistr/u8-set: New file.
501         * modules/unistr/u16-set: New file.
502         * modules/unistr/u32-set: New file.
503         * lib/unistr/u8-set.c: New file.
504         * lib/unistr/u16-set.c: New file.
505         * lib/unistr/u32-set.c: New file.
506         * lib/unistr/u-set.h: New file.
507
508         * modules/unistr/u8-startswith: New file.
509         * modules/unistr/u16-startswith: New file.
510         * modules/unistr/u32-startswith: New file.
511         * lib/unistr/u8-startswith.c: New file.
512         * lib/unistr/u16-startswith.c: New file.
513         * lib/unistr/u32-startswith.c: New file.
514         * lib/unistr/u-startswith.h: New file.
515
516         * modules/unistr/u8-stpcpy: New file.
517         * modules/unistr/u16-stpcpy: New file.
518         * modules/unistr/u32-stpcpy: New file.
519         * lib/unistr/u8-stpcpy.c: New file.
520         * lib/unistr/u16-stpcpy.c: New file.
521         * lib/unistr/u32-stpcpy.c: New file.
522         * lib/unistr/u-stpcpy.h: New file.
523
524         * modules/unistr/u8-stpncpy: New file.
525         * modules/unistr/u16-stpncpy: New file.
526         * modules/unistr/u32-stpncpy: New file.
527         * lib/unistr/u8-stpncpy.c: New file.
528         * lib/unistr/u16-stpncpy.c: New file.
529         * lib/unistr/u32-stpncpy.c: New file.
530         * lib/unistr/u-stpncpy.h: New file.
531
532         * modules/unistr/u8-strcat: New file.
533         * modules/unistr/u16-strcat: New file.
534         * modules/unistr/u32-strcat: New file.
535         * lib/unistr/u8-strcat.c: New file.
536         * lib/unistr/u16-strcat.c: New file.
537         * lib/unistr/u32-strcat.c: New file.
538         * lib/unistr/u-strcat.h: New file.
539
540         * modules/unistr/u8-strchr: New file.
541         * modules/unistr/u16-strchr: New file.
542         * modules/unistr/u32-strchr: New file.
543         * lib/unistr/u8-strchr.c: New file.
544         * lib/unistr/u16-strchr.c: New file.
545         * lib/unistr/u32-strchr.c: New file.
546
547         * modules/unistr/u8-strcmp: New file.
548         * modules/unistr/u16-strcmp: New file.
549         * modules/unistr/u32-strcmp: New file.
550         * lib/unistr/u8-strcmp.c: New file.
551         * lib/unistr/u16-strcmp.c: New file.
552         * lib/unistr/u32-strcmp.c: New file.
553
554         * modules/unistr/u8-strcpy: New file.
555         * modules/unistr/u16-strcpy: New file.
556         * modules/unistr/u32-strcpy: New file.
557         * lib/unistr/u8-strcpy.c: New file.
558         * lib/unistr/u16-strcpy.c: New file.
559         * lib/unistr/u32-strcpy.c: New file.
560         * lib/unistr/u-strcpy.h: New file.
561
562         * modules/unistr/u8-strcspn: New file.
563         * modules/unistr/u16-strcspn: New file.
564         * modules/unistr/u32-strcspn: New file.
565         * lib/unistr/u8-strcspn.c: New file.
566         * lib/unistr/u16-strcspn.c: New file.
567         * lib/unistr/u32-strcspn.c: New file.
568         * lib/unistr/u-strcspn.h: New file.
569
570         * modules/unistr/u8-strdup: New file.
571         * modules/unistr/u16-strdup: New file.
572         * modules/unistr/u32-strdup: New file.
573         * lib/unistr/u8-strdup.c: New file.
574         * lib/unistr/u16-strdup.c: New file.
575         * lib/unistr/u32-strdup.c: New file.
576         * lib/unistr/u-strdup.h: New file.
577
578         * modules/unistr/u8-strlen: New file.
579         * modules/unistr/u16-strlen: New file.
580         * modules/unistr/u32-strlen: New file.
581         * lib/unistr/u8-strlen.c: New file.
582         * lib/unistr/u16-strlen.c: New file.
583         * lib/unistr/u32-strlen.c: New file.
584         * lib/unistr/u-strlen.h: New file.
585
586         * modules/unistr/u8-strmblen: New file.
587         * modules/unistr/u16-strmblen: New file.
588         * modules/unistr/u32-strmblen: New file.
589         * lib/unistr/u8-strmblen.c: New file.
590         * lib/unistr/u16-strmblen.c: New file.
591         * lib/unistr/u32-strmblen.c: New file.
592
593         * modules/unistr/u8-strmbtouc: New file.
594         * modules/unistr/u16-strmbtouc: New file.
595         * modules/unistr/u32-strmbtouc: New file.
596         * lib/unistr/u8-strmbtouc.c: New file.
597         * lib/unistr/u16-strmbtouc.c: New file.
598         * lib/unistr/u32-strmbtouc.c: New file.
599
600         * modules/unistr/u8-strncat: New file.
601         * modules/unistr/u16-strncat: New file.
602         * modules/unistr/u32-strncat: New file.
603         * lib/unistr/u8-strncat.c: New file.
604         * lib/unistr/u16-strncat.c: New file.
605         * lib/unistr/u32-strncat.c: New file.
606         * lib/unistr/u-strncat.h: New file.
607
608         * modules/unistr/u8-strncmp: New file.
609         * modules/unistr/u16-strncmp: New file.
610         * modules/unistr/u32-strncmp: New file.
611         * lib/unistr/u8-strncmp.c: New file.
612         * lib/unistr/u16-strncmp.c: New file.
613         * lib/unistr/u32-strncmp.c: New file.
614
615         * modules/unistr/u8-strncpy: New file.
616         * modules/unistr/u16-strncpy: New file.
617         * modules/unistr/u32-strncpy: New file.
618         * lib/unistr/u8-strncpy.c: New file.
619         * lib/unistr/u16-strncpy.c: New file.
620         * lib/unistr/u32-strncpy.c: New file.
621         * lib/unistr/u-strncpy.h: New file.
622
623         * modules/unistr/u8-strnlen: New file.
624         * modules/unistr/u16-strnlen: New file.
625         * modules/unistr/u32-strnlen: New file.
626         * lib/unistr/u8-strnlen.c: New file.
627         * lib/unistr/u16-strnlen.c: New file.
628         * lib/unistr/u32-strnlen.c: New file.
629         * lib/unistr/u-strnlen.h: New file.
630
631         * modules/unistr/u8-strpbrk: New file.
632         * modules/unistr/u16-strpbrk: New file.
633         * modules/unistr/u32-strpbrk: New file.
634         * lib/unistr/u8-strpbrk.c: New file.
635         * lib/unistr/u16-strpbrk.c: New file.
636         * lib/unistr/u32-strpbrk.c: New file.
637         * lib/unistr/u-strpbrk.h: New file.
638
639         * modules/unistr/u8-strrchr: New file.
640         * modules/unistr/u16-strrchr: New file.
641         * modules/unistr/u32-strrchr: New file.
642         * lib/unistr/u8-strrchr.c: New file.
643         * lib/unistr/u16-strrchr.c: New file.
644         * lib/unistr/u32-strrchr.c: New file.
645
646         * modules/unistr/u8-strspn: New file.
647         * modules/unistr/u16-strspn: New file.
648         * modules/unistr/u32-strspn: New file.
649         * lib/unistr/u8-strspn.c: New file.
650         * lib/unistr/u16-strspn.c: New file.
651         * lib/unistr/u32-strspn.c: New file.
652         * lib/unistr/u-strspn.h: New file.
653
654         * modules/unistr/u8-strstr: New file.
655         * modules/unistr/u16-strstr: New file.
656         * modules/unistr/u32-strstr: New file.
657         * lib/unistr/u8-strstr.c: New file.
658         * lib/unistr/u16-strstr.c: New file.
659         * lib/unistr/u32-strstr.c: New file.
660         * lib/unistr/u-strstr.h: New file.
661
662         * modules/unistr/u8-strtok: New file.
663         * modules/unistr/u16-strtok: New file.
664         * modules/unistr/u32-strtok: New file.
665         * lib/unistr/u8-strtok.c: New file.
666         * lib/unistr/u16-strtok.c: New file.
667         * lib/unistr/u32-strtok.c: New file.
668         * lib/unistr/u-strtok.h: New file.
669
670         * modules/unistr/u8-uctomb: New file.
671         * modules/unistr/u16-uctomb: New file.
672         * modules/unistr/u32-uctomb: New file.
673         * lib/unistr/u8-uctomb.c: New file.
674         * lib/unistr/u16-uctomb.c: New file.
675         * lib/unistr/u32-uctomb.c: New file.
676
677         * MODULES.html.sh (Unicode string functions): Add the new modules.
678
679 2007-01-08  Bruno Haible  <bruno@clisp.org>
680
681         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
682         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
683         subdirectories.
684
685 2007-01-08  Karl Berry  <karl@gnu.org>
686
687         * doc/error.texi: mention that main() fns must set program_name
688         when progname is used.
689
690 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
691
692         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
693         WCTYPE_H is empty, for the benefit of builds from non-distclean
694         directories.  Problem reported by Eric Blake in
695         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
696
697 2007-01-08  Bruno Haible  <bruno@clisp.org>
698
699         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
700         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
701         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
702         PROVIDE_CANONICALIZE_FILENAME_MODE.
703         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
704
705 2007-01-08  Bruno Haible  <bruno@clisp.org>
706
707         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
708         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
709         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
710         * lib/fts.c: Likewise.
711         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
712
713 2006-12-25  Bruno Haible  <bruno@clisp.org>
714
715         * modules/utf8-ucs4-safe: New file.
716         * lib/utf8-ucs4-safe.h: New file.
717         * lib/unistr/utf8-ucs4-safe.c: New file.
718
719         * modules/utf16-ucs4-safe: New file.
720         * lib/utf16-ucs4-safe.h: New file.
721         * lib/unistr/utf16-ucs4-safe.c: New file.
722
723         * MODULES.html.sh (Unicode string functions): Add the new modules.
724
725 2007-01-08  Bruno Haible  <bruno@clisp.org>
726
727         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
728         (Depends-on): Add unitypes.
729         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
730         (u8_mbtouc_aux): Move out to separate file.
731         (u8_mbtouc): Use ucs4_t, uint8_t types.
732         * lib/unistr/utf8-ucs4.c: New file.
733
734         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
735         (Depends-on): Add unitypes.
736         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
737         (u16_mbtouc_aux): Move out to separate file.
738         (u16_mbtouc): Use ucs4_t, uint16_t types.
739         * lib/unistr/utf16-ucs4.c: New file.
740
741         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
742         (Depends-on): Add unitypes.
743         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
744         (u8_uctomb_aux): Move out to separate file.
745         (u8_uctomb): Use ucs4_t, uint8_t types.
746         * lib/unistr/ucs4-utf8.c: New file.
747
748         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
749         (Depends-on): Add unitypes.
750         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
751         (u16_uctomb_aux): Move out to separate file.
752         (u16_uctomb): Use ucs4_t, uint16_t types.
753         * lib/unistr/ucs4-utf16.c: New file.
754
755 2006-12-25  Bruno Haible  <bruno@clisp.org>
756
757         * modules/unitypes: New file.
758         * lib/unitypes.h: New file.
759         * MODULES.html.sh (func_all_modules): New section "Unicode string
760         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
761         this section. Add unitypes.
762
763 2007-01-08  Bruno Haible  <bruno@clisp.org>
764
765         Avoid variable names that conflict with those from libtool.
766         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
767         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
768         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
769         library_names_spec to acl_library_names_spec, hardcode_* to
770         acl_hardcode_*.
771         Reported by Ralf Wildenhues.
772
773 2007-01-08  Bruno Haible  <bruno@clisp.org>
774
775         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
776         definition.
777         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
778         definition.
779         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
780         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
781         definition.
782         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
783         definition.
784         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
785         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
786         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
787         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
788         definition.
789         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
790         definition.
791         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
792         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
793         GC_USE_<algorithm>.
794         * lib/gc-libgcrypt.c: Likewise.
795         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
796         * modules/gc-arctwo (configure.ac): Likewise.
797         * modules/gc-des (configure.ac): Likewise.
798         * modules/gc-hmac-md5 (configure.ac): Likewise.
799         * modules/gc-hmac-sha1 (configure.ac): Likewise.
800         * modules/gc-md2 (configure.ac): Likewise.
801         * modules/gc-md4 (configure.ac): Likewise.
802         * modules/gc-md5 (configure.ac): Likewise.
803         * modules/gc-random (configure.ac): Likewise.
804         * modules/gc-rijndael (configure.ac): Likewise.
805         * modules/gc-sha1 (configure.ac): Likewise.
806
807 2007-01-08  Bruno Haible  <bruno@clisp.org>
808
809         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
810         macro definition.
811         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
812         definition.
813         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
814         definition.
815         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
816         * modules/fcntl-safer (configure.ac): Likewise.
817         * modules/fopen-safer (configure.ac): Likewise.
818         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
819         GNULIB_FWRITEERROR macro definition.
820
821 2007-01-08  Bruno Haible  <bruno@clisp.org>
822
823         * m4/gnulib-common.m4: New file.
824         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
825         (func_get_filelist): Add m4/gnulib-common.m4.
826
827 2007-01-08  Bruno Haible  <bruno@clisp.org>
828
829         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
830         command.
831
832 2007-01-08  Jim Meyering  <jim@meyering.net>
833
834         Use a more robust test for a "can't happen" condition.
835         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
836         narrowed the st_size value.  Presuming the "can't happen" condition
837         is true, that narrowing could conceivably convert an invalid st_size
838         value into a valid one.  Instead, use a change based on Matthew
839         Woehlke's original patch.
840
841         Slight readability improvement: use an assert-like macro
842         in place of literal "abort ()" uses.
843         * lib/fts.c (fts_assert): Define.
844         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
845         Use this macro instead of a bare 'abort'.
846
847 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
848
849         Don't worry about using IRIX 5.3's wctype.h broken definitions;
850         simply work around them.
851         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
852         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
853         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
854         Don't bother to define as macros, since the standard doesn't require it.
855         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
856         longer worry about IRIX 5.3.
857         (HAVE_WCTYPE_CTMP_BUG): Remove.
858
859 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
860
861         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
862         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
863         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
864         Problems reported by Georg Schwarz for IRIX 5.3.
865
866         * gnulib-tool (autoconf_minversion): Take the maximum version number
867         found, not the minimum.  Problem reported by James Youngman.
868
869 2007-01-03  Karl Berry  <karl@gnu.org>
870
871         * doc/error.texi: new file, explaining interaction with progname.
872         * doc/gnulib.texi: include it.  Update copyright.
873
874 2007-01-03  Simon Josefsson  <simon@josefsson.org>
875
876         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
877         AC_CANONICAL_HOST, to improve autobuild outputs.
878
879 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
880             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
881
882         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
883         sockets, server sockets, and other file descriptors.  Count errors
884         to compute the return value.  Reorder the code a bit to be easier
885         to follow.  Don't set event bits that were not requested (except
886         POLLERR and POLLHUP).
887
888 2007-01-01  Bruno Haible  <bruno@clisp.org>
889
890         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
891
892 2007-01-03  Jim Meyering  <jim@meyering.net>
893
894         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
895
896 2007-01-02  Bruno Haible  <bruno@clisp.org>
897
898         * modules/settime (Include): Require timespec.h.
899         * modules/nanosleep (Include): Likewise.
900
901 2007-01-01  Bruno Haible  <bruno@clisp.org>
902
903         * gnulib-tool (func_emit_copyright_notice): Bump year.
904         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
905
906 2007-01-01  Bruno Haible  <bruno@clisp.org>
907
908         Improve support for OpenBSD.
909         * build-aux/config.rpath (libname_spec): Export.
910         (library_names_spec): New variable. Export.
911         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
912         library_names_spec from the config.rpath output. Locate shared library
913         through the name pattern in library_names_spec.
914
915 2007-01-01  Eric Blake  <ebb9@byu.net>
916
917         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
918
919 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
920
921         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
922         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
923         assume the C locale, and avoid an "eval" that could cause trouble.
924         Problem with SORT reported by Bob Proulx.
925
926         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
927         Define.  Trivial patch from Henning Nielsen Lund, originally
928         sent to bug-grep@gnu.org today.
929
930 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
931
932         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
933         struct stat.  Problem reported by Henning Nielsen Lund.
934         * lib/acl.c: Include acl.h first, to check interface.  Don't
935         bother to include sys/types.h and sys/stat.h again.
936
937 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
938
939         Import the following change from libc; problem reported by
940         Sven Verdoolaege.
941
942         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
943
944         [BZ #1373]
945         * lib/argp.h: Remove __NTH for __argp_usage inline function.
946
947 2006-12-28  Jim Meyering  <jim@meyering.net>
948
949         * build-aux/announce-gen: Do not assume that the package
950         builds any of tar.gz, tar.bz2, and .xdelta files.
951         Suggestion from Simon Josefsson.
952
953 2006-12-28  Simon Josefsson  <simon@josefsson.org>
954
955         * modules/announce-gen: New file.
956
957 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
958
959         * lib/mbchar.h: Just include <wctype.h>; the wctype module
960         handles its gotchas now.
961         * lib/mbswidth.c: Likewise.
962         * lib/wcwidth.h: Likewise.
963         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
964         and iswcntrl; the wctype module does this stuff now.
965         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
966         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
967         * modules/mbchar (Depends-on): Add wctype.
968         * modules/mbswidth (Depends-on): Likewise.
969         * modules/wcwidth (Depends-on): Likewise.
970
971 2006-12-27  Eric Blake  <ebb9@byu.net>
972
973         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
974         module uses more than what <wctype.h> is required to provide.
975
976 2006-12-26  Eric Blake  <ebb9@byu.net>
977
978         * gnulib-tool (sed_extract_prog): Avoid space-tab.
979
980 2006-12-26  Eric Blake  <ebb9@byu.net>
981
982         * modules/absolute-header: New module.
983         * modules/fcntl (Depends-on): Depend on it.
984         * modules/inttypes (Depends-on): Likewise.
985         * modules/stdint (Depends-on): Likewise.
986         * modules/sys_stat (Depends-on): Likewise.
987         * modules/wctype (Depends-on): Likewise.
988         * MODULES.html.sh (Support for building libraries and
989         executables): Document it.
990
991 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
992
993         * gnulib-tool (SED): Remove, undoing previous change.
994         The problem was that it broke coreutils on Solaris, because
995         "sed --posix" leaked into a makefile.
996         (sed): New alias, if 'alias' and GNU sed.
997
998 2006-12-24  Jim Meyering  <jim@meyering.net>
999
1000         Work around an fchownat bug in glibc-2.4:
1001         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
1002         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
1003         in spite of the -P option.
1004         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
1005         New macros.
1006         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
1007         * modules/openat (Files): Add lib/fchownat.c.
1008         * lib/openat.c (fchownat): Don't define here.  Move to...
1009         * lib/fchownat.c: ...this new file.
1010
1011 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
1012
1013         Fix bug reported by Bruno Haible in
1014         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
1015         where quotearg.c didn't compile on Mac OS X 10.2 because it
1016         lacks <wchar.h> and wint_t.
1017         * lib/wctype_.h (__wctype_wint_t): New type.
1018         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
1019         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
1020         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
1021         Arg is now of type __wctype_wint_t, not wint_t.
1022         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
1023         substitute HAVE_WINT_T.
1024         * modules/wctype (Files): Add m4/wint_t.m4.
1025         (wctype.h): Substitute HAVE_WINT_T.
1026
1027 2006-12-23  Bruno Haible  <bruno@clisp.org>
1028
1029         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
1030
1031 2006-12-23  Bruno Haible  <bruno@clisp.org>
1032
1033         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
1034         S_ISLNK.
1035         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
1036         mingw.
1037
1038 2006-12-22  Bruno Haible  <bruno@clisp.org>
1039
1040         * lib/copy-file.c: Include acl.h.
1041         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
1042         Close the file descriptors only after being done with copy_acl.
1043         * modules/copy-file (Depends-on): Add acl.
1044
1045 2006-12-22  Bruno Haible  <bruno@clisp.org>
1046
1047         * gnulib-tool (SED): New variable.
1048         Use $SED instead of sed everywhere.
1049
1050 2006-12-22  Bruno Haible  <bruno@clisp.org>
1051
1052         * modules/no-c++: New file.
1053         * m4/no-c++.m4: New file.
1054         * MODULES.html.sh (Support for building libraries and executables):
1055         Add no-c++.
1056
1057 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
1058
1059         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1060         Include <limits.h>, and use its INT_MAX to rewrite the
1061         j loop so that it does not overflow 'int'.  Problem reported by
1062         Ralf Wildenhues in
1063         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
1064         Play it safe by shifting left by 1 rather than multiplying by 2,
1065         as GCC is less likely to optimize this away when the value
1066         is signed (when it assumes overflow leads to undefined behavior).
1067         Also, don't assume time_t uses two's complement.
1068
1069 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1070
1071         * MODULES.html.sh: New module wctype.
1072         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
1073         * lib/fnmatch.c: Don't bother to include <wchar.h> before
1074         <wctype.h>, since the new wctype module should fix this.
1075         * lib/quotearg.c: Include <wctype.h> unconditionally, since
1076         the wctype module should arrange for it.
1077         * lib/regex_internal.h: Likewise.
1078         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
1079         since the wctype module should handle this now.
1080         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
1081         * modules/fnmatch (Depends-on): Add wctype.
1082         * modules/quotearg (Depends-on): Likewise.
1083         * modules/regex (Depends-on): Likewise.
1084
1085 2006-12-19  Bruno Haible  <bruno@clisp.org>
1086
1087         * lib/strdup.h [C++]: Wrap definitions in extern "C".
1088         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
1089
1090 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1091
1092         * modules/savewd (Depends-on): Fix dependency on fcntl.
1093
1094 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1095
1096         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
1097         conforms to C99, rather than relying on the user's environment
1098         setting of STDINT_H.
1099
1100 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1101         and Eric Blake  <ebb9@byu.net>
1102
1103         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
1104         This is more consistent with the other defines here.
1105         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
1106         Port to z/OS.  Problem reported by Paul Gilmartin.
1107         Change local vars to use gl_ prefix rather than ac_.
1108         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
1109         with other defines.
1110         * modules/double-slash-root: New module.
1111         * modules/dirname (Files): Remove m4/double-slash-root.m4.
1112         (Depends-on): Add double-slash-root.
1113         * MODULES.html.sh (File system functions): Mention new module.
1114
1115 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1116
1117         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
1118         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
1119         This is for the benefit of gzip, which doesn't do i18n.
1120
1121 2006-12-12  Jim Meyering  <jim@meyering.net>
1122
1123         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
1124         Reported by Andreas Schwab <schwab@suse.de>.
1125
1126 2006-12-12  Bruno Haible  <bruno@clisp.org>
1127
1128         Merge these changes.
1129         2006-09-05  Bruno Haible  <bruno@clisp.org>
1130         * lib/iconvme.c (iconv_string): No need to save and restore errno when
1131         iconv_alloc succeeded.
1132         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
1133         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
1134         test for " && dest " at the end - dest is always != NULL there. Call
1135         iconv with 4xNULL arguments initially, to reset the state. Call iconv
1136         with 2xNULL arguments, also to flush the state storage. Handle the
1137         IRIX iconv behaviour. Realloc the final result, to throw away unused
1138         memory.
1139
1140 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1141
1142         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
1143         and fchmodat unconditionally, since glibc 2.4 has them.
1144         Problem reported by Arkadiusz Miskiewicz.
1145
1146 2006-12-10  Bruno Haible  <bruno@clisp.org>
1147
1148         * gnulib-tool (func_import): Show the include files only for those
1149         modules that are copied and specified.
1150         Reported by Karl Berry.
1151
1152 2006-12-08  Jim Meyering  <jim@meyering.net>
1153
1154         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
1155         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
1156
1157         * build-aux/announce-gen: Add two new options, both optional:
1158         --bootstrap-tools=TOOL_LIST
1159               a comma-separated list of tools, e.g.,
1160               autoconf,automake,bison,gnulib
1161         --gnulib-snapshot-date=DATE
1162               if gnulib is in the bootstrap tool list,
1163               then report this as the snapshot date.
1164               If not specified, use the current date/time.
1165               If you specify a date here, be sure it's UTC.
1166
1167 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1168
1169         * tests/test-argp-2.sh: Fix test to match actual output.
1170         (func_compare): Fix sed script to be portable.
1171
1172 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
1173
1174         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
1175         workaround for this case.  It is not autoconfigured now; offhand
1176         it's hard to see how to autoconfigure it.
1177
1178 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1179
1180         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
1181         a directory that is about to be chowned.  Such a directory's
1182         initial file permissions should permit the owner only and this
1183         should not be changed until after the chown, since the group and
1184         other bits would be incorrect if they granted permission before
1185         the chown.
1186
1187         Fix porting problem for iswctype reported by Georg Schwarz in:
1188         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
1189         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
1190         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
1191         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
1192         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1193
1194 2006-12-03  Jim Meyering  <jim@meyering.net>
1195
1196         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
1197         p->fts_statp may not yet be defined.
1198         (fts_read): Instead, set it in the caller, once p->fts_statp is
1199         sure to be defined, and corresponds to a top-level directory.
1200         This bug made du -x fail.  Here's the coreutils test case:
1201         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
1202         Reported by Mike Frysinger.
1203
1204 2006-12-01  Jim Meyering  <jim@meyering.net>
1205
1206         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
1207         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
1208         Reported by Simon Josefsson.
1209
1210 2006-11-30  Jim Meyering  <jim@meyering.net>
1211
1212         * m4/warning.m4: Use the all-permissive copyright notice
1213         recommended by RMS (rather than LGPL).
1214         * m4/vararrays.m4: Likewise.
1215         * m4/flexmember.m4: Likewise.
1216
1217 2006-11-29  Bruno Haible  <bruno@clisp.org>
1218
1219         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1220         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
1221         using +=.
1222         Reported by Simon Josefsson <simon@josefsson.org>.
1223
1224 2006-11-28  James Youngman <jay@gnu.org>
1225
1226         * README: Advise users that they might find the bug-gnulib@gnu.org
1227         and autotools-announce@gnu.org mailing lists useful.
1228
1229 2006-11-28  Bruno Haible  <bruno@clisp.org>
1230
1231         * m4/ptrdiff_max.m4: Remove file.
1232
1233 2006-11-21  Bruno Haible  <bruno@clisp.org>
1234
1235         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
1236         _AC_COMPUTE_INT.
1237         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1238         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
1239         _AC_COMPUTE_INT.
1240         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1241         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
1242         _AC_COMPUTE_INT.
1243         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1244
1245 2006-11-28  Jim Meyering  <jim@meyering.net>
1246
1247         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
1248         warning from "gcc -Wshadow" about shadowing the builtin.
1249
1250 2006-11-27  Bruno Haible  <bruno@clisp.org>
1251
1252         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
1253         _AC_COMPUTE_INT.
1254         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1255
1256 2006-11-27  Bruno Haible  <bruno@clisp.org>
1257             Paul Eggert  <eggert@cs.ucla.edu>
1258
1259         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
1260
1261 2006-11-26  Bruno Haible  <bruno@clisp.org>
1262
1263         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1264         noinst_LTLIBRARIES.
1265
1266 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
1267             Bruno Haible  <bruno@clisp.org>
1268
1269         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
1270         if compiling with "gcc -ansi".
1271
1272 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1273
1274         Fix some incompatibilities with gcc -ansi -pedantic.
1275         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
1276         if compiling pedantically with GCC, unless it's C99 or later.
1277         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
1278         it mishandles gcc -ansi -pedantic as well.
1279         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
1280         if gcc -pedantic.
1281         * lib/regexec.c (check_node_accept_bytes): Don't use auto
1282         initializers for struct if -pedantic, unless it's C99 or later.
1283
1284 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
1285
1286         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
1287         Don't close an fd more than once. Identical atimes indicate
1288         success, not failure.
1289
1290 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
1291
1292         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
1293
1294 2006-11-23  Jim Meyering  <jim@meyering.net>
1295
1296         * build-aux/announce-gen: New file.  From coreutils.
1297
1298 2006-11-22  Jim Meyering  <jim@meyering.net>
1299
1300         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
1301         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
1302         (fts_read): Use a temporary to narrow the overused st_size member
1303         before using it in a switch statement.  Reported by Matthew Woehlke.
1304
1305         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
1306         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
1307
1308 2006-11-20  Bruno Haible  <bruno@clisp.org>
1309
1310         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
1311         changequote instead of pairs of brackets.
1312         Reported by Andreas Schwab <schwab@suse.de>.
1313
1314 2006-11-21  Jim Meyering  <jim@meyering.net>
1315
1316         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
1317         so as to remain compatible with older compilers.
1318         Patch from Michael Deutschmann.
1319
1320 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1321
1322         * MODULES.html.sh (File system functions): Add openat.
1323
1324         * lib/openat.h (rpl_fstatat): New macro, if
1325         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
1326         (fstatat): Define to rpl_fstatat under the same conditions,
1327         unless COMPILING_FSTATAT.
1328         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
1329         seems to have the bug.
1330         * lib/fstatat.c: New file.
1331         * modules/openat (Files): Add it.
1332
1333 2006-11-20  Bruno Haible  <bruno@clisp.org>
1334
1335         * Makefile: New file.
1336
1337 2006-11-20  Jim Meyering  <jim@meyering.net>
1338
1339         The beginnings of syntax-related checks for gnulib.
1340         * lib/Makefile: New file.
1341         * lib/t-idcache: New script.  Ensure that the two halves of
1342         idcache.c stay in sync.
1343
1344         * lib/idcache.c: Adjust comments in user- and group- portions to
1345         be more accurate, and to be consistent with one another.
1346
1347 2006-11-20  Jim Meyering  <jim@meyering.net>
1348
1349         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
1350         continue using the flexible array member (thus, this module performs
1351         half as many malloc calls), with the addition that...
1352         (getgroup, getuser): Consistently record a non-match via an empty
1353         "name" string, and map an empty string match to a NULL return value.
1354         * modules/idcache (Depends-on): Re-add flexmember.
1355
1356         * lib/idcache.c (getuser): Remove all uses of the register keyword.
1357         (getuidbyname, getgroup, getgidbyname): Likewise.
1358
1359         Use cleaner syntax: NULL rather than 0.
1360         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
1361
1362 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1363
1364         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
1365         It mishandled the case where the group was missing.
1366         Problem reported by Greg Schafer.
1367         * modules/idcache: Likewise.
1368
1369 2006-11-18  Jim Meyering  <jim@meyering.net>
1370
1371         * check-module (%exempt_header): Add exception for some
1372         conditionally-included headers.
1373
1374         * modules/i-ring (Depends-on): Add verify.
1375         (License): Change to LGPL.
1376
1377 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1378
1379         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
1380         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
1381         and inttostr.h.  Use snprintf rather than uinttostr, so that
1382         LGPLed code doesn't depend on GPLed.
1383
1384 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
1385
1386         * modules/inline (License): Change from GPL to LGPL.
1387
1388 2006-11-17  Jim Meyering  <jim@meyering.net>
1389
1390         * modules/d-type (License): Switch to LGPL.
1391
1392 2006-11-15  Bruno Haible  <bruno@clisp.org>
1393
1394         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
1395
1396 2006-11-15  Eric Blake  <ebb9@byu.net>
1397
1398         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
1399         the module dependency.
1400
1401 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1402             Bruno Haible  <bruno@clisp.org>
1403
1404         * gnulib-tool (func_create_testdir): Add license consistency check.
1405
1406 2006-11-15  Eric Blake  <ebb9@byu.net>
1407
1408         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
1409         random "(cached)" in configure output.
1410
1411 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1412
1413         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
1414         test for conforming inttypes.h is both announced and cached.
1415
1416         * MODULES.html.sh (seen_modules, seen_files): New variables.
1417         (func_module): Rewrite to use a few less gnulib-tool and sed
1418         invocations.  Avoid a couple of quadratic algorithms for ...
1419         (missed_modules, missed_files): ... these, with ...
1420         (func_append, func_tmpdir): ... these new functions, from
1421         gnulib-tool.  Analogously, install traps for cleanup.
1422
1423         * tests/test-gc.c (main): Remove unused variables.
1424         * tests/test-read-file.c: Include stdlib.h, for 'free'.
1425
1426 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
1427
1428         * modules/inttostr (License): Change to LGPL.
1429
1430 2006-11-14  Eric Blake  <ebb9@byu.net>
1431
1432         * modules/tempname (License): Change to LGPL.
1433
1434 2006-11-14  Eric Blake  <ebb9@byu.net>
1435
1436         * doc/functions.texi (Function Portability): *printf functions on
1437         Cygwin now understand all POSIX size specifiers.
1438
1439 2006-11-14  Bruno Haible  <bruno@clisp.org>
1440
1441         * modules/c-ctype (License): Change to LGPL.
1442
1443 2006-11-12  Bruno Haible  <bruno@clisp.org>
1444
1445         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
1446         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
1447         for GNOME libraries, for which the include files are installed in
1448         subdirectories of $prefix/include.
1449
1450 2006-11-12  Bruno Haible  <bruno@clisp.org>
1451
1452         * m4/lib-link.m4: Require at least autoconf-2.54.
1453         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
1454         name to underscores for the --with option.
1455
1456 2006-11-13  Bruno Haible  <bruno@clisp.org>
1457
1458         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
1459         the tests directory.
1460         Reported by Ralf Wildenhues.
1461
1462 2006-11-13  Bruno Haible  <bruno@clisp.org>
1463
1464         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
1465         (func_emit_initmacro_end): Undo the override here.
1466         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
1467         Works around the famous automake error in coreutils.
1468
1469 2006-11-13  Eric Blake  <ebb9@byu.net>
1470
1471         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
1472         element, not its node.
1473
1474 2006-11-12  Bruno Haible  <bruno@clisp.org>
1475
1476         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
1477         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
1478
1479 2006-11-12  Bruno Haible  <bruno@clisp.org>
1480
1481         * gnulib-tool: New option --local-symlink.
1482         (func_usage): Document it.
1483         (lsymbolic): New variable.
1484         (func_import, func_create_testdir): If --symlink was not specified,
1485         test whether --local-symlink was specified and the file comes from
1486         the local_gnulib_dir.
1487
1488 2006-11-12  Bruno Haible  <bruno@clisp.org>
1489
1490         * gnulib-tool (func_ln): New function.
1491         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
1492
1493 2006-11-12  Bruno Haible  <bruno@clisp.org>
1494
1495         Finish support for source files in subdirectories.
1496         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
1497         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
1498         AUTOMAKE_OPTIONS.
1499         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
1500
1501 2006-11-12  Bruno Haible  <bruno@clisp.org>
1502
1503         * gnulib-tool (func_get_automake_snippet): Synthesize also an
1504         EXTRA_lib_SOURCES augmentation.
1505         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
1506
1507 2006-11-12  Jim Meyering  <jim@meyering.net>
1508
1509         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
1510         file descriptors.  This also averts a failure on systems with
1511         native openat support when a traversed directory lacks "x" access.
1512         * lib/fts_.h: Include "i-ring.h"
1513         (struct FTS) [fts_fd_ring]: New member.
1514         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
1515         (FCHDIR): Add parentheses.
1516         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
1517         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
1518         When descending, rather than simply closing the previous
1519         fts_cwd_fd value, push that file descriptor onto the ring.
1520         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
1521         (fts_open): Initialize the new fd_ring member.
1522         (fts_close): Clear the ring.
1523         (fts_safe_changedir): When possible, use our new fd_ring to skip
1524         the diropen and fstat and dev/ino comparison that would normally
1525         accompany a virtual `chdir ("..")'.
1526
1527         * modules/fts (Depends-on): Add i-ring.
1528         * modules/i-ring: New module.
1529         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
1530         * m4/i-ring.m4: New file.
1531
1532 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1533
1534         * gnulib-tool (func_create_testdir): Fix replacement of
1535         `build-aux' in configure.ac.  Run autotools in gltests
1536         subdirectory.
1537         (func_create_testdir, func_create_megatestdir, test): There is
1538         no need for '--force' in most autotool invocations in a new
1539         tree.  Actually fail the whole test if any of the tools, or the
1540         configure or make stages fail.
1541
1542         Sync from Automake.
1543         * build-aux/gnupload: Revert last change.  Add pointer to upload
1544         instructions of the GNU Maintenance Instructions.
1545         Suggestion by Karl Berry.
1546
1547 2006-11-10  Jim Meyering  <jim@meyering.net>
1548
1549         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
1550
1551 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1552
1553         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
1554         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
1555         (bind_textdomain_codeset) [! ENABLE_NLS]:
1556         Evaluate all the arguments.  That way, callers get compatible behavior
1557         if the arguments have side effects.  Also, it avoids some GCC
1558         diagnostics in some cases; Joel E. Denny reported problems when Bison
1559         was configured with --enable-gcc-warnigs.
1560
1561 2006-11-10  Jim Meyering  <jim@meyering.net>
1562
1563         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
1564         relevant options in CFLAGS (like -O, -fno-inline) are taken into
1565         account.
1566
1567 2006-11-10  Jim Meyering  <jim@meyering.net>
1568
1569         * modules/inline: New file/module.
1570         * modules/xalloc (Files): Remove m4/inline.m4.
1571         (Depends-on): Add inline, instead.
1572         * modules/oset: Likewise.
1573         * modules/list: Likewise.
1574
1575 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1576
1577         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
1578         Problem reported by Matthew Woehlke.
1579
1580 2006-11-09  Bruno Haible  <bruno@clisp.org>
1581
1582         * lib/tempname.c (gen_tempname): Remove variant that invokes
1583         __gen_tempname.
1584         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
1585         __gen_tempname.
1586
1587 2006-11-08  Bruno Haible  <bruno@clisp.org>
1588
1589         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
1590         to 'yes' instead of 'cross-compiling'.
1591
1592 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
1593
1594         * lib/quotearg.h (quotearg_free): New decl.
1595         * lib/quotearg.c (quotearg_free): New function.
1596         (slot0, nslots, slotvec0, slotvec):
1597         Now file-scope so that quotearg_free can get at them.
1598
1599 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1600
1601         Sync from Automake.
1602         * build-aux/gnupload: Add missing 'gnu' to example URL.
1603         Report by Karl Berry.
1604
1605 2006-11-08  Bruno Haible  <bruno@clisp.org>
1606
1607         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
1608         Suggested by Paul Eggert.
1609
1610 2006-11-08  Jim Meyering  <jim@meyering.net>
1611
1612         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
1613         It's already included if !_LIBC.
1614         (fts_safe_changedir): Add a comment.
1615
1616 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1617
1618         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
1619         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
1620         Matthew Woehlke.
1621
1622         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
1623         definitions up, to avoid colliding with change below.
1624         (static_inline) [HAVE_INLINE]: New macro.
1625         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
1626         Provide extern decls when !HAVE_INLINE.  Do not define unless
1627         static_inline is defined, either by us or by xmalloc.c.  Use
1628         static_inline rather than static inline.
1629         (XCALLOC): Optimize sizeof(T) = 1 case.
1630         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
1631
1632 2006-11-07  Bruno Haible  <bruno@clisp.org>
1633
1634         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
1635         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
1636         AC_C_INLINE.
1637         * modules/xalloc (Files): Add m4/inline.m4.
1638
1639 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1640
1641         * README: Fix typo.
1642         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
1643         (Miscellanous Notes): ...from this.
1644
1645 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1646
1647         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
1648         Mention that offsetof should be used instead of sizeof.
1649         From Bruno Haible.
1650
1651 2006-11-07  Bruno Haible  <bruno@clisp.org>
1652
1653         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
1654
1655 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1656
1657         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1658         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
1659         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1660         (gl_tree_add_before, gl_tree_add_after):
1661         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
1662         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
1663         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
1664         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
1665         (gl_linked_add_after, gl_linked_add_at): Likewise.
1666         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
1667         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1668         (gl_tree_add_before, gl_tree_add_after): Likewise.
1669         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
1670         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
1671         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
1672
1673 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1674
1675         * lib/gl_oset.h: Use C comment style, not C++ comment style.
1676
1677 2006-11-06  Bruno Haible  <bruno@clisp.org>
1678
1679         * m4/inline.m4: New file.
1680         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
1681         * modules/list (Files): Add m4/inline.m4.
1682         * modules/oset (Files): Likewise.
1683
1684 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1685
1686         * lib/idcache.c: Include <stddef.h>, for offsetof.
1687         (struct userid.name): Change from char * to a flexible array member.
1688         All uses changed.
1689         * modules/idcache (Depends-on): Add flexmember.
1690
1691         * MODULES.html.sh (Core language properties): New module flexmember.
1692         * modules/flexmember, m4/flexmember.m4: New files.
1693
1694         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
1695         inline functions that are identical with the old xnmalloc_inline,
1696         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
1697         that we can avoid some unnecessary integer multiplications and
1698         divisions in the common case where the element size is known at
1699         compile time.
1700         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
1701         needed.
1702         (xnboundedmalloc): Remove.
1703         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
1704         arguments, for consistency with rest of this header.
1705         (xcharalloc): Rewrite using XNMALLOC.
1706         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
1707         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
1708         versions have been moved to lib/xalloc.h and renamed to be the
1709         non-*_inline versions.
1710         (xmalloc, xrealloc): Implement without reference to the xnmalloc
1711         and xnrealloc functions, since those functions are now inline and
1712         now call us.
1713         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
1714         renaming described above.
1715         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
1716         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
1717         captures the dependency in AC_C_INLINE.
1718
1719         New module canonicalize-lgpl, proposed by Charles Wilson in
1720         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
1721         with a few small changes afterwards.
1722         * MODULES.html.sh (File system functions): New module
1723         canonicalize-lgpl.
1724         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
1725         and canonicalize_file_name.
1726         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
1727         * modules/canonicalize-lgpl: New files.
1728
1729 2006-11-05  Bruno Haible  <bruno@clisp.org>
1730
1731         * gnulib-tool (func_import, func_create_testdir): Create directories
1732         also for files in subdirectories of lib/.
1733
1734 2006-11-05  Bruno Haible  <bruno@clisp.org>
1735
1736         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
1737         ANSI C compliant.
1738
1739 2006-11-03  Bruno Haible  <bruno@clisp.org>
1740
1741         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1742         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
1743         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
1744         (xnboundedmalloc): New inline function.
1745         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
1746         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
1747         xmalloc.
1748         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
1749         xmalloc.
1750         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
1751         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
1752         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
1753         xmalloc.
1754         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1755         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
1756         xmalloc.
1757         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
1758         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1759         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
1760         xmalloc.
1761         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1762         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
1763         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1764         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
1765         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
1766         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
1767         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
1768
1769 2006-11-03  Bruno Haible  <bruno@clisp.org>
1770
1771         * lib/c-ctype.h [C++]: Define functions without name mangling.
1772         * lib/fwriteerror.h [C++]: Likewise.
1773         * lib/gcd.h [C++]: Likewise.
1774         * lib/linebreak.h [C++]: Likewise.
1775
1776 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
1777
1778         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
1779         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
1780         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
1781         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
1782         Check for functions and headers just once.
1783         Check for declaration of canonicalize_file_name.
1784         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
1785
1786 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1787
1788         * gnulib-tool (func_import): Fix typo in actioncmd.
1789
1790 2006-11-02  Bruno Haible  <bruno@clisp.org>
1791
1792         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
1793         newline sequence in the Makefile.am snippet as a space, like "make"
1794         does.
1795         Reported by Roger Persson <perrog@gmail.com>.
1796
1797 2006-11-01  Bruno Haible  <bruno@clisp.org>
1798
1799         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
1800         already declared in <string.h>.
1801         * lib/strcase.h (strncasecmp): Don't declare it if yes.
1802
1803 2006-11-01  Bruno Haible  <bruno@clisp.org>
1804
1805         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
1806         * lib/strcase.h: Include <string.h>.
1807         (strcasecmp): Define to rpl_strcasecmp here.
1808
1809 2006-11-01  Bruno Haible  <bruno@clisp.org>
1810
1811         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
1812
1813 2006-11-01  Eric Blake  <ebb9@byu.net>
1814
1815         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
1816
1817         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
1818
1819 2006-10-29  Bruno Haible  <bruno@clisp.org>
1820
1821         Make it compile in C++ mode.
1822         * lib/full-write.c (full_rw): Add a cast.
1823
1824 2006-11-01  Bruno Haible  <bruno@clisp.org>
1825
1826         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
1827         be POSIX compliant.
1828         Reported by Roger Persson <perrog@gmail.com>.
1829
1830 2006-11-01  Eric Blake  <ebb9@byu.net>
1831
1832         * lib/getopt_.h: Fix comments.
1833
1834 2006-10-31  Eric Blake  <ebb9@byu.net>
1835
1836         * modules/tmpdir (Depends-on): Add sys_stat.
1837         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
1838         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
1839         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
1840         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
1841         tempname.
1842
1843 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
1844
1845         Avoid some C++ diagnostics reported by Bruno Haible.
1846         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
1847         xmalloc.
1848         (quotearg_alloc): Use xcharalloc rather than xmalloc.
1849         (struct slotvec): Move to top level.
1850         (quotearg_n_options): Rewrite to avoid xmalloc.
1851         * lib/xalloc.h (xcharalloc): New function.
1852         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
1853         [defined __cplusplus]: Add function template that provides result
1854         type propagation.  This part of the change is from Bruno Haible.
1855
1856 2006-10-29  Bruno Haible  <bruno@clisp.org>
1857
1858         Make it compile in C++ mode.
1859         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
1860         * lib/strnlen1.c (strnlen1): Cast memchr result.
1861         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
1862         * lib/clean-temp.c (string_equals, string_hash): Add casts.
1863         (create_temp_dir): Rename local variable 'template'.
1864         (compile_csharp_using_sscli): Add cast.
1865         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
1866         * lib/findprog.c (find_in_path): Likewise.
1867         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
1868         * lib/wait-process.c (register_slave_subprocess): Likewise.
1869
1870 2006-10-22  Bruno Haible  <bruno@clisp.org>
1871
1872         * modules/tsearch: New file.
1873         * lib/tsearch.h: New file.
1874         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
1875         * m4/tsearch.m4: New file.
1876         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
1877
1878 2006-10-29  Eric Blake  <ebb9@byu.net>
1879
1880         * lib/arcfour.c: Assume config.h.
1881         * lib/arctwo.c: Likewise.
1882         * lib/base64.c: Likewise.
1883         * lib/check-version.c: Likewise.
1884         * lib/crc.c: Likewise.
1885         * lib/des.c: Likewise.
1886         * lib/gc-gnulib.c: Likewise.
1887         * lib/gc-libgcrypt.c: Likewise.
1888         * lib/gc-pbkdf2-sha1.c: Likewise.
1889         * lib/getaddrinfo.c: Likewise.
1890         * lib/getdelim.c: Likewise.
1891         * lib/getline.c: Likewise.
1892         * lib/hmac-md5.c: Likewise.
1893         * lib/hmac-sha1.c: Likewise.
1894         * lib/iconvme.c: Likewise.
1895         * lib/md2.c: Likewise.
1896         * lib/md4.c: Likewise.
1897         * lib/memxor.c: Likewise.
1898         * lib/read-file.c: Likewise.
1899         * lib/readline.c: Likewise.
1900         * lib/rijndael-alg-fst.c: Likewise.
1901         * lib/rijndael-api-fst.c: Likewise.
1902         * lib/xgetdomainname.c: Likewise.
1903
1904 2006-10-28  Eric Blake  <ebb9@byu.net>
1905
1906         * lib/xstrndup.c: Assume config.h.
1907
1908 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
1909
1910         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
1911         stat-macros.h is now for our own macros, whereas stat_h is for
1912         macros in the <sys/stat.h> name space.
1913         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
1914         (STAT_MACROS_H): Remove.
1915         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
1916         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
1917         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
1918         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
1919         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
1920         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
1921         Move these macros to ...
1922         * lib/stat_.h: here.  Don't include stat-macros.h.
1923         * lib/canonicalize.c: Don't include stat-macros.h.
1924         * lib/chown.c: Likewise.
1925         * lib/euidaccess.c: Likewise.
1926         * lib/file-type.c: Likewise.
1927         * lib/filemode.c: Likewise.
1928         * lib/glob.c: Likewise.
1929         * lib/isapipe.c: Likewise.
1930         * lib/lchown.c: Likewise.
1931         * lib/lstat.c: Likewise.
1932         * lib/mkdir-p.c: Likewise.
1933         * lib/rmdir.c: Likewise.
1934         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
1935         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
1936         unless mkdir isn't declared, to speed up 'configure'.
1937         Always create sys/stat.h, since it's unlikely any real sys/stat.h
1938         would define all the S_* symbols.
1939         * modules/canonicalize (Depends-on):
1940         Depend on sys_stat, not stat-macros.
1941         * modules/chown: Likewise.
1942         * modules/euidaccess: Likewise.
1943         * modules/filemode: Likewise.
1944         * modules/file-type: Likewise.
1945         * modules/glob: Likewise.
1946         * modules/isapipe: Likewise.
1947         * modules/lchown: Likewise.
1948         * modules/lstat: Likewise.
1949         * modules/mkancesdirs: Likewise.
1950         * modules/rmdir: Likewise.
1951         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
1952         * modules/modechange: Likewise.
1953         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
1954         (configure.ac): Remove gl_STAT_MACROS.
1955         * modules/sys_stat (Depends-on): Remove stat-macros.
1956
1957 2006-10-27  Bruno Haible  <bruno@clisp.org>
1958
1959         * m4/signed.m4: Remove file.
1960         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
1961         invocation.
1962         * modules/vasnprintf (Files): Remove m4/signed.m4.
1963
1964 2006-10-27  Bruno Haible  <bruno@clisp.org>
1965
1966         Update to GNU gettext 0.16.
1967         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
1968         m4/inttypes-h.m4, m4/signed.m4.
1969         * m4/gettext.m4: Update to GNU gettext 0.16.
1970         * m4/intl.m4: New file, from GNU gettext.
1971         * m4/intldir.m4: New file, from GNU gettext.
1972         * config/srclist.txt: Update
1973
1974 2006-10-27  Eric Blake  <ebb9@byu.net>
1975
1976         * MODULES.html.sh: Document tempname.
1977         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
1978         dependencies.
1979         (Files): Move lib/tempname.c...
1980         * modules/tempname: ...to this new module.
1981         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
1982         (gl_PREREQ_TEMPNAME): Move...
1983         * m4/tempname.m4: ...to this new file.
1984         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
1985         * modules/sys_stat (Depends-on): Add stat-macros.
1986         * lib/stat_.h (includes): Pick up stat macros.
1987         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
1988         if stat macros are broken.
1989         * lib/tempname.c (includes): No need to include "stat-macros.h".
1990         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
1991         (direxists, __path_search) [!_LIBC]: Don't compile these in
1992         gnulib; the tmpdir module covers that.
1993         * lib/tempname.h: New file.
1994
1995 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
1996
1997         * COPYING: Explain how gnulib-tool converts licence headers.
1998         Almost all wording by Eric Blake.
1999
2000 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2001
2002         * lib/mbchar.h (is_basic_table): Make read-only.
2003         * lib/mbchar.c (is_basic_table): Likewise.
2004         Reported by John Darrington.
2005
2006 2006-10-25  Bruno Haible  <bruno@clisp.org>
2007
2008         * lib/progname.h (set_program_name): Undefine before defining.
2009
2010 2006-10-25  Bruno Haible  <bruno@clisp.org>
2011
2012         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
2013         false for non-gcc C++ compilers.
2014         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
2015
2016 2006-10-24  Bruno Haible  <bruno@clisp.org>
2017
2018         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
2019         iconv implementations like Irix iconv.
2020
2021 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2022
2023         * modules/vararrays: New file.
2024         * m4/vararrays.m4: New file, taken from diffutils.
2025         * MODULES.html.sh: New module vararrays.
2026
2027 2006-10-24  Karl Berry  <karl@gnu.org>
2028
2029         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
2030         Don't call GNU Unix.
2031
2032 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2033
2034         * users.txt: Add Libtool.
2035
2036         Sync from Libtool:
2037
2038         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2039
2040         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
2041         to gnulib's policy of including config.h unconditionally.
2042
2043 2006-10-24  Bruno Haible  <bruno@clisp.org>
2044
2045         * modules/wcwidth (Files): Add m4/wint_t.m4.
2046         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
2047         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
2048
2049 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2050
2051         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
2052         to pacify GCC with some -W flags enabled.  Problem reported by
2053         Bruno Haible.
2054
2055 2006-10-24  Jim Meyering  <jim@meyering.net>
2056
2057         * MODULES.html.sh: Remove uinttostr.  It's not a module.
2058         Reported by Karl Berry.
2059
2060 2006-10-23  Bruno Haible  <bruno@clisp.org>
2061
2062         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
2063
2064 2006-10-24  Bruno Haible  <bruno@clisp.org>
2065
2066         * lib/gl_list.h: Use C comment style, not C++ comment style.
2067
2068 2006-10-23  Eric Blake  <ebb9@byu.net>
2069
2070         * lib/getaddrinfo.c (includes): Add missing include.
2071
2072 2006-10-23  Bruno Haible  <bruno@clisp.org>
2073             Paul Eggert  <eggert@cs.ucla.edu>
2074
2075         Ability to rename obstack_free.
2076         * lib/obstack.h (__obstack_free): New macro. Declare instead of
2077         obstack_free.
2078         (obstack_free): Invoke the __obstack_free macro.
2079         * lib/obstack.c (obstack_free): Use __obstack_free macro.
2080
2081 2006-10-23  Bruno Haible  <bruno@clisp.org>
2082             Paul Eggert  <eggert@cs.ucla.edu>
2083
2084         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
2085         __argc, __argv from the declaration. (They are defined as macros on
2086         mingw.)
2087
2088 2006-10-22  Bruno Haible  <bruno@clisp.org>
2089
2090         * doc/gnulib-intro.texi: New file.
2091         * doc/gnulib.texi: Include it.
2092
2093 2006-10-21  Bruno Haible  <bruno@clisp.org>
2094
2095         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
2096         "Introduction", "Miscellanous Notes", "Particular Modules".
2097
2098 2006-10-21  Bruno Haible  <bruno@clisp.org>
2099
2100         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2101         Change mostlyclean-local rule to avoid sh syntax error from bash
2102         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
2103
2104 2006-10-23  Jim Meyering  <jim@meyering.net>
2105
2106         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
2107         in place of snprintf.
2108
2109         * modules/inttostr (Files): Add lib/uinttostr.c.
2110         * lib/uinttostr.c (inttostr): New file/function.
2111         * lib/inttostr.h (uinttostr): Declare.
2112         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
2113         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
2114         Add uinttostr.
2115         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
2116
2117 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2118
2119         * lib/canonicalize.c (ELOOP): Define if not already defined.
2120         Problem reported by Bruno Haible in
2121         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
2122
2123 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2124
2125         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
2126         Problem reported by Perry Smith and Ville Laurikari.
2127
2128         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
2129         uses.
2130
2131 2006-10-19  Bruno Haible  <bruno@clisp.org>
2132
2133         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
2134         for mingw.
2135
2136 2006-10-19  Bruno Haible  <bruno@clisp.org>
2137
2138         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
2139         Needed for mingw.
2140
2141 2006-10-19  Bruno Haible  <bruno@clisp.org>
2142
2143         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
2144
2145 2006-10-19  Bruno Haible  <bruno@clisp.org>
2146
2147         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
2148         it.
2149
2150 2006-10-19  Bruno Haible  <bruno@clisp.org>
2151
2152         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
2153         invocation.
2154
2155 2006-10-19  Bruno Haible  <bruno@clisp.org>
2156
2157         * gnulib-tool (func_create_testdir): Don't include ftruncate and
2158         mountlist by default.
2159
2160 2006-10-16  Bruno Haible  <bruno@clisp.org>
2161
2162         * lib/c-strstr.c: Include c-strstr.h.
2163
2164 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2165
2166         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
2167         in a slash.
2168
2169 2006-10-18  Bruno Haible  <bruno@clisp.org>
2170
2171         * lib/lock.h [C++]: Wrap definitions in extern "C".
2172
2173 2006-10-18  Bruno Haible  <bruno@clisp.org>
2174
2175         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
2176         gl_LIBOBJS list.
2177
2178 2006-10-18  Bruno Haible  <bruno@clisp.org>
2179
2180         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
2181
2182 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
2183
2184         * lib/xstrtol.h: Include gettext.h.
2185         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
2186         Problem reported by Eric Blake.
2187         * modules/xstrtol (Depends-on): Add gettext-h.
2188
2189 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2190
2191         * lib/strftime.c (advance): New macro.
2192         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
2193         incomplete type, so you can't add 0 to it.  Problem and patch
2194         reported by Eelco Dolstra for dietlibc.
2195
2196 2006-10-18  Jim Meyering  <jim@meyering.net>
2197
2198         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
2199         type for a local, and rename it: s/up/user_proc/.
2200
2201 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2202
2203         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
2204         READ_UTMP_USER_PROCESS.
2205         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
2206
2207 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
2208
2209         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
2210         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
2211
2212 2006-10-17  Eric Blake  <ebb9@byu.net>
2213
2214         * lib/sigprocmask.c (sigprocmask): Fix typo.
2215
2216         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
2217
2218         * modules/clean-temp (Makefile.am): Don't add to make output...
2219         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
2220         config.h.
2221
2222 2006-10-17  Bruno Haible  <bruno@clisp.org>
2223
2224         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
2225         differently if DEFAULT_TEXT_DOMAIN is set.
2226
2227 2006-10-16  Bruno Haible  <bruno@clisp.org>
2228
2229         * lib/clean-temp.c: Include fwriteerror.h.
2230
2231 2006-10-16  Bruno Haible  <bruno@clisp.org>
2232
2233         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
2234
2235 2006-10-16  Bruno Haible  <bruno@clisp.org>
2236
2237         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
2238         * lib/sigprocmask.h: Include <sys/types.h>.
2239         (sigset_t): Use the system's definition if present.
2240
2241 2006-10-17  Eric Blake  <ebb9@byu.net>
2242
2243         * lib/xvasprintf.c (includes): Assume config.h.
2244         * lib/xasprintf.c (includes): Likewise.
2245
2246 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
2247
2248         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
2249         at least as wide as intmax_t.
2250
2251 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
2252
2253         (Imported from Automake.)
2254         * build-aux/gnupload: Update to version 1.1 of directive file.
2255
2256 2006-10-16  Eric Blake  <ebb9@byu.net>
2257
2258         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
2259         match Automake 1.10a.
2260
2261 2006-10-14  Bruno Haible  <bruno@clisp.org>
2262
2263         * modules/sigprocmask: New file.
2264         * lib/sigprocmask.h: New file.
2265         * lib/sigprocmask.c: New file.
2266         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
2267         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
2268         request sigprocmask.o.
2269         (gl_PREREQ_SIGPROCMASK): New macro.
2270         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
2271         (Depends-on): Add sigprocmask.
2272         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
2273         gt_SIGNALBLOCKING. Test for 'raise' only once.
2274         * lib/fatal-signal.c: Include sigprocmask.h.
2275         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
2276         unblock_fatal_signals): Define always.
2277         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2278         sigprocmask.
2279
2280 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
2281
2282         Sync from Automake.
2283         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
2284         which incorrectly sets the mode of an existing destination
2285         directory.  In some cases the unpatched install-sh could do the
2286         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
2287         system.  We hope this is rare in practice, but it's clearly worth
2288         fixing.  Problem reported by Alex Unleashed in
2289         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
2290         Also, don't bother to check for -m bugs unless we're using -m;
2291         suggested by Stepan Kasal.
2292
2293 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2294
2295         Sync from Automake.
2296         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
2297         `-c' flag, so they appear at the same position as in %FASTDEP%
2298         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
2299         which ignores unknown options only after the first non-option.
2300         Bug report against M4 by Nelson H. F. Beebe.
2301
2302 2006-10-13  Jim Meyering  <jim@meyering.net>
2303
2304         Fix a bug in yesterday's change.
2305         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
2306         p->fts_statp->st_dev would be used uninitialized.
2307         Ensures that we always call fts_stat on the very first entry.
2308         Miklos Szeredi reported that find -xdev stopped working.
2309
2310 2006-10-12  Bruno Haible  <bruno@clisp.org>
2311
2312         * gnulib-tool (func_get_automake_snippet): Append an automatically
2313         computed EXTRA_DIST augmentation.
2314         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
2315         * modules/alloca-opt (Makefile.am): Likewise.
2316         * modules/allocsa (Makefile.am): Likewise.
2317         * modules/arcfour (Makefile.am): Likewise.
2318         * modules/arctwo (Makefile.am): Likewise.
2319         * modules/argmatch (Makefile.am): Likewise.
2320         * modules/argz (Makefile.am): Likewise.
2321         * modules/atexit (Makefile.am): Likewise.
2322         * modules/backupfile (Makefile.am): Likewise.
2323         * modules/byteswap (Makefile.am): Likewise.
2324         * modules/c-strtod (Makefile.am): Likewise.
2325         * modules/c-strtold (Makefile.am): Likewise.
2326         * modules/calloc (Makefile.am): Likewise.
2327         * modules/canon-host (Makefile.am): Likewise.
2328         * modules/canonicalize (Makefile.am): Likewise.
2329         * modules/chdir-long (Makefile.am): Likewise.
2330         * modules/chdir-safer (Makefile.am): Likewise.
2331         * modules/check-version (Makefile.am): Likewise.
2332         * modules/chown (Makefile.am): Likewise.
2333         * modules/cloexec (Makefile.am): Likewise.
2334         * modules/close-stream (Makefile.am): Likewise.
2335         * modules/closeout (Makefile.am): Likewise.
2336         * modules/crc (Makefile.am): Likewise.
2337         * modules/csharpexec (Makefile.am): Likewise.
2338         * modules/cycle-check (Makefile.am): Likewise.
2339         * modules/des (Makefile.am): Likewise.
2340         * modules/dev-ino (Makefile.am): Likewise.
2341         * modules/dirfd (Makefile.am): Likewise.
2342         * modules/dirname (Makefile.am): Likewise.
2343         * modules/dup2 (Makefile.am): Likewise.
2344         * modules/eealloc (Makefile.am): Likewise.
2345         * modules/error (Makefile.am): Likewise.
2346         * modules/euidaccess (Makefile.am): Likewise.
2347         * modules/exclude (Makefile.am): Likewise.
2348         * modules/exitfail (Makefile.am): Likewise.
2349         * modules/fcntl-safer (Makefile.am): Likewise.
2350         * modules/fcntl (Makefile.am): Likewise.
2351         * modules/file-type (Makefile.am): Likewise.
2352         * modules/fileblocks (Makefile.am): Likewise.
2353         * modules/filemode (Makefile.am): Likewise.
2354         * modules/filenamecat (Makefile.am): Likewise.
2355         * modules/fnmatch (Makefile.am): Likewise.
2356         * modules/fopen-safer (Makefile.am): Likewise.
2357         * modules/fpending (Makefile.am): Likewise.
2358         * modules/fprintftime (Makefile.am): Likewise.
2359         * modules/free (Makefile.am): Likewise.
2360         * modules/fsusage (Makefile.am): Likewise.
2361         * modules/ftruncate (Makefile.am): Likewise.
2362         * modules/fts (Makefile.am): Likewise.
2363         * modules/gc-arcfour (Makefile.am): Likewise.
2364         * modules/gc-des (Makefile.am): Likewise.
2365         * modules/gc-hmac-md5 (Makefile.am): Likewise.
2366         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
2367         * modules/gc-md4 (Makefile.am): Likewise.
2368         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2369         * modules/gc-sha1 (Makefile.am): Likewise.
2370         * modules/gc (Makefile.am): Likewise.
2371         * modules/getaddrinfo (Makefile.am): Likewise.
2372         * modules/getcwd (Makefile.am): Likewise.
2373         * modules/getdelim (Makefile.am): Likewise.
2374         * modules/getdomainname (Makefile.am): Likewise.
2375         * modules/getgroups (Makefile.am): Likewise.
2376         * modules/gethostname (Makefile.am): Likewise.
2377         * modules/gethrxtime (Makefile.am): Likewise.
2378         * modules/getline (Makefile.am): Likewise.
2379         * modules/getloadavg (Makefile.am): Likewise.
2380         * modules/getlogin_r (Makefile.am): Likewise.
2381         * modules/getndelim2 (Makefile.am): Likewise.
2382         * modules/getopt (Makefile.am): Likewise.
2383         * modules/getpagesize (Makefile.am): Likewise.
2384         * modules/getpass-gnu (Makefile.am): Likewise.
2385         * modules/getpass (Makefile.am): Likewise.
2386         * modules/getsubopt (Makefile.am): Likewise.
2387         * modules/gettime (Makefile.am): Likewise.
2388         * modules/gettimeofday (Makefile.am): Likewise.
2389         * modules/getugroups (Makefile.am): Likewise.
2390         * modules/getusershell (Makefile.am): Likewise.
2391         * modules/glob (Makefile.am): Likewise.
2392         * modules/group-member (Makefile.am): Likewise.
2393         * modules/hard-locale (Makefile.am): Likewise.
2394         * modules/hash (Makefile.am): Likewise.
2395         * modules/hmac-md5 (Makefile.am): Likewise.
2396         * modules/hmac-sha1 (Makefile.am): Likewise.
2397         * modules/human (Makefile.am): Likewise.
2398         * modules/idcache (Makefile.am): Likewise.
2399         * modules/imaxabs (Makefile.am): Likewise.
2400         * modules/imaxdiv (Makefile.am): Likewise.
2401         * modules/inet_ntop (Makefile.am): Likewise.
2402         * modules/inet_pton (Makefile.am): Likewise.
2403         * modules/intprops (Makefile.am): Likewise.
2404         * modules/inttostr (Makefile.am): Likewise.
2405         * modules/inttypes (Makefile.am): Likewise.
2406         * modules/isapipe (Makefile.am): Likewise.
2407         * modules/javaversion (Makefile.am): Likewise.
2408         * modules/lchmod (Makefile.am): Likewise.
2409         * modules/lchown (Makefile.am): Likewise.
2410         * modules/localcharset (Makefile.am): Likewise.
2411         * modules/long-options (Makefile.am): Likewise.
2412         * modules/lstat (Makefile.am): Likewise.
2413         * modules/malloc (Makefile.am): Likewise.
2414         * modules/mathl (Makefile.am): Likewise.
2415         * modules/mbchar (Makefile.am): Likewise.
2416         * modules/md2 (Makefile.am): Likewise.
2417         * modules/md4 (Makefile.am): Likewise.
2418         * modules/md5 (Makefile.am): Likewise.
2419         * modules/memcasecmp (Makefile.am): Likewise.
2420         * modules/memchr (Makefile.am): Likewise.
2421         * modules/memcmp (Makefile.am): Likewise.
2422         * modules/memcoll (Makefile.am): Likewise.
2423         * modules/memcpy (Makefile.am): Likewise.
2424         * modules/memmem (Makefile.am): Likewise.
2425         * modules/memmove (Makefile.am): Likewise.
2426         * modules/mempcpy (Makefile.am): Likewise.
2427         * modules/memrchr (Makefile.am): Likewise.
2428         * modules/memset (Makefile.am): Likewise.
2429         * modules/memxor (Makefile.am): Likewise.
2430         * modules/mkancesdirs (Makefile.am): Likewise.
2431         * modules/mkdir-p (Makefile.am): Likewise.
2432         * modules/mkdir (Makefile.am): Likewise.
2433         * modules/mkdtemp (Makefile.am): Likewise.
2434         * modules/mkstemp (Makefile.am): Likewise.
2435         * modules/mktime (Makefile.am): Likewise.
2436         * modules/modechange (Makefile.am): Likewise.
2437         * modules/mountlist (Makefile.am): Likewise.
2438         * modules/nanosleep (Makefile.am): Likewise.
2439         * modules/obstack (Makefile.am): Likewise.
2440         * modules/openat (Makefile.am): Likewise.
2441         * modules/pagealign_alloc (Makefile.am): Likewise.
2442         * modules/pathmax (Makefile.am): Likewise.
2443         * modules/physmem (Makefile.am): Likewise.
2444         * modules/poll (Makefile.am): Likewise.
2445         * modules/posixtm (Makefile.am): Likewise.
2446         * modules/posixver (Makefile.am): Likewise.
2447         * modules/putenv (Makefile.am): Likewise.
2448         * modules/quote (Makefile.am): Likewise.
2449         * modules/quotearg (Makefile.am): Likewise.
2450         * modules/raise (Makefile.am): Likewise.
2451         * modules/read-file (Makefile.am): Likewise.
2452         * modules/readline (Makefile.am): Likewise.
2453         * modules/readlink (Makefile.am): Likewise.
2454         * modules/readtokens (Makefile.am): Likewise.
2455         * modules/readutmp (Makefile.am): Likewise.
2456         * modules/realloc (Makefile.am): Likewise.
2457         * modules/regex (Makefile.am): Likewise.
2458         * modules/rename-dest-slash (Makefile.am): Likewise.
2459         * modules/rename (Makefile.am): Likewise.
2460         * modules/rijndael (Makefile.am): Likewise.
2461         * modules/rmdir (Makefile.am): Likewise.
2462         * modules/rpmatch (Makefile.am): Likewise.
2463         * modules/safe-read (Makefile.am): Likewise.
2464         * modules/safe-write (Makefile.am): Likewise.
2465         * modules/same-inode (Makefile.am): Likewise.
2466         * modules/same (Makefile.am): Likewise.
2467         * modules/save-cwd (Makefile.am): Likewise.
2468         * modules/savedir (Makefile.am): Likewise.
2469         * modules/setenv (Makefile.am): Likewise.
2470         * modules/settime (Makefile.am): Likewise.
2471         * modules/sha1 (Makefile.am): Likewise.
2472         * modules/sig2str (Makefile.am): Likewise.
2473         * modules/snprintf (Makefile.am): Likewise.
2474         * modules/stat-macros (Makefile.am): Likewise.
2475         * modules/stat-time (Makefile.am): Likewise.
2476         * modules/stdbool (Makefile.am): Likewise.
2477         * modules/stdint (Makefile.am): Likewise.
2478         * modules/stdlib-safer (Makefile.am): Likewise.
2479         * modules/stpcpy (Makefile.am): Likewise.
2480         * modules/stpncpy (Makefile.am): Likewise.
2481         * modules/strcase (Makefile.am): Likewise.
2482         * modules/strcasestr (Makefile.am): Likewise.
2483         * modules/strchrnul (Makefile.am): Likewise.
2484         * modules/strcspn (Makefile.am): Likewise.
2485         * modules/strdup (Makefile.am): Likewise.
2486         * modules/strerror (Makefile.am): Likewise.
2487         * modules/strftime (Makefile.am): Likewise.
2488         * modules/strndup (Makefile.am): Likewise.
2489         * modules/strnlen (Makefile.am): Likewise.
2490         * modules/strpbrk (Makefile.am): Likewise.
2491         * modules/strsep (Makefile.am): Likewise.
2492         * modules/strstr (Makefile.am): Likewise.
2493         * modules/strtod (Makefile.am): Likewise.
2494         * modules/strtoimax (Makefile.am): Likewise.
2495         * modules/strtok_r (Makefile.am): Likewise.
2496         * modules/strtol (Makefile.am): Likewise.
2497         * modules/strtoll (Makefile.am): Likewise.
2498         * modules/strtoul (Makefile.am): Likewise.
2499         * modules/strtoull (Makefile.am): Likewise.
2500         * modules/strtoumax (Makefile.am): Likewise.
2501         * modules/strverscmp (Makefile.am): Likewise.
2502         * modules/sys_socket (Makefile.am): Likewise.
2503         * modules/sys_stat (Makefile.am): Likewise.
2504         * modules/sysexits (Makefile.am): Likewise.
2505         * modules/time_r (Makefile.am): Likewise.
2506         * modules/timegm (Makefile.am): Likewise.
2507         * modules/timespec (Makefile.am): Likewise.
2508         * modules/tmpfile-safer (Makefile.am): Likewise.
2509         * modules/trim (Makefile.am): Likewise.
2510         * modules/unistd-safer (Makefile.am): Likewise.
2511         * modules/unlinkdir (Makefile.am): Likewise.
2512         * modules/unlocked-io (Makefile.am): Likewise.
2513         * modules/userspec (Makefile.am): Likewise.
2514         * modules/utime (Makefile.am): Likewise.
2515         * modules/utimecmp (Makefile.am): Likewise.
2516         * modules/utimens (Makefile.am): Likewise.
2517         * modules/vasnprintf (Makefile.am): Likewise.
2518         * modules/vasprintf (Makefile.am): Likewise.
2519         * modules/vsnprintf (Makefile.am): Likewise.
2520         * modules/xalloc (Makefile.am): Likewise.
2521         * modules/xgetcwd (Makefile.am): Likewise.
2522         * modules/xnanosleep (Makefile.am): Likewise.
2523         * modules/xreadlink (Makefile.am): Likewise.
2524         * modules/xstrtod (Makefile.am): Likewise.
2525         * modules/xstrtol (Makefile.am): Likewise.
2526         * modules/xstrtold (Makefile.am): Likewise.
2527         * modules/yesno (Makefile.am): Likewise.
2528         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
2529
2530 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
2531
2532         * modules/error (Makefile.am): Distribute files through
2533         EXTRA_DIST, not lib_SOURCES.
2534
2535 2006-10-12  Eric Blake  <ebb9@byu.net>
2536
2537         * modules/error (Makefile.am): Distribute files in /lib.
2538         * modules/obstack (Makefile.am): Likewise.
2539
2540 2006-10-12  Bruno Haible  <bruno@clisp.org>
2541
2542         * modules/acl (Makefile.am): Distribute all files in lib/ through
2543         EXTRA_DIST.
2544         * modules/arcfour (Makefile.am): Likewise.
2545         * modules/arctwo (Makefile.am): Likewise.
2546         * modules/argmatch (Makefile.am): Likewise.
2547         * modules/argz (Makefile.am): Likewise.
2548         * modules/atexit (Makefile.am): Likewise.
2549         * modules/backupfile (Makefile.am): Likewise.
2550         * modules/c-strtod (Makefile.am): Likewise.
2551         * modules/c-strtold (Makefile.am): Likewise.
2552         * modules/calloc (Makefile.am): Likewise.
2553         * modules/canon-host (Makefile.am): Likewise.
2554         * modules/canonicalize (Makefile.am): Likewise.
2555         * modules/chdir-long (Makefile.am): Likewise.
2556         * modules/chdir-safer (Makefile.am): Likewise.
2557         * modules/check-version (Makefile.am): Likewise.
2558         * modules/chown (Makefile.am): Likewise.
2559         * modules/cloexec (Makefile.am): Likewise.
2560         * modules/close-stream (Makefile.am): Likewise.
2561         * modules/closeout (Makefile.am): Likewise.
2562         * modules/crc (Makefile.am): Likewise.
2563         * modules/cycle-check (Makefile.am): Likewise.
2564         * modules/des (Makefile.am): Likewise.
2565         * modules/dirfd (Makefile.am): Likewise.
2566         * modules/dirname (Makefile.am): Likewise.
2567         * modules/dup2 (Makefile.am): Likewise.
2568         * modules/euidaccess (Makefile.am): Likewise.
2569         * modules/exclude (Makefile.am): Likewise.
2570         * modules/exitfail (Makefile.am): Likewise.
2571         * modules/fcntl-safer (Makefile.am): Likewise.
2572         * modules/file-type (Makefile.am): Likewise.
2573         * modules/fileblocks (Makefile.am): Likewise.
2574         * modules/filemode (Makefile.am): Likewise.
2575         * modules/filenamecat (Makefile.am): Likewise.
2576         * modules/fnmatch (Makefile.am): Likewise.
2577         * modules/fopen-safer (Makefile.am): Likewise.
2578         * modules/fpending (Makefile.am): Likewise.
2579         * modules/fprintftime (Makefile.am): Likewise.
2580         * modules/free (Makefile.am): Likewise.
2581         * modules/fsusage (Makefile.am): Likewise.
2582         * modules/ftruncate (Makefile.am): Likewise.
2583         * modules/fts (Makefile.am): Likewise.
2584         * modules/gc (Makefile.am): Likewise.
2585         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2586         * modules/getaddrinfo (Makefile.am): Likewise.
2587         * modules/getcwd (Makefile.am): Likewise.
2588         * modules/getdelim (Makefile.am): Likewise.
2589         * modules/getdomainname (Makefile.am): Likewise.
2590         * modules/getgroups (Makefile.am): Likewise.
2591         * modules/gethostname (Makefile.am): Likewise.
2592         * modules/gethrxtime (Makefile.am): Likewise.
2593         * modules/getline (Makefile.am): Likewise.
2594         * modules/getloadavg (Makefile.am): Likewise.
2595         * modules/getlogin_r (Makefile.am): Likewise.
2596         * modules/getopt (Makefile.am): Likewise.
2597         * modules/getpass (Makefile.am): Likewise.
2598         * modules/getpass-gnu (Makefile.am): Likewise.
2599         * modules/getsubopt (Makefile.am): Likewise.
2600         * modules/gettime (Makefile.am): Likewise.
2601         * modules/gettimeofday (Makefile.am): Likewise.
2602         * modules/getugroups (Makefile.am): Likewise.
2603         * modules/getusershell (Makefile.am): Likewise.
2604         * modules/glob (Makefile.am): Likewise.
2605         * modules/group-member (Makefile.am): Likewise.
2606         * modules/hard-locale (Makefile.am): Likewise.
2607         * modules/hash (Makefile.am): Likewise.
2608         * modules/hmac-md5 (Makefile.am): Likewise.
2609         * modules/hmac-sha1 (Makefile.am): Likewise.
2610         * modules/human (Makefile.am): Likewise.
2611         * modules/idcache (Makefile.am): Likewise.
2612         * modules/imaxabs (Makefile.am): Likewise.
2613         * modules/imaxdiv (Makefile.am): Likewise.
2614         * modules/inet_ntop (Makefile.am): Likewise.
2615         * modules/inet_pton (Makefile.am): Likewise.
2616         * modules/inttostr (Makefile.am): Likewise.
2617         * modules/isapipe (Makefile.am): Likewise.
2618         * modules/lchown (Makefile.am): Likewise.
2619         * modules/long-options (Makefile.am): Likewise.
2620         * modules/lstat (Makefile.am): Likewise.
2621         * modules/malloc (Makefile.am): Likewise.
2622         * modules/mathl (Makefile.am): Likewise.
2623         * modules/mbchar (Makefile.am): Likewise.
2624         * modules/md2 (Makefile.am): Likewise.
2625         * modules/md4 (Makefile.am): Likewise.
2626         * modules/md5 (Makefile.am): Likewise.
2627         * modules/memcasecmp (Makefile.am): Likewise.
2628         * modules/memchr (Makefile.am): Likewise.
2629         * modules/memcmp (Makefile.am): Likewise.
2630         * modules/memcoll (Makefile.am): Likewise.
2631         * modules/memcpy (Makefile.am): Likewise.
2632         * modules/memmem (Makefile.am): Likewise.
2633         * modules/memmove (Makefile.am): Likewise.
2634         * modules/mempcpy (Makefile.am): Likewise.
2635         * modules/memrchr (Makefile.am): Likewise.
2636         * modules/memset (Makefile.am): Likewise.
2637         * modules/memxor (Makefile.am): Likewise.
2638         * modules/mkancesdirs (Makefile.am): Likewise.
2639         * modules/mkdir (Makefile.am): Likewise.
2640         * modules/mkdir-p (Makefile.am): Likewise.
2641         * modules/mkdtemp (Makefile.am): Likewise.
2642         * modules/mkstemp (Makefile.am): Likewise.
2643         * modules/mktime (Makefile.am): Likewise.
2644         * modules/modechange (Makefile.am): Likewise.
2645         * modules/mountlist (Makefile.am): Likewise.
2646         * modules/nanosleep (Makefile.am): Likewise.
2647         * modules/openat (Makefile.am): Likewise.
2648         * modules/pagealign_alloc (Makefile.am): Likewise.
2649         * modules/physmem (Makefile.am): Likewise.
2650         * modules/poll (Makefile.am): Likewise.
2651         * modules/posixtm (Makefile.am): Likewise.
2652         * modules/posixver (Makefile.am): Likewise.
2653         * modules/putenv (Makefile.am): Likewise.
2654         * modules/quote (Makefile.am): Likewise.
2655         * modules/quotearg (Makefile.am): Likewise.
2656         * modules/raise (Makefile.am): Likewise.
2657         * modules/read-file (Makefile.am): Likewise.
2658         * modules/readline (Makefile.am): Likewise.
2659         * modules/readlink (Makefile.am): Likewise.
2660         * modules/readtokens (Makefile.am): Likewise.
2661         * modules/readutmp (Makefile.am): Likewise.
2662         * modules/realloc (Makefile.am): Likewise.
2663         * modules/regex (Makefile.am): Likewise.
2664         * modules/rename (Makefile.am): Likewise.
2665         * modules/rename-dest-slash (Makefile.am): Likewise.
2666         * modules/rijndael (Makefile.am): Likewise.
2667         * modules/rmdir (Makefile.am): Likewise.
2668         * modules/rpmatch (Makefile.am): Likewise.
2669         * modules/safe-read (Makefile.am): Likewise.
2670         * modules/safe-write (Makefile.am): Likewise.
2671         * modules/same (Makefile.am): Likewise.
2672         * modules/save-cwd (Makefile.am): Likewise.
2673         * modules/savedir (Makefile.am): Likewise.
2674         * modules/setenv (Makefile.am): Likewise.
2675         * modules/settime (Makefile.am): Likewise.
2676         * modules/sha1 (Makefile.am): Likewise.
2677         * modules/sig2str (Makefile.am): Likewise.
2678         * modules/snprintf (Makefile.am): Likewise.
2679         * modules/stdlib-safer (Makefile.am): Likewise.
2680         * modules/stpcpy (Makefile.am): Likewise.
2681         * modules/stpncpy (Makefile.am): Likewise.
2682         * modules/strcase (Makefile.am): Likewise.
2683         * modules/strcasestr (Makefile.am): Likewise.
2684         * modules/strchrnul (Makefile.am): Likewise.
2685         * modules/strcspn (Makefile.am): Likewise.
2686         * modules/strdup (Makefile.am): Likewise.
2687         * modules/strerror (Makefile.am): Likewise.
2688         * modules/strftime (Makefile.am): Likewise.
2689         * modules/strndup (Makefile.am): Likewise.
2690         * modules/strnlen (Makefile.am): Likewise.
2691         * modules/strpbrk (Makefile.am): Likewise.
2692         * modules/strsep (Makefile.am): Likewise.
2693         * modules/strstr (Makefile.am): Likewise.
2694         * modules/strtod (Makefile.am): Likewise.
2695         * modules/strtoimax (Makefile.am): Likewise.
2696         * modules/strtok_r (Makefile.am): Likewise.
2697         * modules/strtol (Makefile.am): Likewise.
2698         * modules/strtoll (Makefile.am): Likewise.
2699         * modules/strtoul (Makefile.am): Likewise.
2700         * modules/strtoull (Makefile.am): Likewise.
2701         * modules/strtoumax (Makefile.am): Likewise.
2702         * modules/strverscmp (Makefile.am): Likewise.
2703         * modules/time_r (Makefile.am): Likewise.
2704         * modules/timegm (Makefile.am): Likewise.
2705         * modules/tmpfile-safer (Makefile.am): Likewise.
2706         * modules/unistd-safer (Makefile.am): Likewise.
2707         * modules/unlinkdir (Makefile.am): Likewise.
2708         * modules/userspec (Makefile.am): Likewise.
2709         * modules/utime (Makefile.am): Likewise.
2710         * modules/utimecmp (Makefile.am): Likewise.
2711         * modules/utimens (Makefile.am): Likewise.
2712         * modules/vasnprintf (Makefile.am): Likewise.
2713         * modules/vasprintf (Makefile.am): Likewise.
2714         * modules/vsnprintf (Makefile.am): Likewise.
2715         * modules/xalloc (Makefile.am): Likewise.
2716         * modules/xgetcwd (Makefile.am): Likewise.
2717         * modules/xnanosleep (Makefile.am): Likewise.
2718         * modules/xreadlink (Makefile.am): Likewise.
2719         * modules/xstrtod (Makefile.am): Likewise.
2720         * modules/xstrtol (Makefile.am): Likewise.
2721         * modules/xstrtold (Makefile.am): Likewise.
2722         * modules/yesno (Makefile.am): Likewise.
2723
2724 2006-10-12  Jim Meyering  <jim@meyering.net>
2725
2726         * m4/getloadavg.m4: Revert the change below.
2727
2728         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
2729         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
2730         fail with a symlink, which is what coreutils' ./bootstrap now
2731         creates by default.
2732
2733 2006-10-12  Bruno Haible  <bruno@clisp.org>
2734
2735         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
2736         mingw.
2737         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
2738         MSVC and mingw explicitly.
2739
2740 2006-10-11  Simon Josefsson  <jas@extundo.com>
2741             Bruno Haible  <bruno@clisp.org>
2742
2743         Add support for multiple gnulib-tool invocations in the scope of a
2744         single configure.ac file.
2745         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
2746         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
2747         with the same contents as the _LIBADD variable.
2748         (func_emit_initmacro_start, func_emit_initmacro_end,
2749         func_emit_initmacro_done): New functions.
2750         (func_import, func_create_testdir): Invoke them. Allow the identifiers
2751         gl_LIBOBJS and gl_LTLIBOBJS.
2752
2753 2006-10-11  Bruno Haible  <bruno@clisp.org>
2754
2755         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
2756         (func_create_testdir): Don't create po/Makefile.am, don't invoke
2757         autoreconf. Instead, invoke autopoint explicitly but move back the
2758         *.m4 files from gnulib.
2759
2760 2006-10-11  Bruno Haible  <bruno@clisp.org>
2761
2762         * gnulib-tool (func_usage): Make module names after --create-testdir
2763         optional.
2764         (func_create_testdir): If no module was specified, use nearly all
2765         modules.
2766
2767 2006-10-12  Jim Meyering  <jim@meyering.net>
2768
2769         Big performance improvement for fts-based tools that use FTS_NOSTAT.
2770         Avoid spurious inode-mismatch problems on non-POSIX file systems.
2771         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
2772         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
2773         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
2774         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
2775         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
2776         (fts_set_stat_required): New function.
2777         (fts_open): Defer the calls to fts_stat, if possible or requested.
2778         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
2779         into fts_stat itself.
2780         (fts_read): Perform any required (deferred) fts_stat call.
2781         (fts_build): Likewise, for the directory we're about to open and read.
2782         In the readdir loop, carefully decide whether each entry will require
2783         an eventual call to fts_stat, using dirent.d_type info if available.
2784         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
2785         a command line argument into this function.  Update all callers.
2786         Map a return value of FTS_DOT to FTS_D for a command line argument.
2787         * modules/fts (Depends-on): Add d-type.  Alphabetize.
2788         Thanks to Miklos Szeredi for his tenacity and for the initial
2789         bug report about "find" failing on a FUSE-based file system.
2790
2791         * lib/fts.c (fts_open): Use consistent indentation.
2792
2793 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
2794
2795         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
2796         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
2797         reported by Jim Meyering.  All uses of cache variables renamed
2798         to match Autoconf's.
2799         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
2800         the other one.
2801
2802         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
2803         Fix misspelling in diagnostic.
2804
2805 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2806
2807         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
2808         defined.  Problem reported by Matthew Woehlke.
2809
2810         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
2811         Add support for Tandem NonStop R series.
2812         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
2813         Use new macro.
2814
2815         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
2816         (has_trailing_slash): Omit size arg; all callers changed.
2817         Omit 'inline', since it doesn't help performance and we'd
2818         need to configure it.
2819         Don't count //, ///, etc. as having a trailing slash.
2820         As a side effect, this removes a C99ism reported by Matthew Woehlke.
2821         (rpl_rename_dest_slash): On failure, use rename's errno rather
2822         than (in some cases) an incorrect or junk errno.
2823         Simplify code by removing need to compute length; this does
2824         cause it to make two passes instead of one over the file name,
2825         but it's worth it.
2826
2827         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
2828         change, since Autoconf's version may no longer be appropriate now
2829         that we are using CVS Autoconf's version.  Add support for Tandem.
2830
2831 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2832             Bruno Haible  <bruno@clisp.org>
2833
2834         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
2835         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
2836         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
2837         gl_AC_TYPE_LONG_LONG.
2838
2839         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
2840         instead of HAVE_LONG_LONG.
2841         * lib/printf-args.c (printf_fetchargs): Likewise.
2842         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
2843         * lib/vasnprintf.c (VASNPRINTF): Likewise.
2844         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
2845         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
2846         gl_AC_TYPE_LONG_LONG.
2847
2848 2006-10-11  Bruno Haible  <bruno@clisp.org>
2849
2850         * m4/longlong.m4: Add comments.
2851         * m4/ulonglong.m4: Likewise.
2852
2853 2006-10-10  Bruno Haible  <bruno@clisp.org>
2854
2855         Make it possible to #define stpcpy, strdup to aliases.
2856         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
2857         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
2858
2859 2006-10-10  Bruno Haible  <bruno@clisp.org>
2860
2861         Make it possible to #define gcd to an alias.
2862         * lib/gcd.c: Include config.h.
2863
2864 2006-10-10  Bruno Haible  <bruno@clisp.org>
2865
2866         Make it possible to #define c_isascii to an alias.
2867         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
2868         defined. Undefine the macros before defining them, to avoid gcc
2869         warnings.
2870         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
2871         define NO_C_CTYPE_MACROS early.
2872
2873 2006-10-10  Bruno Haible  <bruno@clisp.org>
2874
2875         Make it possible to #define set_program_name to an alias.
2876         * lib/progname.c: Don't undefine set_program_name; instead, undefine
2877         ENABLE_RELOCATABLE early.
2878
2879 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
2880
2881         Port to Tandem NSK OSS, which has 64-bit signed int but at most
2882         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
2883         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
2884         More generally, don't assume that 64-bit signed int is available
2885         if unsigned int is, and vice versa.
2886         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
2887         unsigned symbols, not on their signed counterparts.
2888         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
2889         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
2890         (UINT64_C, UINTMAX_C):
2891         Likewise.
2892         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
2893         unsigned counterparts.
2894         (Have_long_long, Unsigned): New macros.
2895         (Int): Renamed from INT.
2896         (strtoimax): Use the new macros.
2897         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
2898         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
2899         * modules/inttypes (inttypes.h): Substitute
2900         HAVE_UNSIGNED_LONG_LONG_INT.
2901         * modules/stdint (stdint.h): Likewise.
2902         (Files): Add m4/ulonglong.m4.
2903
2904 2006-10-10  Bruno Haible  <bruno@clisp.org>
2905
2906         Fix a gcc -Wshadow warning.
2907         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
2908         to 'bucket'.
2909         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
2910         gl_linked_indexof_from_to): Likewise.
2911         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
2912         Likewise.
2913         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
2914         Likewise.
2915         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
2916         Reported by Eric Blake.
2917
2918 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
2919
2920         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
2921         for NetBSD.  Problem reported by Bruno Haible.
2922
2923 2006-10-09  Jim Meyering  <jim@meyering.net>
2924
2925         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
2926         Patch from Bruno Haible.
2927
2928 2006-10-09  Jim Meyering  <jim@meyering.net>
2929
2930         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
2931         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
2932         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
2933
2934 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
2935
2936         Don't include <config.h> twice; this doesn't work in some cases,
2937         e.g., when config.h has "#define intmax_t long long int" and
2938         we include <config.h>, <inttypes.h>, <config.h> in that order.
2939         Problem reported by Matthew Woehlke in:
2940         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
2941         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
2942         * lib/fts-cycle.c: Don't include config.h.
2943         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
2944         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
2945         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
2946         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
2947         inttypes.h.
2948         * lib/xstrtoumax.c: Likewise.
2949         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
2950         __strtol and the like, so that this module is more like its siblings.
2951         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
2952         Remove; no longer needed now that we assume gnulib inttypes.h.
2953
2954 2006-10-08  Bruno Haible  <bruno@clisp.org>
2955
2956         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
2957         option.
2958
2959 2006-10-07  Jim Meyering  <jim@meyering.net>
2960
2961         * modules/inttypes (inttypes.h): Revert what seems to have been
2962         an inadvertent part of today's change: use "|", not "/" in the
2963         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
2964
2965 2006-10-07  Bruno Haible  <bruno@clisp.org>
2966
2967         * modules/sublist: New file.
2968
2969 2006-10-07  Bruno Haible  <bruno@clisp.org>
2970
2971         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
2972         * modules/argz (argz.h): Likewise.
2973         * modules/arpa_inet (arpa/inet.h): Likewise.
2974         * modules/byteswap (byteswap.h): Likewise.
2975         * modules/configmake (configmake.h): Likewise.
2976         * modules/fcntl (fcntl.h): Likewise.
2977         * modules/fnmatch (fnmatch.h): Likewise.
2978         * modules/getopt (getopt.h): Likewise.
2979         * modules/glob (glob.h): Likewise.
2980         * modules/inttypes (inttypes.h): Likewise.
2981         * modules/netinet_in (netinet/in.h): Likewise.
2982         * modules/poll (poll.h): Likewise.
2983         * modules/stdbool (stdbool.h): Likewise.
2984         * modules/stdint (stdint.h): Likewise.
2985         * modules/sys_select (sys/select.h): Likewise.
2986         * modules/sys_socket (sys/socket.h): Likewise.
2987         * modules/sys_stat (sys/stat.h): Likewise.
2988         * modules/sysexits (sysexits.h): Likewise.
2989         * modules/unistd (unistd.h): Likewise.
2990         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2991         Add a "DO NOT EDIT" comment to the generated file.
2992         (func_import): Likewise for gnulib-comp.m4.
2993
2994 2006-10-07  Bruno Haible  <bruno@clisp.org>
2995
2996         * lib/gl_sublist.h: New file.
2997         * lib/gl_sublist.c: New file.
2998
2999 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3000
3001         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
3002         name (relative to the original working directory) and the file
3003         name component (relative to the temporary working directory).  All
3004         callers changed.
3005         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
3006         * lib/mkdir-p.c (make_dir_parents): Likewise.
3007         * lib/mkdir-p.h (make_dir_parents): Likewise.
3008
3009 2006-10-06  Eric Blake  <ebb9@byu.net>
3010
3011         Define several macros for use by the clean-temp module.
3012         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
3013         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
3014         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
3015
3016         * lib/clean-temp.h (close_stream_temp): New declaration.
3017         * lib/clean-temp.c (includes): Pull in headers according to what
3018         other modules are in use.
3019         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
3020
3021 2006-10-06  Bruno Haible  <bruno@clisp.org>
3022
3023         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
3024         instead of fopen, fwriteerror.
3025
3026 2006-10-06  Bruno Haible  <bruno@clisp.org>
3027
3028         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
3029         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
3030         int.
3031         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
3032         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
3033         Return an error indicator.
3034         Suggested by Eric Blake.
3035
3036 2006-10-06  Bruno Haible  <bruno@clisp.org>
3037
3038         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
3039         Reported by Eric Blake.
3040
3041 2006-10-06  Bruno Haible  <bruno@clisp.org>
3042
3043         * modules/closeout (Description): Mention stderr too.
3044
3045 2006-10-06  Bruno Haible  <bruno@clisp.org>
3046         and Paul Eggert  <eggert@cs.ucla.edu>
3047
3048         * lib/closeout.c (close_stdout): Also close stderr.
3049         * lib/closeout.h: Update comment.
3050
3051 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3052
3053         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
3054         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
3055         * lib/dirchownmod.c: Include lchown.h.
3056         * lib/lchown.c: Don't include files that lchown.h now includes.
3057         Don't declare chown, since lchown.h now does that.
3058         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
3059         (lchown): Define to rpl_chown if lchown is declared but
3060         does not exist.  Declare using a prototype if lchown is not
3061         declared.  Add a copyright notice.
3062         * lib/mkstemp.h: Include <unistd.h>.
3063         * lib/openat.c: Include lchown.h.
3064
3065         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
3066         we now test for that separately.
3067         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
3068         rather than O_NOFOLLOW, when testing whether it's possible to
3069         avoid a race condition reliably.
3070         * lib/savewd.c (savewd_chdir): Likewise.
3071
3072         Remove macros that are no longer needed now that stdint.h is
3073         reliable.
3074         * lib/fsusage.c (UINTMAX_MAX): Remove.
3075         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
3076         * lib/utimecmp.c (SIZE_MAX): Remove.
3077
3078         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
3079
3080         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
3081         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
3082         O_NOATIME works.
3083
3084 2006-10-05  Bruno Haible  <bruno@clisp.org>
3085
3086         * lib/gl_list.h (gl_sortedlist_search_from_to,
3087         gl_sortedlist_indexof_from_to): New declarations.
3088         (gl_list_implementation): New fields sortedlist_search_from_to,
3089         sortedlist_indexof_from_to.
3090         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
3091         inline functions.
3092         * lib/gl_list.c (gl_sortedlist_search_from_to,
3093         gl_sortedlist_indexof_from_to): New functions.
3094         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
3095         function.
3096         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
3097         (gl_array_sortedlist_search_from_to): New function.
3098         (gl_array_list_implementation): Update.
3099         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
3100         function.
3101         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
3102         (gl_carray_sortedlist_search_from_to): New function.
3103         (gl_carray_list_implementation): Update.
3104         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
3105         gl_linked_sortedlist_indexof_from_to): New functions.
3106         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3107         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3108         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
3109         gl_tree_sortedlist_indexof_from_to): New functions.
3110         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3111         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3112         Update.
3113         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3114         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
3115         Update.
3116
3117 2006-10-05  Bruno Haible  <bruno@clisp.org>
3118
3119         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
3120         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
3121         (struct gl_list_implementation): Add fields search_from_to,
3122         indexof_from_to. Remove fields search, indexof.
3123         (gl_list_search): Use the search_from_to method.
3124         (gl_list_search_from, gl_list_search_from_to): New functions.
3125         (gl_list_indexof): Use the indexof_from_to method.
3126         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3127         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
3128         (gl_list_search_from, gl_list_search_from_to): New functions.
3129         (gl_list_indexof): Use the indexof_from_to method.
3130         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3131         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
3132         gl_array_indexof. Add start_index, end_index arguments.
3133         (gl_array_search_from_to): Renamed from gl_array_search. Add
3134         start_index, end_index arguments.
3135         (gl_array_remove, gl_array_list_implementation): Update.
3136         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
3137         gl_carray_indexof. Add start_index, end_index arguments.
3138         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
3139         start_index, end_index arguments.
3140         (gl_carray_remove, gl_carray_list_implementation): Update.
3141         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
3142         gl_linked_search. Add start_index, end_index arguments.
3143         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
3144         start_index, end_index arguments.
3145         (gl_linked_remove): Update.
3146         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3147         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3148         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
3149         field to 'size_t'.
3150         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
3151         gl_tree_search. Add start_index, end_index arguments.
3152         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3153         start_index, end_index arguments.
3154         (gl_tree_remove): Update.
3155         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3156         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3157         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
3158         function.
3159         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
3160         gl_tree_search. Add start_index, end_index arguments.
3161         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3162         start_index, end_index arguments.
3163         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3164         Update.
3165         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
3166
3167 2006-10-05  Bruno Haible  <bruno@clisp.org>
3168
3169         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
3170
3171         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
3172         fwriteerror_temp): New declarations.
3173         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
3174         (descriptors): New variable.
3175         (cleanup): First, close the descriptors.
3176         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
3177         fclose_temp, fwriteerror_temp): New functions.
3178
3179 2006-10-04  Jim Meyering  <jim@meyering.net>
3180
3181         * lib/fts.c (fts_open): Tiny comment change.
3182
3183 2006-10-04  Bruno Haible  <bruno@clisp.org>
3184
3185         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
3186         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
3187         gl_LOCK_BODY.
3188         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
3189         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
3190         gl_LOCK_EARLY_BODY.
3191         (gl_LOCK): Require gl_LOCK_BODY.
3192
3193 2006-10-04  Bruno Haible  <bruno@clisp.org>
3194
3195         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
3196         (gl_oset_search_atleast): New declaration.
3197         (struct gl_oset_implementation): Add field 'search_atleast'.
3198         (gl_oset_search_atleast): New inline function.
3199         * lib/gl_oset.c (gl_oset_search_atleast): New function.
3200         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
3201         (gl_array_oset_implementation): Update.
3202         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
3203         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
3204         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
3205
3206 2006-10-04  Bruno Haible  <bruno@clisp.org>
3207
3208         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
3209
3210 2006-10-03  Bruno Haible  <bruno@clisp.org>
3211
3212         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
3213         from gl_avltreehash_list_implementation.
3214
3215 2006-10-03  Bruno Haible  <bruno@clisp.org>
3216
3217         * lib/gl_oset.c (gl_oset_add): Fix return type.
3218
3219 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
3220
3221         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
3222
3223 2006-10-02  Eric Blake  <ebb9@byu.net>
3224
3225         * modules/strnlen (Depends-on): Add extensions.
3226
3227 2006-10-02  Eric Blake  <ebb9@byu.net>
3228
3229         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
3230         definition in 2.60+.
3231
3232 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
3233
3234         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
3235         checks.
3236
3237 2006-10-02  Bruno Haible  <bruno@clisp.org>
3238
3239         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
3240         to the AUTOMAKE_OPTIONS.
3241         Reported by Jim Meyering.
3242
3243 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
3244
3245         Work around bug in Solaris 10 /proc file system:
3246         /proc/self/fd/NNN/.. isn't the parent directory of
3247         the directory whose file descriptor is NNN.  This needs to
3248         be worked around at run time, not compile time, since a
3249         program might be built on Solaris 8, where things work, and
3250         run on Solaris 10.
3251         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
3252         to use the following interface instead:
3253         (OPENAT_BUFFER_SIZE): New macro.
3254         (openat_proc_name): New function.
3255         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
3256         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
3257         Likewise.
3258         * lib/openat-proc.c: New file.
3259         * modules/openat (Files): Add lib/openat-proc.c.
3260         (Depends-on): Add same-inode, stdbool.
3261         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
3262
3263 2006-09-29  Bruno Haible  <bruno@clisp.org>
3264
3265         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
3266         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
3267         argument. Set stdout_closed before testing for ferror, not after.
3268         (fwriteerror, fwriteerror_no_ebadf): New functions.
3269
3270 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3271
3272         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
3273
3274 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
3275
3276         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
3277         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
3278
3279 2006-09-28  Jim Meyering  <jim@meyering.net>
3280
3281         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
3282         Include <unistd.h>.
3283
3284 2006-09-28  Bruno Haible  <bruno@clisp.org>
3285
3286         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
3287         * modules/linkedhash-list (Depends-on): Likewise.
3288         * modules/rbtreehash-list (Depends-on): Likewise.
3289
3290 2006-09-28  Bruno Haible  <bruno@clisp.org>
3291
3292         * lib/strndup.h: Simplify the redefinition of strndup.
3293         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
3294         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
3295
3296 2006-09-28  Bruno Haible  <bruno@clisp.org>
3297
3298         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
3299         * lib/gl_linkedhash_list.c: Likewise.
3300         * lib/gl_rbtreehash_list.c: Likewise.
3301
3302 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
3303
3304         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
3305         getaddrinfo.
3306
3307         * lib/__fpending.h: Don't include <stdio_ext.h> unless
3308         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
3309         it causes <stdio_ext.h> to cause a compile-time error.
3310         Problem reported by Nelson H. F. Beebe.
3311         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
3312         of HAVE_DECL___PENDING.
3313
3314         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
3315         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
3316         declaration.
3317
3318 2006-09-27  Jim Meyering  <jim@meyering.net>
3319
3320         This file could end up with a definition for a function
3321         named __strndup, rather than rpl_strndup on a system with
3322         incomplete weak_alias support.
3323         * lib/strndup.c (strndup): Rename from __strndup.
3324         Remove #defines that used to map __strndup to strndup.
3325         Don't use K&R prototypes.
3326         Remove LIBC-related code, since this file is not sync'd with glibc.
3327         * lib/strndup.h: Revamp, accordingly.
3328         * m4/strndup.m4: Modernize.
3329
3330 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
3331
3332         * modules/savewd (Depends-on): Add 'raise'.
3333         * lib/savewd.c: Include <signal.h>, for 'raise'.
3334
3335 2006-09-26  Jim Meyering  <jim@meyering.net>
3336
3337         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
3338         when we detect Darwin 8.7.0's acl_get_file bug.
3339         Rearrange to perform the new (below) run-test while $LIBS
3340         contains any acl-related library.  Set USE_ACL at the end.
3341         (gl_ACL_GET_FILE): New function.
3342
3343 2006-09-26  Eric Blake  <ebb9@byu.net>
3344
3345         * lib/verror.c: Include <config.h> unconditionally.
3346
3347 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
3348
3349         * modules/clock-time (Maintainer): Add self.
3350         * modules/getlogin_r (Depends-on): Add extensions.
3351
3352 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3353
3354         * modules/clock-time: New module.
3355         * modules/nanosleep (Depends-on): Add clock-time.
3356         * modules/gethrxtime (Depends-on): Likewise.
3357         * modules/gettime (Depends-on): Likewise.
3358         * modules/settime (Depends-on): Likewise.
3359
3360         * modules/fts-lgpl: Depend on openat.
3361         * modules/mkancesdirs: Depend on savewd.
3362         * modules/mkdir-p: Likewise.
3363
3364 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3365
3366         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
3367
3368         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
3369         `gl_have_arbitrary_file_name_length_limit' to
3370         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
3371         actually works between configure runs.
3372
3373 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3374             Bruno Haible  <bruno@clisp.org>
3375
3376         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
3377
3378 2006-09-25  Jim Meyering  <jim@meyering.net>
3379
3380         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
3381         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
3382
3383 2006-09-25  Eric Blake  <ebb9@byu.net>
3384
3385         * gnulib-tool (func_import, func_create_testdir): Fix typos in
3386         exec's in 2006-09-18 patch when shuffling fds.
3387
3388 2006-09-25  Bruno Haible  <bruno@clisp.org>
3389
3390         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
3391         Reported by Jim Meyering.
3392
3393 2006-09-24  Jim Meyering  <jim@meyering.net>
3394
3395         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
3396         compare a pointer against a literal "0".  That caused failures with
3397         at least HP-UX's hpcc.
3398
3399 2006-09-22  Simon Josefsson  <jas@extundo.com>
3400
3401         * modules/gc-sha1:
3402         * modules/gc-md4:
3403         * modules/gc-hmac-sha1:
3404         * modules/gc-hmac-md5:
3405         * modules/gc-des:
3406         * modules/gc-arcfour: Distribute more files.
3407
3408 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3409
3410         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
3411         (gl_linked_iterator_from_to): Initialize struct completely.
3412         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
3413         (gl_tree_iterator_from_to): Likewise
3414         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
3415         * lib/gl_array_list.c [lint] (gl_array_iterator)
3416         (gl_array_iterator_from_to): Likewise.
3417         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
3418         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
3419         (gl_carray_iterator_from_to): Likewise.
3420
3421         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
3422         * lib/md4.c (md4_process_block): Remove unused variable.
3423         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
3424         parentheses for clarity.
3425
3426 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3427
3428         * modules/bison-i18n (Depends-on): Add gettext.
3429
3430 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3431
3432         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
3433         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
3434         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
3435         also add missing comma that caused broken test.
3436         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
3437         stdlib.h, for `abort'.
3438         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
3439         variables.
3440         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
3441         include unistd.h if present, for `rmdir'.
3442         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
3443         variables.
3444         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
3445         in the process include standard headers for prototypes.
3446         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
3447         gets declared on GNU/Linux.
3448         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
3449         unistd.h, for `rmdir'.
3450         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
3451
3452         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
3453         always true.
3454         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
3455
3456         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
3457
3458 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3459
3460         * gnulib-tool (func_version): Create output all at once.  This
3461         may help avoid triggering unnecessary SIGPIPEs, and at any
3462         rate it doesn't hurt.
3463
3464 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3465             Bruno Haible  <bruno@clisp.org>
3466
3467         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
3468         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3469         * m4/signed.m4 (bh_C_SIGNED): Likewise.
3470
3471         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
3472         (gl_FUNC_VASPRINTF): Invoke it.
3473
3474 2006-09-22  Bruno Haible  <bruno@clisp.org>
3475
3476         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
3477         getloadavg.c as first argument.
3478
3479 2006-09-22  Bruno Haible  <bruno@clisp.org>
3480
3481         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
3482         at the beginning of the gl_INIT macro.
3483         * modules/getloadavg (configure.ac): Pass $gl_source_base to
3484         gl_GETLOADAVG.
3485
3486 2006-09-22  Bruno Haible  <bruno@clisp.org>
3487
3488         * gnulib-tool (func_create_megatestdir): Don't include the config-h
3489         module.
3490         Suggested by Ralf Wildenhues.
3491
3492 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
3493
3494         Import this patch from libc:
3495
3496         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
3497
3498         * lib/regex_internal.c (re_string_reconstruct): Handle
3499         offset < pstr->valid_raw_len && pstr->offsets_needed case.
3500         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
3501         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
3502         re_string_context_at.
3503
3504         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
3505         now requires it.
3506         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
3507         gl_REGEX now does it for us.
3508         (gl_REGEX): Add test taken from
3509         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
3510
3511         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
3512         Check that large offsets work.  Modernize Autoconf usages.
3513         Prefer "yes" to mean a good thing rather than a bad.
3514         Don't put "#define mkstemp" in config.h, as this might interfere
3515         with standard system headers that "#define mkstemp mkstemp64".
3516
3517         * modules/mkstemp (Depends-on): Add extensions, so that
3518         mkstemp is visible on some platforms.
3519         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
3520         (Include): Change to "mkstemp.h" from <stdlib.h>.
3521         (Files): Add mkstemp.h.
3522
3523         * lib/mkstemp.h: New file, since some standard headers
3524         #define mkstemp.
3525         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
3526         Include "mkstemp.h".
3527         Make the _LIBC code resemble glibc original more,
3528         e.g., use K&R style.
3529         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
3530         (mkstemp): Remove, since mkstemp.h does this for us.
3531         * lib/stdlib--.h: Include mkstemp.h.
3532
3533         Import this patch from libc:
3534
3535         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3536
3537         * lib/tempname.c (__gen_tempname): Change attempts_min
3538         into a macro.  Use preprocessor to decide how to initialize
3539         attempts [Coverity CID 67].
3540
3541 2006-09-20  Bruno Haible  <bruno@clisp.org>
3542
3543         * lib/mkdtemp.c: Import from libc.
3544         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3545                 * sysdeps/posix/tempname.c (__gen_tempname): Change
3546                 attempts_min into a macro.  Use preprocessor to decide how to
3547                 initialize attempts [Coverity CID 67].
3548         2001-11-27  Paul Eggert  <eggert@twinsun.com>
3549                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
3550                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
3551
3552 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3553
3554         * gnulib-tool (func_exit): New function, to allow to pass the
3555         exit status portably through the trap.  Use everywhere.
3556         (--help, --version): Signal a write error.
3557         (trap): catch SIGPIPE, for write errors.
3558         Exit at the end of the trap, with the correct exit status.
3559
3560 2006-09-19  Karl Berry  <karl@gnu.org>
3561
3562         * doc/gnulib.texi: note about the license texinfo files.
3563
3564 2006-09-19  Eric Blake  <ebb9@byu.net>
3565
3566         * gnulib-tool: Avoid space-tab.
3567
3568 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3569
3570         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
3571         that prevented coreutils 6.1 from building.  Problem reported
3572         by Petter Reinholdtsen.
3573
3574 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3575
3576         * gnulib-tool (avoidlist): Fix typo that broke options like
3577         --avoid=lock that are used by coreutils bootstrap.
3578
3579 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
3580
3581         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
3582         more systematically.
3583
3584 2006-09-18  Jim Meyering  <jim@meyering.net>
3585
3586         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
3587
3588 2006-09-18  Bruno Haible  <bruno@clisp.org>
3589
3590         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
3591
3592 2006-09-18  Bruno Haible  <bruno@clisp.org>
3593
3594         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
3595         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
3596         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
3597         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
3598         * m4/gettext.m4: Require autoconf >= 2.52.
3599         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
3600         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
3601         of gl_cv_header_inttypes_h.
3602
3603 2006-09-18  Bruno Haible  <bruno@clisp.org>
3604
3605         * lib/javaversion.c: Include configmake.h.
3606
3607 2006-09-18  Bruno Haible  <bruno@clisp.org>
3608
3609         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
3610         avoid that the while loops be executed in a subshell.
3611
3612 2006-09-18  Bruno Haible  <bruno@clisp.org>
3613
3614         * MODULES.html.sh (func_module): Break long lines.
3615         Suggested by Bruce Korb <bkorb@gnu.org>.
3616
3617 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3618
3619         Speed up by a factor of 1.12.
3620         * gnulib-tool (nl): New variable.
3621         (func_import): Rewrite include directive extraction to only read each
3622         directive once.
3623
3624 2006-09-17  Bruno Haible  <bruno@clisp.org>
3625
3626         * modules/javaversion (Makefile.am): Remove DEFS setting.
3627         (Depends-on): Add configmake, for PKGDATADIR definition.
3628
3629 2006-09-17  Bruno Haible  <bruno@clisp.org>
3630
3631         * gnulib-tool (func_create_testdir): Rewrite all files at once.
3632
3633 2006-09-17  Bruno Haible  <bruno@clisp.org>
3634
3635         * gnulib-tool (func_append): New function, stolen from libtool.m4.
3636         (func_modules_transitive_closure, func_modules_add_dummy,
3637         func_modules_to_filelist, func_import, func_create_testdir,
3638         func_create_megatestdir, ...): Use it wherever possible.
3639         Suggested by Ralf Wildenhues.
3640
3641 2006-09-16  Karl Berry  <karl@gnu.org>
3642
3643         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
3644         to avoid sectioning errors.
3645         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
3646         [ifinfo]: blank line after @center-ed titles.
3647         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
3648         Spell FSF address consistently with others.
3649         (These changes approved by rms.)
3650
3651 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3652
3653         Speed up by a factor of 1.61.
3654         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
3655         already checked module names again.
3656
3657 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3658
3659         Speed up by a factor of 1.13.
3660         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
3661         for new_files, and the input to func_add_or_update.
3662
3663 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3664
3665         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
3666         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
3667
3668 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3669
3670         * modules/mkancesdirs (Depends-on): Add fcntl.
3671         * modules/savewd: New file.
3672         * MODULES.html.sh (File system functions): Add savewd.
3673
3674         * modules/configmake (Makefile.am): Add support for the
3675         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
3676
3677 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3678
3679         * m4/savewd.m4: New file.
3680
3681 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3682
3683         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
3684         (dirchownmod): New arg FD.  All callers changed.
3685         Use FD rather than opening the directory ourself, as opening is
3686         now the caller's responsibility.
3687         * lib/dirchownmod.h: Likewise.
3688         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
3689         hosts that require <sys/types.h> before <sys/stat.h>.  Include
3690         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
3691         (test_dir): Remove.
3692         (mkancesdirs): Return length of prefix of FILE that has already
3693         been made, or -2 if there is a child doing the work.  Redo
3694         algorithm so that it is O(N) rather than O(N**2).  Optimize away
3695         ".", and treat ".." specially since it might stray back into
3696         already-created areas.  Use a subprocess if necessary.  New arg
3697         WD; all users changed.  MAKE_DIR function should now return 1
3698         if it creates a directory that is not readable.  Return -2 if
3699         a child process is spun off.
3700         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
3701         Adjust signature to match code.
3702         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
3703         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
3704         all users changed.
3705         * lib/savewd.c, lib/savewd.h: New files.
3706
3707 2006-09-15  Jim Meyering  <jim@meyering.net>
3708
3709         * modules/rename-dest-slash: New module.
3710         * MODULES.html.sh (posix_compat): Add it here.
3711
3712         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
3713
3714 2006-09-15  Jim Meyering  <jim@meyering.net>
3715
3716         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
3717         file.
3718
3719         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
3720
3721 2006-09-15  Jim Meyering  <jim@meyering.net>
3722
3723         * lib/rename-dest-slash.c (has_trailing_slash): Use
3724         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
3725         (rpl_rename_dest_slash): Perform the cheaper trailing slash
3726         test before testing whether SRC is a directory.
3727         Suggestions from Bruno Haible.
3728
3729         Avoid a warning about an unused variable.
3730         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
3731         into the #ifdef block where it's used.
3732
3733         * lib/rename-dest-slash.c: New file.
3734
3735 2006-09-14  Bruno Haible  <bruno@clisp.org>
3736
3737         * lib/allocsa.c: Include <config.h> unconditionally.
3738         * lib/asnprintf.c: Likewise.
3739         * lib/asprintf.c: Likewise.
3740         * lib/c-strcasecmp.c: Likewise.
3741         * lib/c-strcasestr.c: Likewise.
3742         * lib/c-strncasecmp.c: Likewise.
3743         * lib/c-strstr.c: Likewise.
3744         * lib/classpath.c: Likewise.
3745         * lib/clean-temp.c: Likewise.
3746         * lib/concatpath.c: Likewise.
3747         * lib/copy-file.c: Likewise.
3748         * lib/csharpcomp.c: Likewise.
3749         * lib/csharpexec.c: Likewise.
3750         * lib/execute.c: Likewise.
3751         * lib/fatal-signal.c: Likewise.
3752         * lib/findprog.c: Likewise.
3753         * lib/fwriteerror.c: Likewise.
3754         * lib/gl_array_list.c: Likewise.
3755         * lib/gl_array_oset.c: Likewise.
3756         * lib/gl_avltree_list.c: Likewise.
3757         * lib/gl_avltree_oset.c: Likewise.
3758         * lib/gl_avltreehash_list.c: Likewise.
3759         * lib/gl_carray_list.c: Likewise.
3760         * lib/gl_linked_list.c: Likewise.
3761         * lib/gl_linkedhash_list.c: Likewise.
3762         * lib/gl_list.c: Likewise.
3763         * lib/gl_oset.c: Likewise.
3764         * lib/gl_rbtree_list.c: Likewise.
3765         * lib/gl_rbtree_oset.c: Likewise.
3766         * lib/gl_rbtreehash_list.c: Likewise.
3767         * lib/imaxabs.c: Likewise.
3768         * lib/imaxdiv.c: Likewise.
3769         * lib/javacomp.c: Likewise.
3770         * lib/javaexec.c: Likewise.
3771         * lib/javaversion.c: Likewise.
3772         * lib/linebreak.c: Likewise.
3773         * lib/localcharset.c: Likewise.
3774         * lib/lock.c: Likewise.
3775         * lib/mbchar.c: Likewise.
3776         * lib/mbswidth.c: Likewise.
3777         * lib/mkdtemp.c: Likewise.
3778         * lib/pipe.c: Likewise.
3779         * lib/printf-args.c: Likewise.
3780         * lib/printf-parse.c: Likewise.
3781         * lib/progname.c: Likewise.
3782         * lib/progreloc.c: Likewise.
3783         * lib/readlink.c: Likewise.
3784         * lib/sh-quote.c: Likewise.
3785         * lib/stpcpy.c: Likewise.
3786         * lib/stpncpy.c: Likewise.
3787         * lib/strcasecmp.c: Likewise.
3788         * lib/strcasestr.c: Likewise.
3789         * lib/strcspn.c: Likewise.
3790         * lib/striconv.c: Likewise.
3791         * lib/strncasecmp.c: Likewise.
3792         * lib/strnlen1.c: Likewise.
3793         * lib/strstr.c: Likewise.
3794         * lib/strtok_r.c: Likewise.
3795         * lib/tls.c: Likewise.
3796         * lib/tmpdir.c: Likewise.
3797         * lib/unicodeio.c: Likewise.
3798         * lib/unsetenv.c: Likewise.
3799         * lib/vasnprintf.c: Likewise.
3800         * lib/vasprintf.c: Likewise.
3801         * lib/wait-process.c: Likewise.
3802         * lib/xallocsa.c: Likewise.
3803         * lib/xsetenv.c: Likewise.
3804         * lib/xstriconv.c: Likewise.
3805
3806 2006-09-13  Simon Josefsson  <jas@extundo.com>
3807
3808         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
3809         that internally, suggested by Ralf Wildenhues
3810         <Ralf.Wildenhues@gmx.de>.
3811
3812 2006-09-13  Simon Josefsson  <jas@extundo.com>
3813
3814         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
3815         @LIBOBJS@.
3816         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3817
3818 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
3819
3820         * lib/_fpending.c: Include <config.h> unconditionally, since we no
3821         longer worry about uses that don't define HAVE_CONFIG_H.
3822         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
3823         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
3824         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
3825         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
3826         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
3827         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
3828         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
3829         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
3830         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
3831         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
3832         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
3833         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
3834         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
3835         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
3836         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
3837         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
3838         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
3839         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
3840         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
3841         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
3842         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
3843         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
3844         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
3845         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
3846         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
3847         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
3848         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
3849         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
3850         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
3851         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
3852         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
3853         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
3854         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
3855         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
3856         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
3857         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
3858         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
3859         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
3860         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
3861         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
3862         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
3863         Likewise.
3864
3865 2006-09-13  Eric Blake  <ebb9@byu.net>
3866
3867         * lib/getopt.c: Fix typo in last commit.
3868
3869 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
3870
3871         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
3872         dgettext.
3873
3874 2006-09-12  Jim Meyering  <jim@meyering.net>
3875
3876         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
3877         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
3878         Reported by Nelson H. F. Beebe.
3879
3880 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
3881
3882         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
3883         program_invocation_name and program_invocation_short_name are
3884         initialized.
3885         * lib/argp-namefrob.h: Move declarations of program_invocation_name
3886         and program_invocation_short_name to argp.h, so they are visible
3887         to user programs.
3888         * lib/argp.h: Likewise
3889
3890 2006-09-10  Bruno Haible  <bruno@clisp.org>
3891
3892         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
3893         m4/inttypes_h.m4, m4/uintmax_t.m4.
3894
3895 2006-09-10  Bruno Haible  <bruno@clisp.org>
3896
3897         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
3898         gl_AC_TYPE_UINTMAX_T.
3899
3900 2006-09-10  Bruno Haible  <bruno@clisp.org>
3901
3902         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
3903
3904 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
3905
3906         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
3907         convention.  Text proposed by Bruno Haible.
3908         (struct argp_option): Document the use of N_() wrappers.
3909
3910         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
3911         '\v', and translate the two parts separately, instead of feeding
3912         the whole string to gettext.  This allows to exclude
3913         '\v' from the strings visible to the translator by writing doc
3914         strings as N_("..") "\v" N_("..").
3915
3916 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
3917
3918         * config/srclist.txt: Undo latest change; the bug was fixed.
3919
3920 2006-09-09  Bruno Haible  <bruno@clisp.org>
3921
3922         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
3923         assignments if building a library without libtool.
3924         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
3925         in func_emit_lib_Makefile_am.
3926         (func_import): When building a static library libfoo.a, arrange to
3927         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
3928         (func_create_testdir): Likewise.
3929         * modules/gc (configure.ac, Makefile.am): If building statically,
3930         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
3931         * modules/iconvme (configure.ac, Makefile.am): Likewise.
3932         * modules/striconv (configure.ac, Makefile.am): Likewise.
3933         Based on a suggestion by Ralf Wildenhues.
3934
3935 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3936
3937         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
3938         Check for unistd.h too, since Autoconf doesn't assume POSIX.
3939         Also:
3940
3941         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3942         Add year_2050_test to catch glibc bug 2821
3943         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3944
3945         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3946         Prefer #ifdef to #if.
3947
3948         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
3949         Return from 'main' instead of calling 'exit'.
3950
3951 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3952
3953         * lib/mktime.c (guess_time_tm): Fix bug where mktime
3954         returned the maximum time_t value rather than (time_t) -1.
3955         Problem originally reported by William Bardwell
3956         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3957
3958         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3959         Moved to here ...
3960         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3961         ... from here.
3962
3963 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3964
3965         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
3966         2821 is fixed.
3967
3968 2006-09-08  Jim Meyering  <jim@meyering.net>
3969
3970         Don't make generated files read-only.  That would bother too many
3971         people.  However, do retain the ability to work when targets are
3972         read-only: remove the destination and temporary files before writing
3973         them (when generated via sed or echo), or by using the -f option for
3974         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
3975         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3976         * modules/byteswap, modules/configmake, modules/fcntl:
3977         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3978         * modules/localcharset, modules/netinet_in, modules/poll:
3979         * modules/stdbool, modules/stdint, modules/sys_select:
3980         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3981
3982 2006-09-08  Jim Meyering  <jim@meyering.net>
3983
3984         Avoid new build failure on FreeBSD 6.0.
3985         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
3986         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
3987         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
3988
3989 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3990
3991         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
3992
3993 2006-09-07  Jim Meyering  <jim@meyering.net>
3994
3995         Fix global typo in last change: use chmod u-w, not chmod u-x.
3996         Spotted by Paul Eggert and Bruce Korb.
3997         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3998         * modules/byteswap, modules/configmake, modules/fcntl:
3999         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4000         * modules/localcharset, modules/netinet_in, modules/poll:
4001         * modules/stdbool, modules/stdint, modules/sys_select:
4002         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4003
4004 2006-09-06  Jim Meyering  <jim@meyering.net>
4005
4006         Make generated files be read-only.
4007         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
4008         Ensure that each generated file is now read-only.
4009         * modules/argz: Likewise.
4010         * modules/arpa_inet: Likewise.
4011         * modules/byteswap: Likewise.
4012         * modules/configmake: Likewise.
4013         * modules/fcntl: Likewise.
4014         * modules/fnmatch: Likewise.
4015         * modules/getopt: Likewise.
4016         * modules/glob: Likewise.
4017         * modules/inttypes: Likewise.
4018         * modules/netinet_in: Likewise.
4019         * modules/poll: Likewise.
4020         * modules/stdbool: Likewise.
4021         * modules/stdint: Likewise.
4022         * modules/sys_select: Likewise.
4023         * modules/sys_socket: Likewise.
4024         * modules/sys_stat: Likewise.
4025         * modules/sysexits: Likewise.
4026         * modules/localcharset: Same as above, but continue using temporary
4027         file named "t-$@" (why different?) rather than the "$@-t" used
4028         everywhere else.
4029
4030         * modules/sysexits (Makefile.am): Replace literal occurrences
4031         of "sysexit.h" more readable, and more consistent, "$@".
4032
4033 2006-09-06  Bruno Haible  <bruno@clisp.org>
4034
4035         * modules/striconv: New file.
4036         * modules/xstriconv: New file.
4037         * MODULES.html.sh (Internationalization functions): Add striconv,
4038         xstriconv.
4039
4040 2006-09-06  Bruno Haible  <bruno@clisp.org>
4041
4042         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
4043         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
4044         not using libtool correctly.
4045
4046 2006-09-06  Bruno Haible  <bruno@clisp.org>
4047
4048         * lib/striconv.h: New file.
4049         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
4050         iconvstring.c.
4051         * lib/xstriconv.h: New file.
4052         * lib/xstriconv.c: New file.
4053
4054 2006-09-06  Bruno Haible  <bruno@clisp.org>
4055
4056         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4057         lib_..._LDFLAGS.
4058
4059 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4060
4061         * lib/argz_.h: Sync from Libtool.
4062
4063         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
4064                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4065
4066         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
4067
4068 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4069
4070         * modules/trim: New file.
4071
4072 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4073
4074         * lib/trim.h: New file.
4075         * lib/trim.c: New file.
4076
4077 2006-09-05  Bruno Haible  <bruno@clisp.org>
4078
4079         * MODULES.html.sh (String handling): Add trim.
4080
4081 2006-09-04  Karl Berry  <karl@gnu.org>
4082
4083         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
4084         until next release.
4085
4086 2006-09-03  Bruno Haible  <bruno@clisp.org>
4087
4088         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
4089         correctly.
4090
4091 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4092
4093         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
4094         not gl_GETLOADAVG.  Omit unneeded semicolons.
4095         Problems reported by Ralf Wildenhues in
4096         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4097         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
4098         at the end, which is the usual gnulib style.
4099
4100         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
4101         of doing all the work ourselves.
4102         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
4103         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
4104
4105 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4106
4107         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
4108         Problem reported by Ralf Wildenhues in
4109         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4110
4111         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
4112         HAVE_STRUCT_STATFS_F_FSTYPENAME.
4113
4114 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4115
4116         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
4117         yesterday's patch by changing test -n to test -z.
4118
4119 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4120
4121         * modules/getloadavg (Files): Add m4/getloadavg.m4.
4122         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
4123         the former is now obsolescent.
4124
4125         * modules/chdir-long (Depends-on): Add fcntl.
4126
4127 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4128
4129         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
4130         obsolescent, and programs should use gnulib instead.
4131         * m4/getloadavg.m4: New file, with contents taken from Autoconf
4132         but with prefixes changed.
4133
4134 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4135
4136         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
4137         or stdbool.h, because they might not exist while configuring.
4138
4139         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
4140         Don't include unistd.h or limits.h; not needed, since chdir-long.h
4141         does that for us.
4142         (O_DIRECTORY): Remove.
4143
4144 2006-08-31  Eric Blake  <ebb9@byu.net>
4145
4146         * gnulib-tool: Don't let emacs change spaces to TAB.
4147
4148 2006-08-31  Bruno Haible  <bruno@clisp.org>
4149
4150         * gnulib-tool: When calling func_import more than once, do it in a
4151         subshell.
4152         Reported by Eric Blake <ebb9@byu.net>.
4153
4154 2006-08-31  Bruno Haible  <bruno@clisp.org>
4155
4156         * gnulib-tool (nl): Remove variable.
4157         (sed_transform_lib_file): Use more robust test for config-h module.
4158         (func_import): Fix typo in 2006-08-25 patch.
4159
4160 2006-08-31  Bruno Haible  <bruno@clisp.org>
4161
4162         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
4163         specified, augment Makefile.am variables instead of assigning them.
4164
4165 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4166
4167         Work around a bug in both the Linux and SunOS 64-bit kernels:
4168         nanosleep mishandles sleeps for longer than 2**31 seconds.
4169         Problem reported by Frank v Waveren in
4170         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4171         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
4172         Check for nanosleep bug.
4173         (LIB_NANOSLEEP): Append clock_gettime library if needed.
4174
4175 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4176
4177         Work around a bug in both the Linux and SunOS 64-bit kernels:
4178         nanosleep mishandles sleeps for longer than 2**31 seconds.
4179         Problem reported by Frank v Waveren in
4180         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4181         * lib/nanosleep.c (BILLION): New constant.
4182         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
4183         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
4184         implementation.
4185
4186 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4187
4188         * modules/nanosleep (Depends-on): Add gettime.
4189
4190 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4191         and Simon Josefsson  <jas@extundo.com>
4192         and Oskar Liljeblad  <oskar@osk.mine.nu>
4193
4194         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
4195         * gnulib-tool (func_import): New license type 'unmodifiable license
4196         text'.
4197         * modules/fdl: Use it.  Longer description.
4198         * module/gpl, module/lgpl: New files.
4199
4200 2006-08-30  Jim Meyering  <jim@meyering.net>
4201
4202         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
4203         shadowing the parameter.
4204
4205 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4206
4207         Sync from Libtool:
4208
4209         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4210
4211         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
4212         sharing with gnulib.  Report by Eric Blake.
4213
4214 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4215
4216         * modules/isapipe: New file.
4217         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
4218
4219 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4220
4221         * modules/configmake (Makefile.am): Add a comment, and omit
4222         the CONFIGMAKE_ prefix from generated macro names.  Suggested
4223         by Bruno Haible.
4224
4225 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4226
4227         * m4/isapipe.m4: New file.
4228
4229 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4230
4231         * lib/isapipe.c, lib/isapipe.h: New files.
4232
4233 2006-08-29  Jim Meyering  <jim@meyering.net>
4234
4235         * modules/configmake (Makefile.am): Make configmake.h depend on
4236         Makefile.  Otherwise, a stale configmake.h could hang around.
4237
4238 2006-08-29  Eric Blake  <ebb9@byu.net>
4239
4240         * lib/error.c (error_at_line, print_errno_message): Match libc, after
4241         resolution of upstream bug 3044.
4242
4243 2006-08-29  Bruno Haible  <bruno@clisp.org>
4244
4245         * modules/localcharset (Depends-on): Add configmake.
4246         (Makefile.am): Remove setting of LIBDIR through DEFS.
4247
4248 2006-08-29  Bruno Haible  <bruno@clisp.org>
4249
4250         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
4251         defined.
4252
4253 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4254
4255         * modules/fcntl: New file.
4256         * modules/chdir-safer (Depends-on): Add fcntl.
4257         * modules/fts: Likewise.
4258         * modules/mkdir-p: Likewise.
4259
4260         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
4261         This undoes the most recent change, since we're now addressing the
4262         problem in a different way.
4263
4264         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
4265         into output, since the output might be called Makefile.am even
4266         if $makefile_name is something different.
4267         (func_import): Use $makefile_am rather than
4268         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
4269         empty.
4270
4271         * modules/inttypes (Files): Add m4/inttypes-h.m4.
4272
4273 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4274
4275         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
4276         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
4277         recent change to stdint.m4, since we're now addressing the problem in a
4278         different way.
4279
4280 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4281
4282         * m4/fcntl_h.m4: New file.
4283
4284 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4285
4286         * lib/fcntl_.h: New file.
4287         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
4288         the fcntl module.
4289         * lib/dirchownmod.c: Likewise.
4290         * lib/fts.c: Likewise.
4291
4292         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
4293         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
4294         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
4295         just before including <inttypes.h>, to avoid circular inclusion.
4296
4297 2006-08-28  Jim Meyering  <jim@meyering.net>
4298
4299         * doc/visibility.texi: Actually read and correct the grammar of the
4300         sentence affected by yesterday's change.
4301
4302 2006-08-28  Eric Blake  <ebb9@byu.net>
4303
4304         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
4305         needs wrapper.
4306
4307 2006-08-28  Eric Blake  <ebb9@byu.net>
4308
4309         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
4310
4311 2006-08-28  Eric Blake  <ebb9@byu.net>
4312
4313         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
4314
4315 2006-08-28  Bruno Haible  <bruno@clisp.org>
4316
4317         * modules/c-strstr: New file, from GNU gettext.
4318         * MODULES.html.sh (String handling): Add c-strstr.
4319
4320 2006-08-28  Bruno Haible  <bruno@clisp.org>
4321
4322         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
4323         macros.
4324         Reported by Eric Blake.
4325
4326 2006-08-28  Bruno Haible  <bruno@clisp.org>
4327
4328         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
4329         (VASNPRINTF): Return a string of length > INT_MAX without failing.
4330         * lib/vasprintf.c: Include errno.h, limits.h.
4331         (EOVERFLOW): New fallback definition.
4332         (vasprintf): Test here whether the string length is > INT_MAX.
4333         * lib/vsnprintf.c: Include errno.h, limits.h.
4334         (EOVERFLOW): New fallback definition.
4335         (vsnprintf): Fix bug when generated string was too long for the buffer.
4336         Test here whether the string length is > INT_MAX.
4337
4338 2006-08-28  Bruno Haible  <bruno@clisp.org>
4339
4340         * lib/inttypes_.h (SCNX*): Remove definitions.
4341         Reported by Eric Blake.
4342
4343 2006-08-28  Bruno Haible  <bruno@clisp.org>
4344
4345         * lib/c-strstr.h: New file, from GNU gettext.
4346         * lib/c-strstr.c: New file, from GNU gettext.
4347
4348 2006-08-28  Bruno Haible  <bruno@clisp.org>
4349
4350         * gnulib-tool: Reorder some statements.
4351
4352 2006-08-28  Bruno Haible  <bruno@clisp.org>
4353
4354         * gnulib-tool: New option --makefile-name.
4355         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
4356         $makefile_name.
4357         (func_import): Write $makefile_name to the cache file, and read it from
4358         there unless explicitly specified. Use $makefile_name as file name
4359         instead of Makefile.am. Adjust the recommendations accordingly.
4360
4361 2006-08-28  Bruno Haible  <bruno@clisp.org>
4362
4363         * gnulib-tool (func_verify_module): Check against misapplying patch.
4364
4365 2006-08-28  Bruno Haible  <bruno@clisp.org>
4366
4367         * gnulib-tool (func_relativize, func_relconcat): New functions.
4368         Give an error if --local-dir is given with --update.
4369         Remove trailing slashes from $local_gnulib_dir.
4370         (func_import): Store the relativized $local_gnulib_dir in
4371         gnulib-cache.m4, and read it from there if not specified explicitly.
4372
4373 2006-08-28  Bruno Haible  <bruno@clisp.org>
4374
4375         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
4376         is the current directory. Respect also $local_gnulib_dir.
4377
4378 2006-08-28  Bruno Haible  <bruno@clisp.org>
4379             Simon Josefsson  <jas@extundo.com>
4380
4381         BeOS portability.
4382         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
4383
4384 2006-08-27  Jim Meyering  <jim@meyering.net>
4385
4386         * doc/visibility.texi: Remove duplicate word: "pointer".
4387
4388 2006-08-26  Bruno Haible  <bruno@clisp.org>
4389
4390         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
4391         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
4392         (Makefile.am): Create inttypes.h from inttypes_.h.
4393         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
4394
4395         * modules/imaxabs: New file.
4396
4397         * modules/imaxdiv: New file.
4398
4399 2006-08-26  Bruno Haible  <bruno@clisp.org>
4400
4401         * m4/inttypes.m4: New file.
4402         * m4/_inttypes_h.m4: Remove file.
4403         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
4404         PRI_MACROS_BROKEN.
4405         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
4406
4407         * m4/imaxabs.m4: New file.
4408
4409         * m4/imaxdiv.m4: New file.
4410
4411 2006-08-26  Bruno Haible  <bruno@clisp.org>
4412
4413         * lib/inttypes_.h: New file.
4414         * lib/inttypes.h: Remove file.
4415         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
4416
4417         * lib/imaxabs.c: New file.
4418
4419         * lib/imaxdiv.c: New file.
4420
4421 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4422
4423         New config-h module, so that "make" output needn't be cluttered
4424         by -DHAVE_CONFIG_H.
4425         * MODULES.html.sh (Support for building libraries and executables):
4426         Add config-h.
4427         * modules/config-h: New file.
4428         * gnulib-tool (nl, sed_transform_lib_file): New vars.
4429         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
4430         the config-h module is used.
4431
4432         New configmake module, so that "make" output needn't be cluttered
4433         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
4434         * MODULES.html.sh (Support for building libraries and executables):
4435         Add configmake.
4436         * modules/configmake: New file.
4437
4438 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4439
4440         * m4/config-h.m4: New file.
4441
4442 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4443
4444         * config/srclist.txt: Add elisp-comp.
4445
4446 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4447
4448         * MODULES.html.sh (Support for building libraries and executables):
4449         Add elisp-comp.
4450         * build-aux/elisp-comp: New file.
4451         * modules/elisp-comp: New file.
4452
4453 2006-08-24  Bruno Haible  <bruno@clisp.org>
4454
4455         * gnulib-tool (func_create_testdir): Use non-default values of
4456         sourcebase and m4base.
4457
4458 2006-08-24  Bruno Haible  <bruno@clisp.org>
4459
4460         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
4461         HTML structure.
4462
4463 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
4464
4465         * modules/openat (Depends-on): Add lchown.
4466
4467 2006-08-23  Bruno Haible  <bruno@clisp.org>
4468
4469         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
4470         of gl_LOCK_EARLY instead of gl_LOCK.
4471
4472 2006-08-23  Bruno Haible  <bruno@clisp.org>
4473
4474         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
4475         on OSF/1 to no.
4476         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
4477
4478 2006-08-23  Bruno Haible  <bruno@clisp.org>
4479
4480         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
4481         as unusable.
4482
4483         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
4484         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
4485         (gl_LOCK): New macro.
4486
4487 2006-08-22  Simon Josefsson  <jas@extundo.com>
4488
4489         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
4490         to md5 module.
4491
4492 2006-08-22  Simon Josefsson  <jas@extundo.com>
4493
4494         * MODULES.html.sh: Add "Support for maintaining and release
4495         projects".
4496
4497         * build-aux/gnupload: New file, from coreutils.
4498
4499 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4500
4501         Avoid the need for AC_LIBSOURCES in m4 macros.
4502         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
4503         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
4504         * modules/check-version (EXTRA_DIST): Add check-version.h.
4505         * modules/crc (EXTRA_DIST): Add crc.h.
4506         * modules/des (EXTRA_DIST): Add des.h.
4507         * modules/gc (EXTRA_DIST): Add gc.h.
4508         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
4509         * modules/getline (EXTRA_DIST): Add getline.h.
4510         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
4511         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
4512         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
4513         * modules/md2 (EXTRA_DIST): Add md2.h.
4514         * modules/md4 (EXTRA_DIST): Add md4.h.
4515         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
4516         * modules/read-file (EXTRA_DIST): Add read-file.h.
4517         * modules/readline (EXTRA_DIST): Add readline.h.
4518         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
4519         rijndael-api-fst.h.
4520
4521 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4522
4523         * m4/rijndael.m4 (gl_ARCFOUR):
4524         * m4/arctwo.m4 (gl_ARCTWO):
4525         * m4/check-version.m4 (gl_CHECK_VERSION):
4526         * m4/crc.m4 (gl_CRC):
4527         * m4/des.m4 (gl_DES):
4528         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
4529         * m4/gc.m4 (gl_GC):
4530         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
4531         * m4/getline.m4 (gl_FUNC_GETLINE):
4532         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
4533         * m4/hmac-md5.m4 (gl_HMAC_MD5):
4534         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
4535         * m4/md2.m4 (gl_MD2):
4536         * m4/md4.m4 (gl_MD4):
4537         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
4538         * m4/read-file.m4 (gl_FUNC_READ_FILE):
4539         * m4/readline.m4 (gl_FUNC_READLINE):
4540         * m4/rijndael.m4 (gl_RIJNDAEL):
4541         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
4542         to get the necessary .h files and whatnot.
4543
4544 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4545
4546         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
4547         gnulib rather than the other way around.
4548         * config/srclistvars.sh (COREUTILS): Remove.
4549
4550 2006-08-22  Jim Meyering  <jim@meyering.net>
4551
4552         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
4553
4554         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
4555
4556 2006-08-22  Eric Blake  <ebb9@byu.net>
4557
4558         * modules/regexprops-generic: New file.
4559         * MODULES.html.sh (Support for building documentation): List it.
4560
4561 2006-08-22  Eric Blake  <ebb9@byu.net>
4562
4563         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
4564         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
4565         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
4566         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
4567
4568 2006-08-22  Bruno Haible  <bruno@clisp.org>
4569
4570         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
4571         and lib_LTLIBRARIES like the other lib_* variables.
4572
4573 2006-08-22  Bruno Haible  <bruno@clisp.org>
4574
4575         * build-aux/x-to-1.in: New file, from GNU gettext.
4576
4577 2006-08-22  Bruno Haible  <bruno@clisp.org>
4578
4579         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
4580         <utmpx.h> exists.
4581
4582 2006-08-22  Bruno Haible  <bruno@clisp.org>
4583
4584         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
4585         <utmpx.h> exists.
4586
4587 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4588
4589         BeOS portability.
4590         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
4591         exist.
4592         Problem reported by Bruno Haible.
4593
4594 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4595
4596         Avoid the need for AC_LIBSOURCES in m4 macros.
4597         * modules/acl (EXTRA_DIST): Add acl.h.
4598         * modules/argmatch (Files): Add m4/argmatch.m4.
4599         (configure.ac): Add gl_ARGMATCH.
4600         (EXTRA_DIST): Renamed from lib_SOURCES, for
4601         consistency with the other modules.  Remove argmatch.c.
4602         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
4603         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
4604         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
4605         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
4606         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
4607         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
4608         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
4609         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
4610         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
4611         * modules/closeout (EXTRA_DIST): Add closeout.h.
4612         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
4613         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
4614         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
4615         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
4616         dirname.h; remove basename.c and stripslash.c.
4617         * modules/exclude (EXTRA_DIST): Add exclude.h.
4618         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
4619         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
4620         * modules/file-type (EXTRA_DIST): Add file-type.h.
4621         * modules/filemode (EXTRA_DIST): Add filemode.h.
4622         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
4623         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4624         * modules/fpending (EXTRA_DIST): Add __fpending.h.
4625         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
4626         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
4627         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
4628         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
4629         * modules/getdate (EXTRA_DIST): Add getdate.c.
4630         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
4631         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
4632         * modules/getpass (EXTRA_DIST): Add getpass.h.
4633         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
4634         * modules/group-member (EXTRA_DIST): Add group-member.h.
4635         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
4636         * modules/hash (EXTRA_DIST): Add hash.h.
4637         * modules/human (EXTRA_DIST): Add human.h.
4638         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
4639         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
4640         * modules/lchown (EXTRA_DIST): Add lchown.h.
4641         * modules/long-options (EXTRA_DIST): Add long-options.h.
4642         * modules/lstat (EXTRA_DIST): Add lstat.h.
4643         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
4644         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
4645         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
4646         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
4647         * modules/memxor (EXTRA_DIST): Add memxor.h.
4648         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
4649         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
4650         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
4651         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
4652         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
4653         * modules/physmem (EXTRA_DIST): Add physmem.h.
4654         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
4655         * modules/posixver (EXTRA_DIST): Add posixver.h.
4656         * modules/quote (EXTRA_DIST): Add quote.h.
4657         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
4658         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
4659         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
4660         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
4661         regex_internal.h regexec.c.
4662         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
4663         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
4664         * modules/same (EXTRA_DIST): Add same.h.
4665         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
4666         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
4667         * modules/savedir (EXTRA_DIST): Add savedir.h.
4668         * modules/sha1 (EXTRA_DIST): Add sha1.h.
4669         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
4670         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
4671         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
4672         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
4673         * modules/strdup (EXTRA_DIST): Add strdup.h.
4674         * modules/strftime (EXTRA_DIST): Add strftime.h.
4675         * modules/strndup (EXTRA_DIST): Add strndup.h.
4676         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
4677         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
4678         * modules/time_r (EXTRA_DIST): Add time_r.h.
4679         * modules/timespec (EXTRA_DIST): Add timespec.h.
4680         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4681         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
4682         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
4683         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
4684         * modules/userspec (EXTRA_DIST): Add userspec.h.
4685         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
4686         * modules/utimens (EXTRA_DIST): Add utimens.h.
4687         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
4688         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
4689         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
4690         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
4691         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
4692         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
4693         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
4694         * modules/yesno (EXTRA_DIST): Add yesno.h.
4695
4696 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4697
4698         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
4699
4700         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
4701         * m4/dev-ino.m4, same-inode.m4: Remove.
4702
4703         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
4704         * m4/acl.m4 (AC_FUNC_ACL):
4705         * m4/backupfile.m4 (gl_BACKUPFILE):
4706         * m4/c-strtod.m4 (gl_C99_STRTOLD):
4707         * m4/canon-host.m4 (gl_CANON_HOST):
4708         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
4709         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
4710         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
4711         * m4/cloexec.m4 (gl_CLOEXEC):
4712         * m4/close-stream.m4 (gl_CLOSE_STREAM):
4713         * m4/closeout.m4 (gl_CLOSEOUT):
4714         * m4/dirfd.m4 (gl_FUNC_DIRFD):
4715         * m4/dirname.m4 (gl_DIRNAME):
4716         * m4/exclude.m4 (gl_EXCLUDE):
4717         * m4/exitfail.m4 (gl_EXITFAIL):
4718         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
4719         * m4/file-type.m4 (gl_FILE_TYPE):
4720         * m4/filemode.m4 (gl_FILEMODE):
4721         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
4722         * m4/fpending.m4 (gl_FUNC_FPENDING):
4723         * m4/fprintftime.m4 (gl_FPRINTFTIME):
4724         * m4/fts.m4 (gl_FUNC_FTS):
4725         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
4726         * m4/getdate.m4 (gl_GETDATE):
4727         * m4/gethrxtime.m4 (gl_GETHRXTIME):
4728         * m4/getpagesize.m4 (gl_GETPAGESIZE):
4729         * m4/getpass.m4 (gl_FUNC_GETPASS):
4730         * m4/gettime.m4 (gl_GETTIME):
4731         * m4/getugroups.m4 (gl_GETUGROUPS):
4732         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
4733         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
4734         * m4/hard-locale.m4 (gl_HARD_LOCALE):
4735         * m4/hash.m4 (gl_HASH):
4736         * m4/idcache.m4 (gl_IDCACHE):
4737         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
4738         * m4/lchown.m4 (gl_FUNC_LCHOWN):
4739         * m4/long-options.m4 (gl_LONG_OPTIONS):
4740         * m4/lstat.m4 (gl_FUNC_LSTAT):
4741         * m4/md5.m4 (gl_MD5):
4742         * m4/memcasecmp.m4 (gl_MEMCASECMP):
4743         * m4/memcoll.m4 (gl_MEMCOLL):
4744         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
4745         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
4746         * m4/memxor.m4 (gl_MEMXOR):
4747         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
4748         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
4749         * m4/modechange.m4 (gl_MODECHANGE):
4750         * m4/mountlist.m4 (gl_MOUNTLIST):
4751         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4752         * m4/openat.m4 (gl_FUNC_OPENAT):
4753         * m4/pathmax.m4 (gl_PATHMAX):
4754         * m4/physmem.m4 (gl_PHYSMEM):
4755         * m4/posixtm.m4 (gl_POSIXTM):
4756         * m4/posixver.m4 (gl_POSIXVER):
4757         * m4/quote.m4 (gl_QUOTE):
4758         * m4/quotearg.m4 (gl_QUOTEARG):
4759         * m4/readtokens.m4 (gl_READTOKENS):
4760         * m4/readutmp.m4 (gl_READUTMP):
4761         * m4/regex.m4 (gl_REGEX):
4762         * m4/safe-read.m4 (gl_SAFE_READ):
4763         * m4/safe-write.m4 (gl_SAFE_WRITE):
4764         * m4/same.m4 (gl_SAME):
4765         * m4/save-cwd.m4 (gl_SAVE_CWD):
4766         * m4/savedir.m4 (gl_SAVEDIR):
4767         * m4/settime.m4 (gl_SETTIME):
4768         * m4/sha1.m4 (gl_SHA1):
4769         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
4770         * m4/stat-macros.m4 (gl_STAT_MACROS):
4771         * m4/stat-time.m4 (gl_STAT_TIME):
4772         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
4773         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
4774         * m4/strdup.m4 (gl_FUNC_STRDUP):
4775         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
4776         * m4/strndup.m4 (gl_FUNC_STRNDUP):
4777         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
4778         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
4779         * m4/time_r.m4 (gl_TIME_R):
4780         * m4/timespec.m4 (gl_TIMESPEC):
4781         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
4782         * m4/unlinkdir.m4 (gl_UNLINKDIR):
4783         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
4784         * m4/userspec.m4 (gl_USERSPEC):
4785         * m4/utimecmp.m4 (gl_UTIMECMP):
4786         * m4/utimens.m4 (gl_UTIMENS):
4787         * m4/xalloc.m4 (gl_XALLOC):
4788         * m4/xgetcwd.m4 (gl_XGETCWD):
4789         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
4790         * m4/xreadlink.m4 (gl_XREADLINK):
4791         * m4/xstrtod.m4 (gl_XSTRTOD):
4792         * m4/yesno.m4 (gl_YESNO):
4793         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
4794         to get the necessary .h files and whatnot.
4795
4796 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
4797             Bruno Haible  <bruno@clisp.org>
4798
4799         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
4800         /bin/sh understanding of '!' conditional negation.
4801
4802 2006-08-21  Jim Meyering  <jim@meyering.net>
4803
4804         * modules/openat (Depends-on): Really alphabetize.
4805
4806         * modules/acl (Depends-on): Add error and quote.
4807
4808         * check-module (find_included_lib_files): Add at-func.c to the
4809         ok-to-include-more-than-once white list.
4810
4811         * modules/openat (Depends-on): Add lstat.  Alphabetize.
4812
4813 2006-08-21  Bruno Haible  <bruno@clisp.org>
4814
4815         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4816         Emit a pkgdata_DATA variable only if some snippets add contents to it.
4817         Reported by Martin Lambers <marlam@marlam.de>.
4818
4819 2006-08-21  Bruno Haible  <bruno@clisp.org>
4820
4821         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
4822         specify an installation location, don't emit a noinst_LIBRARIES or
4823         noinst_LTLIBRARIES assignment.
4824
4825 2006-08-21  Bruno Haible  <bruno@clisp.org>
4826
4827         BeOS portability.
4828         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
4829         BeOS has mbrtowc() but no <wctype.h>.
4830
4831 2006-08-21  Bruno Haible  <bruno@clisp.org>
4832
4833         BeOS portability.
4834         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
4835         exist.
4836
4837 2006-08-21  Bruno Haible  <bruno@clisp.org>
4838
4839         BeOS portability.
4840         * lib/mbchar.h: Include <wctype.h> only if it exists.
4841
4842 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4843
4844         Remove files that are no longer needed by their respective modules.
4845         * m4/obstack.m4: Remove.
4846         * m4/strerror_r.m4: Remove.
4847         * m4/uint32_t.m4: Remove.
4848         * m4/uintptr_t.m4: Remove.
4849         * m4/ullong_max.m4: Remove.
4850         * m4/xstrtoimax.m4: Remove.
4851         * m4/xstrtoumax.m4: Remove.
4852
4853         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
4854         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
4855         dependencies now capture this.
4856
4857         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
4858         Do not use AC_LIBSOURCES, since gnulib modules now do this.
4859         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
4860         * m4/human.m4 (gl_HUMAN): Likewise.
4861         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
4862         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
4863
4864         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
4865
4866         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
4867         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
4868         stdint.
4869         * m4/human.m4 (gl_HUMAN): Likewise.
4870         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
4871         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
4872         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
4873         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
4874         * m4/xstrtol (gl_XSTRTOL): Likewise.
4875
4876         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
4877         AC_TYPE_LONG_LONG_INT.
4878         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
4879         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
4880         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
4881         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
4882
4883         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
4884         on stdbool.
4885
4886         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
4887         (gl_PREREQ_XSTRTOUL): Remove.
4888
4889         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
4890
4891         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
4892         mode.
4893
4894 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4895
4896         Add and change modules to make it easier for coreutils to use
4897         gnulib-tool.
4898         * modules/backupfile (Files): Remove m4/d-ino.m4.
4899         (Depends-on): Add d-ino.
4900         * modules/cycle-check (Depends-on): Add stdint.
4901         (lib_SOURCES): Add cycle-check.h.
4902         * modules/d-ino: New module.
4903         * modules/d-type: New module.
4904         * modules/error (Files): Remove m4/strerror_r.m4.
4905         * modules/filemode (Files): Add m4/st_dm_mode.m4.
4906         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4907         m4/inttypes_h.m4, m4/uintmax_t.m4.
4908         (Depends-on): Add stdint.
4909         (lib_SOURCES): Add fsusage.h.
4910         * modules/getcwd (Files): Remove d-ino.m4.
4911         (Depends-on): Add d-ino.
4912         * modules/getndelim2 (Depends-on): Add stdint.
4913         * modules/glob (Files): Remove m4/d-type.m4.
4914         (Depends-on): Add d-type.
4915         * modules/host-os: New module.
4916         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
4917         m4/inttypes_h.m4, m4/uintmax_t.m4.
4918         * Depends-on: Add stdint.
4919         (lib_SOURCES): Add human.h.
4920         * modules/inttostr (Files): Remove m4/intmax_t.m4,
4921         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
4922         m4/uintmax_t.m4, m4/ulonglong.m4.
4923         (Depends-on): Add stdint.
4924         (EXTRA_DIST): Add inttostr.h.
4925         * modules/lchmod: New module.
4926         * modules/link-follow: New module.
4927         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
4928         (Depends-on): Add lchmod.
4929         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
4930         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
4931         (Depends-on): Add stdint.
4932         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
4933         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
4934         (Depends-on): Add stdint.
4935         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
4936         * modules/perl: New module.
4937         * modules/regex (Depends-on): Add stdint.
4938         * modules/rmdir-errno: New module.
4939         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4940         m4/intmax_t.m4.
4941         (Depends-on): Add stdint.
4942         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4943         m4/uintmax_t.m4.
4944         (Depends-on): Add stdint.
4945         * modules/unlink-busy: New module.
4946         * modules/utimecmp (Depends-on): Add stdint.
4947         * modules/uptime: New module.
4948         * modules/winsz-ioctl: New module.
4949         * modules/winsz-termios: New module.
4950         * modules/xnanosleep (Depends-on): Add nanosleep.
4951         * modules/ullong_max: Remove.
4952         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
4953         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
4954         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
4955         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
4956         (Depends-on): Add inttypes.
4957         (lib_SOURCES): Add xstrtol.h.
4958         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
4959         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
4960         * MODULES.html.sh: Move 'assert' into the assert section.
4961         Move 'dummy' into the linking section.
4962         Remove ullong_max.
4963         Add section for compatibility checks for POSIX:2001 functions,
4964         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
4965         winsz-ioctl, and winsz-termios into it.
4966         Add lchmod.
4967         Add top-level Misc section and put host-os, perl, and uptime
4968         into it.
4969
4970 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4971
4972         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
4973         now assume the stdint module.  Do not include inttypes.h.
4974         * lib/fsusage.h: Likewise.
4975         * lib/getndelim2.c: Likewise.
4976         * lib/human.h: Likewise.
4977         * lib/inttostr.h: Likewise.
4978         * lib/obstack.c: Likewise.
4979         * lib/regex_internal.h: Likewise.
4980         * lib/tempname.c: Likewise.
4981         * lib/utimecmp.c: Likewise.
4982         * lib/xstrtol.h: Likewise.
4983
4984         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
4985
4986         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
4987         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
4988         * lib/xtime.h: Likewise.
4989
4990 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4991
4992         * modules/openat (Files): Add lib/fchmodat.c.
4993         Fixes problem reported by Jay Youngman.
4994
4995 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4996
4997         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
4998         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
4999
5000 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
5001             Bruno Haible  <bruno@clisp.org>
5002
5003         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5004         and is a script that invokes bison. Tighten the code. Add comments.
5005
5006 2006-08-18  Jim Meyering  <jim@meyering.net>
5007
5008         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
5009         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
5010         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
5011         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
5012
5013 2006-08-18  Bruno Haible  <bruno@clisp.org>
5014
5015         * modules/bison-i18n: New file.
5016         * MODULES.html.sh (Internationalization functions): Add it.
5017
5018 2006-08-18  Bruno Haible  <bruno@clisp.org>
5019
5020         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
5021         sys/statvfs.h. When getmntinfo was found, check its declaration and
5022         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
5023
5024 2006-08-18  Bruno Haible  <bruno@clisp.org>
5025
5026         * m4/bison-i18n.m4: New file, from bison.
5027
5028 2006-08-18  Bruno Haible  <bruno@clisp.org>
5029
5030         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
5031         (ME_DUMMY): Treat "kernfs" as a dummy.
5032         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
5033
5034 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5035
5036         Update from coreutils.
5037
5038         2006-08-15  Jim Meyering  <jim@meyering.net>
5039
5040         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
5041
5042         2006-01-17  Jim Meyering  <jim@meyering.net>
5043
5044         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
5045
5046         2006-01-11  Jim Meyering  <jim@meyering.net>
5047
5048         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
5049         Check for the lchmod function.
5050
5051 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5052
5053         Update from coreutils.
5054
5055         * lib/__fpending.h: Add copyright notice.
5056         * lib/fprintftime.h: Likewise.
5057         * lib/savedir.c: Use (C) in copyright notice.
5058         * lib/savedir.h: Likewise.
5059
5060         2006-08-15  Jim Meyering  <jim@meyering.net>
5061
5062         * lib/at-func.c: New file, with the logic of all emulated at-functions.
5063         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
5064         in support of the EXPECTED_ERRNO macro.
5065         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
5066         definitions.  Instead, define the appropriate symbols and include
5067         "at-func.c".
5068         * lib/mkdirat.c (mkdirat): Likewise.
5069         * lib/fchmodat.c (fchmodat): Likewise.
5070         (ENOSYS): Remove definition.
5071         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
5072         it.  Don't include "unistd--.h" -- it wasn't ever used.
5073
5074         2006-01-17  Jim Meyering  <jim@meyering.net>
5075
5076         Rewrite fts.c not to change the current working directory,
5077         by using openat, fstatat, fdopendir, etc..
5078
5079         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
5080         (HAVE_OPENAT_SUPPORT): Define.
5081         [_LIBC] (fchdir): Don't undef or define; no longer used.
5082         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
5083         Now, this `function' always succeeds, and consumes its file descriptor
5084         parameter -- so callers must not close such FDs.  Update callers.
5085         (diropen_fd, opendirat, cwd_advance_fd): New functions.
5086         (diropen): Add parameter, SP.  Adjust all callers.
5087         Implement using diropen_fd, rather than open.
5088         (fts_open): Initialize new member, fts_cwd_fd.
5089         Remove fts_rft-setting code.
5090         (fts_close): Close fts_cwd_fd, if necessary.
5091         (__opendir2): Define in terms of opendir or opendirat,
5092         depending on whether the FST_NOCHDIR flag is set.
5093         (fts_build): Since fts_safe_changedir consumes its FD, and since
5094         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
5095         and close the dup'd file descriptor upon failure.
5096         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
5097         (fts_safe_changedir): Tweak semantics to reflect that this function
5098         now calls cwd_advance_fd and hence consumes its FD argument.
5099         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
5100         [struct FTS] (fts_rft): Remove now-unused member.
5101         [struct FTS] (fts_cycle.state): Improve comment.
5102
5103         * lib/openat.c (openat_needs_fchdir): New function.
5104         * lib/openat.h (openat_needs_fchdir): Declare it.
5105
5106 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5107
5108         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
5109         Problem and fix reported by Pádraig Brady in
5110         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
5111
5112 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5113
5114         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
5115
5116 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5117
5118         * lib/memcoll.c (memcoll): Optimize for the common case where the
5119         arguments are bytewise equal.
5120
5121 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5122
5123         * doc/regexprops-generic.texi: Add a copyright notice.
5124
5125 2006-08-15  Bruno Haible  <bruno@clisp.org>
5126
5127         * modules/tmpdir (License): Change to LGPL.
5128
5129 2006-08-15  Bruno Haible  <bruno@clisp.org>
5130
5131         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
5132         module.
5133
5134 2006-08-14  Simon Josefsson  <jas@extundo.com>
5135
5136         * config/srclist.txt: Add gnupload.
5137
5138 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5139
5140         Change copyright notice from LGPL 2 to GPL 2, since that's the
5141         standard form used in the gnulib repository.
5142         * tests/test-lock.c: Likewise.
5143         * tests/test-stdint.c: Likewise.
5144         * tests/test-tls.c: Likewise.
5145
5146         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
5147         prelude-manager.  User shorter URLs for GNU projects, without '?'.
5148         Add copyright notice.
5149
5150         * check-module: Add copyright notice.  Output a copyright
5151         notice if "--version" is specified.
5152         * modules/COPYING: New file.
5153         * tests/test-getaddrinfo.c: Add copyright notice.
5154         * tests/test-verify.c: Likewise.
5155
5156 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5157
5158         Change copyright notice from LGPL 2 to GPL 2, since that's the
5159         standard form used in the gnulib repository.
5160         * lib/lock.c: LGPL -> GPL.
5161         * lib/lock.h: Likewise.
5162         * lib/strnlen1.c: Likewise.
5163         * lib/strnlen1.h: Likewise.
5164         * lib/tls.c: Likewise.
5165         * lib/tls.h: Likewise.
5166         * lib/tmpdir.c: Likewise.
5167
5168         * lib/TODO: Remove; this belongs only in coreutils.
5169
5170 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5171
5172         Add copyright notices to long-enough files that lack them, since
5173         otherwise the files aren't clearly free.  Use the same notice that
5174         getdate.texi already uses.
5175         * doc/alloca-opt.texi: Add copyright notice.
5176         * doc/alloca.texi: Likewise.
5177         * doc/ctime.texi: Likewise.
5178         * doc/functions.texi: Likewise.
5179         * doc/gcd.texi: Likewise.
5180         * doc/gnulib-tool.texi: Likewise.
5181         * doc/inet_ntoa.texi: Likewise.
5182         * doc/visibility.texi: Likewise.
5183
5184         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
5185         * doc/quote.texi: Add copyright notice.
5186
5187         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
5188         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
5189         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
5190         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
5191         is now obsolete, and give a pointer to the Sun list.
5192         Add copyright notice.
5193
5194 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5195
5196         * config/srclistvars.sh: Add copyright notice.
5197
5198 2006-08-14  Eric Blake  <ebb9@byu.net>
5199
5200         Import the following change from libc:
5201
5202         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
5203
5204         Upstream bug 2997.
5205         * lib/misc/error.c: Add space between program name and message if file
5206         name is missing.
5207
5208 2006-08-12  Karl Berry  <karl@gnu.org>
5209
5210         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
5211         remove, these originate in gnulib now.
5212
5213 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5214
5215         * doc/Makefile (standards.info standards.html standards.dvi):
5216         Also depend on make-stds.texi.
5217
5218 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
5219
5220         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
5221         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
5222
5223         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
5224         in wchar_t.  Problem reported by Eric Blake.
5225
5226         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
5227         LEN is smaller than SIZE.  Suggested by Bruno Haible.
5228         Also, help the compiler to keep LEN in a register.
5229
5230 2006-08-11  Eric Blake  <ebb9@byu.net>
5231
5232         * users.txt: Sort.  Add tar.
5233
5234 2006-08-11  Bruno Haible  <bruno@clisp.org>
5235
5236         * users.txt: New file.
5237
5238 2006-08-11  Bruno Haible  <bruno@clisp.org>
5239
5240         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
5241         before <wchar.h>. Needed for OSF/1 and BSD/OS.
5242
5243 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5244
5245         * modules/snprintf (Depends-on): Remove minmax.
5246         (Maintainer): Add self and Bruno.
5247
5248 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5249
5250         * lib/.cppi-disable: Add snprintf.h, socket_.h.
5251         * lib/snprintf.c: Include <errno.h> and <limits.h>.
5252         (EOVERFLOW): Define if the system does not.
5253         Do not include "minmax.h"; it wasn't used.
5254         (snprintf): Don't assume size_t promotes to an unsigned type.
5255         Fix bug when generated string was too long for the buffer: the
5256         buffer's contents are supposed to be the initial prefix of the
5257         output.  Don't assume vasnprintf returns EOVERFLOW if the size
5258         exceeds INT_MAX; do the check ourselves.
5259
5260         Import the following changes from libc:
5261
5262         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
5263
5264         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
5265         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
5266         set wc to the byte which couldn't be converted.
5267         (re_string_reconstruct): Don't clear valid_raw_len before calling
5268         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
5269         tip_context using re_string_context_at.
5270
5271         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
5272
5273         * lib/posix/regex.h: g++ still cannot handled [restrict].
5274
5275         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
5276
5277         * lib/posix/regex.h: Remove special handling for VMS.
5278
5279 2006-08-10  Jim Meyering  <jim@meyering.net>
5280
5281         * modules/same-inode: New module.
5282         * modules/dev-ino: New module.
5283         * modules/cycle-check: Depend on these modules, rather than simply
5284         including their .h files.
5285         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
5286         required via m4/cycle-check.m4.
5287         * modules/same: Depend on new same-inode module, rather than
5288         including same-inode.h.
5289         * modules/chdir-safer: New file.
5290
5291         * modules/chown (Depends-on): Add stat-macros.
5292
5293 2006-08-10  Jim Meyering  <jim@meyering.net>
5294
5295         * m4/cycle-check.m4: New file.
5296         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
5297         * m4/dev-ino.m4, m4/same-inode.m4: New files.
5298
5299 2006-08-10  Eric Blake  <ebb9@byu.net>
5300
5301         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
5302         in from original proposal.
5303
5304 2006-08-10  Eric Blake  <ebb9@byu.net>
5305         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5306
5307         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
5308         namespace.
5309
5310 2006-08-10  Bruno Haible  <bruno@clisp.org>
5311
5312         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
5313         as well.
5314
5315 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5316
5317         Sync from coreutils.
5318
5319         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
5320
5321         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
5322         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
5323
5324 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5325
5326         * modules/restrict: Remove; no longer needed now that we assume
5327         Autoconf 2.59 or later.
5328         * MODULES.html.sh: Remove 'restrict'.
5329         * modules/argp (Depends-on): Remove 'restrict'.
5330         * modules/base64 (Depends-on): Likewise.
5331         * modules/gc (Depends-on): Likewise.
5332         * modules/getaddrinfo (Depends-on): Likewise.
5333         * modules/glob (Depends-on): Likewise.
5334         * modules/inet_ntop (Depends-on): Likewise.
5335         * modules/inet_pton (Depends-on): Likewise.
5336         * modules/memxor (Depends-on): Likewise.
5337         * modules/regex (Depends-on): Likewise.
5338         * modules/strtok_r (Depends-on): Likewise.
5339         * modules/time_r (Depends-on): Likewise.
5340
5341 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5342
5343         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
5344         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
5345         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5346         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
5347         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
5348         * m4/memxor.m4 (gl_MEMXOR): Likewise.
5349         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
5350         gl_C_RESTRICT replaced by AC_C_RESTRICT.
5351
5352         Merge from coreutils.
5353         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
5354         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
5355         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
5356         * m4/time_r.m4 (gl_TIME_R): Likewise.
5357
5358 2006-08-09  Karl Berry  <karl@gnu.org>
5359
5360         * config/srclist.txt: no more gettext-tools, per Bruno.
5361
5362 2006-08-08  Eric Blake  <ebb9@byu.net>
5363
5364         * modules/verror: New module.
5365         * MODULES.html.sh: Document it.
5366
5367 2006-08-08  Eric Blake  <ebb9@byu.net>
5368
5369         * lib/verror.h, lib/verror.c: New files.
5370
5371 2006-08-08  Eric Blake  <ebb9@byu.net>
5372
5373         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
5374         verror_at_line output complies with GNU Coding Standards even when
5375         file is NULL.
5376
5377 2006-08-07  Bruno Haible  <bruno@clisp.org>
5378
5379         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
5380         versions of AIX.
5381         Reported by Ralf Wildenhues.
5382
5383 2006-08-07  Bruno Haible  <bruno@clisp.org>
5384
5385         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
5386         in an AC_DEFUN. Needed so that the autoconf snippets can use
5387         AC_REQUIRE.
5388
5389 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5390
5391         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5392         Initialize pkgdata_DATA.
5393         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
5394         overriding it.
5395
5396 2006-08-06  Eric Blake  <ebb9@byu.net>
5397
5398         * lib/error.h: Fold in some upstream changes from glibc.
5399         * lib/error.c: Likewise.
5400
5401 2006-08-04  Bruno Haible  <bruno@clisp.org>
5402
5403         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5404         Make the mostlyclean-local rule depend on mostlyclean-generic.
5405         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
5406
5407 2006-07-31  Bruno Haible  <bruno@clisp.org>
5408
5409         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
5410         <stdlib.h>, <string.h>.
5411
5412 2006-07-30  Bruno Haible  <bruno@clisp.org>
5413
5414         * modules/readlink (License): Change to LGPL.
5415
5416 2006-07-30  Bruno Haible  <bruno@clisp.org>
5417
5418         * modules/javaversion (Makefile.am): Distribute javaversion.java and
5419         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
5420         set PKGDATADIR to point to it.
5421
5422 2006-07-30  Bruno Haible  <bruno@clisp.org>
5423
5424         * modules/csharpexec (configure.ac): Comment out macro invocation.
5425         * modules/javaexec (configure.ac): Likewise.
5426         * modules/javacomp-script (configure.ac): Likewise.
5427
5428         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
5429
5430 2006-07-30  Bruno Haible  <bruno@clisp.org>
5431
5432         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
5433         linked-list.
5434
5435 2006-07-30  Bruno Haible  <bruno@clisp.org>
5436
5437         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
5438
5439 2006-07-30  Bruno Haible  <bruno@clisp.org>
5440
5441         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5442         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
5443         get removed.
5444
5445 2006-07-29  Bruno Haible  <bruno@clisp.org>
5446
5447         Make it possible for gnulib-tool to work with locally modified or
5448         augmented gnulib repositories.
5449         * gnulib-tool (func_usage): Document --local-dir option.
5450         (local_gnulib_dir): New variable.
5451         Handle --local-dir option.
5452         (func_lookup_file): New function.
5453         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
5454         (func_get_description, func_get_filelist, func_get_description,
5455         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
5456         func_get_automake_snippet, func_get_include_directive,
5457         func_get_license, func_get_maintainer): Use func_lookup_file.
5458         (func_import, func_create_testdir): Use func_lookup_file.
5459
5460 2006-07-29  Bruno Haible  <bruno@clisp.org>
5461
5462         * modules/setenv (Depends-on): Add unistd.
5463
5464 2006-07-29  Bruno Haible  <bruno@clisp.org>
5465
5466         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
5467
5468 2006-07-29  Bruno Haible  <bruno@clisp.org>
5469
5470         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
5471
5472 2006-07-29  Bruno Haible  <bruno@clisp.org>
5473
5474         * gnulib-tool (import, update): If there is no Makefile.am, look at
5475         aclocal.m4, instead of bailing out.
5476
5477 2006-07-29  Bruno Haible  <bruno@clisp.org>
5478
5479         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
5480         Categorize the options by when they are useful.
5481
5482 2006-07-29  Bruno Haible  <bruno@clisp.org>
5483
5484         * gnulib-tool (func_usage): Document option --no-libtool.
5485         Handle option --no-libtool.
5486         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
5487         for changed semantics of $libtool variable.
5488         (func_import): Likewise. If libtool is not used, show this through
5489         an option --no-libtool.
5490         (func_create_testdir): Update.
5491
5492 2006-07-29  Bruno Haible  <bruno@clisp.org>
5493
5494         * gnulib-tool (func_import): Extend error message about missing
5495         --doc-base.
5496
5497 2006-07-29  Bruno Haible  <bruno@clisp.org>
5498
5499         * gnulib-tool (func_import): Don't create the $docbase directory if
5500         there is no file to store there.
5501
5502 2006-07-29  Bruno Haible  <bruno@clisp.org>
5503
5504         * gnulib-tool (autoconf_minversion): If a --dir option is given and
5505         relevant, look for configure.ac there, not in the current directory.
5506         Also use a simple search for AC_PREREQ, not "autoconf --trace".
5507
5508 2006-07-29  Bruno Haible  <bruno@clisp.org>
5509
5510         * gnulib-tool (SORT): New variable.
5511         (func_usage): Undocument --assume-autoconf option.
5512         Remove --assume-autoconf option handling.
5513         (autoconf_minversion): Determine from the contents of configure.ac.
5514         (func_import): Remove autoconf_minversion handling.
5515         Suggested by Eric Blake.
5516
5517 2006-07-29  Bruno Haible  <bruno@clisp.org>
5518
5519         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
5520
5521 2006-07-29  Bruno Haible  <bruno@clisp.org>
5522
5523         * config/srclist.txt (*setenv.[ch]): Remove rules.
5524
5525 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5526
5527         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
5528
5529 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5530
5531         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
5532         arpa/inet.h.
5533
5534 2006-07-28  Simon Josefsson  <jas@extundo.com>
5535
5536         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
5537         * modules/inet_pton (Depends-on): Likewise.
5538
5539 2006-07-28  Simon Josefsson  <jas@extundo.com>
5540
5541         * m4/netinet_in_h.m4: New file.
5542
5543 2006-07-28  Simon Josefsson  <jas@extundo.com>
5544
5545         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
5546         #include's.
5547
5548 2006-07-28  Simon Josefsson  <jas@extundo.com>
5549
5550         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
5551         #include's.
5552
5553 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
5554
5555         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
5556         setgid on directories only if they set these bits.
5557         * lib/modechange.h: Remove obsolete comment about masks.
5558
5559 2006-07-28  Eric Blake  <ebb9@byu.net>
5560
5561         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
5562         macro expansion.
5563
5564 2006-07-28  Bruno Haible  <bruno@clisp.org>
5565
5566         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
5567
5568 2006-07-28  Bruno Haible  <bruno@clisp.org>
5569
5570         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
5571
5572 2006-07-28  Bruno Haible  <bruno@clisp.org>
5573
5574         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
5575         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
5576         Define fallbacks.
5577         Avoids link error on FreeBSD 4.x.
5578         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
5579
5580         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
5581         encoding.
5582         * lib/mbswidth.c (iswcntrl): Likewise.
5583
5584 2006-07-27  Bruno Haible  <bruno@clisp.org>
5585
5586         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
5587         test.
5588
5589 2006-07-27  Bruno Haible  <bruno@clisp.org>
5590
5591         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
5592         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
5593         defined.
5594
5595 2006-07-26  Eric Blake  <ebb9@byu.net>
5596
5597         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
5598
5599 2006-07-26  Eric Blake  <ebb9@byu.net>
5600
5601         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
5602         like mingw that lack mkstemp.
5603         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
5604         avoid compilation warning on mingw.
5605
5606 2006-07-26  Bruno Haible  <bruno@clisp.org>
5607
5608         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
5609         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
5610         INT_FAST*_MIN, INTPTR_MIN.
5611
5612 2006-07-25  Bruno Haible  <bruno@clisp.org>
5613
5614         * modules/version-etc (Depends-on): Add stdarg.
5615
5616 2006-07-25  Bruno Haible  <bruno@clisp.org>
5617
5618         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
5619         complex commands.
5620
5621 2006-07-25  Bruno Haible  <bruno@clisp.org>
5622
5623         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
5624         defined in <stdarg.h> or config.h.
5625
5626 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5627
5628         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
5629         (gl_STDIO_SAFER): Remove.
5630
5631 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5632
5633         * MODULES.html.sh (File stream based Input/Output):
5634         Add fopen-safer, tmpfile-safer; remove stdio-safer.
5635         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
5636         * modules/fopen-safer, modules/tmpfile-safer: New files.
5637         * modules/stdio-safer: Remove.
5638
5639 2006-07-24  Bruno Haible  <bruno@clisp.org>
5640
5641         * modules/tmpdir: New file.
5642         * MODULES.html.sh (File system functions): Add it.
5643
5644 2006-07-24  Bruno Haible  <bruno@clisp.org>
5645
5646         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
5647         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
5648
5649 2006-07-24  Bruno Haible  <bruno@clisp.org>
5650
5651         * modules/clean-temp: New file.
5652
5653 2006-07-24  Bruno Haible  <bruno@clisp.org>
5654
5655         * m4/tmpdir.m4: New file, from GNU gettext.
5656
5657 2006-07-24  Bruno Haible  <bruno@clisp.org>
5658
5659         * lib/tmpdir.h: New file, from GNU gettext.
5660         * lib/tmpdir.c: New file, from GNU gettext.
5661
5662 2006-07-24  Bruno Haible  <bruno@clisp.org>
5663
5664         * lib/clean-temp.h: New file, from GNU gettext.
5665         * lib/clean-temp.c: New file, from GNU gettext.
5666
5667 2006-07-23  Eric Blake  <ebb9@byu.net>
5668
5669         * modules/stdio-safer (Files): Add tmpfile-safer.c.
5670         (Depends-on): Add binary-io.
5671
5672 2006-07-23  Eric Blake  <ebb9@byu.net>
5673
5674         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
5675
5676 2006-07-23  Eric Blake  <ebb9@byu.net>
5677
5678         * lib/tmpfile-safer.c: New file.
5679         * lib/stdio-safer.h (fopen_safer): Add prototype.
5680         * lib/stdio--.h (tmpfile): Make safer.
5681
5682 2006-07-23  Bruno Haible  <bruno@clisp.org>
5683
5684         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
5685         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
5686         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
5687         gl_linked_remove_at): Use it.
5688
5689 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5690         and Simon Josefsson <jas@extundo.com>
5691
5692         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
5693
5694         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
5695
5696 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5697
5698         * modules/close-stream: New file.
5699         * modules/closeout (Description): Make it clear that it exits
5700         with a diagnostic on error.
5701         (Depends-on): Add close-stream.  Remove fpending, stdbool.
5702         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
5703
5704 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5705
5706         * m4/close-stream.m4: New file.
5707
5708 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5709
5710         * lib/close-stream.c, lib/close-stream.h: New files.
5711
5712 2006-07-22  Bruno Haible  <bruno@clisp.org>
5713
5714         Merge from GNU gettext 0.15.
5715
5716         2006-05-01  Bruno Haible  <bruno@clisp.org>
5717
5718                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
5719
5720         2006-07-22  Bruno Haible  <bruno@clisp.org>
5721
5722                 * modules/javaversion: New file.
5723                 * MODULES.html.sh (Java): Add javaversion.
5724
5725         2006-03-12  Bruno Haible  <bruno@clisp.org>
5726
5727                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
5728
5729         2005-12-04  Bruno Haible  <bruno@clisp.org>
5730
5731                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
5732                 (untested).
5733
5734         2006-06-21  Bruno Haible  <bruno@clisp.org>
5735
5736                 Avoid warnings from recent versions of mcs.
5737                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
5738                 -o, -L, -r any more. Use options documented since mcs-1.0
5739                 instead. Similarly for -g.
5740
5741         2005-12-04  Bruno Haible  <bruno@clisp.org>
5742
5743                 * build-aux/csharpcomp.sh.in: Suffix for resources is
5744                 .resources, not .resource.
5745
5746         2005-07-09  Bruno Haible  <bruno@clisp.org>
5747
5748                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
5749                 add a .dll suffix.
5750                 Reported by Mark Junker <mjscod@gmx.de>.
5751
5752         2006-07-22  Bruno Haible  <bruno@clisp.org>
5753
5754                 * modules/gettext: Upgrade to gettext-0.15.
5755                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
5756                 m4/visibility.m4.
5757                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
5758
5759 2006-07-22  Bruno Haible  <bruno@clisp.org>
5760
5761         Merge from GNU gettext 0.15.
5762
5763         2006-03-25  Bruno Haible  <bruno@clisp.org>
5764
5765                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
5766
5767         2006-07-21  Bruno Haible  <bruno@clisp.org>
5768
5769                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
5770                 "1.1".
5771
5772         2006-05-09  Bruno Haible  <bruno@clisp.org>
5773
5774                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
5775                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
5776                 for the conftestver execution.
5777
5778         2006-05-01  Bruno Haible  <bruno@clisp.org>
5779
5780                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
5781                 optional target-version argument. Verify that the compiler
5782                 groks source of the specified source-version, or add -source
5783                 option as necessary. Verify that the compiler produces
5784                 bytecode in the specified target-version, or add -target and
5785                 -source options as necessary. Make the result of the test
5786                 available as variable CONF_JAVAC. Also log error output in
5787                 config.log.
5788
5789         2006-03-11  Bruno Haible  <bruno@clisp.org>
5790
5791                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
5792
5793         2006-05-09  Bruno Haible  <bruno@clisp.org>
5794
5795                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
5796                 CLASSPATH_SEPARATOR to a semicolon.
5797
5798         2006-03-12  Bruno Haible  <bruno@clisp.org>
5799
5800                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
5801                 available as variable CONF_JAVA, for subsequent autoconf
5802                 tests. Also log error output in config.log.
5803
5804         2006-07-19  Bruno Haible  <bruno@clisp.org>
5805
5806                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
5807                 that getline works on glibc2 systems. Needed to avoid trouble
5808                 in relocatable.c.
5809                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
5810
5811         2005-12-04  Bruno Haible  <bruno@clisp.org>
5812
5813                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
5814                 launcher (untested).
5815
5816         2005-12-04  Bruno Haible  <bruno@clisp.org>
5817
5818                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
5819
5820         2006-07-22  Bruno Haible  <bruno@clisp.org>
5821
5822                 * gettext.m4: Update from GNU gettext-0.15.
5823                 * nls.m4: Likewise.
5824                 * po.m4: Likewise.
5825                 * inttypes-pri.m4: Likewise.
5826                 * inttypes-h.m4: Renamed from inttypes.m4.
5827                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
5828
5829 2006-07-22  Bruno Haible  <bruno@clisp.org>
5830
5831         Merge from GNU gettext 0.15.
5832
5833         2005-07-05  Bruno Haible  <bruno@clisp.org>
5834
5835                 * printf-args.c (printf_fetchargs): Work around broken
5836                 definition of wint_t on mingw.
5837
5838         2005-02-12  Bruno Haible  <bruno@clisp.org>
5839
5840                 * xallocsa.h: Add extern "C" for C++.
5841
5842         2006-05-17  Bruno Haible  <bruno@clisp.org>
5843
5844                 Cygwin portability.
5845                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
5846
5847         2006-04-30  Bruno Haible  <bruno@clisp.org>
5848
5849                 * progreloc.c: Include <mach-o/dyld.h> if available.
5850                 (find_executable): Use _NSGetExecutablePath when possible.
5851
5852         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5853
5854                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
5855                 function.
5856
5857         2005-12-29  Bruno Haible  <bruno@clisp.org>
5858
5859                 * progreloc.c (set_program_name_and_installdir): Fix
5860                 compilation error.
5861
5862         2005-12-04  Bruno Haible  <bruno@clisp.org>
5863
5864                 Cygwin portability.
5865                 * progreloc.c: Include <windows.h> also on Cygwin.
5866                 (find_executable): Add support for Cygwin.
5867                 (set_program_name_and_installdir): Handle also platforms with
5868                 nonempty EXEEXT.
5869
5870         2006-07-11  Bruno Haible  <bruno@clisp.org>
5871
5872                 * javacomp.c: Fix a comment.
5873                 Reported by Jim Meyering.
5874
5875         2006-04-30  Bruno Haible  <bruno@clisp.org>
5876
5877                 * javacomp.h (compile_java_class): Add source_version,
5878                 target_version arguments.
5879                 * javacomp.c: Rewritten to choose only a compiler that
5880                 respects the specified source_version and target_version.
5881
5882         2006-06-27  Bruno Haible  <bruno@clisp.org>
5883
5884                 Assume correct S_ISDIR macro.
5885                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
5886
5887         2006-07-22  Bruno Haible  <bruno@clisp.org>
5888
5889                 * javaversion.h: New file, from GNU gettext.
5890                 * javaversion.c: New file, from GNU gettext.
5891                 * javaversion.java: New file, from GNU gettext.
5892                 * javaversion.class: New file, from GNU gettext.
5893
5894         2006-05-17  Bruno Haible  <bruno@clisp.org>
5895
5896                 Cygwin portability.
5897                 * javaexec.c (execute_java_class): Test for jview program
5898                 also on Cygwin.
5899
5900         2006-04-09  Bruno Haible  <bruno@clisp.org>
5901
5902                 * fatal-signal.c: Don't include string.h.
5903                 (at_fatal_signal): Use a copying loop instead of memcpy.
5904
5905         2005-12-04  Bruno Haible  <bruno@clisp.org>
5906
5907                 * csharpexec.c: Add support for 'clix' launcher (untested).
5908                 (execute_csharp_using_sscli): New function.
5909                 (execute_csharp_program): Call it.
5910
5911         2006-06-21  Bruno Haible  <bruno@clisp.org>
5912
5913                 Avoid warnings from recent versions of mcs.
5914                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
5915                 -o, -L, -r any more. Use options documented since mcs-1.0
5916                 instead. Similarly for -g.
5917
5918         2005-07-09  Bruno Haible  <bruno@clisp.org>
5919
5920                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
5921                 add a .dll suffix.
5922                 Reported by Mark Junker <mjscod@gmx.de>.
5923
5924         2006-06-17  Bruno Haible  <bruno@clisp.org>
5925
5926                 * config.charset: Update for NetBSD 3.0.
5927
5928         2006-05-17  Bruno Haible  <bruno@clisp.org>
5929
5930                 Cygwin portability.
5931                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
5932
5933         2006-05-16  Bruno Haible  <bruno@clisp.org>
5934
5935                 * localcharset.c [CYGWIN]: Include <windows.h>.
5936                 (get_charset_aliases): For Cygwin, return the same CPxxx
5937                 aliases list as under WIN32.
5938                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
5939                 the environment variables. Fall back to GetACP().
5940
5941         2006-04-05  Bruno Haible  <bruno@clisp.org>
5942
5943                 * config.charset: Update Juan Manuel Guerrero's address.
5944
5945         2005-02-12  Bruno Haible  <bruno@clisp.org>
5946
5947                 * allocsa.h: Add extern "C" for C++.
5948
5949         2005-02-10  Bruno Haible  <bruno@clisp.org>
5950
5951                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
5952                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
5953
5954         2006-07-22  Bruno Haible  <bruno@clisp.org>
5955
5956                 * gettext.h: Update to GNU gettext-0.15.
5957
5958 2006-07-22  Bruno Haible  <bruno@clisp.org>
5959
5960         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
5961         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
5962         lib-prefix.m4, longdouble.m4, ssize_t.m4.
5963
5964 2006-07-21  Eric Blake  <ebb9@byu.net>
5965
5966         * modules/stdlib-safer: New file.
5967         * MODULES.html.sh (File stream based Input/Output): Add
5968         stdlib-safer.
5969
5970 2006-07-21  Eric Blake  <ebb9@byu.net>
5971
5972         * lib/stdlib-safer.h: New file from coreutils, required by
5973         stdlib--.h.
5974
5975 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
5976
5977         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
5978
5979 2006-07-20  Bruno Haible  <bruno@clisp.org>
5980
5981         * gnulib-tool: Recognize new option --assume-autoconf.
5982         (autoconf_minversion): New variable.
5983         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
5984
5985 2006-07-20  Bruno Haible  <bruno@clisp.org>
5986
5987         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
5988
5989 2006-07-19  Derek R. Price  <derek@ximbiot.com>
5990
5991         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
5992         Reindent and repaginate.
5993
5994 2006-07-19  Derek Price  <derek@ximbiot.com>
5995
5996         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
5997         Correct grammar.
5998
5999 2006-07-17  Bruno Haible  <bruno@clisp.org>
6000
6001         * modules/list: New file.
6002         * modules/array-list: New file.
6003         * modules/carray-list, modules/carray-list-tests: New files.
6004         * modules/linked-list, modules/linked-list-tests: New files.
6005         * modules/avltree-list, modules/avltree-list-tests: New files.
6006         * modules/rbtree-list, modules/rbtree-list-tests: New files.
6007         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
6008         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
6009         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
6010         * modules/oset: New file.
6011         * modules/array-oset: New file.
6012         * modules/avltree-oset, modules/avltree-oset-tests: New files.
6013         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
6014         * tests/test-carray_list.c: New file.
6015         * tests/test-linked_list.c: New file.
6016         * tests/test-avltree_list.c: New file.
6017         * tests/test-rbtree_list.c: New file.
6018         * tests/test-linkedhash_list.c: New file.
6019         * tests/test-avltreehash_list.c: New file.
6020         * tests/test-rbtreehash_list.c: New file.
6021         * tests/test-avltree_oset.c: New file.
6022         * tests/test-rbtree_oset.c: New file.
6023         * MODULES.html.sh (Container data structures): New section.
6024
6025 2006-07-17  Bruno Haible  <bruno@clisp.org>
6026
6027         * m4/gl_list.m4: New file.
6028
6029 2006-07-17  Bruno Haible  <bruno@clisp.org>
6030
6031         * lib/gl_list.h: New file.
6032         * lib/gl_list.c: New file.
6033         * lib/gl_array_list.h: New file.
6034         * lib/gl_array_list.c: New file.
6035         * lib/gl_carray_list.h: New file.
6036         * lib/gl_carray_list.c: New file.
6037         * lib/gl_linked_list.h: New file.
6038         * lib/gl_linked_list.c: New file.
6039         * lib/gl_anylinked_list1.h: New file.
6040         * lib/gl_anylinked_list2.h: New file.
6041         * lib/gl_avltree_list.h: New file.
6042         * lib/gl_avltree_list.c: New file.
6043         * lib/gl_anyavltree_list1.h: New file.
6044         * lib/gl_anyavltree_list2.h: New file.
6045         * lib/gl_rbtree_list.h: New file.
6046         * lib/gl_rbtree_list.c: New file.
6047         * lib/gl_anyrbtree_list1.h: New file.
6048         * lib/gl_anyrbtree_list2.h: New file.
6049         * lib/gl_anytree_list1.h: New file.
6050         * lib/gl_anytree_list2.h: New file.
6051         * lib/gl_linkedhash_list.h: New file.
6052         * lib/gl_linkedhash_list.c: New file.
6053         * lib/gl_anyhash_list1.h: New file.
6054         * lib/gl_anyhash_list2.h: New file.
6055         * lib/gl_avltreehash_list.h: New file.
6056         * lib/gl_avltreehash_list.c: New file.
6057         * lib/gl_rbtreehash_list.h: New file.
6058         * lib/gl_rbtreehash_list.c: New file.
6059         * lib/gl_anytreehash_list1.h: New file.
6060         * lib/gl_anytreehash_list2.h: New file.
6061
6062         * lib/gl_oset.h: New file.
6063         * lib/gl_oset.c: New file.
6064         * lib/gl_array_oset.h: New file.
6065         * lib/gl_array_oset.c: New file.
6066         * lib/gl_avltree_oset.h: New file.
6067         * lib/gl_avltree_oset.c: New file.
6068         * lib/gl_rbtree_oset.h: New file.
6069         * lib/gl_rbtree_oset.c: New file.
6070         * lib/gl_anytree_oset.h: New file.
6071
6072 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6073
6074         * m4/mkancesdirs.m4: New file.
6075         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
6076         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
6077         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
6078         it.
6079
6080 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6081
6082         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
6083         * lib/mkancesdirs.h: New files.
6084         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
6085         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
6086         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
6087         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
6088         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
6089         callers changed.  Revamp internals significantly, by not
6090         attempting to create directories that are temporarily more
6091         permissive than the final results.  Do not attempt to use
6092         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
6093         This removes some race conditions, fixes some bugs, and simplifies
6094         things.  Use new dirchownmod function to do owner and mode changes.
6095         * lib/mkdir-p.h: Likewise.
6096         * lib/modechange.c (octal_to_mode): New function.
6097         (struct mode_change): New member mentioned.
6098         (make_node_op_equals): New arg mentioned.  All callers changed.
6099         (mode_compile): Keep track of which mode bits the user has explicitly
6100         mentioned.
6101         (mode_adjust): New arg DIR, so that we implement the X op correctly.
6102         New arg PMODE_BITS, to keep track of which mode bits the user
6103         mentioned; it treats S_ISUID and S_ISGID speciall.
6104         All callers changed.
6105         * lib/modechange.h: Likewise.
6106
6107 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6108
6109         * MODULES.html.sh: Add mkancestors.
6110         * modules/mkancesdirs: New module.
6111         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
6112         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
6113         The chdir-safer and afs files are now orphans; I'll remove them
6114         unless someone speaks up.
6115         Add lib/dirchownmod.c, lib/dirchownmod.h.
6116         (Depends-on): Remove alloca, chown, save-cwd, dirname.
6117         Add lchown, mkancesdirs.
6118         (Maintainer): Add self.
6119
6120 2006-07-15  Karl Berry  <karl@gnu.org>
6121
6122         * gnulib-tool: help message wording/arrangement.
6123
6124 2006-07-14  Simon Josefsson  <jas@extundo.com>
6125
6126         * doc/gnulib.texi (Libtool and Windows): New section.
6127
6128 2006-07-12  Simon Josefsson  <jas@extundo.com>
6129
6130         * modules/gendocs (License): Fix license, approved by Karl.
6131
6132 2006-07-12  Eric Blake  <ebb9@byu.net>
6133
6134         * MODULES.html.sh: Add gendocs.
6135
6136 2006-07-11  Eric Blake  <ebb9@byu.net>
6137
6138         * modules/fdl: New module, to install doc/fdl.texi.
6139         * MODULES.html.sh: Add new section for documentation modules.
6140         * gnulib-tool: Avoid space-tab.
6141         (--doc-base): New option, to manage files from doc.
6142
6143 2006-07-11  Eric Blake  <ebb9@byu.net>
6144
6145         * m4/absolute-header.m4: Fix comments to match recent change.
6146
6147 2006-07-11  Eric Blake  <ebb9@byu.net>
6148
6149         * gnulib-tool: List --doc-base before --tests-base.
6150
6151 2006-07-11  Derek R. Price  <derek@ximbiot.com>
6152
6153         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
6154
6155 2006-07-11  Bruno Haible  <bruno@clisp.org>
6156
6157         * README: Mention where to put documentation.
6158
6159 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6160
6161         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
6162
6163 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6164
6165         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
6166         to stdint.m4.
6167
6168 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6169
6170         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
6171         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
6172         "no/such/file/stdint.h" when there is no such file, so that
6173         the resulting C code can be parsed by dodgy compilers.
6174         Problems reported by Bob Proulx.
6175
6176 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6177
6178         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
6179         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6180         macros into the GNU _D_EXACT_NAMLEN.
6181         * lib/savedir.c:  Likewise.
6182         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
6183
6184 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6185         and Paul Eggert  <eggert@cs.ucla.edu>
6186
6187         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
6188         * m4/savedir.m4:
6189         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6190         macros into the GNU _D_EXACT_NAMLEN.
6191
6192 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6193
6194         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
6195         around the absolute name, to work around a problem with the HP-UX
6196         11.23 native C compiler, reported by Bob Proulx.
6197
6198 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6199
6200         * doc/maintain.texi, make-stds.texi: Sync from
6201         <http://savannah.gnu.org/projects/gnustandards>.
6202
6203 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6204
6205         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
6206
6207 2006-07-09  Jim Meyering  <jim@meyering.net>
6208
6209         * m4/glob.m4: Remove a doubled word in a comment.
6210
6211 2006-07-09  Jim Meyering  <jim@meyering.net>
6212
6213         * lib/argp-pv.c: Remove a doubled word in a comment.
6214         * lib/check-version.c (check_version): Likewise.
6215         * lib/javacomp.c (compile_java_class): Likewise.
6216
6217 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
6218
6219         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
6220         for the benefit of people using Autoconf 2.60.  If you want to
6221         support older Autoconf versions you can copy m4/onceonly_2_57.m4
6222         (or m4/onceonly.m4, if pre-2.57) manually.
6223
6224 2006-07-08  Jim Meyering  <jim@meyering.net>
6225
6226         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
6227         comment.
6228         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
6229         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
6230         comment.
6231
6232 2006-07-08  Jim Meyering  <jim@meyering.net>
6233
6234         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
6235
6236 2006-07-07  Simon Josefsson  <jas@extundo.com>
6237
6238         * tests/test-crc.c: Change expected crc value, the test vector
6239         were probably computed using the old broken crc.c?
6240
6241 2006-07-06  Simon Josefsson  <jas@extundo.com>
6242
6243         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
6244         now the canonical place for the M4 file).
6245
6246         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
6247         from the sys_socket dependency now.
6248
6249         * modules/inet_pton (Files): Ditto.
6250
6251         * modules/inet_ntop (Files): Ditto.
6252
6253 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6254
6255         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
6256         not gl_PREREQ_GETUSERSHELL.
6257
6258 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6259
6260         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
6261         with only one argument, for Autoconf 2.60.
6262         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
6263         expand to nothing, so add a shell command to avoid syntax error.
6264         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6265
6266 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6267
6268         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
6269
6270 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6271
6272         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
6273         no longer needed.  Check for isblank decl.
6274         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
6275         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
6276         of existence.
6277
6278 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6279
6280         * lib/getloadavg.c: Use __VMS, not VMS.
6281         * lib/getopt.c: Likewise.
6282         * lib/getpagesize.h: Likewise.
6283         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
6284         and probably does not work.
6285
6286 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6287
6288         * lib/.cppi-disable: Add wcwidth.
6289         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
6290         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
6291         (ISGRAPH): Remove.  All uses changed to isgraph.
6292         (FOLD) [!defined _LIBC]: Remove special case.
6293         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
6294         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
6295         HAVE_ISBLANK.
6296         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
6297         case.
6298
6299 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6300
6301         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
6302         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
6303         brackets.  Other minor changes to suppress some compiler
6304         warnings.
6305
6306 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6307         and Paul Eggert  <eggert@cs.ucla.edu>
6308
6309         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
6310         of invoking obsolescent AC_HEADER_DIRENT macro.
6311         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
6312         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
6313         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
6314         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
6315         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
6316         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6317         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
6318         * m4/readdir.m4: Remove; no longer needed.
6319
6320 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6321         and Paul Eggert  <eggert@cs.ucla.edu>
6322
6323         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
6324         Don't worry about this obsolete case any more.
6325         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
6326         directories.
6327         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
6328         worry about this obsolete case any more.
6329         * lib/fts.c: Likewise.
6330         * lib/getcwd.c: Likewise.
6331         * lib/glob.h: Likewise.
6332         * lib/savedir.c: Likewise.
6333
6334 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6335
6336         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
6337         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
6338         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
6339         needed.
6340         All uses removed.
6341         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6342         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6343         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
6344         needed.
6345         * m4/getdate.m4 (gl_GETDATE): Likewise.
6346         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6347         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6348         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6349         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6350         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6351         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6352         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
6353         needed.
6354
6355 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6356
6357         * lib/memcasecmp.c: Include <limits.h>.
6358         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
6359         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
6360         Don't assume isdigit succeeds only on '0' through '9'.
6361
6362 2006-07-05  Eric Blake  <ebb9@byu.net>
6363
6364         * modules/getaddrinfo (Depends-on): Add snprintf.
6365
6366 2006-07-05  Eric Blake  <ebb9@byu.net>
6367
6368         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
6369         to avoid 'header present but could not be compiled' on cygwin.
6370
6371 2006-07-05  Eric Blake  <ebb9@byu.net>
6372
6373         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
6374         missing from netdb.h.
6375         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
6376
6377 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6378
6379         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
6380         no longer needed.
6381         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
6382         * m4/getdate.m4 (gl_GETDATE): Likewise.
6383         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6384         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6385         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6386         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6387         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6388
6389 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6390
6391         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
6392         All uses of is_space replaced by isspace.
6393         * lib/exit.h: Don't talk about STDC_HEADERS.
6394         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
6395         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
6396         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
6397         replaced by isprint etc.
6398         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
6399         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6400         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
6401         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
6402         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
6403         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6404
6405 2006-07-05  Bruno Haible  <bruno@clisp.org>
6406
6407         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
6408         the function exists, before testing against AIX.
6409         Reported by Martin Lambers <marlam@marlam.de>.
6410
6411 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6412
6413         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
6414         From Mark D. Baushke.
6415
6416 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6417
6418         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
6419         to the absolute name, not just one, to bypass Sun C 5.8's
6420         "warning: #include of /usr/include/... may be non-portable".
6421
6422 2006-07-04  Eric Blake  <ebb9@byu.net>
6423
6424         * modules/dirname-tests: New test module.
6425         * tests/test-dirname.c: New file, replacing dirname.c
6426         TEST_DIRNAME section that was recently deleted.
6427
6428 2006-07-04  Bruno Haible  <bruno@clisp.org>
6429
6430         Assume ANSI C header files and <ctype.h> functions.
6431         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
6432         (mbsnwidth): Use isprint, iscntrl instead.
6433
6434 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6435
6436         Merge from coreutils.
6437         * MODULES.html.sh: Add xstrtold.
6438         * modules/xstrtold: New file.
6439         * modules/cycle-check (Files): Add lib/same-inode.h.
6440         * modules/dirname (Files): Add m4/double-slash-root.m4.
6441         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
6442         * modules/mkdir-p (Files): Add lib/same-inode.h.
6443         * modules/same (Files): Add lib/same-inode.h.
6444
6445 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6446
6447         * m4/absolute-header.m4: Renamed from full-header-path.m4.
6448         This is to keep the terminology clean; POSIX talks about
6449         "absolute pathnames", not "full pathnames", but the GNU
6450         Coding Standards say to use "path" for something else;
6451         so use "absolute" to keep both sides happy.
6452         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
6453         Set gl_absolute_header, not gl_full_header_path.
6454         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
6455         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
6456         All uses changed.
6457
6458         Merge from coreutils.
6459
6460         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6461
6462         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
6463         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
6464         want to require the building of c-strtod.o.
6465         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
6466         needs -lm directly.
6467         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
6468
6469         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6470
6471         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
6472         --as-needed option if available.  Problem reported by Albert Chin in
6473         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
6474         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
6475         cc merely issues a bunch of annoying warnings for --as-needed
6476         (this problem was reported by Bob Proulx).  Also, try linking with
6477         -lm to detect a bug in binutils 2.16 (this problem was reported
6478         by Ralf Wildenhues).
6479
6480         2006-06-18  Jim Meyering  <jim@meyering.net>
6481
6482         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
6483         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
6484         macro.
6485         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
6486         also check for glibc-2.4's abort-inducing bug.
6487
6488         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
6489         Low-probability clean-up should be to use rmdir to get rid of
6490         the just-created directory, not unlink.
6491
6492         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
6493         configure fail, and request a bug report to inform us about it.
6494         Add a comment that, barring reports to the contrary, in 2007 we'll
6495         assume ftruncate is universally available.
6496
6497         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6498
6499         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
6500
6501         2006-03-12  Jim Meyering  <jim@meyering.net>
6502
6503         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
6504         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
6505         * m4/same.m4 (gl_SAME): Likewise.
6506         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
6507
6508         2006-03-11  Eric Blake  <ebb9@byu.net>
6509
6510         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
6511         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
6512         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
6513         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
6514
6515 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6516
6517         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
6518         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
6519         reported by Mark D. Baushke, one in
6520         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
6521
6522         Merge from coreutils.
6523
6524         * lib/.cppi-disable: Add stdint_.h.
6525         * lib/.cvsignore: Add stdint.h.
6526
6527         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6528
6529         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
6530         both double and long double versions.
6531         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
6532         * lib/xstrtold.c: New file.
6533         * lib/xstrtod.h (xstrtold): New decl.
6534
6535         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
6536
6537         * lib/filemode.c (setst): Remove.
6538         (strmode): Rewrite to avoid setst.  This makes the code shorter,
6539         (arguably) clearer, and the generated code is a bit smaller on my
6540         Debian GNU/Linux stable x86 host.
6541
6542         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6543
6544         * lib/filemode.c: Include "filemode.h" first, to test the interface.
6545         Assume that filemode.h includes sys/types.h and sys/stat.h.
6546         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
6547         (ftypelet): Reorder to put common cases first, for efficiency.
6548         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
6549         to do 'M'.
6550         (strmode): Renamed from mode_string, and now stores 12 bytes instead
6551         of 10, for compatibility with FreeBSD.  All callers changed.
6552         (filemodestring): Now stores 12 bytes instead of 10, and sets file
6553         types that can't be deduced solely from st_mode.  First arg is now a
6554         const pointer.
6555         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
6556         (strmode): Renamed from mode_string.
6557         (filemodestring): New decl.
6558         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
6559         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
6560         needed.
6561         (S_ISPORT, S_ISWHT): New macros, if not already defined.
6562
6563         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
6564
6565         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
6566         fsusage.h now does that.  Include fsusage.h first, to test interface.
6567         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
6568         at most one method (the old code could have generated decls that
6569         didn't conform to C89, not that this was ever exercised).
6570         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
6571
6572         2006-03-19  Jim Meyering  <jim@meyering.net>
6573
6574         Work even in a chroot where d_ino values for entries in "/"
6575         don't match the stat.st_ino values for the same names.
6576         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
6577         number, iterate through all entries again, using lstat instead.
6578         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
6579         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
6580
6581         * lib/getcwd.c (__getcwd): Clarify a comment.
6582         Use memcpy in place of a call to strcpy.
6583
6584         2006-03-12  Jim Meyering  <jim@meyering.net>
6585
6586         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
6587         matches that of the current directory (which we're about to chdir ".."
6588         out of), then save the dev-ino of the parent, instead.
6589
6590         * lib/same-inode.h (SAME_INODE): New file/macro.
6591         * lib/chdir-safer.c (SAME_INODE): Remove definition.
6592         Include "same-inode.h", instead.
6593         * lib/same.c: Likewise.
6594         * lib/cycle-check.h: Include "same-inode.h".
6595         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
6596         * lib/cycle-check.c (SAME_INODE): Remove definition.
6597         * lib/root-dev-ino.h: Include "same-inode.h".
6598
6599         2006-03-11  Eric Blake  <ebb9@byu.net>
6600
6601         * lib/same.c (same_name): s/base_name/last_component/
6602         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
6603         * lib/filenamecat.c (file_name_concat): Likewise.
6604
6605         2006-03-11  Eric Blake  <ebb9@byu.net>,
6606                     Paul Eggert  <eggert@cs.ucla.edu>
6607
6608         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
6609         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
6610         drive prefix.
6611         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
6612         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
6613         (last_component): New method.
6614         * lib/dirname.c (dir_len): Determine when drive letters need a
6615         subsequent slash.  Preserve // when it is special.
6616         (dir_name): Don't append dot when drive letter is absolute.
6617         [TEST_DIRNAME]: Move into a full-blown gnulib test.
6618         * lib/basename.c (base_name): New semantics - malloc the result.
6619         Preserve // when it is special.  Preserve relative files that look
6620         like drive letters.
6621         (base_len): Preserve // when it is special.
6622         (last_component): New method, similar to old base_name semantics.
6623         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
6624         base_name.  Strip redundant slashes from ///.
6625
6626 2006-07-03  Jim Meyering  <jim@meyering.net>
6627
6628         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
6629         macro is used before the first cycle_check call.
6630
6631 2006-07-03  Eric Blake  <ebb9@byu.net>
6632
6633         * modules/dirname (Depends-on): Add xstrndup.
6634
6635 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6636
6637         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
6638         test cases, so that config.log is a bit easier to follow.
6639
6640 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6641
6642         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
6643         both are 64 bits, since this seems to be the tradition, and this
6644         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
6645         we ever run into a host that prefers long long to long in this
6646         case, we'll need another configure-time test.  Problem reported by
6647         Jim Meyering.
6648
6649 2006-07-02  Eric Blake  <ebb9@byu.net>
6650
6651         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
6652
6653 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6654
6655         * modules/inttypes (Depends-on): No longer depends on stdint.
6656         * modules/stdint (Description): Say more about assumptions.
6657         Say that the fast types might differ.  Say macros are used.
6658         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
6659         (Makefile.am): Revise list of substituted symbols to match
6660         new stdint.m4.
6661         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
6662         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
6663         * tests/test-stdint.c (verify_same_types)
6664         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
6665         the code conforms to C99/C89.
6666         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
6667         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
6668
6669 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6670
6671         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
6672         but fix a bug, by requiring at least 64 bits.
6673         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
6674         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
6675         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
6676         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
6677
6678         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
6679         changes.  Make 2.59 a prerequisite.  Check and substitute for
6680         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
6681         inttypes.h.  Do not use special include files; just use the
6682         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
6683         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
6684         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
6685         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
6686         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
6687         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
6688         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
6689         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
6690         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
6691         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
6692         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
6693         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
6694         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
6695         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
6696         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
6697         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
6698         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
6699         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
6700         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
6701         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
6702         WINT_MAX.  Check for C99 conformance more strictly, by detecting
6703         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
6704         not check for things that C99 does not require, e.g., int8_t.  If
6705         a test isn't needed unless <stdint.h> isn't working, and is
6706         unlikely to be needed for any other reason, then don't do it
6707         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
6708         size_t, since we assume C89 freestanding at least.  Do not check
6709         for sig_atomic_t, wchar_t, or wint_t, since the code now does
6710         the right thing even if the types are not defined.  Instead use:
6711         (gl_STDINT_TYPE_PROPERTIES): New macro.
6712         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
6713         testing whether <sys/types.h> clashes, as Autoconf does this for
6714         us now.  All uses removed.
6715         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
6716         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
6717         (gl_CHECK_TYPE_SAME):
6718         Remove; no longer needed.
6719         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
6720         exists, since we'll return 0 anyway in that case.
6721         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
6722
6723 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6724
6725         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
6726         possible collision with system files.
6727         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
6728         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
6729         WCHAR_MIN and WCHAR_MAX in this case.
6730         (<stddef.h>): Do not include; no longer needed.
6731         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
6732         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
6733         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
6734         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
6735         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
6736         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
6737         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
6738         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
6739         !defined(__c99))]: Include in this case too, since it's harmless
6740         now.
6741         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
6742         dangerous to do so.
6743         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
6744         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
6745         (_STDINT_MIN, _STDINT_MAX): New macros.
6746         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
6747         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
6748         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
6749         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
6750         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
6751         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
6752         macros, not typedefs; this simplifies things quite a bit.
6753         Use long int for all types narrower than int64_t.
6754         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
6755         Define in terms of long long int or int64_t or long int,
6756         not int64_t or int32_t.  This saves some compile-time testing.
6757         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
6758         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
6759         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
6760         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
6761         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
6762         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
6763         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
6764         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
6765         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
6766         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
6767         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
6768         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
6769         undef any previous version and define our own version, for
6770         simplicity and consistency with the new macros for types.
6771         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
6772         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
6773         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
6774         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
6775         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
6776         @WINT_T_SUFFIX@ to keep things simple here.
6777         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
6778         Simplify by assuming typical 8/16/32/64 host, since we're
6779         already doing that elsewhere anyway.
6780         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
6781         and assume long long int is 64 bits if available.  This
6782         speeds up 'configure'.
6783
6784 2006-07-01  Eric Blake  <ebb9@byu.net>
6785
6786         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
6787         Reported by Andreas Buening.
6788
6789 2006-07-01  Eric Blake  <ebb9@byu.net>
6790
6791         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
6792
6793 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6794
6795         * lib/getaddrinfo.c: fixed typo
6796
6797 2006-06-29  Jim Meyering  <jim@meyering.net>
6798
6799         * modules/strftime (Maintainer): Add my name, since with the
6800         FPRINTFTIME changes strftime.c has forked from glibc.
6801
6802 2006-06-29  Eric Blake  <ebb9@byu.net>
6803
6804         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
6805
6806 2006-06-29  Eric Blake  <ebb9@byu.net>
6807
6808         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
6809
6810 2006-06-29  Eric Blake  <ebb9@byu.net>
6811
6812         * lib/stat_.h: New file.
6813
6814 2006-06-29  Eric Blake  <ebb9@byu.net>
6815
6816         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
6817         unused static function.
6818
6819 2006-06-29  Eric Blake  <ebb9@byu.net>
6820
6821         * doc/functions.texi (Function Portability): Document missing lstat
6822         on mingw.
6823
6824 2006-06-29  Eric Blake  <ebb9@byu.net>
6825
6826         * MODULES.html.sh: Add sys_stat.
6827         * modules/sys_stat: New module.
6828         * modules/mkstemp (Depends-on): Add sys_stat.
6829
6830 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6831
6832         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
6833
6834 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6835
6836         * m4/c-bs-a.m4: Removed.
6837
6838 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6839
6840         * lib/strftime.c: Assume strftime() exists.
6841
6842 2006-06-29  Derek Price  <derek@ximbiot.com>
6843
6844         * modules/c-bs-a: Removed - \a is C89.
6845         * MODULES.html.sh: Remove c-bs-a.
6846
6847 2006-06-29  Bruno Haible  <bruno@clisp.org>
6848
6849         * modules/wcwidth (License): Change to LGPL.
6850
6851 2006-06-28  Simon Josefsson  <jas@extundo.com>
6852
6853         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
6854         on _WIN32.
6855
6856         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
6857         getnameinfo.
6858
6859 2006-06-28  Simon Josefsson  <jas@extundo.com>
6860
6861         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
6862
6863 2006-06-28  Simon Josefsson  <jas@extundo.com>
6864
6865         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
6866         functions there.  It will succeed on Windows XP, but on Windows
6867         2000 and (presumably) earlier, it will fail, and use the internal
6868         re-implementation.
6869         (use_win32_p): New function.
6870         (getaddrinfo): Use strtoul on servname, to support numeric ports.
6871         Support AI_NUMERICSERV to disable getservbyname.
6872         (getnameinfo): New function, only supports
6873         NI_NUMERICHOST|NI_NUMERICSERV for now.
6874
6875         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
6876         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
6877         getnameinfo.
6878
6879 2006-06-28  Eric Blake  <ebb9@byu.net>
6880
6881         * modules/wcwidth: New file.
6882         * modules/mbchar (Depends-on): Add wcwidth.
6883         * modules/mbswidth (Depends-on): Add wcwidth.
6884         * MODULES.html.sh: Add wcwidth.
6885
6886 2006-06-28  Eric Blake  <ebb9@byu.net>
6887
6888         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
6889         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
6890
6891 2006-06-28  Eric Blake  <ebb9@byu.net>
6892
6893         * lib/xvasprintf.h: Fix comments.
6894
6895 2006-06-28  Eric Blake  <ebb9@byu.net>
6896
6897         * lib/mbchar.h (wcwidth): Include wcwidth.h.
6898         * lib/mbswidth.c (wcwidth): Move from here...
6899         * lib/wcwidth.h: ...to this new file.
6900
6901 2006-06-28  Derek R. Price  <derek@ximbiot.com>
6902
6903         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
6904
6905         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
6906         it's obsolete.
6907         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
6908
6909 2006-06-28  Derek R. Price  <derek@ximbiot.com>
6910
6911         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
6912         Autoconf 2.60 says this stuff was obsolete.
6913
6914 2006-06-28  Bruno Haible  <bruno@clisp.org>
6915
6916         * modules/wcwidth (Files): Add m4/wchar_t.m4.
6917
6918 2006-06-28  Bruno Haible  <bruno@clisp.org>
6919
6920         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
6921         gt_TYPE_WCHAR_T.
6922
6923 2006-06-28  Bruno Haible  <bruno@clisp.org>
6924
6925         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
6926         declaration for wcwidth.
6927         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
6928
6929 2006-06-28  Bruno Haible  <bruno@clisp.org>
6930
6931         * lib/mkdtemp.c [MINGW]: Include <io.h>.
6932         (mkdir): Define using _mkdir.
6933
6934 2006-06-28  Bruno Haible  <bruno@clisp.org>
6935
6936         * lib/getaddrinfo.h: Fix POSIX URL.
6937         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
6938         _WIN32.
6939         (use_win32_p): Make static.
6940         (getaddrinfo): Reject service name if it is empty or does not consist
6941         solely of decimal digits, or if its value is > 65535.
6942         (getnameinfo): Remove useless casts.
6943
6944 2006-06-27  Simon Josefsson  <jas@extundo.com>
6945
6946         * modules/sys_select: New file, suggested by Bruno Haible, Paul
6947         Eggert and Martin Lambers.
6948
6949 2006-06-27  Simon Josefsson  <jas@extundo.com>
6950
6951         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
6952         Eggert and Martin Lambers.
6953
6954 2006-06-27  Bruno Haible  <bruno@clisp.org>
6955
6956         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
6957         result to 0, not to empty.
6958         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
6959
6960 2006-06-27  Bruno Haible  <bruno@clisp.org>
6961
6962         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
6963
6964 2006-06-26  Simon Josefsson  <jas@extundo.com>
6965
6966         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
6967         present.
6968
6969 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
6970
6971         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
6972         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
6973         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
6974
6975 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
6976
6977         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
6978
6979 2006-06-26  Bruno Haible  <bruno@clisp.org>
6980
6981         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
6982
6983 2006-06-26  Bruno Haible  <bruno@clisp.org>
6984
6985         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
6986
6987 2006-06-26  Bruno Haible  <bruno@clisp.org>
6988
6989         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
6990         SGI C compiler in pre-C99 mode.
6991         Suggested by Mark D. Baushke and Larry Jones.
6992
6993 2006-06-26  Bruno Haible  <bruno@clisp.org>
6994
6995         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
6996         WCHAR_MAX.
6997         Reported by Mark D. Baushke and Larry Jones.
6998
6999 2006-06-26  Bruno Haible  <bruno@clisp.org>
7000
7001         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
7002         in pre-C99 mode.
7003         Suggested by Mark D. Baushke and Larry Jones.
7004
7005 2006-06-23  Simon Josefsson  <jas@extundo.com>
7006             Bruno Haible  <bruno@clisp.org>
7007
7008         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
7009         Emit mostlyclean-local rule.
7010         (func_emit_tests_Makefile_am): Likewise.
7011         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
7012
7013 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
7014
7015         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
7016
7017 2006-06-23  Bruno Haible  <bruno@clisp.org>
7018
7019         * tests/test-stdint.c: Update to match ISO C 99 Technical
7020         Corrigendum 1.
7021
7022 2006-06-23  Bruno Haible  <bruno@clisp.org>
7023
7024         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
7025
7026 2006-06-23  Bruno Haible  <bruno@clisp.org>
7027
7028         * lib/stdint_.h: Treat IRIX like OpenBSD.
7029
7030 2006-06-23  Bruno Haible  <bruno@clisp.org>
7031
7032         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
7033         ISO C 99 Technical Corrigendum 1.
7034
7035 2006-06-22  Simon Josefsson  <jas@extundo.com>
7036
7037         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
7038         MinGW.
7039
7040 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
7041
7042         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
7043         needed.  Some compiler complained about some of them.  Problem reported
7044         by Larry Jones in
7045         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
7046
7047 2006-06-21  Simon Josefsson  <jas@extundo.com>
7048
7049         * tests/test-getaddrinfo.c: New file.
7050
7051         * modules/getaddrinfo-tests: New file.
7052
7053         * MODULES.html.sh: Add inet_pton.
7054
7055         * modules/inet_pton: New file.
7056
7057 2006-06-21  Simon Josefsson  <jas@extundo.com>
7058
7059         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
7060         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
7061         of using the (limited) gnulib implementation on Windows XP.
7062
7063         * m4/inet_pton.m4: New file.
7064
7065 2006-06-21  Simon Josefsson  <jas@extundo.com>
7066
7067         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
7068         variable.
7069
7070         * lib/socket_.h: Don't define WINVER.
7071
7072         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
7073         slightly modified to work in gnulib.
7074
7075 2006-06-21  Simon Josefsson  <jas@extundo.com>
7076
7077         * doc/gnulib.texi (Windows sockets): Add.
7078
7079 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
7080
7081         * lib/read-file.c (fread_file): Start with buffer allocation of
7082         0 bytes rather than 1 byte; this simplifies the code.
7083         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
7084         code to free buffer and save/restore errno.
7085         (internal_read_file): Remove unused local.
7086
7087 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
7088
7089         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
7090         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
7091         Problem reported by Denis Excoffier in
7092         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
7093
7094 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7095
7096         * modules/sys_socket, modules/socklen: Include sys/types since
7097         FreeBSD 4.x's sys/socket.h needs it.
7098
7099 2006-06-19  Simon Josefsson  <jas@extundo.com>
7100
7101         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
7102
7103 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7104
7105         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
7106
7107 2006-06-19  Bruno Haible  <bruno@clisp.org>
7108
7109         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
7110         and FULL_PATH_INTTYPES_H in angle brackets.
7111         Reported by Mark D. Baushke <mdb@gnu.org>.
7112
7113 2006-06-17  Eric Blake  <ebb9@byu.net>
7114
7115         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
7116         errno.
7117
7118 2006-06-17  Bruno Haible  <bruno@clisp.org>
7119
7120         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
7121         <sys/inttypes.h>.
7122
7123 2006-06-17  Bruno Haible  <bruno@clisp.org>
7124
7125         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
7126         whether errno is declared. Assume <errno.h> declares errno.
7127
7128 2006-06-17  Bruno Haible  <bruno@clisp.org>
7129
7130         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
7131
7132 2006-06-17  Bruno Haible  <bruno@clisp.org>
7133
7134         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
7135         problem on Solaris 2.5.1.
7136
7137 2006-06-16  Eric Blake  <ebb9@byu.net>
7138
7139         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
7140         * lib/unicodeio.c [!defined errno]: Likewise.
7141         * lib/strtol.c [!defined errno]: Likewise.
7142         * lib/strtod.c [!defined errno]: Likewise.
7143
7144 2006-06-15  Eric Blake  <ebb9@byu.net>
7145
7146         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
7147
7148 2006-06-15  Eric Blake  <ebb9@byu.net>
7149
7150         * config/srclist.txt (ssize_t.m4): Lose sync.
7151
7152 2006-06-15  Bruno Haible  <bruno@clisp.org>
7153
7154         * modules/stdint (Files): Include m4/full-header-path.m4,
7155         m4/size_max.m4, m4/wchar_t.m4.
7156         (Makefile.am): Many more substitutions.
7157         * modules/stdint-tests: New file.
7158         * tests/test-stdint.c: New file.
7159
7160 2006-06-15  Bruno Haible  <bruno@clisp.org>
7161
7162         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
7163         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
7164         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
7165         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
7166         gl_CHECK_TYPE_SAME): New macros.
7167
7168 2006-06-15  Bruno Haible  <bruno@clisp.org>
7169
7170         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
7171
7172 2006-06-15  Bruno Haible  <bruno@clisp.org>
7173
7174         * lib/stdint_.h: Rewritten to be fully auto-configured.
7175         Fixes bug on HP-UX/IA64.
7176
7177 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
7178
7179         * lib/getdate.y (__attribute__): Don't define if already defined.
7180         Problem reported by Larry Jones.
7181         * lib/utimens.c (__attribute__): Likewise.
7182
7183 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
7184
7185         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
7186         reported by Andreas Schwab.
7187
7188 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7189             Bruno Haible  <bruno@clisp.org>
7190
7191         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
7192         check for the declaration of strnlen and a run test that exposes the
7193         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
7194         rpl_strndup.
7195
7196 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7197             Bruno Haible  <bruno@clisp.org>
7198
7199         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
7200
7201 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7202
7203         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
7204         compile test, for Tru64 4.0D.
7205
7206 2006-05-28  Karl Berry  <karl@gnu.org>
7207
7208         * config/srclist.txt (printf-args.c): lose sync.
7209
7210 2006-05-26  Martin Lambers  <marlam@marlam.de>
7211
7212         * lib/getpass.c: Updates the test for the native W32 API, and adds
7213         missing includes, thus fixing compilation warnings.
7214
7215 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7216
7217         * lib/exclude.c (exclude_fnmatch): New function.
7218         (excluded_file_name): Call exclude_fnmatch.
7219         * lib/exclude.h (excluded_file_name): New prototype
7220
7221 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
7222
7223         * lib/tempname.c (small_open, large_open): New macros.
7224         (__open, __open64) [!_LIBC]: Remove.
7225         (__gen_tempname): Use small_open and large_open instead of __open
7226         and __open64.  This fixes a portability bug on HP-UX 11.11i
7227         reported by Simon Wing-Tang in
7228         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
7229
7230 2006-05-24  Bruno Haible  <bruno@clisp.org>
7231
7232         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
7233         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
7234         Reported by Thorsten Maerz <torte@netztorte.de> via
7235         Aaron Stone <aaron@serendipity.cx>.
7236
7237 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7238
7239         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
7240         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
7241         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
7242         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
7243         not really conditional on the cache.
7244         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
7245
7246 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7247
7248         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
7249         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
7250         (my_usleep): Don't mishandle maximum value.
7251
7252 2006-05-19  Jim Meyering  <jim@meyering.net>
7253
7254         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
7255
7256 2006-05-17  Bruno Haible  <bruno@clisp.org>
7257
7258         Cygwin portability.
7259         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
7260
7261 2006-05-17  Bruno Haible  <bruno@clisp.org>
7262
7263         * lib/stdint_.h: Fix recognition of Cygwin.
7264
7265 2006-05-15  Bruno Haible  <bruno@clisp.org>
7266
7267         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
7268         on libtool patch by Ralf Wildenhues.
7269
7270 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
7271
7272         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
7273         test for C99 conformance; (bool) 0.5 is an integer constant
7274         expression, but (bool) -0.5 is not.  Problem reported by Fedor
7275         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
7276
7277 2006-05-11  Simon Josefsson  <jas@extundo.com>
7278
7279         * m4/xvasprintf.m4: Fix obvious typo.
7280
7281 2006-05-11  Jim Meyering  <jim@meyering.net>
7282
7283         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
7284         James Lemley.
7285
7286 2006-05-10  Simon Josefsson  <jas@extundo.com>
7287
7288         * lib/md4.c: Typo fix, update copyright years.
7289         (K1, K2): Don't use L because it turn computations into 64-bit on
7290         64-bit platforms.
7291
7292 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
7293
7294         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
7295         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
7296         unwanted sign propagation, e.g., on hosts with 64-bit int.
7297         There still are some problems with reeelly weird theoretical hosts
7298         (e.g., 33-bit int) but it's not worth worrying about now.
7299         * lib/sha1.c (rol): Likewise.
7300         (K1, K2, K3, K4): Remove unnecessary L suffix.
7301
7302 2006-05-10  Bruno Haible  <bruno@clisp.org>
7303
7304         * lib/des.c: Cast to avoid warnings.
7305
7306 2006-05-09  Bruno Haible  <bruno@clisp.org>
7307
7308         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
7309         (Depends-on): Depend also on xsize, stdarg.
7310         (configure.ac): Add gl_XVASPRINTF.
7311
7312 2006-05-09  Bruno Haible  <bruno@clisp.org>
7313
7314         * m4/xvasprintf.m4: New file.
7315
7316 2006-05-09  Bruno Haible  <bruno@clisp.org>
7317
7318         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
7319         (EOVERFLOW): Define fallback value.
7320         (xstrcat): New function.
7321         (xvasprintf): Recognize the special case of a string concatenation.
7322
7323 2006-05-08  Eric Blake  <ebb9@byu.net>
7324
7325         * gnulib-tool (func_version): Base copyright year on CVS date.
7326         (func_emit_copyright_notice): New function.
7327         (func_emit_lib_Makefile_am): Use it.
7328         (func_emit_tests_Makefile_am): Likewise.
7329         (func_import): Likewise.
7330
7331 2006-05-08  Bruno Haible  <bruno@clisp.org>
7332
7333         * modules/stdarg: New file.
7334         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
7335
7336 2006-05-08  Bruno Haible  <bruno@clisp.org>
7337
7338         * m4/stdarg.m4: New file, from GNU gettext.
7339
7340 2006-05-08  Bruno Haible  <bruno@clisp.org>
7341
7342         * config/srclist.txt (build-aux/config.rpath): different from latest
7343         release.
7344
7345 2006-05-08  Bruno Haible  <bruno@clisp.org>
7346
7347         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
7348
7349 2006-05-05  Jim Meyering  <jim@meyering.net>
7350
7351         * m4/warning.m4: New file, derived from bison's file by the same name.
7352
7353 2006-05-03  Bruno Haible  <bruno@clisp.org>
7354
7355         * lib/stdint_.h: Shorter URL.
7356         * lib/inttypes.h: Likewise.
7357
7358 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7359
7360         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
7361
7362 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7363
7364         * lib/verify.h: Document the internals better.  Most of this change
7365         was written by Bruno Haible.
7366
7367 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7368
7369         * doc/verify.texi: New file, partly based on a proposal by
7370         Bruno Haible.
7371
7372 2006-05-02  Bruno Haible  <bruno@clisp.org>
7373
7374         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
7375         test from here...
7376         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
7377
7378 2006-04-29  Bruno Haible  <bruno@clisp.org>
7379
7380         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
7381         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
7382
7383 2006-04-29  Bruno Haible  <bruno@clisp.org>
7384
7385         * gnulib-tool: Make --update option actually work.
7386
7387 2006-04-29  Bruno Haible  <bruno@clisp.org>
7388
7389         * doc/gcd.texi: New file.
7390         * doc/gnulib.texi: Include it.
7391
7392 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
7393
7394         * lib/getdate.y (get_date): When adding relative date, start with the
7395         initial time, not with the result of the first mktime call.
7396
7397 2006-04-25  Bruno Haible  <bruno@clisp.org>
7398
7399         * gnulib-tool (func_import): Output the include directives in three
7400         blocks, sorted separately.
7401         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7402
7403 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7404
7405         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
7406         to define main with arguments, for C++.  Reported by Eric Blake.
7407         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
7408         Prefer 'int main ()' to 'int main (void)', for C++.
7409         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
7410         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
7411         for 'main', for C99 and C++.
7412
7413 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7414
7415         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
7416         Don't assume that exit status -1 is valid.
7417         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7418         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
7419         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
7420         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
7421         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
7422         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
7423         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
7424         functions can be used without declaring them, or that you can
7425         exit with status -1.
7426         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
7427
7428 2006-04-24  Karl Berry  <karl@gnu.org>
7429
7430         * config/srclist.txt (longdouble.m4): sync lost.
7431
7432 2006-04-24  Eric Blake  <ebb9@byu.net>
7433
7434         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
7435
7436 2006-04-24  Bruno Haible  <bruno@clisp.org>
7437
7438         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
7439         poll() implementation in AIX.
7440         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7441
7442 2006-04-24  Bruno Haible  <bruno@clisp.org>
7443
7444         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
7445         assigned exactly once.
7446
7447 2006-04-23  Claudio Fontana  <claudio@gnu.org>
7448             Bruno Haible  <bruno@clisp.org>
7449
7450         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
7451         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
7452         for AM_CPPFLAGS.
7453
7454 2006-04-23  Bruno Haible  <bruno@clisp.org>
7455
7456         * modules/copy-file: Depend on unistd.
7457         * modules/execute: Likewise.
7458         * modules/fatal-signal: Likewise.
7459         * modules/findprog: Likewise.
7460         * modules/mkdtemp : Likewise.
7461         * modules/pipe: Likewise.
7462         * modules/wait-process: Likewise.
7463
7464 2006-04-23  Bruno Haible  <bruno@clisp.org>
7465
7466         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
7467         condition was already detected.
7468         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7469
7470 2006-04-23  Bruno Haible  <bruno@clisp.org>
7471
7472         * lib/copy-file.c: Include <unistd.h> unconditionally.
7473         * lib/execute.c: Likewise.
7474         * lib/fatal-signal.c: Likewise.
7475         * lib/findprog.c: Likewise.
7476         * lib/mkdtemp.c: Likewise.
7477         * lib/pipe.h: Likewise.
7478         * lib/pipe.c: Likewise.
7479         * lib/wait-process.h: Likewise.
7480
7481 2006-04-23  Bruno Haible  <bruno@clisp.org>
7482
7483         * gnulib-tool (func_usage): Fix --import description. Document
7484         --update.
7485         (func_import): Create temporary file in a temporary directory, if
7486         --dry-run is specified. Silence errors from 'grep' when there are no
7487         m4 files in $m4dir.
7488         (func_create_testdir): Silence errors from 'grep' when there are no
7489         m4 files in $m4dir.
7490         Reported by Karl Berry <karl@freefriends.org>.
7491
7492 2006-04-20  Bruno Haible  <bruno@clisp.org>
7493
7494         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
7495         one argument, so that the code will be portable to Autoconf 2.60.
7496         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
7497         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7498         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
7499
7500 2006-04-19  Derek Price  <derek@ximbiot.com>
7501             Eric Blake  <ebb9@byu.net>
7502
7503         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
7504         rather than "/full/path.h".  Update comment to match.  Shorten &
7505         generalize m4_translit call via AS_TR_CPP.
7506
7507 2006-04-19  Derek Price  <derek@ximbiot.com>
7508             Eric Blake  <ebb9@byu.net>
7509
7510         * lib/inttypes.h: Correct grammar in comment.
7511
7512 2006-04-18  Derek Price  <derek@ximbiot.com>
7513             Paul Eggert  <eggert@cs.ucla.edu>
7514
7515         * modules/inttypes: New file.
7516         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
7517
7518 2006-04-18  Derek Price  <derek@ximbiot.com>
7519             Paul Eggert  <eggert@cs.ucla.edu>
7520
7521         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
7522         New files.
7523
7524 2006-04-18  Derek Price  <derek@ximbiot.com>
7525             Paul Eggert  <eggert@cs.ucla.edu>
7526
7527         * lib/inttypes.h: New file.
7528         * lib/strtoimax.c: Assume <inttypes.h>.
7529
7530 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
7531
7532         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
7533         isn't mounted.  Problem reported by Kir Kolyshkin.
7534
7535 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
7536
7537         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
7538         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
7539         Derek R. Price.
7540         * lib/regex.h (RE_DUP_MAX): Update comment to match current
7541         implementation.
7542
7543 2006-04-12  Eric Blake  <ebb9@byu.net>
7544
7545         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
7546         is now done automatically by the corresponding Autoconf macro.
7547
7548 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
7549
7550         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
7551         time_r.h.
7552
7553 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7554
7555         Merge regex changes from libc, removing some of our
7556         POSIX-conformance changes that were rejected and redoing them in a
7557         less-intrusive way.
7558
7559         * lib/regcomp.c (re_compile_internal, init_dfa):
7560         Length arg is now size_t, not Idx.  All uses changed.
7561         (peek_token): Forward decl now says internal_function.
7562         (__re_error_msgid, __re_error_msgid_idx):
7563         Now static rather than extern with attribute_hidden.
7564         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
7565         For some reason libc prefers K&R style defns for external functions.
7566         (regerror) [!defined _LIBC]: Likewise.
7567         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
7568         (seek_collating_symbol_entry, lookup_collation_sequence_value):
7569         (build_range_exp, build_collating_symbol):
7570         Use K&R-style defn.
7571         (re_compile_fastmap): Use '\0' to memset, not 0.
7572         (utf8_sb_map): Make the calculations more obvious.
7573         (init_dfa, parse_bracket_exp, build_charclass_op):
7574         Call calloc and cast result, as glibc does.
7575         (init_word_char, fetch_token, peek_token, peek_token_bracket):
7576         (build_range_exp, build_collating_symbol):
7577         Now internal functions.
7578
7579         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
7580
7581         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
7582         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
7583         Don't depend on VMS; depend on __VMS instead, for POSIX
7584         namespace cleanness.
7585         (regoff_t): Define to ssize_t, not long int.
7586
7587         Remove the REG_ macros named below.  Instead, make the old names
7588         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
7589         __USE_GNU_REGEX.
7590         (REG_BACKSLASH_ESCAPE_IN_LISTS):
7591         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
7592         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
7593         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
7594         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
7595         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
7596         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
7597         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
7598         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
7599         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
7600         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
7601         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
7602         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
7603         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
7604         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
7605         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
7606         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
7607         (REG_NREGS):
7608         Remove.  All uses replaced by the old RE_* names.
7609         (RE_BACKSLASH_ESCAPE_IN_LISTS):
7610         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
7611         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
7612         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
7613         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
7614         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
7615         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
7616         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
7617         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
7618         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
7619         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
7620         Don't bother having these macros be independent of each others'
7621         values, since they no longer exist in the POSIX name space.
7622
7623         Rename the following member names back to their old names,
7624         unless !__USE_GNU_REGEX.  All uses changed back.
7625         (buffer): Renamed from re_buffer.
7626         (allocated): Renamed from re_allocated.
7627         (used): Renamed from re_used.
7628         (syntax): Renamed from re_syntax.
7629         (fastmap): Renamed from re_fastmap.
7630         (translate): Renamed from re_translate.
7631         (can_be_null): Renamed from re_can_be_null.
7632         (regs_allocated): Renamed from re_regs_allocated.
7633         (fastmap_accurate): Renamed from re_fastmap_accurate.
7634         (no_sub): Renamed from re_no_sub.
7635         (not_bol): Renamed from re_not_bol.
7636         (not_eol): Renamed from re_not_eol.
7637         (newline_anchor): Renamed from re_newline_anchor.
7638         (num_regs): Renamed from rm_num_regs.
7639         (start): Renamed from rm_start.
7640         (end): Renamed from rm_end.
7641
7642         (free_state): Move up a bit.
7643
7644         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
7645         #define to be empty.
7646         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
7647         when that is what is intended.
7648         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
7649         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
7650         (MAX): New macro.
7651         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
7652         All uses changed back to re_malloc, etc.  It's now the caller's
7653         responsibility to check for overflow; all callers changed.
7654         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
7655         (re_x2nrealloc): Remove.
7656         (free_state): Remove decl.
7657
7658         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
7659         (re_set_registers, re_exec):
7660         Use K&R-style defn.
7661
7662         2006-01-31  Roland McGrath  <roland@redhat.com>
7663
7664         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
7665         Reported by Mike Frysinger <vapier@gentoo.org>.
7666
7667         2006-01-15  Andreas Jaeger  <aj@suse.de>
7668
7669         [BZ #1950]
7670         * lib/regex_internal.c (re_string_reconstruct): Adjust for
7671         build_wcs_upper_buffer change.
7672         (build_wcs_upper_buffer): Change return type.
7673
7674         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
7675
7676         * lib/regex_internal.h: Include <stdint.h> if available.
7677
7678         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
7679
7680         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
7681
7682         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7683
7684         * lib/regcomp.c: Adjust for changed secondary hash function.
7685
7686         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
7687
7688         * lib/regex.h: Pretty printing.
7689         Clean up namespace a bit.
7690
7691         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
7692
7693         * lib/regexec.c (update_cur_sifted_state, check_arrival,
7694         check_arrival_add_next_nodes): Avoid using uninitialized variable.
7695
7696         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
7697                     Ulrich Drepper  <drepper@redhat.com>
7698
7699         [BZ #1302]
7700         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
7701         changed.
7702         (bitset_word_t): Renamed from bitset_word.  All uses changed.
7703
7704         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
7705
7706         [BZ #281]
7707         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
7708         * lib/regcomp.c: Remove unnecessary uses of
7709         unsigned RE_TRANSLATE_TYPE.
7710         * lib/regex_internal.h: Likewise.
7711         * lib/regex_internal.c: Likewise.
7712         * lib/regexec.c: Likewise.
7713         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
7714
7715         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
7716
7717         * lib/regexec.c (find_recover_state): Remove unnecessary
7718         initialization.
7719         (transit_state_bkref): Make DFA a const pointer.
7720         (get_subexp): Likewise.
7721         (check_arrival): Likewise.
7722         (update_cur_sifted_state): Likewise.
7723         (re_search_internal): Likewise.
7724         (prune_impossible_nodes): Likewise.
7725         (acquire_init_state_context): Likewise.
7726         (proceed_next_node): Likewise.
7727         (set_regs): Likewise.
7728         (free_fail_stack_return): Likewise.
7729         (check_arrival_expand_ecl): Mark DFA parameter as const.
7730         (check_arrival_expand_ecl_sub): Likewise.
7731         (check_subexp_limits): Likewise.
7732         (sub_epsilon_src_nodes):  Likewise.
7733         (add_epsilon_src_nodes):  Likewise.
7734         (merge_state_array): Likewise.
7735         (update_regs): Likewise.
7736         (build_trtable): Likewise.
7737         (sift_states_backward): Mark MCTX parameter as const.
7738         (build_sifted_states): Likewise.
7739         (update_cur_sifted_state): Likewise.
7740         (sift_states_mkref): Likewise.
7741         (check_arrival_expand_ecl): Mark eclosure as const.
7742         (check_dst_limits_calc_pos_1): Likewise.
7743         * lib/regex_internal.h (re_match_context_t): Make dfa a const
7744         pointer.
7745
7746         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
7747
7748         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
7749         (transit_state_sb): Likewise.
7750         (transit_state_mb): Likewise.
7751         (sift_states_iter_mb): Likewise.
7752         (check_arrival_add_next_nodes): Likewise.
7753         (check_node_accept_bytes): Change first parameter to pointer-to-const.
7754         [_LIBC] (re_search_2_stub): Use mempcpy.
7755
7756         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
7757         mbrtowc for very simple UTF-8 case.
7758
7759         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
7760         a pointer-to-const.
7761         (re_acquire_state_context): Likewise.
7762         * lib/regex_internal.h: Adjust prototypes.
7763
7764         * lib/regex.c: Prevent using C++ compilers.
7765
7766         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
7767         (re_acquire_state_context): Likewise.
7768
7769 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7770
7771         * modules/regex (Depends-on): Add ssize_t.
7772
7773 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7774
7775         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
7776         translation table.
7777
7778 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7779
7780         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
7781
7782 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
7783             Bruno Haible  <bruno@clisp.org>
7784
7785         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
7786         <sys/types.h> and <inttypes.h>.
7787
7788 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7789
7790         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
7791         `__error_t_defined', so argp.h will not typedef the former.
7792
7793 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
7794
7795         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
7796         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
7797         glibc names.  Even if glibc is changed to conform to POSIX, the
7798         traditional names will be available anyway, since regex depends on
7799         the extensions module.  Also, fix a longstanding typo in the
7800         implementation of Spencer ERE test #75 from grep 2.3.  Problems
7801         reported by Emanuele Giaquinta.  Also, change sense of cached
7802         variable, so that the message makes sense.
7803
7804 2006-03-24  Simon Josefsson  <jas@extundo.com>
7805
7806         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
7807         including some doc fixes.
7808         (base64_encode_alloc): Fix +1 bug on allocation failures.
7809
7810 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7811
7812         * lib/base64.c (base64_encode): Do not read past end of array with
7813         unsanitized input on systems with CHAR_BIT > 8.
7814
7815 2006-03-24  Eric Blake  <ebb9@byu.net>
7816
7817         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
7818
7819 2006-03-22  Karl Berry  <karl@gnu.org>
7820
7821         * config/srclist.txt (*setenv.[ch]): get from coreutils.
7822         * config/srclistvars.sh (COREUTILS): new var.
7823
7824 2006-03-17  Jim Meyering  <jim@meyering.net>
7825
7826         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
7827         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
7828
7829 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
7830
7831         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
7832         no longer needs it.  Instead, check that regoff_t is as least
7833         as wide as ptrdiff_t.
7834
7835         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
7836         so that our regex.h stays compatible with the installed regex.
7837         This is helpful for installers who configure --without-included-regex.
7838         Problem reported by Emanuele Giaquinta.
7839
7840 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
7841
7842         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
7843         Typedef to long int, not to off_, as POSIX will likely change
7844         in that direction.
7845
7846 2006-03-15  Eric Blake  <ebb9@byu.net>
7847
7848         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
7849
7850 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7851
7852         * lib/argp-help.c (validate_uparams): Fix typo
7853         * lib/argp-parse.c (argp_default_options): Consistently begin help
7854         messages with a lowercase letter.
7855
7856 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
7857
7858         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
7859         overrun buffers and shouldn't be used (much as gets shouldn't be
7860         used).
7861         * lib/time_r.c (asctime_r, ctime_r): Likewise.
7862
7863 2006-03-08  Simon Josefsson  <jas@extundo.com>
7864
7865         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
7866         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7867
7868 2006-03-08  Simon Josefsson  <jas@extundo.com>
7869
7870         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
7871         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7872
7873 2006-03-08  Simon Josefsson  <jas@extundo.com>
7874
7875         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
7876         signal that configure disabled the device.
7877
7878 2006-03-08  Simon Josefsson  <jas@extundo.com>
7879
7880         * build-aux/maint.mk: Fix refresh-po, to handle no translated
7881         languages.
7882
7883 2006-03-07  Simon Josefsson  <jas@extundo.com>
7884
7885         * modules/getopt (Depends-on): Add unistd.
7886
7887         * modules/unistd: New file.
7888
7889 2006-03-07  Simon Josefsson  <jas@extundo.com>
7890
7891         * modules/gc-random: New file.
7892
7893 2006-03-07  Simon Josefsson  <jas@extundo.com>
7894
7895         * m4/unistd_h.m4: New file.
7896
7897 2006-03-07  Simon Josefsson  <jas@extundo.com>
7898
7899         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
7900         test to be side-effect free by storing the result in the cache
7901         variable gl_cv_lib_readline, and moving the assignment of
7902         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
7903         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7904
7905 2006-03-07  Simon Josefsson  <jas@extundo.com>
7906
7907         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
7908         error on missing devices (the functions will return an error).
7909
7910         * m4/gc.m4: Move random stuff to gc-random.m4
7911
7912 2006-03-07  Simon Josefsson  <jas@extundo.com>
7913
7914         * lib/unistd_.h: New file.
7915
7916 2006-03-07  Simon Josefsson  <jas@extundo.com>
7917
7918         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
7919
7920 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7921
7922         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
7923         Problem reported by Juan Manuel Guerrero.
7924
7925 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7926
7927         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
7928         the unistd module.
7929         * lib/getlogin_r.c: Likewise.
7930         * lib/getlogin_r.h: Likewise.
7931         * lib/glob.c: Likewise.
7932         * lib/pagealign_alloc.c: Likewise.
7933         * lib/unistd_.h: Remove; no longer needed.
7934
7935 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7936
7937         * MODULES.html.sh (Support for systems lacking POSIX:2001):
7938         Add unistd.
7939         * modules/c-stack (Depends-on): Add unistd.
7940         * modules/getlogin_r: Likewise.
7941         * modules/glob: Likewise.
7942         * modules/pagealign_alloc: Likewise.
7943         * modules/unistd (Files): Remove lib/unistd_.h.
7944         (EXTRA_DIST): Remove.
7945         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
7946         need unistd_.h.
7947         (MOSTLYCLEANFILES): Remove unistd.h-t.
7948
7949 2006-03-03  Simon Josefsson  <jas@extundo.com>
7950
7951         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
7952
7953 2006-03-03  Simon Josefsson  <jas@extundo.com>
7954
7955         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
7956         libidn and bison.
7957
7958 2006-03-03  Simon Josefsson  <jas@extundo.com>
7959
7960         * build-aux/maint.mk: Add indent target.
7961
7962 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
7963
7964         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
7965         our replacement poll.h in any case, to avoid a differing
7966         declaration from a system header.  Seen on AIX.
7967
7968 2006-03-01  Simon Josefsson  <jas@extundo.com>
7969
7970         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
7971         <kasal@ucw.cz>.
7972
7973 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7974
7975         * modules/gettime (Depends-on): Add extensions module.
7976         * modules/nanosleep (Depends-on): Likewise.
7977         * modules/settime (Depends-on): Likewise.
7978
7979 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7980
7981         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
7982         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
7983         pedantically.
7984         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7985         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
7986
7987         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
7988         not "==".  Reported by Ralf Wildenhues.
7989
7990 2006-03-01  Karl Berry  <karl@gnu.org>
7991
7992         * doc/Copyright/request-*: new files, synced from gnuorg.
7993
7994 2006-03-01  Karl Berry  <karl@gnu.org>
7995
7996         * config/srclist.txt (Copyright/*): new entries.
7997
7998 2006-02-28  Simon Josefsson  <jas@extundo.com>
7999
8000         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
8001
8002 2006-02-27  Simon Josefsson  <jas@extundo.com>
8003
8004         * lib/base64.h: Indent #define's.  From Jim Meyering
8005         <jim@meyering.net>.
8006
8007 2006-02-27  Jim Meyering  <jim@meyering.net>
8008
8009         Revert the change of 2006-02-24, so these files can continue
8010         to be sync'd from gettext.
8011         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
8012         of `config.h'.
8013
8014 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
8015
8016         * modules/intprops: New file.
8017         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8018         Add intprops.
8019         * modules/getloadavg (Files): Remove lib/intprops.h.
8020         (Depends-on): Add intprops.
8021         * modules/human: Likewise.
8022         * modules/inttostr: Likewise.
8023         * modules/openat: Likewise.
8024         * modules/sig2str: Likewise.
8025         * modules/userspec: Likewise.
8026         * modules/utimecmp: Likewise.
8027         * modules/xnanosleep: Likewise.
8028         * modules/xstrtol: Likewise.
8029
8030 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
8031
8032         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
8033         * modules/lock-tests (TESTS): Use $(EXEEXT).
8034         * modules/tls-tests: Likewise.
8035         * modules/argp-tests: Likewise.
8036         (check_PROGRAMS): New var, replacing...
8037         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
8038
8039 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8040
8041         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
8042         `config.h'.
8043
8044 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
8045
8046         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
8047
8048 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8049
8050         Sync from coreutils.
8051         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
8052         gl_CHDIR_SAFER.
8053
8054 2006-02-22  Jim Meyering  <jim@meyering.net>
8055
8056         Sync from coreutils.
8057         * m4/chdir-safer.m4: New file.
8058
8059 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
8060
8061         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
8062         AT_FDCWD exceeds INT_MAX.
8063         * lib/openat.h (AT_FDCWD): Likewise.
8064
8065 2006-02-17  Eric Blake  <address@hidden>
8066
8067         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
8068
8069 2006-02-16  Simon Josefsson  <jas@extundo.com>
8070
8071         * modules/getaddrinfo (Depends-on): Add sys_socket.
8072
8073 2006-02-15  Simon Josefsson  <jas@extundo.com>
8074
8075         * build-aux/maint.mk: Add dsyntax-check rule.
8076
8077 2006-02-15  Eric Blake  <ebb9@byu.net>
8078
8079         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
8080         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
8081         'present but cannot compile' warnings on cygwin.
8082         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
8083         use ws2tcpip.h if sys/socket.h works.
8084         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
8085         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
8086
8087 2006-02-14  Simon Josefsson  <jas@extundo.com>
8088
8089         * modules/maintainer-makefile (Files): Rename.
8090
8091         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
8092         and (the local) Makefile.cfg to maint-cfg.mk.
8093
8094         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
8095         to the latter.
8096
8097         * modules/maintainer-makefile: New module.
8098
8099         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
8100         severaly stripped to make it possible to build it up from scratch
8101         with reliable tests.
8102
8103         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
8104         fixes to permit overriding the default actions when configure and
8105         makefile are not available.
8106
8107 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
8108
8109         Sync from coreutils.
8110         * modules/lstat (Depends-on): Don't depend on xalloc.
8111         (License): Change from GPL to LGPL, since this is now simply a
8112         replacement for a libc function.
8113
8114 2006-02-14  Jim Meyering  <jim@meyering.net>
8115
8116         Sync from coreutils.
8117
8118         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
8119         failure on deficient systems, and simplify gnulib lgpl dependencies.
8120         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
8121         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
8122
8123         * lib/xalloc-die.c: Remove unused definition of N_.
8124
8125 2006-02-14  Jim Meyering  <jim@meyering.net>
8126
8127         Sync from coreutils.
8128         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
8129         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
8130         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
8131         double-quote uses of that variable, to accommodate the rare case in
8132         which getmntent is available in none of the libraries checked.  This
8133         happens at least on FreeBSD 5.0.
8134
8135 2006-02-13  Simon Josefsson  <jas@extundo.com>
8136
8137         * gnulib-tool (Usage): Fix --import, from
8138         karl@freefriends.org (Karl Berry).
8139
8140 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8141
8142         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
8143
8144 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8145
8146         * lib/argp-namefrob.h: Restore changes accidentally lost during the
8147         "autoupdate" on 2005-12-12.
8148
8149 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8150
8151         * modules/closeout (Depends-on): Remove atexit.
8152
8153 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8154
8155         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
8156         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
8157
8158 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
8159
8160         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
8161         __EXTENSIONS__ if this causes compilation to fail.  Problem
8162         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
8163         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
8164
8165 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
8166
8167         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
8168         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
8169         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
8170         All uses changed.
8171
8172 2006-01-26  Simon Josefsson  <jas@extundo.com>
8173
8174         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
8175         prototype is visible on mingw32.
8176
8177         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
8178         for mingw32.
8179
8180         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
8181         mingw32).
8182
8183 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
8184
8185         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
8186         attempt to open for write; this always fails, at least on POSIX
8187         hosts.  This reinstates the 2006-01-09 change, which was
8188         inadvertently removed.
8189
8190 2006-01-26  Bruno Haible  <bruno@clisp.org>
8191
8192         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
8193         Reported by Paul Eggert.
8194
8195 2006-01-26  Bruno Haible  <bruno@clisp.org>
8196             Paul Eggert  <eggert@cs.ucla.edu>
8197
8198         * lib/stdbool_.h (_Bool)
8199         [(! (defined __cplusplus || defined __BEOS__)
8200           && !defined __GNUC__
8201           && !(defined __HP_cc || defined __xlc__
8202                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
8203                || defined __sgi))]:
8204         #define to signed char in these cases too; this simplifies
8205         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
8206         etc., separately) and makes it more conservative.
8207
8208 2006-01-25  Simon Josefsson  <jas@extundo.com>
8209
8210         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
8211         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
8212         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
8213
8214 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8215
8216         * lib/argp-namefrob.h: Bugfix. Remove stray #
8217
8218 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
8219
8220         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
8221         so that we test the test.
8222         Check for yet another HP-UX cc bug involving *bool |= bool.
8223
8224 2006-01-25  Karl Berry  <karl@gnu.org>
8225
8226         * config/srclist.txt (vasnprintf.c): sync lost.
8227
8228 2006-01-25  Jim Meyering  <jim@meyering.net>
8229
8230         Sync from the stable (b5) branch of coreutils:
8231
8232         * lib/fts.c (fts_children): Don't let close() clobber errno from
8233         failed fchdir().
8234
8235         * lib/fts.c (fts_stat): When following a symlink-to-directory,
8236         don't necessarily interpret stat-fails+lstat-succeeds as indicating
8237         a dangling symlink.  That can also happen at least for ELOOP.
8238         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
8239         FYI, this bug predates the inclusion of fts.c in coreutils.
8240
8241         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
8242         in their own block, so pre-c99 compilers don't object.
8243
8244         Avoid the double-free (first in fts_read, second in fts_close) that
8245         would occur when an `active' directory is made inaccessible (e.g.,
8246         via chmod a-x) during a traversal.
8247         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8248         before returning.  Reproduce this failure by
8249         mkdir -p a/b; cd a; chmod a-x . b
8250         Reported by Stavros Passas.
8251
8252 2006-01-25  Jim Meyering  <jim@meyering.net>
8253
8254         * lib/fileblocks.c: Remove more useless parentheses.
8255         * lib/readutmp.h: Likewise.
8256
8257 2006-01-25  Bruno Haible  <bruno@clisp.org>
8258
8259         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
8260         warnings.
8261         Reported by Paul Eggert.
8262
8263 2006-01-25  Bruno Haible  <bruno@clisp.org>
8264
8265         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
8266         rid of a trap command. For Solaris sh.
8267         Reported by Mark D. Baushke <mdb@gnu.org>.
8268
8269 2006-01-24  Simon Josefsson  <jas@extundo.com>
8270
8271         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
8272         Bruno.
8273
8274 2006-01-24  Karl Berry  <karl@gnu.org>
8275
8276         * config/srclist.txt (argp-namefrob.h): sync lost.
8277
8278 2006-01-24  Jim Meyering  <jim@meyering.net>
8279
8280         * modules/openat (Files): Add lib/intprops.h.
8281         From Mark D. Baushke.
8282
8283 2006-01-24  Jim Meyering  <jim@meyering.net>
8284
8285         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
8286         Reported by Mark D. Baushke.
8287
8288 2006-01-24  Jim Meyering  <jim@meyering.net>
8289
8290         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
8291
8292 2006-01-24  Bruno Haible  <bruno@clisp.org>
8293
8294         * modules/strnlen (Maintainer): Change from glibc to all.
8295
8296 2006-01-24  Bruno Haible  <bruno@clisp.org>
8297
8298         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
8299         Patch by Paul Eggert.
8300
8301 2006-01-24  Bruno Haible  <bruno@clisp.org>
8302
8303         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
8304         already has it.
8305         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
8306         2005-11-26.
8307
8308         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
8309         'signed char' to avoid problems with the built-in _Bool type.
8310         Reported by Paul Eggert on 2005-11-26.
8311
8312 2006-01-24  Bruno Haible  <bruno@clisp.org>
8313
8314         * gnulib-tool (func_import): Avoid constructing complicated sed
8315         expressions inside backquote.
8316         Report and solution by Mark D. Baushke <mdb@gnu.org>.
8317
8318 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
8319
8320         These changes imported from libc.
8321         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
8322         test and two separate function calls.
8323         * lib/strndup.c (__strndup): Add libc_hidden_def.
8324
8325 2006-01-23  Simon Josefsson  <jas@extundo.com>
8326
8327         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
8328         Remove the test_*_SOURCES variable: automake infers it by default.
8329         * modules/tls-tests: Likewise.
8330
8331 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8332
8333         Work around porting bugs reported by Dieter in
8334         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
8335         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
8336         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
8337         Include "getopt.h" first, to check interface.
8338         (getenv): Declare only if defined HAVE_DECL_GETENV &&
8339         !HAVE_DECL_GETENV.
8340         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
8341         (__strndup): Revert to K&R-style function dfns, the glibc style.
8342         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
8343         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
8344         Include strnlen.h first, to get prototype properly.
8345         (strnlen): Renamed from __strnlen.
8346         Remove weak alias.
8347
8348 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8349
8350         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
8351
8352 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8353
8354         * config/srclist.txt: Adjust to reflect glibc reorganization.
8355         This affects only comments.
8356
8357 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8358
8359          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
8360          Reported by Bruce Korb <bkorb@gnu.org>.
8361
8362 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
8363
8364         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
8365         to pacify gcc -Wswitch-default.
8366
8367 2006-01-22  Bruno Haible  <bruno@clisp.org>
8368
8369         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
8370         temporary buffer for sprintf, take into account the precision also
8371         for 'd', 'i', 'u', 'o', 'x', 'X'.
8372
8373 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8374
8375         * modules/argp-tests: New module
8376         * tests/test-argp.c: New file
8377         * tests/test-argp-2.sh: New file
8378
8379 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8380
8381         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
8382         (__argp_base_name): Removed
8383         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
8384         typo.
8385         (__argp_base_name): Provide macro definition or extern declaration
8386         depending on the configuration
8387
8388 2006-01-20  Simon Josefsson  <jas@extundo.com>
8389
8390         * modules/inet_ntop (Depends-on): Depend on sys_socket.
8391
8392 2006-01-20  Simon Josefsson  <jas@extundo.com>
8393
8394         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
8395
8396 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
8397
8398         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
8399         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
8400         Suggested by Bruno Haible.
8401
8402 2006-01-20  Karl Berry  <karl@gnu.org>
8403
8404         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
8405         until changes propagate, I guess.
8406
8407 2006-01-19  Simon Josefsson  <jas@extundo.com>
8408
8409         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
8410
8411 2006-01-19  Simon Josefsson  <jas@extundo.com>
8412
8413         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
8414
8415 2006-01-19  Simon Josefsson  <jas@extundo.com>
8416
8417         * gnulib-tool: Set check_PROGRAMS.
8418
8419         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8420         modules/des-tests, modules/gc-arcfour-tests,
8421         modules/gc-arctwo-tests, modules/gc-des-tests,
8422         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8423         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8424         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8425         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8426         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8427         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
8428         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
8429         test_*_SOURCES.
8430
8431 2006-01-18  Simon Josefsson  <jas@extundo.com>
8432
8433         * modules/socklen (Depends-on): Depend on sys_socket.
8434
8435 2006-01-18  Simon Josefsson  <jas@extundo.com>
8436
8437         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8438         modules/des-tests, modules/gc-arcfour-tests,
8439         modules/gc-arctwo-tests, modules/gc-des-tests,
8440         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8441         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8442         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8443         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8444         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8445         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
8446         $(EXEEXT) to automake TESTS variable, for mingw32.
8447
8448 2006-01-17  Simon Josefsson  <jas@extundo.com>
8449
8450         * modules/socklen (Include): Need sys/socket.h.
8451
8452 2006-01-17  Bruno Haible  <bruno@clisp.org>
8453
8454         * modules/ssize_t (Include): Add <sys/types.h>.
8455
8456 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
8457
8458         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
8459         it's not portable and it doesn't work with cross-compiles.
8460         Problem reported by Bruno Haible.  Fix missing-$ typo in
8461         'test "gl_cv_ignore_unused_libraries" ...' that prevented
8462         -zignore from being used with Sun's C compiler.
8463
8464 2006-01-12  Simon Josefsson  <jas@extundo.com>
8465
8466         * lib/base64.c: Fix warning, reported by Bruno Haible
8467         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
8468
8469 2006-01-12  Bruno Haible  <bruno@clisp.org>
8470
8471         * modules/ldd: New file.
8472         * build-aux/ldd.sh.in: New file.
8473         * MODULES.html.sh (Support for building libraries and executables): Add
8474         ldd.
8475
8476 2006-01-12  Bruno Haible  <bruno@clisp.org>
8477
8478         * m4/ldd.m4: New file.
8479
8480 2006-01-12  Bruno Haible  <bruno@clisp.org>
8481
8482         * gnulib-tool (func_import, func_create_testdir): Don't go into an
8483         endless loop while replacing $auxdir with build-aux.
8484
8485 2006-01-11  Simon Josefsson  <jas@extundo.com>
8486
8487         * lib/stdint_.h (SIZE_MAX): Add missing (.
8488
8489 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
8490
8491         Sync from coreutils.
8492         * lib/md5.c: Fix commentary typos.
8493         (alignof, UNALIGNED_P): No need for a GCC-specific version.
8494         * lib/md5.h (__attribute__): Remove; unused.
8495         * lib/sha1.c: Fix commentary to match md5 better.
8496         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
8497         so that we don't need to worry about alignment.  All uses changed.
8498         This merges the 2005-10-28 md5 change into sha1.
8499
8500 2006-01-11  Jim Meyering  <jim@meyering.net>
8501
8502         Sync from coreutils.
8503         * lib/md5.c (OP): Fix spacing.
8504
8505 2006-01-11  Bruno Haible  <bruno@clisp.org>
8506
8507         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8508         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
8509         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
8510
8511 2006-01-11  Bruno Haible  <bruno@clisp.org>
8512
8513         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8514         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
8515         the "early" section as well.
8516
8517 2006-01-11  Bruno Haible  <bruno@clisp.org>
8518
8519         Avoid "ar: no archive members specified" error on MacOS X.
8520         * gnulib-tool (func_modules_add_dummy): New function.
8521         (func_import, func_create_testdir): Invoke it.
8522
8523 2006-01-11  Bruno Haible  <bruno@clisp.org>
8524
8525         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
8526         with $auxdir in AC_CONFIG_FILES statements.
8527
8528 2006-01-11  Bruno Haible  <bruno@clisp.org>
8529
8530         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8531         Initialize also noinst_HEADERS to empty.
8532
8533 2006-01-11  Bruno Haible  <bruno@clisp.org>
8534
8535         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
8536         variables.
8537         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
8538         autoreconf.
8539
8540 2006-01-11  Bruno Haible  <bruno@clisp.org>
8541
8542         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
8543         overridable by the user.
8544         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8545
8546 2006-01-10  Simon Josefsson  <jas@extundo.com>
8547
8548         * modules/sys_socket: New file.
8549
8550 2006-01-10  Simon Josefsson  <jas@extundo.com>
8551
8552         * m4/sys_socket_h.m4: New file.
8553
8554 2006-01-10  Simon Josefsson  <jas@extundo.com>
8555
8556         * lib/socket_.h: New file.
8557
8558 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8559
8560         * modules/readutmp (Maintainer): Add myself.
8561
8562 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8563
8564         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
8565         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
8566         People who are still concerned with buggy memcmp implementations
8567         can invoke gl_FUNC_MEMCMP themselves.
8568
8569 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8570
8571         * lib/regex_internal.h (BITSET_WORD_BITS):
8572         Work around a bug in 64-bit PGC (before version 6.1-2), where the
8573         preprocessor mishandles large unsigned values as if they were signed.
8574         Problem reported by Claudio Fontana in
8575         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
8576
8577 2006-01-10  Jim Meyering  <jim@meyering.net>
8578
8579         Avoid the double-free (first in fts_read, second in fts_close) that
8580         would occur when an `active' directory is made inaccessible (e.g.,
8581         via chmod a-x) during a traversal.
8582         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8583         before returning.  Reproduce this failure by
8584         mkdir -p a/b; cd a; chmod a-x . b
8585         Reported by Stavros Passas.
8586
8587         Sync from coreutils.
8588         * lib/sha1.c: Tweak grammar in a comment.
8589
8590 2006-01-10  Jim Meyering  <jim@meyering.net>
8591
8592         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
8593         Patch by Joerg Sonnenberger.
8594
8595 2006-01-10  Bruno Haible  <bruno@clisp.org>
8596
8597         * modules/readutmp: Depend on module free.
8598         * modules/strtok_r: Depend on module restrict.
8599
8600 2006-01-10  Bruno Haible  <bruno@clisp.org>
8601
8602         * modules/gettext (configure.ac): Add an invocation of
8603         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
8604
8605 2006-01-10  Bruno Haible  <bruno@clisp.org>
8606
8607         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
8608         Reported by Werner Lemberg <wl@gnu.org>.
8609
8610 2006-01-10  Bruno Haible  <bruno@clisp.org>
8611
8612         * lib/localcharset.c: Update from GNU gettext.
8613
8614 2006-01-10  Bruno Haible  <bruno@clisp.org>
8615
8616         * lib/argp.h (__const): Remove macro. Use const instead.
8617         * lib/argp-fmtstream.h (__const): Likewise.
8618         * lib/glob_.h (__const): Remove macro.
8619         * lib/glob-libc.h: Use const instead of __const.
8620
8621 2006-01-10  Bruno Haible  <bruno@clisp.org>
8622
8623         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
8624         variable.
8625         Needed to avoid an automake error regarding the 'gettext' module.
8626
8627 2006-01-09  Simon Josefsson  <jas@extundo.com>
8628
8629         * modules/inet_ntop (Depends-on): Add restrict.
8630
8631 2006-01-09  Simon Josefsson  <jas@extundo.com>
8632
8633         * modules/gc-rijndael-tests (License): Put under LGPL.
8634
8635         * modules/gc-des-tests (License): Likewise.
8636
8637         * modules/gc-arcfour-tests (License): Likewise.
8638
8639         * modules/gc-arctwo-tests (License): Likewise.
8640
8641         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
8642
8643         * modules/gc-hmac-sha1-tests (Files): Likewise.
8644
8645         * modules/gc-hmac-md5-tests (License): Likewise.
8646
8647         * modules/gc-sha1-tests (License): Likewise.
8648
8649         * modules/gc-md5-tests (License): Likewise.
8650
8651         * modules/gc-md4-tests (License): Likewise.
8652
8653         * modules/gc-md2-tests (License): Likewise.
8654
8655         * modules/gc-tests (License): Likewise.
8656
8657         * modules/des-tests (License): Likewise.
8658
8659         * modules/md4-tests (License): Likewise.
8660
8661         * modules/md2-tests (License): Likewise.
8662
8663 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8664
8665         Sync from coreutils:
8666
8667         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
8668         * modules/lib-ignore: New file.
8669         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
8670         chdir-safer.m4, lchmod.m4.
8671         * modules/openat: Add mkdirat.c, openat-priv.h.
8672
8673 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8674
8675         Sync from coreutils.
8676         * m4/lib-ignore.m4: New file.
8677         * m4/lchmod.m4: New file.
8678
8679 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8680
8681         Sync from coreutils.
8682         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
8683         for write access: POSIX says that must fail.
8684         * lib/fts.c (diropen): Likewise.
8685         * lib/save-cwd.c (save_cwd): Likewise.
8686         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
8687         well, for minor improvements on hosts that lack O_DIRECTORY.
8688         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
8689         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
8690         Fall back on chown if open failed with EACCES.
8691
8692         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
8693         Report an error at compile-time if only a 1-second nominal clock
8694         resolution is found.
8695
8696         * lib/lchmod.h: New file.
8697         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
8698         (make_dir_parents): Use lchown rather than chown, and
8699         lchmod rather than chmod.
8700
8701         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
8702         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
8703         "proc" reported by n0dalus.
8704
8705         * lib/mountlist.c: Include <limits.h>.
8706         (dev_from_mount_options)
8707         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
8708         New function.  It no longer assumes "dev=" has the System V meaning
8709         on Linux (since it doesn't).  It also parses "dev=" more carefully.
8710         (read_file_system_list)
8711         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
8712         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
8713         dev= in that case.
8714
8715         * lib/posixtm.h (PDS_PRE_2000): New macro.
8716         * lib/posixtm.c (year): Arg is now syntax_bits rather than
8717         allow_century.  All usages changed.  Reject dates outside the range
8718         1969-1999 if PDS_PRE_2000 is used.
8719
8720 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8721
8722         Sync from coreutils.
8723         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
8724         (Time of day items): Mention the possibility of leap seconds.
8725         Problem reported by Dr. David Alan Gilbert.
8726
8727 2006-01-09  Jim Meyering  <jim@meyering.net>
8728
8729         Sync from coreutils.
8730
8731         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
8732
8733         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
8734
8735         * lib/modechange.c (mode_compile): Reject an invalid mode string
8736         that starts with an octal digit.  From Andreas Gruenbacher.
8737
8738         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
8739         and dup to open_safer and dup_safer, respectively.
8740         (openat_permissive): Fix typo in comment.
8741
8742         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
8743         "gettext.h"; either no longer needed or are guaranteed by openat.h.
8744         (_): Remove; no longer needed.
8745         (openat): Renamed from rpl_openat; no need for rpl_openat
8746         since openat.h renames openat for us.
8747         Replace most of the body with a call to openat_permissive,
8748         to avoid duplicate code.
8749         Port to (probably hypothetical) environments were mode_t is
8750         wider than int.
8751         (openat_permissive): Require mode arg, so that we can check
8752         types better.  Put it just after flags.  Change cwd failure
8753         indicator from pointer-to-bool to pointer-to-errno-value.
8754         All callers changed.
8755         Invoke openat_save_fail and/or openat_restore_fail if
8756         cwd_errno is null, so that openat can call us.
8757         (openat_permissive, fdopendir, fstatat, unlinkat):
8758         Simplify errno handling to avoid some duplicate code,
8759         as it's OK to set errno on success.
8760         * lib/openat.h: Revamp code so that function macros depend on
8761         __OPENAT_PREFIX only, not also on AT_FDCWD.
8762         (openat_ro): Remove.  Caller changed to use openat_permissive.
8763         (openat_permissive): Now a macro, if not a function.
8764         (openat_restore_fail, openat_save_fail): Now always functions,
8765         since mkdirat needs them even if __OPENAT_PREFIX is defined.
8766
8767         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
8768         and openat.c.
8769         * lib/mkdirat.c: Include openat-priv.h.
8770         Remove definitions of macros defined therein.
8771         * lib/openat.c: Likewise.
8772
8773         * lib/mkdirat.c (mkdirat): New file and function.
8774         * lib/openat.h (mkdirat): Declare.
8775
8776         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
8777
8778         * lib/openat.h (openat_permissive): Declare.
8779         (openat_ro): Define.
8780
8781         * lib/openat.c (EXPECTED_ERRNO): New macro.
8782         (openat_permissive): New function -- used in remove.c rewrite.
8783         (all functions): Set errno just before returning, only if there
8784         was an actual failure.
8785         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
8786
8787         Emulate openat-family functions using Linux's procfs, if possible.
8788         Idea and some code based on Ulrich Drepper's glibc changes.
8789
8790         * lib/openat.c: (BUILD_PROC_NAME): New macro.
8791         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
8792         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
8793         before falling back on save_cwd and restore_cwd.
8794         (fdopendir, fstatat, unlinkat): Likewise.
8795
8796         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
8797         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
8798
8799         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
8800         as second argument to va_arg.  Otherwise, some versions of gcc
8801         warn that `if this code is reached, the program will abort'.
8802
8803 2006-01-09  Jim Meyering  <jim@meyering.net>
8804
8805         Sync from coreutils.
8806         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
8807         Require openat-priv.h.
8808
8809 2006-01-09  Bruno Haible  <bruno@clisp.org>
8810
8811         * modules/strnlen (Include): Use strnlen.h.
8812
8813 2006-01-09  Bruno Haible  <bruno@clisp.org>
8814
8815         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
8816
8817 2006-01-09  Bruno Haible  <bruno@clisp.org>
8818
8819         * lib/sysexit_.h (EX_OK): New macro.
8820         Suggested by Martin Lambers <marlam@marlam.de>.
8821
8822 2006-01-09  Bruno Haible  <bruno@clisp.org>
8823
8824         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
8825         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
8826
8827 2006-01-09  Bruno Haible  <bruno@clisp.org>
8828
8829         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
8830         numbers.
8831
8832 2006-01-09  Bruno Haible  <bruno@clisp.org>
8833
8834         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
8835         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
8836         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
8837         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
8838
8839 2006-01-09  Bruno Haible  <bruno@clisp.org>
8840
8841         * build-aux/javacomp.sh.in: New file, moved from lib/.
8842         * modules/javacomp-script (Files): Update.
8843         (configure.ac): Add AC_CONFIG_FILES invocation.
8844         (EXTRA_DIST): Remove variable.
8845
8846         * build-aux/javaexec.sh.in: New file, moved from lib/.
8847         * modules/javaexec (Files): Update.
8848         (configure.ac): Add AC_CONFIG_FILES invocation.
8849         (EXTRA_DIST): Remove javaexec.sh.in.
8850
8851         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
8852         * modules/csharpcomp-script (Files): Update.
8853         (configure.ac): Add AC_CONFIG_FILES invocation.
8854         (EXTRA_DIST): Remove variable.
8855
8856         * build-aux/csharpexec.sh.in: New file, moved from lib/.
8857         * modules/csharpexec (Files): Update.
8858         (configure.ac): Add AC_CONFIG_FILES invocation.
8859         (EXTRA_DIST): Remove csharpexec.sh.in.
8860
8861 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
8862
8863         Sync from coreutils.
8864
8865         Add POSIX ACL support
8866         * lib/acl.h (copy_acl, set_acl): Add declarations.
8867         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
8868         systems other than Linux.
8869         (chmod_or_fchmod): New function: use fchmod when possible,
8870         and chmod otherwise.
8871         (file_has_acl): Add a POSIX ACL implementation, with a
8872         Linux-specific subcase.
8873         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
8874         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
8875         acls are unsupported.
8876         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
8877         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
8878         are unsupported.
8879
8880 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
8881
8882         Sync from coreutils.
8883         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
8884
8885 2006-01-07  Bruno Haible  <bruno@clisp.org>
8886
8887         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
8888         gl_EARLY.
8889
8890 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8891
8892         * lib/strftime.c (tzname): Don't declare if it is already #defined.
8893         Problem reported for Mingw by Mark Junker.
8894
8895 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8896
8897         * README: Gnulib normally doesn't generate a tarball.
8898
8899 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
8900
8901         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
8902         long int, not int, for nanosecond counts, so that people who are
8903         used to POSIX struct timespec won't be surprised.  Reported by Jim
8904         Meyering.
8905
8906 2005-12-28  Bruno Haible  <bruno@clisp.org>
8907
8908         * build-aux/config.rpath: Update from GNU gettext.
8909
8910 2005-12-16  Jim Meyering  <jim@meyering.net>
8911
8912         * modules/fprintftime: New module.
8913         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
8914
8915 2005-12-16  Jim Meyering  <jim@meyering.net>
8916
8917         * m4/fprintftime.m4: New file.
8918
8919 2005-12-16  Jim Meyering  <jim@meyering.net>
8920
8921         * lib/fprintftime.c, lib/fprintftime.h: New files.
8922
8923 2005-12-15  Simon Josefsson  <jas@extundo.com>
8924
8925         * modules/socklen (configure.ac): Fix M4 macro name, to align with
8926         new m4/socklen.m4.
8927
8928 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8929
8930         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
8931         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
8932
8933 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8934
8935         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
8936         * lib/argp-help.c (fill_in_uparams): Check if the constructed
8937         struct uparams is valid. Fall back to the default values if it is
8938         not.
8939
8940 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8941
8942         * modules/argp (Files): Add argp-pin.c
8943         (Depends-on): dirname
8944         (lib_SOURCES): Add argp-pin.c
8945
8946 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8947
8948         * m4/argp.m4:  Check if program_invocation_name and
8949         program_invocation_short_name are declared and define appropriate
8950         macros if they are not.
8951
8952 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8953
8954         * lib/argp-help.c (__argp_base_name): New function
8955         (__argp_short_program_name): Rewrite using __argp_base_name
8956         * lib/argp-namefrob.h: Define program_invocation_name and
8957         program_invocation_short_name if requested
8958         (__argp_base_name): Add prototype
8959         * lib/argp-parse.c (argp_def): Use gettext wrappers
8960         (argp_default_parser): Use __argp_base_name
8961         * lib/argp-pin.c: New file. Defines program_invocation_name and
8962         program_invocation_short_name on systems that lack them.
8963
8964 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8965
8966         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
8967         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8968         porting problem reported by Georg Schwarz in
8969         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8970
8971 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8972
8973         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
8974         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8975         porting problem reported by Georg Schwarz in
8976         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8977
8978 2005-12-05  Bruno Haible  <bruno@clisp.org>
8979
8980         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
8981         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
8982         Reported by Mark Junker <mjscod@gmx.de>.
8983
8984 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
8985
8986         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
8987         Use implementation from Albert Chin, with some
8988         comments/corrections by Stepan Kasal and myself.
8989
8990 2005-12-02  Bruno Haible  <bruno@clisp.org>
8991
8992         * gnulib-tool (func_import): Accept GPLed build tool modules when
8993         --lgpl is given.
8994         * modules/csharpcomp-script: New file.
8995         * modules/csharpcomp: Depend on it.
8996         * modules/javacomp-script: New file.
8997         * modules/javacomp: Depend on it.
8998         Suggested by Simon Josefsson.
8999
9000 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
9001
9002         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
9003         statement, to work around an HP-UX 10.20 compiler bug reported by
9004         Peter O'Gorman.
9005
9006 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9007
9008         * modules/savedir (Depends-on): Add openat.
9009
9010 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9011
9012         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
9013         (uintmax_t) [defined uintmax_t]: Do not declare.
9014         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
9015         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
9016         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
9017         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
9018         sake of portability to weird hosts that C allows (though we don't
9019         know of any practical examples).
9020
9021         * lib/savedir.h (fdsavedir): New decl.
9022         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
9023         contains most of the former guts of savedir.
9024         (savedir): Use savedirstream.
9025         Include "openat.h".
9026
9027 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
9028
9029         * modules/obstack (Files): Add m4/ulonglong.m4.
9030         Problem reported by Davide Angelocola.
9031
9032 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
9033
9034         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
9035         coreutils no longer futzes with rounding modes.
9036
9037 2005-11-14  Jim Meyering  <jim@meyering.net>
9038
9039         * lib/mkstemp-safer.c: Include <config.h>, required for possible
9040         replacement of mkstemp.
9041
9042 2005-11-10  Simon Josefsson  <jas@extundo.com>
9043
9044         * lib/readline.c: Remove EOL.
9045
9046 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9047
9048         * modules/gethrxtime (Depends-on): Add gettime.
9049
9050 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9051
9052         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
9053         or gettimeofday; no longer needed.
9054
9055 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9056
9057         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
9058         time business.
9059         (gethrxtime) [! (HAVE_NANOUPTIME
9060         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
9061         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
9062         our own approximation.
9063
9064 2005-11-08  Eric Blake  <ebb9@byu.net>
9065
9066         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9067
9068 2005-11-08  Eric Blake  <ebb9@byu.net>
9069
9070         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9071
9072 2005-11-04  Bruno Haible  <bruno@clisp.org>
9073
9074         * gnulib-tool: Implement --update mode.
9075
9076 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9077
9078         Fix porting problem reported by Theodoros V. Kalamatianos.
9079         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
9080         Don't assume that futimes failing means we must fail.
9081
9082 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9083
9084         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
9085         variables to suggest the intended function of the PATH_MAX check.
9086
9087 2005-10-30  Kean Johnston  <jkj@sco.com>
9088
9089         Trivial changes to support SCO systems.
9090         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
9091         as PATH_MAX.
9092         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
9093         where __ptr is null when no I/O is pending.
9094
9095 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
9096
9097         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
9098         leave errno alone.  Problem reported by Dmitry V. Levin.
9099
9100 2005-10-28  Simon Josefsson  <jas@extundo.com>
9101
9102         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
9103         Test more.
9104
9105         * tests/test-gc-md2.c, tests/test-md2.c: New files.
9106
9107         * modules/md2, modules/md2-tests: New files.
9108
9109 2005-10-28  Simon Josefsson  <jas@extundo.com>
9110
9111         * m4/inet_ntop.m4: More tests.
9112
9113         * m4/gc-md2.m4, md2.m4: New file.
9114
9115 2005-10-28  Simon Josefsson  <jas@extundo.com>
9116
9117         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
9118         "restrict" keywords, as per POSIX.  Protect the function
9119         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
9120         Don't use K&R prototypes.  Check the sprintf return values.
9121         Re-define EAFNOSUPPORT if not present.  Indent.
9122
9123         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
9124         suggested by Bruno Haible <bruno@clisp.org>.
9125
9126         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
9127
9128         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
9129
9130         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
9131         libgcrypt).
9132
9133         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
9134
9135         * lib/md2.h, lib/md2.c: New files.
9136
9137 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
9138
9139         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
9140         errno alone.  Problem reported by Frederic Jolliton.
9141
9142 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9143
9144         * modules/verify (License): Change from GPL to LGPL.  This is a
9145         tiny module and there are apparently near-equivalents that are
9146         under the BSD license.
9147
9148 2005-10-24  Simon Josefsson  <jas@extundo.com>
9149
9150         * modules/sha1: Relicense to LGPL.
9151
9152 2005-10-24  Simon Josefsson  <jas@extundo.com>
9153
9154         * lib/md4.h: Shrink buffer size, now that we changed the type.
9155
9156 2005-10-23  Simon Josefsson  <jas@extundo.com>
9157
9158         * gnulib-tool (func_import): Fix --tests-base.
9159
9160 2005-10-22  Simon Josefsson  <jas@extundo.com>
9161
9162         * modules/arcfour (Depends-on): Need stdint.
9163
9164 2005-10-22  Simon Josefsson  <jas@extundo.com>
9165
9166         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
9167         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
9168
9169 2005-10-22  Simon Josefsson  <jas@extundo.com>
9170
9171         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
9172         suggested by Bruno Haible <bruno@clisp.org>.
9173
9174 2005-10-22  Simon Josefsson  <jas@extundo.com>
9175
9176         * lib/crc.h: Include stddef.h, for size_t.
9177
9178 2005-10-22  Simon Josefsson  <jas@extundo.com>
9179
9180         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
9181         arcfour_context struct (simplify test vector testing in GNU
9182         Shishi).
9183
9184 2005-10-21  Simon Josefsson  <jas@extundo.com>
9185
9186         * modules/des, modules/des-tests: New files.
9187
9188         * modules/gc-des, modules/gc-des-tests: New files.
9189
9190         * tests/test-des.c, tests/test-gc-des.c: New file.
9191
9192 2005-10-21  Simon Josefsson  <jas@extundo.com>
9193
9194         * modules/arctwo, modules/arctwo-tests: New files.
9195
9196         * tests/test-arctwo.c: New file.
9197
9198         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
9199
9200         * tests/test-gc-arctwo.c: New file.
9201
9202 2005-10-21  Simon Josefsson  <jas@extundo.com>
9203
9204         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
9205         Bruno Haible <bruno@clisp.org>.
9206
9207         * m4/gc-des.m4: New file.
9208
9209 2005-10-21  Simon Josefsson  <jas@extundo.com>
9210
9211         * m4/arctwo.m4: New file.
9212
9213         * m4/gc-arctwo.m4: New file.
9214
9215 2005-10-21  Simon Josefsson  <jas@extundo.com>
9216
9217         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
9218         block.
9219
9220 2005-10-21  Simon Josefsson  <jas@extundo.com>
9221
9222         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
9223         <bruno@clisp.org>.
9224
9225         * lib/hmac-sha1.c (hmac_sha1): Likewise.
9226
9227         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
9228         Bruno Haible <bruno@clisp.org>.
9229
9230         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
9231         <bruno@clisp.org>.
9232
9233 2005-10-21  Simon Josefsson  <jas@extundo.com>
9234
9235         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
9236
9237 2005-10-21  Simon Josefsson  <jas@extundo.com>
9238
9239         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
9240
9241 2005-10-21  Simon Josefsson  <jas@extundo.com>
9242
9243         * lib/des.h, lib/des.c: New files.
9244
9245         * lib/gc-gnulib.c: Support DES.c
9246
9247 2005-10-21  Simon Josefsson  <jas@extundo.com>
9248
9249         * lib/arctwo.h, lib/arctwo.c: New files.
9250
9251         * lib/gc-gnulib.c: Support ARCTWO.
9252
9253 2005-10-21  Simon Josefsson  <jas@extundo.com>
9254
9255         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
9256         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9257
9258 2005-10-21  Simon Josefsson  <jas@extundo.com>
9259
9260         * gnulib-tool (func_import, func_create_testdir): Define automake
9261         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
9262         Makefile.am snippet),
9263         suggested by Bruno Haible <bruno@clisp.org>.
9264
9265         * modules/gc (Makefile.am): Use it.
9266
9267 2005-10-21  Bruno Haible  <bruno@clisp.org>
9268
9269         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
9270         patch.
9271
9272 2005-10-19  Simon Josefsson  <jas@extundo.com>
9273
9274         * tests/test-gc-rijndael.c: New file.
9275
9276         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
9277
9278 2005-10-19  Simon Josefsson  <jas@extundo.com>
9279
9280         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
9281         interface too.
9282
9283 2005-10-19  Simon Josefsson  <jas@extundo.com>
9284
9285         * tests/test-gc-arcfour.c: New file.
9286
9287         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
9288
9289 2005-10-19  Simon Josefsson  <jas@extundo.com>
9290
9291         * modules/gc-md4, modules/gc-md4-tests: New file.
9292
9293         * tests/test-gc-md4.c: New file.
9294
9295 2005-10-19  Simon Josefsson  <jas@extundo.com>
9296
9297         * m4/gc-md4.m4: New file.
9298
9299 2005-10-19  Simon Josefsson  <jas@extundo.com>
9300
9301         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
9302         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
9303         <kasal@ucw.cz>.
9304
9305 2005-10-19  Simon Josefsson  <jas@extundo.com>
9306
9307         * m4/gc-arcfour.m4: New file.
9308
9309         * m4/gc-rijndael.m4: New file.
9310
9311 2005-10-19  Simon Josefsson  <jas@extundo.com>
9312
9313         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
9314
9315 2005-10-19  Simon Josefsson  <jas@extundo.com>
9316
9317         * lib/gc-gnulib.c: Support ARCFOUR.
9318
9319 2005-10-19  Simon Josefsson  <jas@extundo.com>
9320
9321         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
9322         support.
9323
9324         * lib/gc.h: Add ECB enum type.
9325
9326         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
9327
9328 2005-10-18  Simon Josefsson  <jas@extundo.com>
9329
9330         * tests/test-md5.c: New file.
9331
9332         * modules/md5-tests: New file.
9333
9334 2005-10-18  Simon Josefsson  <jas@extundo.com>
9335
9336         * tests/test-md4.c: New file.
9337
9338         * modules/md4, modules/md4-tests: New files.
9339
9340 2005-10-18  Simon Josefsson  <jas@extundo.com>
9341
9342         * m4/md4.m4: New file.
9343
9344 2005-10-18  Simon Josefsson  <jas@extundo.com>
9345
9346         * lib/md4.h, lib/md4.c: New files, based on md5.?.
9347
9348 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
9349
9350         * gnulib-tool (func_create_testdir): Omit the second check whether
9351         BUILT_SOURCES in nonempty.
9352
9353 2005-10-17  Simon Josefsson  <jas@extundo.com>
9354
9355         * tests/test-rijndael.c: New file.
9356
9357 2005-10-17  Simon Josefsson  <jas@extundo.com>
9358
9359         * modules/sha1: Depend on stdint instead of md5.
9360
9361         * modules/md5: Depend on stdint, remove uint32_t.
9362
9363 2005-10-17  Simon Josefsson  <jas@extundo.com>
9364
9365         * modules/gc-sha1-tests: New file.
9366
9367         * tests/test-gc-sha1.c: New file.
9368
9369 2005-10-17  Simon Josefsson  <jas@extundo.com>
9370
9371         * m4/md5.m4: Remove call to uint32_t.m4.
9372
9373 2005-10-17  Simon Josefsson  <jas@extundo.com>
9374
9375         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
9376
9377         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
9378         md5.h.
9379
9380         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
9381
9382         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
9383
9384 2005-10-17  Simon Josefsson  <jas@extundo.com>
9385
9386         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
9387
9388 2005-10-17  Simon Josefsson  <jas@extundo.com>
9389
9390         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
9391
9392 2005-10-17  Simon Josefsson  <jas@extundo.com>
9393
9394         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
9395
9396         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
9397
9398 2005-10-17  Bruno Haible  <bruno@clisp.org>
9399
9400         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
9401         that it can also be used in a test.
9402
9403 2005-10-16  Bruno Haible  <bruno@clisp.org>
9404
9405         * gnulib-tool (func_emit_tests_Makefile_am): Also define
9406         TESTS_ENVIRONMENT, so that individual tests can augment it.
9407
9408         * gnulib-tool (func_create_testdir): Use an intermediate target for
9409         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
9410         macros, like $(ALLOCA_H), which cannot be passed through the command
9411         line.
9412
9413 2005-10-15  Simon Josefsson  <jas@extundo.com>
9414
9415         * modules/rijndael-tests: New file.
9416
9417         * modules/rijndael: New file.
9418
9419 2005-10-15  Simon Josefsson  <jas@extundo.com>
9420
9421         * m4/rijndael.m4: New file.
9422
9423 2005-10-15  Simon Josefsson  <jas@extundo.com>
9424
9425         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
9426
9427         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
9428
9429 2005-10-14  Simon Josefsson  <jas@extundo.com>
9430
9431         * tests/test-arcfour.c: New file.
9432
9433         * modules/arcfour, modules/arcfour-tests: New files.
9434
9435 2005-10-14  Simon Josefsson  <jas@extundo.com>
9436
9437         * m4/arcfour.m4: New file.
9438
9439 2005-10-14  Simon Josefsson  <jas@extundo.com>
9440
9441         * lib/arcfour.h, lib/arcfour.c: New files.
9442
9443 2005-10-14  Roland McGrath  <roland@redhat.com>
9444
9445         Import from libc.  [BZ #1331]
9446         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
9447         macro argument.
9448         Reported by Matej Vela <vela@debian.org>.
9449
9450 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9451
9452         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
9453         include <wchar.h>; no longer needed.
9454
9455 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9456
9457         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
9458
9459 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
9460         and  Ulrich Drepper  <drepper@redhat.com>
9461
9462         Import from libc.
9463         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
9464         instead of inline stream orientation test and two separate
9465         function calls.  Pay no attention to USE_IN_LIBIO.
9466
9467 2005-10-13  Simon Josefsson  <jas@extundo.com>
9468
9469         * modules/gc-hmac-md5-tests: New file.
9470
9471         * tests/test-gc-hmac-sha1.c: New file.
9472
9473         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
9474
9475         * modules/gc-hmac-md5-tests: New file.
9476
9477         * tests/test-gc-md5.c: New file.
9478
9479         * modules/gc-md5-tests: New file.
9480
9481 2005-10-13  Simon Josefsson  <jas@extundo.com>
9482
9483         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
9484         Move memory allocation outside of loop.
9485
9486 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
9487
9488         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
9489         intermediate directory is in a read-only file system.  Problem
9490         reported by Eric Blake.
9491
9492 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
9493
9494         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
9495
9496 2005-10-12  Simon Josefsson  <jas@extundo.com>
9497
9498         * tests/test-hmac-sha1.c: New file.
9499
9500         * modules/hmac-sha1-tests: New file.
9501
9502         * modules/hmac-sha1: New file.
9503
9504 2005-10-12  Simon Josefsson  <jas@extundo.com>
9505
9506         * modules/gc-sha1: New file.
9507
9508 2005-10-12  Simon Josefsson  <jas@extundo.com>
9509
9510         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
9511
9512         * tests/test-gc-pbkdf2-sha1.c: New file.
9513
9514 2005-10-12  Simon Josefsson  <jas@extundo.com>
9515
9516         * modules/gc-md5, modules/gc-hmac-md5: New files.
9517
9518         * modules/gc (Files): Remove md5, memxor and hmac files.
9519
9520 2005-10-12  Simon Josefsson  <jas@extundo.com>
9521
9522         * m4/gc-pbkdf2-sha1.m4: New file.
9523
9524         * m4/gc-hmac-sha1.m4: New file.
9525
9526         * m4/gc-sha1: New file.
9527
9528         * m4/hmac-sha1.m4: New file.
9529
9530 2005-10-12  Simon Josefsson  <jas@extundo.com>
9531
9532         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
9533
9534         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
9535
9536 2005-10-12  Simon Josefsson  <jas@extundo.com>
9537
9538         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
9539         suggested by Bruno Haible <bruno@clisp.org>.
9540
9541 2005-10-12  Simon Josefsson  <jas@extundo.com>
9542
9543         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
9544
9545 2005-10-12  Simon Josefsson  <jas@extundo.com>
9546
9547         * lib/gc-pbkdf2-sha1.c: New file.
9548
9549         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
9550
9551 2005-10-12  Simon Josefsson  <jas@extundo.com>
9552
9553         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
9554
9555         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
9556
9557 2005-10-12  Simon Josefsson  <jas@extundo.com>
9558
9559         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
9560         GC_USE_HMAC_MD5, respectively.
9561
9562         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
9563         (gc_md5): Fix typo.
9564
9565         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
9566
9567         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
9568
9569         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
9570
9571 2005-10-12  Bruno Haible  <bruno@clisp.org>
9572
9573         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
9574         Reported by Stepan Kasal <kasal@ucw.cz>.
9575
9576 2005-10-11  Simon Josefsson  <jas@extundo.com>
9577
9578         * tests/test-crc.c: New file.
9579
9580         * modules/crc, modules/crc-tests: New files.
9581
9582 2005-10-11  Simon Josefsson  <jas@extundo.com>
9583
9584         * m4/crc.m4: New file.
9585
9586 2005-10-11  Simon Josefsson  <jas@extundo.com>
9587
9588         * lib/gc.h: Add gc_hash and gc_hash_buffer.
9589
9590         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
9591
9592         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
9593
9594 2005-10-11  Simon Josefsson  <jas@extundo.com>
9595
9596         * lib/crc.h, lib/crc.c: New files.
9597
9598         * lib/gc.h (gc_hash_buffer): Add doc.
9599
9600 2005-10-11  Bruno Haible  <bruno@clisp.org>
9601
9602         * modules/c-strcasestr: New file.
9603         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
9604
9605 2005-10-11  Bruno Haible  <bruno@clisp.org>
9606
9607         * modules/c-strcase: New file.
9608         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
9609
9610 2005-10-11  Bruno Haible  <bruno@clisp.org>
9611
9612         * lib/strcasecmp.c: Include limits.h.
9613         (strcasecmp): Avoid integer overflow on exotic platforms.
9614         * lib/strncasecmp.c: Include limits.h.
9615         (strncasecmp): Avoid integer overflow on exotic platforms.
9616         Reported by Paul Eggert.
9617
9618 2005-10-11  Bruno Haible  <bruno@clisp.org>
9619
9620         * lib/c-strcasestr.h: New file, from GNU gettext.
9621         * lib/c-strcasestr.c: New file, from GNU gettext.
9622
9623 2005-10-11  Bruno Haible  <bruno@clisp.org>
9624
9625         * lib/c-strcase.h: New file, from GNU gettext.
9626         * lib/c-strcasecmp.c: New file, from GNU gettext.
9627         * lib/c-strncasecmp.c: New file, from GNU gettext.
9628
9629 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9630
9631         * modules/mempcpy (License): GPL -> LGPL.
9632         * modules/strchrnul (License): Likewise.
9633         * modules/sysexits (License): Likewise.
9634
9635 2005-10-08  Simon Josefsson  <jas@extundo.com>
9636
9637         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
9638
9639 2005-10-07  Simon Josefsson  <jas@extundo.com>
9640
9641         * m4/memxor.m4: Remove gl_C_RESTRICT call.
9642
9643 2005-10-06  Simon Josefsson  <jas@extundo.com>
9644
9645         * tests/test-hmac-md5.c: New file.
9646
9647         * modules/hmac-md5-tests: New file.
9648
9649         * modules/hmac-md5: New file.
9650
9651 2005-10-06  Simon Josefsson  <jas@extundo.com>
9652
9653         * m4/hmac-md5.m4: New file.
9654
9655         * m4/memxor.m4: Require gl_C_RESTRICT.
9656
9657 2005-10-06  Simon Josefsson  <jas@extundo.com>
9658
9659         * lib/memxor.c (memxor): Avoid casts and warnings.
9660
9661 2005-10-06  Simon Josefsson  <jas@extundo.com>
9662
9663         * lib/hmac-md5.c: New file.
9664
9665         * lib/hmac.h: New file.
9666
9667 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9668
9669         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
9670         promotes to int, not unsigned int, to catch the AIX 5.3
9671         compiler bug.
9672
9673 2005-10-05  Simon Josefsson  <jas@extundo.com>
9674
9675         * modules/memxor: New file.
9676
9677         * modules/iconv (Files): Move config.rpath to havelib, it is used
9678         there.
9679
9680         * modules/havelib (Files): Add config.rpath.
9681
9682 2005-10-05  Simon Josefsson  <jas@extundo.com>
9683
9684         * m4/memxor.m4: New file.
9685
9686 2005-10-05  Simon Josefsson  <jas@extundo.com>
9687
9688         * lib/memxor.c (memxor): Fix compiler error.
9689
9690         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
9691         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
9692
9693         * lib/memxor.h, lib/memxor.c: New files.
9694
9695         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
9696         we assume all systems have it, suggested by Jim Meyering
9697         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
9698         any systems lack sys/socket.h; mingw32 is known to lack it, but we
9699         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
9700         same reasons.
9701
9702 2005-10-05  Simon Josefsson  <jas@extundo.com>
9703
9704         * config/srclist.txt: Add glibc bug 1423 for md5.h.
9705
9706 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9707
9708         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
9709         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
9710         needed, since the source code now assumes these .h files.
9711
9712 2005-10-05  Derek Price  <derek@ximbiot.com>
9713
9714         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
9715
9716 2005-10-05  Bruno Haible  <bruno@clisp.org>
9717
9718         * modules/stdint (License): Change to LGPL.
9719
9720 2005-10-04  Simon Josefsson  <jas@extundo.com>
9721
9722         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
9723         D. Baushke" <mdb@gnu.org>.
9724
9725 2005-10-04  Bruno Haible  <bruno@clisp.org>
9726
9727         * lib/verify.h (verify_true): Provide alternative definition for C++.
9728
9729 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
9730
9731         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
9732         (SSIZE_MAX): New macro, if not already defined.
9733         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
9734         than 2 GiB.
9735
9736 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9737
9738         Sync from coreutils.
9739         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
9740         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
9741         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
9742         ULLONG_MAX doesn't work with 2.7.2.1.
9743
9744 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9745
9746         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
9747         From Ben Pfaff.
9748
9749         * modules/exclude (Depends-on): Depend on verify.
9750         * modules/strtoimax (Depends-on): Likewise.
9751         * modules/utimecmp (Depends-on): Likewise.
9752
9753 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9754
9755         * lib/exclude.c: Include verify.h.
9756         (verify): Remove.  All callers changed to use verify.h's version.
9757         * lib/strtoimax.c: Likewise.
9758         * lib/utimecmp.c: Likewis.e
9759
9760         Sync from coreutils.
9761         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
9762         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
9763         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
9764         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
9765         bother returning ENOSYS if settimeofday or stime fails; just let
9766         them return whatever errno they want to return.
9767         * lib/utimens.c: Include unistd.h, for dup2.
9768         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
9769         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
9770
9771 2005-10-02  Jim Meyering  <jim@meyering.net>
9772
9773         Sync from coreutils.
9774         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
9775         from glibc-2.2.5 that fails for read-only files.
9776
9777 2005-10-02  Jim Meyering  <jim@meyering.net>
9778
9779         Sync from coreutils.
9780         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
9781         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
9782         `#if HAVE_CONFIG_H'.
9783         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
9784         Remove AT_FDCWD test.
9785         Do not consume the fd unless successful.
9786         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
9787         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
9788         block, so that we don't even try to compile it if settimeofday is
9789         available.  This works around a compilation failure on OSF1 V5.1,
9790         due to stime requiring a `long int*' while tv_sec is `int'.
9791
9792 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
9793
9794         Sync from coreutils.
9795         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
9796         against `yes', rather than just testing for nonempty.
9797
9798 2005-10-01  Simon Josefsson  <jas@extundo.com>
9799
9800         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
9801         and Darwin.
9802
9803         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
9804         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
9805         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
9806         freeaddrinfo and gai_strerror are declared by the POSIX headers.
9807         Check if struct addrinfo is declared.
9808
9809 2005-10-01  Simon Josefsson  <jas@extundo.com>
9810
9811         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
9812         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
9813         AI_* and EAI_* definitions.  Protect function declarations.
9814
9815 2005-10-01  Jim Meyering  <jim@meyering.net>
9816
9817         Sync from coreutils.
9818
9819         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
9820         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
9821         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
9822         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
9823         in the inet and nsl libraries.  Required on Solaris 5.7.
9824
9825 2005-10-01  Jim Meyering  <jim@meyering.net>
9826
9827         Sync from coreutils.
9828         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
9829         in the inet and nsl libraries.  Required on Solaris 5.7.
9830
9831 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
9832
9833         * lib/getdelim.c (getdelim): Remove unused variables.
9834
9835 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
9836
9837         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
9838         so that the code works even with ancient cpp.  Portability problem
9839         with GCC 2.7.2.1 reported by Thomas M.Ott.
9840
9841 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
9842
9843         * modules/regex (Depends-on): Add strcase.
9844
9845         * modules/gethostname (Licence): Change from GPL to LGPL, since
9846         gethostname.c is a trivial implementation of a standard library
9847         function.
9848         * modules/poll (License): Change from GPL to LGPL, since it's
9849         derived from LGPL code.
9850
9851 2005-09-27  Jim Meyering  <jim@meyering.net>
9852
9853         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
9854         HAVE_CONFIG_H.
9855
9856         * lib/intprops.h (signed_type_or_expr__): Define.
9857         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
9858         for unsigned types.
9859
9860 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
9861
9862         * lib/verify.h (verify_expr): Remove, replacing with:
9863         (verify_true): New macro that returns true instead of void.
9864         (verify_type__): Remove.
9865         (verify): Use verify_true rather than verify_type__.
9866
9867 2005-09-26  Bruno Haible  <bruno@clisp.org>
9868
9869         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
9870         is necessary.
9871         (lib_SOURCES): Remove mbchar.c.
9872         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
9873         (Files): Add m4/mbrtowc.m4.
9874         * modules/mbiter: Likewise.
9875         * modules/mbuiter: Likewise.
9876
9877 2005-09-26  Bruno Haible  <bruno@clisp.org>
9878
9879         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
9880         compile mbchar.c if they are not both present.
9881         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
9882         * m4/mbiter.m4 (gl_MBITER): Likewise.
9883         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
9884         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
9885         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
9886
9887 2005-09-25  Jim Meyering  <jim@meyering.net>
9888
9889         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
9890         also uses socklen_t.
9891
9892 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
9893
9894         * lib/utimens.c (ENOSYS): Define if not already defined.
9895         (futimens): Support having a null PATH if the file descriptor
9896         is nonnegative.
9897
9898         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
9899         Remove.
9900         (__attribute): Define to empty unless GCC 3.1 or later.
9901         This works around a core dump on OpenBSD 3.4, which has GCC
9902         2.95.3, which dumps core when given __attribute__(()).  It also
9903         simplifies other tests, since we really don't want to bother with
9904         worrying about which ancient version of GCC supported what.
9905         Original problem reported by Yoann Vandoorselaere, with part of
9906         the fix suggested by Derek Price.
9907
9908 2005-09-24  Jim Meyering  <jim@meyering.net>
9909
9910         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
9911         so we can once again use a positive bitfield width of 1 -- now we
9912         don't have to explain why we were using a bitfield width of 2.
9913
9914 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
9915
9916         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
9917         and similarly for the other external symbols.  Problem reported
9918         by James Gallager.
9919
9920         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
9921         bug reported by Jim Meyering.
9922
9923         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
9924         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
9925         not needed, since socklen is a prerequisite module.
9926
9927 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
9928
9929         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
9930         Problem reported by Eric Blake.
9931         (getaddrinfo): Initialize se so that it's not garbage.
9932         Redo internal storage allocation so that it doesn't make unportable
9933         assumptions about alignment.
9934         Fix a memory leak.
9935
9936         * lib/utimens.c (futimens): Use futimesat if available.
9937         Prefer it to futimes since it doesn't have the futimes bug.
9938
9939         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
9940         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
9941         Instead, declare a function that returns a pointer to an array,
9942         and use verify_type__ to declare the size of the array.
9943         Problem and germ of a solution reported by Bruno Haible.
9944         (verify_type__): Use 2, not 1, for bitfield size, to avoid
9945         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
9946
9947 2005-09-23  Jim Meyering  <jim@meyering.net>
9948
9949         Sync from coreutils.
9950         Correct build failure (socklen_t not defined) on at least
9951         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
9952         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
9953
9954 2005-09-23  Jim Meyering  <jim@meyering.net>
9955
9956         * modules/getaddrinfo (Depends-on): Add socklen.
9957
9958 2005-09-23  Bruno Haible  <bruno@clisp.org>
9959
9960         * tests/test-verify.c: New file.
9961
9962 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9963
9964         Sync from coreutils.
9965
9966         * modules/argmatch (Depends-on): Add verify.
9967         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
9968         unistd-safer.
9969         * modules/save-cwd (Depends-on): Likewise.
9970
9971         * modules/openat (Files): Add lib/openat-die.c.
9972         (Depends-on): Remove error, exitfail.
9973         Add dirname.
9974
9975         * modules/verify: New file.
9976         * MODULES.html.sh (Diagnostics <assert.h>): New section,
9977         with "verify" module.
9978
9979 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9980
9981         Sync from coreutils.
9982
9983         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
9984         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
9985         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
9986         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
9987         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
9988         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
9989         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
9990         Don't bother checking for string.h, stdlib.h, unistd.h.
9991         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
9992         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
9993         module's job.
9994         * m4/jm-macros.m4 (gl_MACROS): Likewise.
9995         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
9996
9997         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
9998         (gl_GETDATE): Use it.
9999
10000         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
10001
10002 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10003
10004         Sync from coreutils.
10005
10006         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
10007         stat-time.h.
10008         * lib/argmatch.h: Include verify.h
10009         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
10010         (ARGMATCH_ASSERT): Remove; unused.
10011         * lib/canonicalize.c: Assume STDC_HEADERS.
10012         * lib/exclude.c: Include "strcase.h".
10013         * lib/regex_internal.h [!defined _LIBC]: Likewise.
10014         * lib/getusershell.c: Include stdio--.h rather than stdio.h
10015         and stdio-safer.h.
10016         (getusershell): Call fopen, not fopen_safer.
10017         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
10018         Do not include unistd-safer.h.
10019         (save_cwd): Don't call fd_safer; no longer needed
10020         now that we include fcntl--.h.
10021
10022         * lib/getdate.y (relative_time): New type.
10023         (RELATIVE_TIME_0): New constant.
10024         (parser_control): Use relative_time instead of doing it ourselves.
10025         (%union): Add new relative_time rel member.
10026         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
10027         Now typeless.
10028         (relunit, relunit_snumber): Now of type rel.
10029         (zone, rel, relunit, get_date): Adjust to above changes.
10030
10031         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
10032         Do not include unistd-safer.h.
10033         (getloadavg): Don't call fd_safer; no longer needed
10034         now that we include fcntl--.h.
10035
10036         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
10037         (make_dir_parents): Treat ENOSYS like EEXIST.
10038
10039         Improve quality of diagnostics on restore_cwd failure.
10040         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
10041         (make_dir_parents): Last arg is now int * (for errno), not bool *.
10042         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
10043         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
10044         each time through the loop.  Do not diagnose restore_cwd failure;
10045         that is the caller's job (and perhaps the caller does not care).
10046
10047         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
10048         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
10049         If the file already exists but is not a directory, don't bother
10050         to try to make its parents.
10051         Close potential file descriptor leak if we can't chdir("/") (!).
10052         Don't always return true if chdir($PWD) fails; return true only
10053         if the requested action was done successfully (except for the
10054         chdir($PWD)).
10055         Don't log final directory unless we actually made it.
10056         Refactor to avoid duplicate code to fix up permissions.
10057         Don't attempt to fix up parent permissions if chdir($PWD) fails.
10058
10059         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
10060         to make it a bit faster and (I hope) clearer.
10061         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
10062         Fix bug in formats like %2N.
10063
10064         * lib/verify.h: New file.
10065
10066 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10067
10068         Sync from coreutils.
10069         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
10070
10071 2005-09-22  Jim Meyering  <jim@meyering.net>
10072
10073         Sync from coreutils.
10074
10075         * m4/lstat.m4 (gl_FUNC_LSTAT):
10076         Use AC_LIBSOURCES to require lstat.c and lstat.h.
10077         Remove obsolete comment.
10078         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
10079         * m4/xstrtod.m4: Likewise.
10080
10081         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
10082
10083 2005-09-22  Jim Meyering  <jim@meyering.net>
10084
10085         Sync from coreutils.
10086
10087         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
10088
10089         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
10090         the .tm_year member, since otherwise gcc-4.0 would now warn about
10091         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
10092
10093         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
10094         order to avoid an unsuppressible warning from gcc on 64-bit systems.
10095
10096         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
10097         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
10098         when run in a time zone for which daylight savings time is in effect
10099         for the starting date.
10100
10101         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
10102         stop us from restricting permissions of just-created absolute-named
10103         directories.
10104         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
10105         to restore initial working directory.
10106         * lib/mkdir-p.c (make_dir_parents): New parameter:
10107         different_working_dir, to tell caller if/when we change the working
10108         directory and are unable to return to the initial one.
10109         * lib/mkdir-p.h (make_dir_parents): Update prototype.
10110         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
10111         `return false'.  This fixes a bug introduced on 2004-07-30.
10112
10113         * lib/openat.c (fdopendir): Be sure to close the supplied
10114         file descriptor before returning.  This makes our replacement
10115         implementation a little closer to Solaris's, where fdopendir
10116         ties the file descriptor to the returned DIR* pointer.
10117         * lib/openat.c (unlinkat): New function.
10118         * lib/openat.h (unlinkat): Add prototype.
10119         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
10120         (openat_restore_fail): Rename from openat_restore_die.
10121         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
10122
10123         Provide an alternative to exiting immediately upon save_cwd or
10124         restore_cwd failure.  Now, an application can arrange e.g.,
10125         to perform a longjump in that case.
10126         * lib/openat.c: Include dirname.h.
10127         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
10128         (rpl_openat, fdopendir, fstatat): Call openat_save_die
10129         and openat_restore_die rather than calling error directly.
10130         Don't include "error.h" or "exitfail.h"; they're no longer needed.
10131
10132         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
10133         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
10134         define.
10135
10136         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
10137         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
10138                             int utc, int nanoseconds);
10139         Background:
10140         date should not have to allocate a megabyte of virtual memory to
10141         handle a format argument like +%1048575T.  When implemented with
10142         strftime, it must allocate such a buffer, use strftime to fill it
10143         in, print it, then free it.
10144         With fprintftime, it simply prints everything and exits.
10145         With no need for memory allocation, that's one fewer way to fail.
10146         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
10147         optional field width, not before, so we accept %9:z, not %:9z.
10148         (my_strftime): Be sure to use L_('x') for literals.
10149
10150         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
10151         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
10152         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
10153         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
10154         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
10155         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
10156         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
10157         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
10158         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
10159         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
10160         * lib/xgethostname.c, lib/xreadlink.c:
10161         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
10162
10163         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
10164         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
10165         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
10166         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10167         and don't include <sys/file.h>).
10168
10169 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
10170
10171         Sync from coreutils.
10172
10173         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
10174         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
10175         [!LDAV_DONE]: Avoid unused variable warning.
10176
10177 2005-09-21  Bruno Haible  <bruno@clisp.org>
10178
10179         * lib/unicodeio.h (unicode_to_mb): New declaration.
10180
10181 2005-09-20  Derek Price  <derek@ximbiot.com>
10182
10183         * lib/getaddrinfo.c: Don't include <netdb.h> included from
10184         getaddrinfo.h.
10185
10186 2005-09-20  Bruno Haible  <bruno@clisp.org>
10187
10188         * gnulib-tool: Remove trailing slashes from the values specified for
10189         --source-base, --m4-base, --tests-base, --aux-dir.
10190         Suggested by Simon Josefsson <jas@extundo.com>.
10191
10192 2005-09-20  Bruno Haible  <bruno@clisp.org>
10193
10194         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
10195         func_modules_to_filelist, func_import, func_create_testdir): Make all
10196         sorting results locale-independent, so that gnulib-cache.m4 doesn't
10197         change when gnulib-tool is invoked in a different locale.
10198
10199 2005-09-19  Simon Josefsson  <jas@extundo.com>
10200
10201         * m4/socklen.m4: Fix typo.
10202
10203 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10204
10205         Use a consistent style for including <config.h>.
10206         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
10207         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
10208         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
10209         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
10210         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
10211         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
10212         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
10213         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
10214         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
10215         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
10216         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
10217         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
10218         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
10219         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
10220         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
10221         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
10222         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
10223         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
10224         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
10225         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
10226         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
10227         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
10228         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
10229         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
10230         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
10231         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
10232         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
10233         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
10234         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
10235         lib/xstrtoumax.c, lib/yesno.c:
10236         Standardize inclusion of config.h.
10237         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
10238         lib/inttostr.h:  Removed inclusion of config.h from header files.
10239         * lib/inttostr.c:  Adjusted in-tree users.
10240         * lib/timespec.h: Remove superfluous warning to include config.h.
10241         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
10242         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
10243         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
10244         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
10245         config.h with HAVE_CONFIG_H.
10246
10247 2005-09-19  Jim Meyering  <jim@meyering.net>
10248
10249         * modules/pathmax (License): Change to LGPL.
10250
10251 2005-09-19  Derek Price  <derek@ximbiot.com>
10252
10253         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
10254
10255 2005-09-19  Bruno Haible  <bruno@clisp.org>
10256
10257         * gnulib-tool (import): Provide default for --tests-base.
10258
10259 2005-09-19  Bruno Haible  <bruno@clisp.org>
10260
10261         * doc/quote.texi: New file, extracted from gnulib.texi.
10262         * doc/ctime.texi: New file, extracted from gnulib.texi.
10263         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
10264         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
10265         * doc/gnulib.texi: Include them.
10266
10267 2005-09-18  Bruno Haible  <bruno@clisp.org>
10268
10269         Portability fix.
10270         * gnulib-tool (func_readlink): New function.
10271         (func_ln_if_changed): Use it.
10272
10273 2005-09-18  Bruno Haible  <bruno@clisp.org>
10274
10275         * gnulib-tool: Support --with-tests also with --import.
10276         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
10277         (func_import): Use variables $testsbase and $inctests. Emit a
10278         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
10279         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
10280         SUBDIRS += $testsdir.
10281         (func_create_testdir): Update.
10282
10283 2005-09-18  Bruno Haible  <bruno@clisp.org>
10284
10285         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
10286         instead of $dry_run.
10287         (func_cp_if_changed, func_mv_if_changed): Remove functions.
10288         (func_ln_if_changed): Don't handle dry-run here.
10289         (func_import): In dry-run mode, detect more precisely which actions
10290         would be performed, and don't use "...ing" verbs.
10291
10292 2005-09-18  Bruno Haible  <bruno@clisp.org>
10293
10294         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
10295         (func_import): Use join on two temporary files instead of three nested
10296         loops, in order to determine which files are new or old.
10297
10298 2005-09-18  Bruno Haible  <bruno@clisp.org>
10299
10300         * gnulib-tool (func_import): Comment out code that spits out the
10301         new files with --dry-run.
10302
10303 2005-09-18  Bruno Haible  <bruno@clisp.org>
10304
10305         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
10306
10307 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10308
10309         * lib/stat-time.h: New file.
10310         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
10311         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
10312         in a different way.
10313         (timespec_cmp): New function.
10314         * lib/utimecmp.c: Include stat-time.h.
10315         (SYSCALL_RESOLUTION): Depend on whether various struct stat
10316         members exist, not on the obsolescent ST_MTIM_NSEC.
10317         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
10318
10319 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10320
10321         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
10322
10323 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10324
10325         * MODULES.html.sh (File system functions): Add stat-time.
10326         * modules/stat-time: New file.
10327         * modules/timespec (Files): Remove m4/st_mtim.m4; this
10328         is now done in a different way, by the stat-time module.
10329         * modules/utimecmp (Depends-on): Add stat-time.
10330
10331 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10332
10333         * m4/st_mtim.m4: Remove.  Superseded by...
10334         * m4/stat-time.m4: New file.
10335         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
10336         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
10337
10338 2005-09-15  Derek Price  <derek@ximbiot.com>
10339
10340         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
10341
10342 2005-09-15  Derek Price  <derek@ximbiot.com>
10343
10344         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
10345         * lib/regex_internal.c: Ditto, using this...
10346         (__GNUC_PREREQ): ...new macro.
10347         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
10348         using...
10349         (__GNUC_PREREQ): ...this new macro.
10350
10351         * lib/strstr.h: Include string.h. Define strstr as a macro here.
10352
10353 2005-09-15  Derek Price  <derek@ximbiot.com>
10354             Paul Eggert  <eggert@cs.ucla.edu>
10355
10356         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
10357         changes, consolidating in...
10358         * lib/regex_internal.h: ...this file.
10359
10360 2005-09-13  Jim Meyering  <jim@meyering.net>
10361
10362         * lib/canon-host.c: Filter through gnu indent and reword comments
10363         slightly.
10364         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
10365
10366 2005-09-13  Derek Price  <derek@ximbiot.com>
10367
10368         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
10369         failure.
10370         Reported by Jim Meyering  <jim@meyering.net>.
10371
10372 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10373
10374         * lib/base64.c: Typo.
10375         (base64_encode): Put b64str in initialized data section.
10376
10377 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
10378
10379         Merge glibc and coreutils changes into gnulib, plus a few
10380         extra fixes.
10381         * lib/md5.c: Use #error rather than a string.
10382         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
10383         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
10384         (__attribute__): Define to empty for non recent-GCC.
10385         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
10386         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
10387         Renamed from their non-__ counterparts, with new macros replacing
10388         them if not _LIBC.  Add __THROW attribute.
10389         (rol): Remove.
10390         (struct md5_ctx): Align buffer if using GCC.
10391         * lib/sha1.h (struct sha1_ctx): Likewise.
10392         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
10393         The old name was backwards.
10394         (NOTSWAP): Remove; not used.
10395         (rol): New macro, moved here from md5.h.
10396         (sha1_process_block): Remove a FIXME that doesn't make sense.
10397
10398 2005-09-12  Derek Price  <derek@ximbiot.com>
10399
10400         Return usable errors from canon-host.
10401         * lib/canon-host.h: New file.
10402         * lib/canon-host.c (canon_host): Wrap...
10403         (canon_host_r): ...this new function, which now relies exclusively on
10404         getaddrinfo.
10405         (ch_strerror): New function.
10406         (last_cherror): New global.
10407         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
10408         interface.
10409         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
10410         void *.
10411         (freeaddrinfo): Free ai->ai_canonname when set.
10412
10413 2005-09-12  Derek Price  <derek@ximbiot.com>
10414
10415         Make canon-host require getaddrinfo.
10416         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
10417         AC_LIBSOURCE canon-host.h.  Call...
10418         (gl_PREREQ_CANON_HOST): ...this new function, which requires
10419         gl_GETADDRINFO.
10420         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
10421
10422 2005-09-12  Derek Price  <derek@ximbiot.com>
10423
10424         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
10425         LGPL.
10426         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
10427
10428 2005-09-12  Derek Price  <derek@ximbiot.com>
10429
10430         * lib/gai_strerror.c: Include config.h when available.  Include
10431         getaddrinfo.h before other headers to test interface.
10432         Reported by Larry Jones <lawrence.jones@ugs.com>.
10433
10434 2005-09-12  Derek Price  <derek@ximbiot.com>
10435             Paul Eggert  <eggert@cs.ucla.edu>
10436
10437         * modules/glob (Files): Add glob-libc.h.
10438
10439 2005-09-12  Derek Price  <derek@ximbiot.com>
10440             Paul Eggert  <eggert@cs.ucla.edu>
10441
10442         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
10443         glob_.h, glob-libc.h.
10444         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
10445
10446 2005-09-12  Derek Price  <derek@ximbiot.com>
10447             Paul Eggert  <eggert@cs.ucla.edu>
10448
10449         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
10450         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
10451         protecting things that should be done only in gnulib contexts.
10452         * lib/glob_.h: New file, containing only the glob things needed for
10453         gnulib.
10454         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
10455         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
10456         (glob, globfree, glob_pattern_p): Now defined simply in terms of
10457         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
10458         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
10459         and to respect the namespace rules better.
10460
10461 2005-09-08  Simon Josefsson  <jas@extundo.com>
10462
10463         * modules/socklen: New file.
10464
10465 2005-09-08  Simon Josefsson  <jas@extundo.com>
10466
10467         * m4/socklen.m4: New file.
10468
10469 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10470
10471         * modules/utimens (Files): Add m4/utimbuf.m4, since
10472         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
10473         Reported by Sergey Poznyakoff.
10474
10475 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10476
10477         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
10478         definitions, since that's the preferred style in glibc.
10479         Fix a minor spacing issue, and update copyright notice to match
10480         glibc's.
10481
10482 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10483
10484         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
10485
10486 2005-09-06  Simon Josefsson  <jas@extundo.com>
10487
10488         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
10489         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
10490
10491 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10492
10493         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
10494         warning.
10495
10496 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10497
10498         * config/srclist.txt: Add glibc bug 1302.
10499
10500 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
10501
10502         Change bitset word type from unsigned int to unsigned long int,
10503         as this has better performance on typical 64-bit hosts.
10504         Port bitset code to hosts with unusual word sizes.
10505         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
10506         (build_collating_symbol):
10507         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
10508         argument is a bitset.  This is merely a style issue, but it makes
10509         it clearer that an entire array is expected.
10510         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
10511         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
10512         Port to the case where bitset_word is not the same as unsigned int.
10513         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
10514         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
10515         Likewise.
10516         * lib/regexec.c (check_dst_limits_calc_pos_1,
10517         check_subexp_matching_top):
10518         (build_trtable, group_nodes_into_DFAstates):
10519         Likewise.
10520         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
10521         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
10522         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
10523         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
10524         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
10525         * lib/regcomp.c (optimize_subexps, lower_subexp):
10526         Work even if bitset_word has holes in its bitwise representation.
10527         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
10528         * lib/regexec.c (check_dst_limits_calc_pos_1,
10529         check_subexp_matching_top):
10530         Likewise.
10531         * lib/regex_internal.c (re_string_reconstruct):
10532         Don't assume UCHAR_MAX == 255.
10533         * lib/regex_internal.h (bitset_set_all): Likewise.
10534         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
10535         All uses changed.
10536         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
10537         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
10538         All uses changed.
10539         (BITSET_WORD_MAX): New macro.
10540         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
10541         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
10542         (bitset_empty, bitset_copy):
10543         Prefer sizeof (bitset) to multiplying it out ourselves.
10544         (bitset_not_merge): Remove; unused.
10545         (bitset_contain): Return bool, not unsigned int with one bit on.
10546         All callers changed.
10547         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
10548         alignment than re_node_set; do this by defining a new internal
10549         type struct dests_alloc and using it to allocate memory.
10550
10551 2005-09-05  Bruno Haible  <bruno@clisp.org>
10552
10553         * gnulib-tool (func_import): Fix comparison in handling of symbolic
10554         links.
10555
10556 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
10557
10558         * modules/size_max (Makefile.am): Add size_max.h
10559
10560 2005-09-04  Derek Price  <derek@ximbiot.com>
10561
10562         * gnulib-tool (func_import): Fix reversed $symbolic logic.
10563
10564 2005-09-03  Simon Josefsson  <jas@extundo.com>
10565
10566         * gnulib-tool: Fix typo.
10567
10568 2005-09-03  Simon Josefsson  <jas@extundo.com>
10569
10570         * config/srclist.txt: Add glibc bug 1293.
10571
10572 2005-09-03  Derek Price  <derek@ximbiot.com>
10573
10574         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
10575         From Larry Jones <lawrence.jones@ugs.com>.
10576
10577 2005-09-02  Simon Josefsson  <jas@extundo.com>
10578
10579         * modules/socklen: New file.
10580
10581 2005-09-02  Simon Josefsson  <jas@extundo.com>
10582
10583         * modules/havelib: New module.
10584
10585         * modules/gettext, modules/iconv, modules/lock, modules/readline:
10586         Use havelib.
10587
10588 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10589
10590         Check for arithmetic overflow when calculating sizes, to prevent
10591         some buffer-overflow issues.  These patches are conservative, in the
10592         sense that when I couldn't determine whether an overflow was possible,
10593         I inserted a run-time check.
10594         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
10595         macros.
10596         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
10597         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
10598         (re_xnrealloc, re_x2nrealloc): New inline functions.
10599         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
10600         parse_bracket_exp):
10601         (build_equiv_class, build_charclass): Check for arithmetic overflow
10602         in size expression calculations.
10603         * lib/regex_internal.c (re_string_realloc_buffers):
10604         (build_wcs_upper_buffer, re_node_set_add_intersect):
10605         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
10606         (re_dfa_add_node, register_state): Likewise.
10607         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
10608         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
10609         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
10610         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
10611
10612 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10613
10614         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
10615         m4/ulonglong.m4.  Problem reported by Martin Lambers.
10616
10617 2005-09-02  Bruno Haible  <bruno@clisp.org>
10618
10619         Support for lib vs. lib64 distinction on biarch platforms.
10620         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
10621         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
10622         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
10623
10624 2005-09-02  Bruno Haible  <bruno@clisp.org>
10625
10626         * gnulib-tool (import): In the other first-use case, provide defaults
10627         as well.
10628
10629 2005-09-02  Bruno Haible  <bruno@clisp.org>
10630
10631         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
10632         patches not yet found in the latest gettext release.
10633
10634 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10635
10636         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
10637         to avoid a collision with bits/local_lim.h in glibc.
10638         All uses changed.  Problem reported by Dmitry V. Levin in
10639         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
10640
10641         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
10642         bugs in int versus size_t comparisons.
10643         (re_string_context_at): Fix bug where the code assumed that
10644         Idx is signed.
10645
10646         Use bool where appropriate.
10647         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
10648         All callers changed.
10649         (calc_eclosure_iter): Likewise, for ROOT arg.
10650         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
10651         (build_charclass_op): Likewise, for NON_MATCH arg.
10652         * lib/regex_internal.c (re_string_allocate, re_string_construct):
10653         (re_string_construct_common): Likewise, for ICASE arg.
10654         * lib/regexec.c (re_search_2_stub, re_search_stub):
10655         Likewise, for RET_LEN arg.
10656         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
10657         (set_regs): Likewise, for FL_BACKTRACK arg.
10658         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
10659         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
10660         (calc_eclosure_iter, parse_bracket_exp):
10661         Use bool for internal variables that are booleans.
10662         * lib/regexec.c (re_search_internal, check_matching,
10663         proceed_next_node):
10664         (set_regs, build_sifted_states, sift_states_bkref):
10665         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
10666         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
10667         (find_collation_sequence_value):
10668         Likewise.
10669         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
10670         (re_node_set_compare):
10671         Return bool, not int. All callers changed.
10672         * lib/regexec.c (check_halt_node_context, check_dst_limits):
10673         (build_trtable, check_node_accept): Likewise.
10674         * lib/regex_internal.h: Include stdbool.h.
10675
10676         Fix bugs uncovered when converting to bool.
10677         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
10678         failure instead of charging ahead blindly.
10679         * lib/regex_internal.c (register_state): Likewise.
10680         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
10681         for freeing internal storage.
10682         (group_nodes_into_DFA_states): Use unsigned int, not int, for
10683         bitset pieces used as boolean, to avoid undefined behavior
10684         on hosts that do int overflow checking.
10685
10686 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10687
10688         * config/srclist.txt: Add glibc bugs 1285-1287.
10689
10690 2005-09-01  Jim Meyering  <jim@meyering.net>
10691
10692         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
10693         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
10694         Require gl_STAT_MACROS, too.
10695
10696 2005-09-01  Bruno Haible  <bruno@clisp.org>
10697
10698         * gnulib-tool (import): In the first-use case, provide defaults.
10699
10700 2005-09-01  Bruno Haible  <bruno@clisp.org>
10701
10702         * gnulib-tool (func_import): Remove the .tmp files.
10703
10704 2005-09-01  Bruno Haible  <bruno@clisp.org>
10705
10706         * gnulib-tool (func_import): Fix handling of symbolic links.
10707
10708 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10709
10710         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
10711         old glibc regex code mishandles strings longer than 2**31 bytes.
10712         This patch fixes this when the regex code is used in gnulib
10713         (i.e., outside glibc).
10714
10715         This patch should not affect the use of the regex code inside
10716         glibc.  No doubt this problem also needs to be handled for glibc
10717         as well, but the result will be an incompatible change to the
10718         glibc ABI, and the old ABI will have to be supported too.  That
10719         can be the the subject for another patch.
10720
10721         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
10722         governing whether the rest of this patch is active.  By default,
10723         the macro is disabled and the patch has no effect.
10724         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
10725         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
10726         (struct re_pattern_buffer, re_search, re_search_2, re_match):
10727         (re_match_2, re_set_registers): Use the new types.
10728         * lib/regex_internal.h (Idx, re_hashval_t): New types.
10729         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
10730         New macros.
10731         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
10732         (re_string_context_at, bin_tree_t, re_dfastate_t):
10733         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
10734         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
10735         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
10736         (re_string_char_size_at, re_string_wchar_at):
10737         (re_string_elem_size_at):
10738         Use the new types and macros to port to 64-bit hosts.
10739         Use unsigned types for internal values, so that the code
10740         mostly works even for arrays larger than SSIZE_MAX.
10741         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
10742         (search_duplicated_node, calc_eclosure_iter, fetch_number):
10743         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
10744         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
10745         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
10746         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
10747         (calc_inveclosure, parse_dup_op, build_range_exp):
10748         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
10749         (fetch_number, create_token_tree, mark_opt_subexp):
10750         Likewise.
10751         * lib/regex_internal.c (re_string_construct_common,
10752         create_ci_newstate):
10753         (create_cd_newstate, re_string_allocate, re_string_construct):
10754         (re_string_realloc_buffers, build_wcs_upper_buffer):
10755         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
10756         (re_string_reconstruct, re_string_peek_byte_case):
10757         (re_string_fetch_byte_case, re_string_context_at):
10758         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
10759         (re_node_set_init_copy, re_node_set_add_intersect):
10760         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10761         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10762         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
10763         (re_acquire_state, re_acquire_state_context, register_state):
10764         Likewise.
10765         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
10766         search_cur_bkref_entry):
10767         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
10768         (re_search_internal, re_search_2_stub, re_search_stub)
10769         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
10770         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
10771         (update_cur_sifted_state, check_dst_limits):
10772         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
10773         (check_subexp_limits, sift_states_bkref, merge_state_array):
10774         (check_subexp_matching_top, get_subexp, get_subexp_sub):
10775         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
10776         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
10777         (expand_bkref_cache, check_node_accept_bytes):
10778         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
10779         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
10780         (acquire_init_state_context, check_halt_node_context):
10781         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
10782         (sift_states_backward, clean_state_log_if_needed):
10783         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
10784         (find_recover_state, transit_state_sb, transit_state_mb):
10785         (transit_state_bkref, build_trtable, match_ctx_clean):
10786         Likewise.
10787         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
10788         to work around an assumption that REG_MISSING is negative.
10789
10790         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
10791         (seek_collating_symbol_entry) [defined _LIBC]:
10792         (lookup_collation_sequence_value) [defined _LIBC]:
10793         (build_range_exp, build_collating_symbol) [defined _LIBC]:
10794         Use prototypes rather than old-style function definitions.
10795         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
10796         (transit_state_sb) [0]:
10797         (find_collation_sequence_value) [defined _LIBC]: Likewise.
10798
10799         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
10800         rm_eo.
10801
10802         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
10803         (optimize_subexps, lower_subexp):
10804         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
10805         since the signed shift might overflow.  Use 1u<<31 instead.
10806         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
10807         Likewise.
10808         * lib/regexec.c (check_dst_limits_calc_pos_1,
10809         check_subexp_matching_top): Likewise.
10810
10811         * lib/regcomp.c (optimize_subexps, lower_subexp):
10812         Use CHAR_BIT rather than 8, for clarity.
10813         * lib/regexec.c (check_dst_limits_calc_pos_1):
10814         (check_subexp_matching_top): Likewise.
10815         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
10816         have to worry about portability issues when shifting it left.
10817         Remove no-longer-needed test for table_size > 0.
10818         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
10819         in a word, as the resulting behavior is undefined.
10820         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
10821         in one case, a <= should have been an <, and in another case the
10822         whole test was missing.
10823         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
10824         the standard name CHAR_BIT.
10825         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
10826         this is not true on one's complement and signed-magnitude hosts.
10827
10828         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
10829         next_last_offset.
10830         (struct re_dfa_t): Remove unused member states_alloc.
10831         * lib/regcomp.c (init_dfa): Don't initialize unused members.
10832
10833 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10834
10835         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
10836         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
10837         and large-file glibc and in 32-bit large-file Solaris.
10838
10839 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10840
10841         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
10842         lengths fit in regoff_t; this isn't true if regoff_t is the same
10843         width as size_t.
10844         * lib/regex.c (re_search_internal): 5th arg is LAST_START
10845         (= START + RANGE) instead of RANGE.  This avoids overflow
10846         problems when regoff_t is the same width as size_t.
10847         All callers changed.
10848         (re_search_2_stub): Check for overflow when adding the
10849         sizes of the two strings.
10850         (re_search_stub): Check for overflow when adding START
10851         to RANGE; if it occurs, substitute the extreme value.
10852
10853 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10854
10855         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
10856
10857 2005-08-31  Jim Meyering  <jim@meyering.net>
10858
10859         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
10860         a pointer-to-const.
10861         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
10862         (register_state): Likewise.
10863         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
10864         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
10865         (group_nodes_into_DFAstates): Likewise.
10866
10867 2005-08-31  Jim Meyering  <jim@meyering.net>
10868
10869         * check-module: Add a FIXME comment.
10870
10871 2005-08-31  Eric Blake  <ebb9@byu.net>
10872
10873         * modules/unistd-safer (Files): Add unistd--.h.
10874         * modules/stdio-safer (Files): Add stdio--.h.
10875
10876 2005-08-31  Derek Price  <derek@ximbiot.com>
10877
10878         * lib/getdelim.c (getdelim): Return EOF on EOF.
10879         Reported by Larry Jones <lawrence.jones@ugs.com>.
10880
10881 2005-08-31  Bruno Haible  <bruno@clisp.org>
10882
10883         Avoid unnecessary diffs in the generated lib/Makefile.am.
10884         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
10885         the generated files.
10886         (func_import): Don't set cmd.
10887
10888 2005-08-31  Bruno Haible  <bruno@clisp.org>
10889
10890         * lib/strstr.c: Include <stddef.h>, for NULL.
10891         * lib/strcasestr.c: Likewise.
10892         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
10893
10894 2005-08-31  Bruno Haible  <bruno@clisp.org>
10895
10896         * gnulib-tool: New option --macro-prefix.
10897         (func_import): Use macro_prefix.
10898         (import): Handle option --macro-prefix.
10899
10900 2005-08-31  Bruno Haible  <bruno@clisp.org>
10901
10902         * gnulib-tool (import): Rename most ac_* variables to cached_*.
10903         Also use new variables cached_lgpl, cached_libtool.
10904
10905 2005-08-31  Bruno Haible  <bruno@clisp.org>
10906
10907         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
10908         always instantiating them.
10909
10910 2005-08-31  Bruno Haible  <bruno@clisp.org>
10911
10912         * gnulib-tool (func_import): Read the previous cached settings
10913         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
10914         earlier added by gnulib but are now dropped. Warn when a gnulib file
10915         overwrites a non-gnulib file.
10916
10917 2005-08-31  Bruno Haible  <bruno@clisp.org>
10918
10919         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
10920         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
10921         projects that don't keep autogenerated files in CVS. Put into
10922         actioncmd only the specified modules, not the transitive closure.
10923
10924 2005-08-31  Bruno Haible  <bruno@clisp.org>
10925
10926         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
10927         Create directories that shall be filled.
10928         (import): Don't look for gl_* macros in configure.ac. Recurse across
10929         all directories containing a gnulib-cache.m4 files, if meaningful.
10930
10931 2005-08-31  Bruno Haible  <bruno@clisp.org>
10932
10933         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
10934         (import): Set seen_libtool when we see gl_LIBTOOL.
10935
10936 2005-08-31  Bruno Haible  <bruno@clisp.org>
10937
10938         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
10939         declaration macro definitions from generated gnulib.m4.
10940
10941 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
10942
10943         * lib/iconvme.h: Add prototype for iconv_alloc.
10944
10945 2005-08-29  Simon Josefsson  <jas@extundo.com>
10946
10947         * lib/iconvme.c: Fix errno.
10948
10949 2005-08-29  Bruno Haible  <bruno@clisp.org>
10950
10951         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
10952         that it works when the directory contains spaces.
10953
10954 2005-08-29  Bruno Haible  <bruno@clisp.org>
10955
10956         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
10957
10958 2005-08-29  Bruno Haible  <bruno@clisp.org>
10959
10960         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
10961         Emit more advice.
10962
10963 2005-08-29  Bruno Haible  <bruno@clisp.org>
10964         and Stepan Kasal  <kasal@ucw.cz>
10965
10966         * check-module: If more parameters are given, check each of them
10967         separately; add more exceptions, as noted by Jim Meyering.
10968         (check_module): New procedure.
10969         (%exempt_header): Now contains all exceptions.
10970
10971 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
10972
10973         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
10974
10975 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
10976
10977         * lib/iconvme.c: Split iconv_string into iconv_alloc.
10978
10979 2005-08-28  Bruno Haible  <bruno@clisp.org>
10980
10981         * m4/gnulib-tool.m4: New file.
10982
10983 2005-08-27  Jim Meyering  <jim@meyering.net>
10984
10985         * modules/unistd-safer (Files): Add pipe-safer.c.
10986         * modules/fcntl-safer (Files): Add creat-safer.c.
10987
10988 2005-08-27  Jim Meyering  <jim@meyering.net>
10989
10990         * m4/stdlib-safer.m4: New file.  From coreutils.
10991         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
10992         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
10993         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
10994         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
10995         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
10996
10997 2005-08-27  Jim Meyering  <jim@meyering.net>
10998
10999         * lib/fopen-safer.c: Merge minor changes from coreutils.
11000         * lib/dup-safer.c: Likewise.
11001         * lib/fd-safer.c: Likewise.
11002
11003         Merge from coreutils.
11004         * lib/stdio--.h: New file.
11005         * lib/stdlib--.h: New file.
11006         * lib/mkstemp-safer.c: New file.
11007
11008         GNU tar needs these.
11009         * lib/pipe-safer.c: New file.
11010         * lib/creat-safer.c: New file.
11011         * lib/fcntl--.h (creat): Define to creat_safer.
11012         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
11013         * lib/unistd--.h (pipe): Define to pipe_safer.
11014         * lib/unistd-safer.h: Declare pipe_safer.
11015
11016 2005-08-26  Simon Josefsson  <jas@extundo.com>
11017
11018         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
11019         Haible <bruno@clisp.org>.
11020
11021 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
11022
11023         * lib/regex_internal.h: Remove all references to
11024         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
11025         or better.
11026         (bitset_not, bitset_merge, bitset_not_merge):
11027         (bitset_mask, re_string_allocate, re_string_construct):
11028         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
11029         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
11030         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
11031         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
11032         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11033         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11034         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
11035         (re_acquire_state_context):
11036         Remove unnecessary forward decls.
11037         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
11038         Put __attribute at function definition,
11039         now that the function decl has been removed.
11040         * lib/regex_internal.c (re_string_peek_byte_case):
11041         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
11042         Likewise.
11043
11044 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
11045
11046         * m4/regex.m4: Add AC_PREREQ(2.50).
11047         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
11048
11049 2005-08-25  Simon Josefsson  <jas@extundo.com>
11050
11051         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
11052         __fsetlocking.
11053
11054 2005-08-25  Simon Josefsson  <jas@extundo.com>
11055
11056         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
11057         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
11058         GLIBC specific code.
11059
11060 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11061
11062         Make regex safe for g++.  This fixes one real bug (an "err"
11063         that should have been "*err").  g++ problem reported by
11064         Sam Steingold.
11065         * lib/regex_internal.h (re_calloc): New macro, consistent with
11066         re_malloc etc.  All callers of calloc changed to use re_calloc.
11067         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
11068         not int.  All callers changed.
11069         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
11070         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
11071         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
11072         (find_recover_state): Change "err" to "*err"; this fixes what
11073         appears to be a real bug.
11074         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
11075         versus int.
11076
11077 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11078
11079         * modules/regex (Depends-on): Add malloc, since the code
11080         assumes that !malloc(0) means failure.
11081
11082 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11083
11084         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
11085
11086         alloca modernization/simplification for regex.
11087         * lib/regex.c: Remove portability cruft for alloca.  This no longer
11088         needs to be at the start of the file, and can be moved into
11089         regex_internal.h and simplified.
11090         * lib/regex_internal.h: Include <alloca.h>.
11091         (__libc_use_alloca) [!defined _LIBC]: New macro.
11092         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
11093         now works outside glibc.
11094
11095 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11096
11097         * config/srclist.txt: Add glibc bugs 1241, 1245.
11098
11099 2005-08-25  Jim Meyering  <jim@meyering.net>
11100
11101         * lib/open-safer.c: Include <config.h>.
11102         Otherwise, we'd lose LARGEFILE support in any file using
11103         e.g. "fcntl--.h"
11104
11105 2005-08-25  Bruno Haible  <bruno@clisp.org>
11106
11107         * m4/minmax.m4: Require autoconf 2.52.
11108         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
11109         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
11110         alternatives of translit over the alphabet.
11111         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
11112
11113 2005-08-24  Simon Josefsson  <jas@extundo.com>
11114
11115         * tests/test-getpass.c: New file.
11116
11117 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11118
11119         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
11120         for GNU regex features.
11121
11122 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11123
11124         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
11125         * lib/regex.h (regerror): Likewise.
11126
11127         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
11128         requires this.  (The code never needed it.)
11129
11130         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
11131         All uses of recently-renamed identifiers changed to use the new,
11132         POSIX-compliant names.  The code will build and run just fine
11133         without these changes, but it's better to eat our own dog food
11134         and use the standard-conforming names.
11135
11136         * lib/regex.h: Fix a multitude of POSIX name space violations.
11137         These changes have an effect only for programs that define
11138         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
11139         do not change anything for programs compiled in the normal way.
11140         Also, there is no effect on the ABI.
11141
11142         (_REGEX_SOURCE): New macro.
11143         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
11144         defined and _GNU_SOURCE is not; this fixes a name space violation.
11145
11146         Rename the following macros to obey POSIX requirements.
11147         The old names are still visible as macros if _REGEX_SOURCE is defined.
11148         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
11149         RE_BACKSLASH_ESCAPE_IN_LISTS.
11150         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
11151         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
11152         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
11153         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
11154         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
11155         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
11156         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
11157         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
11158         (REG_INTERVALS): renamed from RE_INTERVALS.
11159         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
11160         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
11161         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
11162         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
11163         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
11164         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
11165         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
11166         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
11167         RE_UNMATCHED_RIGHT_PAREN_ORD.
11168         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
11169         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
11170         (REG_DEBUG): renamed from RE_DEBUG.
11171         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
11172         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
11173         unusual, since we can't clash with the POSIX REG_ICASE.
11174         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
11175         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
11176         (REG_NO_SUB): renamed from RE_NO_SUB.
11177         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
11178         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
11179         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
11180         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
11181         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
11182         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
11183         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
11184         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
11185         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
11186         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
11187         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
11188         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
11189         RE_SYNTAX_POSIX_MINIMAL_BASIC.
11190         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
11191         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
11192         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
11193         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
11194         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
11195         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
11196         (REG_FIXED): Renamed from REGS_FIXED.
11197         (REG_NREGS): Renamed from RE_NREGS.
11198
11199         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
11200         of other REG_* macros, since POSIX says the user is allowed to
11201         #undef these macros selectively.
11202
11203         (reg_errcode_t): Update comment stating what other tables need
11204         to be consistent.
11205
11206         Rename the following enum values to obey POSIX requirements.
11207         The old names are still visible as macros.
11208         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
11209         is not defined, since GNU is supposed to be a superset of POSIX as
11210         much as possible, and since we want reg_errcode_t to be a signed
11211         type for implementation consistency.
11212         (_REG_NOERROR): Renamed from REG_NOERROR.
11213         (_REG_NOMATCH): Renamed from REG_NOMATCH.
11214         (_REG_BADPAT): Renamed from REG_BADPAT.
11215         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
11216         (_REG_ECTYPE): Renamed from REG_ECTYPE.
11217         (_REG_EESCAPE): Renamed from REG_EESCAPE.
11218         (_REG_ESUBREG): Renamed from REG_ESUBREG.
11219         (_REG_EBRACK): Renamed from REG_EBRACK.
11220         (_REG_EPAREN): Renamed from REG_EPAREN.
11221         (_REG_EBRACE): Renamed from REG_EBRACE.
11222         (_REG_BADBR): Renamed from REG_BADBR.
11223         (_REG_ERANGE): Renamed from REG_ERANGE.
11224         (_REG_ESPACE): Renamed from REG_ESPACE.
11225         (_REG_BADRPT): Renamed from REG_BADRPT.
11226         (_REG_EEND): Renamed from REG_EEND.
11227         (_REG_ESIZE): Renamed from REG_ESIZE.
11228         (_REG_ERPAREN): Renamed from REG_ERPAREN.
11229         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
11230         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
11231         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
11232         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
11233
11234         (_REG_RE_NAME, _REG_RM_NAME): New macros.
11235         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
11236         changed.  But support the old name if the new one is not defined
11237         and if _REGEX_SOURCE.
11238
11239         Change the following member names in struct re_pattern_buffer.
11240         The old names are still supported if !_REGEX_SOURCE.
11241         The new names are always supported, regardless of _REGEX_SOURCE.
11242         (re_buffer): Renamed from buffer.
11243         (re_allocated): Renamed from allocated.
11244         (re_used): Renamed from used.
11245         (re_syntax): Renamed from syntax.
11246         (re_fastmap): Renamed from fastmap.
11247         (re_translate): Renamed from translate.
11248         (re_can_be_null): Renamed from can_be_null.
11249         (re_regs_allocated): Renamed from regs_allocated.
11250         (re_fastmap_accurate): Renamed from fastmap_accurate.
11251         (re_no_sub): Renamed from no_sub.
11252         (re_not_bol): Renamed from not_bol.
11253         (re_not_eol): Renamed from not_eol.
11254         (re_newline_anchor): Renamed from newline_anchor.
11255
11256         Change the following member names in struct re_registers.
11257         The old names are still supported if !_REGEX_SOURCE.
11258         The new names are always supported, regardless of _REGEX_SOURCE.
11259         (rm_num_regs): Renamed from num_regs.
11260         (rm_start): Renamed from start.
11261         (rm_end): Renamed from end.
11262
11263         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
11264         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
11265         Prepend __ to parameter names.
11266
11267         Undo yesterday's changes.
11268
11269 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11270
11271         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
11272         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
11273         lib/regex.c.
11274
11275 2005-08-24  Jim Meyering  <jim@meyering.net>
11276
11277         Sync from coreutils.
11278         * m4/fcntl-safer.m4: New file.
11279
11280         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
11281         and object files for this module.
11282
11283 2005-08-24  Jim Meyering  <jim@meyering.net>
11284
11285         Sync from coreutils.
11286         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
11287
11288 2005-08-24  Jim Meyering  <jim@meyering.net>
11289
11290         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
11291         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
11292
11293 2005-08-24  Jim Meyering  <jim@meyering.net>
11294
11295         * modules/fcntl-safer: New module.
11296         * modules/fts (Depends-on): Add fcntl-safer.
11297         * MODULES.html.sh (File descriptor based Input/Output):
11298         Add fcntl-safer.
11299
11300 2005-08-24  Bruno Haible  <bruno@clisp.org>
11301
11302         Support for unit test modules.
11303         * modules/README: Mention tests modules.
11304         * modules/TEMPLATE-TESTS: New file.
11305         * gnulib-tool: New options --extract-tests-module, --with-tests and
11306         --tests-base (unused for the moment).
11307         (testsbase, inctests): New variables.
11308         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
11309         (func_verify_module): Exclude TEMPLATE-TESTS.
11310         (func_verify_nontests_module, func_verify_tests_module): New functions.
11311         (func_get_dependencies): Add implicit dependency for tests modules.
11312         (func_get_tests_module): New function.
11313         (func_modules_transitive_closure): When --with-tests was specified,
11314         include the unit tests as well, unless explicitly avoided.
11315         (func_emit_lib_Makefile_am): Ignore the tests modules here.
11316         (func_emit_tests_Makefile_am): New function.
11317         (func_create_testdir): When --with-tests was specified, emit a
11318         tests/ directory.
11319         * MODULES.html.sh (Future developments): Update.
11320
11321 2005-08-24  Bruno Haible  <bruno@clisp.org>
11322
11323         * modules/tls-tests: New file.
11324         * tests/test-tls.c: New file, from GNU gettext.
11325
11326 2005-08-24  Bruno Haible  <bruno@clisp.org>
11327
11328         * modules/lock-tests: New file.
11329         * tests/test-lock.c: New file, from GNU gettext.
11330
11331 2005-08-24  Bruno Haible  <bruno@clisp.org>
11332
11333         * lib/lock.h: Add multiple inclusion guard.
11334         * lib/tls.h: Add multiple inclusion guard.
11335
11336 2005-08-24  Bruno Haible  <bruno@clisp.org>
11337
11338         * gnulib-tool: Add support for the --aux-dir option to
11339         --create-testdir, --create-megatestdir, --test, --megatest.
11340         (func_create_testdir, func_create_megatestdir): Optionally emit a
11341         AC_CONFIG_AUX_DIR directive.
11342         (create-testdir, create-megatestdir, test, megatest): Provide a
11343         default value for $auxdir.
11344
11345 2005-08-24  Bruno Haible  <bruno@clisp.org>
11346
11347         * gnulib-tool (import): Use compound statement instead of subshell
11348         where possible.
11349
11350 2005-08-24  Bruno Haible  <bruno@clisp.org>
11351
11352         * gnulib-tool (import): Change --aux-dir default to "build-aux".
11353
11354 2005-08-24  Bruno Haible  <bruno@clisp.org>
11355
11356         * gnulib-tool (func_version): Update.
11357
11358 2005-08-24  Bruno Haible  <bruno@clisp.org>
11359
11360         * gnulib-tool (func_import, func_create_testdir,
11361         func_create_megatestdir): Quote all autoconf macro arguments.
11362
11363 2005-08-24  Bruno Haible  <bruno@clisp.org>
11364
11365         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
11366         option --force, because --force causes the aclocal.m4 of each
11367         subdirectory to be newer than the corresponding config.h.in.
11368
11369 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11370
11371         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
11372         All contents moved to gl_REGEX.
11373         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
11374         assume that it does.
11375
11376 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11377
11378         * lib/regex.h (REG_NOSYS)
11379         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
11380         Define, since POSIX requires it as of 2001.
11381         (_REG_ENOSYS)
11382         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
11383         New private symbol, used to keep the enum signed in all cases.
11384         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
11385         Youngman in
11386         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
11387
11388         * lib/regex_internal.c (re_string_skip_chars, register_state):
11389         (calc_state_hash):
11390         Remove forward decls; no longer needed now that we use prototypes.
11391         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
11392         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
11393         (clean_state_log_if_needed): Likewise.
11394
11395 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11396
11397         * config/srclist.txt: Add glibc bugs 1231-1233.
11398
11399 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11400
11401         Fix problems reported by Sam Steingold in
11402         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
11403         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
11404         assumed that reg_errcode_t is a signed type, which is not
11405         necessarily true if _XOPEN_SOURCE is not defined.
11406         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
11407         since some compilers warn about it otherwise.
11408
11409 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11410
11411         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
11412         (init_word_char, create_initial_state, duplicate_node_closure):
11413         (fetch_token, peek_token_bracket, build_range_exp):
11414         (build_collating_symbol): Remove forward decls; no longer needed
11415         now that we use prototypes.
11416
11417         * lib/regcomp.c:
11418         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
11419         (re_compile_fastmap_iter, regcomp, regerror, regfree):
11420         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
11421         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
11422         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
11423         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
11424         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
11425         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
11426         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
11427         (build_range_exp, build_collating_symbol, parse_bracket_exp):
11428         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
11429         (build_charclass, build_charclass_op, fetch_number, create_tree):
11430         (create_token_tree, mark_opt_subexp, duplicate_tree):
11431         Use prototypes rather than old-style definitions.
11432
11433         * lib/regex_internal.c:
11434         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
11435         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
11436         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11437         (re_string_reconstruct, re_string_peek_byte_case):
11438         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
11439         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11440         (re_node_set_init_copy, re_node_set_add_intersect):
11441         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11442         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11443         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11444         (re_acquire_state, re_acquire_state_context, register_state):
11445         (create_ci_newstate, create_cd_newstate, free_state):
11446         Likewise.
11447         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
11448         re_search_2):
11449         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
11450         (re_search_internal, prune_impossible_nodes):
11451         (acquire_init_state_context, check_matching, static):
11452         (check_halt_node_context, check_halt_state_context, proceed_next_node):
11453         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
11454         (update_regs, sift_states_backward, build_sifted_states):
11455         (clean_state_log_if_needed, merge_state_array):
11456         (update_cur_sifted_state, add_epsilon_src_nodes):
11457         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
11458         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
11459         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
11460         (find_recover_state, check_subexp_matching_top, transit_state_mb):
11461         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
11462         (check_arrival, check_arrival_add_next_nodes):
11463         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11464         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11465         (check_node_accept_bytes, check_node_accept, extend_buffers):
11466         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
11467         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
11468         (sift_ctx_init):
11469         Likewise.
11470
11471         * lib/regex_internal.h:
11472         (re_string_allocate, re_string_construct, re_string_reconstruct):
11473         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
11474         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
11475         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
11476         (re_string_context_at, re_string_peek_byte_case):
11477         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
11478         is defined, since we now use prototypes always.
11479
11480         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
11481         C89 or better.  All uses removed.
11482
11483 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11484
11485         * config/srclist.txt: Add glibc bugs 1220-1227.
11486
11487 2005-08-20  Jim Meyering  <jim@meyering.net>
11488
11489         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
11490         of unused local, dfa.
11491
11492 2005-08-20  Bruno Haible  <bruno@clisp.org>
11493
11494         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
11495
11496 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11497
11498         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
11499         (re_node_set_insert_last, re_dfa_add_node):
11500         Rename local variables to avoid GCC shadowing warnings.
11501
11502 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11503
11504         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
11505         [defined lint]: Suppress bogus uninitialized-variable warnings.
11506
11507         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
11508         and let the caller return REG_ESPACE if out of space.  This
11509         removes an uninitialied-variable warning with GCC 4.0.1, and also
11510         avoids taking the address of a local variable.  All callers
11511         changed.
11512
11513 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11514
11515         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
11516         $LIBCSRC/posix/regexec.c.
11517         Add glibc bug 1217 for regcomp.c.
11518
11519 2005-08-19  Jim Meyering  <jim@meyering.net>
11520
11521         * lib/regexec.c (proceed_next_node): Redo local variables to
11522         avoid GCC shadowing warnings.
11523
11524 2005-08-18  Bruno Haible  <bruno@clisp.org>
11525
11526         * lib/strstr.c (strstr): Fix return value in multibyte case.
11527         * lib/strcasestr.c (strcasestr): Likewise.
11528
11529 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11530
11531         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
11532
11533 2005-08-17  Jim Meyering  <jim@meyering.net>
11534
11535         Make the %s format (seconds since the epoch) work for a negative
11536         number and when used with a zero-padded field width, e.g. %015s.
11537
11538         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
11539         label so that it precedes the code to set `digits'.  Otherwise,
11540         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
11541         print `00-22'.  Now, it prints `-0022', as it should.
11542
11543 2005-08-17  Bruno Haible  <bruno@clisp.org>
11544
11545         * modules/strstr (Files): Add m4/mbrtowc.m4.
11546         (Depends-on): Add mbuiter.
11547
11548 2005-08-17  Bruno Haible  <bruno@clisp.org>
11549
11550         * modules/strcasestr: New file.
11551         * MODULES.html.sh (String handling, based on ANSI C 89): Add
11552         strcasestr.
11553
11554 2005-08-17  Bruno Haible  <bruno@clisp.org>
11555
11556         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
11557
11558 2005-08-17  Bruno Haible  <bruno@clisp.org>
11559
11560         * modules/mbuiter: New file.
11561         * MODULES.html.sh (Extended multibyte and wide character utilities):
11562         Add mbuiter.
11563
11564 2005-08-17  Bruno Haible  <bruno@clisp.org>
11565
11566         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
11567         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
11568
11569 2005-08-17  Bruno Haible  <bruno@clisp.org>
11570
11571         * m4/strcasestr.m4: New file.
11572
11573 2005-08-17  Bruno Haible  <bruno@clisp.org>
11574
11575         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
11576         * lib/strstr.c: Completely rewritten, with multibyte locale support.
11577
11578 2005-08-17  Bruno Haible  <bruno@clisp.org>
11579
11580         * lib/strcasestr.h: New file.
11581         * lib/strcasestr.c: New file.
11582
11583 2005-08-17  Bruno Haible  <bruno@clisp.org>
11584
11585         * lib/strcasecmp.c: Use mbuiter.h.
11586
11587 2005-08-17  Bruno Haible  <bruno@clisp.org>
11588
11589         * lib/mbuiter.h: New file.
11590
11591 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
11592
11593         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
11594         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
11595         and gl_GETOPT are both invoked via different paths (as happens
11596         with GNU tar CVS because it uses both argp and getopt), the former
11597         wins.
11598
11599 2005-08-16  Bruno Haible  <bruno@clisp.org>
11600
11601         * modules/tls: New file.
11602         * MODULES.html.sh (Multithreading): Add tls.
11603
11604 2005-08-16  Bruno Haible  <bruno@clisp.org>
11605
11606         * modules/strnlen1: New file.
11607         * MODULES.html.sh (String handling): Add strnlen1.
11608
11609 2005-08-16  Bruno Haible  <bruno@clisp.org>
11610
11611         * modules/strcase (Files): Add m4/mbrtowc.m4.
11612         (Depends-on): Add strnlen1, mbchar.
11613
11614 2005-08-16  Bruno Haible  <bruno@clisp.org>
11615
11616         * modules/mbiter: New file.
11617         * MODULES.html.sh (Extended multibyte and wide character utilities):
11618         Add mbiter.
11619
11620 2005-08-16  Bruno Haible  <bruno@clisp.org>
11621
11622         * modules/mbfile: New file.
11623         * MODULES.html.sh (Extended multibyte and wide character utilities):
11624         Add mbfile.
11625
11626 2005-08-16  Bruno Haible  <bruno@clisp.org>
11627
11628         * modules/mbchar: New file.
11629         * MODULES.html.sh (Extended multibyte and wide character utilities):
11630         New section.
11631
11632 2005-08-16  Bruno Haible  <bruno@clisp.org>
11633
11634         * m4/tls.m4: New file, from GNU gettext.
11635
11636 2005-08-16  Bruno Haible  <bruno@clisp.org>
11637
11638         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
11639         always.
11640         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
11641
11642 2005-08-16  Bruno Haible  <bruno@clisp.org>
11643
11644         * m4/mbiter.m4: New file.
11645
11646 2005-08-16  Bruno Haible  <bruno@clisp.org>
11647
11648         * m4/mbfile.m4: New file.
11649
11650 2005-08-16  Bruno Haible  <bruno@clisp.org>
11651
11652         * m4/mbchar.m4: New file.
11653
11654 2005-08-16  Bruno Haible  <bruno@clisp.org>
11655
11656         * lib/tls.h: New file, from GNU gettext.
11657         * lib/tls.c: New file, from GNU gettext.
11658
11659 2005-08-16  Bruno Haible  <bruno@clisp.org>
11660
11661         * lib/strnlen1.h: New file.
11662         * lib/strnlen1.c: New file.
11663
11664 2005-08-16  Bruno Haible  <bruno@clisp.org>
11665
11666         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
11667         (mbi_init): Update.
11668         (mbi_avail, mbi_advance): Let the iteration end before the terminating
11669         NUL byte, not after it.
11670
11671 2005-08-16  Bruno Haible  <bruno@clisp.org>
11672
11673         * lib/strcase.h (strcasecmp): Add note in comments.
11674         * lib/strncasecmp.c: Use code from strcasecmp.c.
11675         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
11676         (strcasecmp): Work correctly in multibyte locales.
11677
11678 2005-08-16  Bruno Haible  <bruno@clisp.org>
11679
11680         * lib/mbiter.h: New file.
11681
11682 2005-08-16  Bruno Haible  <bruno@clisp.org>
11683
11684         * lib/mbfile.h: New file.
11685
11686 2005-08-16  Bruno Haible  <bruno@clisp.org>
11687
11688         * lib/mbchar.h: New file.
11689         * lib/mbchar.c: New file.
11690
11691 2005-08-16  Bruno Haible  <bruno@clisp.org>
11692
11693         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
11694         the valid ones. Makes the comparison operations transitive:
11695         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
11696         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
11697
11698 2005-08-15  Simon Josefsson  <jas@extundo.com>
11699
11700         * modules/ssize_t (License): Change to 'unlimited'.
11701
11702         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
11703
11704 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11705
11706         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
11707         Add comments for each pending glibc patch.
11708
11709 2005-08-15  Bruno Haible  <bruno@clisp.org>
11710
11711         * lib/regex.h (__restrict_arr): Don't define to __restrict if
11712         __cplusplus is defined.
11713
11714 2005-08-14  Jim Meyering  <jim@meyering.net>
11715
11716         Sync from coreutils.
11717
11718         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
11719         Use the hash-table-based cycle-detection code not just when
11720         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
11721         Reported by James Youngman in
11722         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
11723         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
11724         FTS_TIGHT_CYCLE_CHECK.
11725         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
11726         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
11727         once again.
11728         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
11729         * lib/fts.c (fd_safer): Remove decl.
11730         Include fcntl--.h rather than unistd-safer.h
11731         (fts_safe_changedir): Don't call fd_safer; no longer needed
11732         now that we include fcntl--.h.
11733
11734 2005-08-12  Simon Josefsson  <jas@extundo.com>
11735
11736         * modules/getndelim2: Use ssize_t module.
11737         * modules/getnline: Likewise.
11738         * modules/safe-read: Likewise.
11739         * modules/xreadlink: Likewise.
11740
11741         * modules/ssize_t: New file.
11742
11743 2005-08-12  Simon Josefsson  <jas@extundo.com>
11744
11745         * m4/readline.m4: Look for termcap, curses or ncurses if required.
11746
11747 2005-08-12  Simon Josefsson  <jas@extundo.com>
11748
11749         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11750         ssize_t.
11751
11752 2005-08-12  Simon Josefsson  <jas@extundo.com>
11753
11754         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
11755         readline, getdelim and check_version.
11756         (Support for systems lacking ISO C 99: Sizes of integer types):
11757         Add size_max.
11758
11759 2005-08-12  Bruno Haible  <bruno@clisp.org>
11760
11761         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
11762
11763 2005-08-11  Simon Josefsson  <jas@extundo.com>
11764
11765         * modules/readline: New file.
11766
11767         * modules/strnlen (Files): Add strnlen.h.
11768
11769 2005-08-11  Simon Josefsson  <jas@extundo.com>
11770
11771         * m4/readline.m4: New file.
11772
11773 2005-08-11  Simon Josefsson  <jas@extundo.com>
11774
11775         * lib/readline.h, readline.c: New file.
11776
11777 2005-08-11  Simon Josefsson  <jas@extundo.com>
11778
11779         * doc/gnulib.texi (Initial import, Finishing touches): Mention
11780         gl_AVOID.
11781
11782 2005-08-11  Bruno Haible  <bruno@clisp.org>
11783
11784         * lib/strnlen.h (strnlen): Change parameter name to match comment.
11785
11786 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
11787
11788         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
11789
11790 2005-08-10  Simon Josefsson  <jas@extundo.com>
11791
11792         * tests/test-iconvme.c: New file.
11793
11794 2005-08-10  Simon Josefsson  <jas@extundo.com>
11795
11796         * m4/strnlen.m4: New file.
11797
11798         * m4/strndup.m4: Don't check for strnlen declaration, done in
11799         strnlen.m4.
11800
11801 2005-08-10  Simon Josefsson  <jas@extundo.com>
11802
11803         * lib/strndup.c: Use strnlen.h.
11804
11805         * lib/strnlen.h: New file.
11806
11807 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11808
11809         * README: Typos.
11810
11811 2005-08-02  Simon Josefsson  <jas@extundo.com>
11812
11813         * modules/readline: New file.
11814
11815 2005-08-02  Simon Josefsson  <jas@extundo.com>
11816
11817         * modules/getdelim: New file.
11818
11819         * modules/getline: Rewrite, don't use getndelim2.
11820
11821 2005-08-02  Simon Josefsson  <jas@extundo.com>
11822
11823         * m4/getline.m4: Separate out getdelim stuff into separate module.
11824
11825         * m4/getdelim.m4: New file.
11826
11827 2005-08-02  Simon Josefsson  <jas@extundo.com>
11828
11829         * lib/getline.h, getline.c: Rewrite.
11830
11831         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
11832
11833 2005-07-31  Bruno Haible  <bruno@clisp.org>
11834
11835         * lib/lock.h (gl_lock_initializer): New macro.
11836         (gl_lock_define_initialized): Use it.
11837         (gl_rwlock_initializer): New macro.
11838         (gl_rwlock_define_initialized): Use it.
11839         (gl_recursive_lock_initializer): New macro.
11840         (gl_recursive_lock_define_initialized): Use it.
11841
11842 2005-07-30  Karl Berry  <karl@gnu.org>
11843
11844         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
11845         Report from Ben Pfaff, regarding getopt.
11846
11847 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
11848
11849         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
11850         normal way.
11851         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
11852         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
11853         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
11854         (gl_GETOPT): Use the new macros.  Most of the implementation
11855         is moved to the new macros.  This is for programs like Emacs
11856         that don't want all the functionality of gl_GETOPT.
11857
11858 2005-07-26  Bruno Haible  <bruno@clisp.org>
11859
11860         * m4/lock.m4: Update from GNU gettext.
11861
11862 2005-07-26  Bruno Haible  <bruno@clisp.org>
11863
11864         * lib/lock.h: Update from GNU gettext.
11865         * lib/lock.c: Update from GNU gettext.
11866
11867 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
11868
11869         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
11870         obsolescent AC_TRY_RUN.  Include the default includes files, for
11871         'exit'.
11872
11873 2005-07-24  Bruno Haible  <bruno@clisp.org>
11874
11875         * modules/visibility: New file.
11876         * MODULES.html.sh (Misc): Add visibility.
11877
11878 2005-07-24  Bruno Haible  <bruno@clisp.org>
11879
11880         * m4/visibility.m4: New file.
11881
11882 2005-07-24  Bruno Haible  <bruno@clisp.org>
11883
11884         * doc/visibility.texi: New file.
11885
11886 2005-07-22  Bruno Haible  <bruno@clisp.org>
11887
11888         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
11889         $(ALLOCA_H), redundant through BUILT_SOURCES.
11890         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
11891         redundant through BUILT_SOURCES.
11892         * modules/byteswap (Makefile.am): Remove explicit dependency on
11893         $(BYTESWAP_H), redundant through BUILT_SOURCES.
11894         * modules/fnmatch (Makefile.am): Remove explicit dependency on
11895         $(FNMATCH_H), redundant through BUILT_SOURCES.
11896         * modules/getopt (Makefile.am): Remove explicit dependency on
11897         $(GETOPT_H), redundant through BUILT_SOURCES.
11898         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
11899         redundant through BUILT_SOURCES.
11900         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
11901         redundant through BUILT_SOURCES.
11902         * modules/stdbool (Makefile.am): Remove explicit dependency on
11903         $(STDBOOL_H), redundant through BUILT_SOURCES.
11904         * modules/stdint (Makefile.am): Remove explicit dependency on
11905         $(STDINT_H), redundant through BUILT_SOURCES.
11906         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
11907         Remove explicit dependency on $(SYSEXITS_H).
11908         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
11909
11910 2005-07-18  Simon Josefsson  <jas@extundo.com>
11911
11912         * lib/check-version.c (check_version): Accept identical versions too.
11913
11914 2005-07-18  Bruno Haible  <bruno@clisp.org>
11915
11916         * modules/lock: New file.
11917         * MODULES.html.sh (Multithreading): New section.
11918
11919 2005-07-18  Bruno Haible  <bruno@clisp.org>
11920
11921         * m4/lock.m4: New file, from GNU gettext.
11922
11923 2005-07-18  Bruno Haible  <bruno@clisp.org>
11924
11925         * lib/lock.h: New file, from GNU gettext.
11926         * lib/lock.c: New file, from GNU gettext.
11927
11928 2005-07-18  Bruno Haible  <bruno@clisp.org>
11929
11930         * lib/lock.h (gl_once_t): New type.
11931         (gl_once_define, gl_once): New macros.
11932         * lib/lock.c (fresh_once): New variable.
11933         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
11934         functions.
11935
11936 2005-07-16  Simon Josefsson  <jas@extundo.com>
11937
11938         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
11939         workaround, suggested by Bruno.
11940
11941 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11942
11943         * modules/xalloc (Depends-on): Add xalloc-die.
11944         * modules/xvasprintf (Depends-on): Add xalloc-die.
11945
11946 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11947
11948         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
11949         with a minor change.
11950
11951 2005-07-15  Bruno Haible  <bruno@clisp.org>
11952
11953         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
11954         When using lib/poll.c, define poll as rpl_poll.
11955
11956 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
11957
11958         * modules/argp (Depends-on): Remove unlocked-io.
11959
11960 2005-07-14  Derek Price  <derek@ximbiot.com>
11961
11962         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
11963         for glob symlink bug.
11964
11965 2005-07-14  Bruno Haible  <bruno@clisp.org>
11966
11967         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
11968         Instead, test for *_unlocked function declarations directly.
11969
11970 2005-07-11  Simon Josefsson  <jas@extundo.com>
11971
11972         * modules/size_max: New file.
11973
11974         * modules/xsize: Depend on size_max module for size_max.m4.
11975
11976 2005-07-11  Simon Josefsson  <jas@extundo.com>
11977
11978         * lib/size_max.h: New file.
11979
11980 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
11981
11982         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
11983         copyright symbol and the year.
11984         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
11985         (version_etc_va): Use parameterized copyright notice.
11986         Reword to conform to the current GNU coding standards.
11987
11988 2005-07-11  Karl Berry  <karl@gnu.org>
11989
11990         * doc/gnulib.texi (Quoting): new node.
11991         (Initial import): more info, from Patrice.
11992
11993 2005-07-11  Bruno Haible  <bruno@clisp.org>
11994
11995         * gnulib-tool (func_usage): Document option --avoid.
11996         (Command line options): Handle --avoid.
11997         (func_acceptable): New function.
11998         (func_modules_transitive_closure): Use it.
11999
12000 2005-07-11  Bruno Haible  <bruno@clisp.org>
12001
12002         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
12003         Reported by Jim Meyering.
12004
12005 2005-07-10  Bruno Haible  <bruno@clisp.org>
12006
12007         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
12008         Needed when size_t is smaller than 'unsigned int'.
12009         Reported by Paul Eggert.
12010
12011 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12012
12013         * modules/argp (Depends-on): Add unlocked-io
12014
12015 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12016
12017         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
12018         block of defines.
12019
12020 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12021
12022         * config/srclist.txt: Comment out regcomp.c, since we have a porting
12023         fix now.
12024
12025 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
12026         and Paul Eggert  <eggert@cs.ucla.edu>
12027
12028         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
12029         in wint_t, not wchar_t.  Remove now-unnecessary cast.
12030
12031 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12032
12033         * modules/regex (Files): Add lib/regex_internal.c,
12034         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
12035         (Depends-on): Add extensions.
12036         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
12037
12038 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12039
12040         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
12041         pathconf.
12042         * m4/same.m4 (gl_SAME): Likewise.
12043         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
12044
12045         * m4/regex.m4: Adjust to new libc regex implementation.
12046         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
12047         all the .c and .h parts of (the new) regex.
12048         Quote the m4 stuff better.
12049         Check for RE_ICASE bug of old gnulib.
12050         Check for REG_STARTEND of recent libc.
12051         Rename local variables from jm_* to gl_*.
12052         Quote operand of "test -f".
12053         Say "recent enough" version of libc, not "version 2".
12054         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
12055         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
12056         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
12057         Remove check for btowc, isascii.
12058         Require AM_LANGINFO_CODESET.
12059
12060 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12061
12062         * lib/regex.c, regex.h: Sync from libc.
12063         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
12064         * lib/regexec.c:
12065         New files, synced from libc, except that regex_internal.h
12066         currently has a small porting fix.
12067
12068 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12069
12070         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
12071         regex_internal.c, regexec.c.
12072         Add regex_internal.h too, but as a comment, since the libc version
12073         is currently broken in gnulib mode.
12074
12075 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12076
12077         Support programs like Emacs that use gnulib but not gettext.
12078         * MODULES.html.sh (Internationalization functions): Add gettext-h.
12079         * modules/gettext-h: New file.
12080         * modules/gettext (Files): Remove lib/gettext.h.
12081         (Depends-on): Add gettext-h.
12082         (Makefile.am): Remove lib_SOURCES.
12083         * modules/argmatch, modules/c-stack, modules/closeout:
12084         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
12085         * modules/execute, modules/file-type, modules/getaddrinfo:
12086         * modules/getopt, modules/human, modules/javacomp:
12087         * modules/javaexec, modules/mkdir-p, modules/obstack:
12088         * modules/openat, modules/pagealign_alloc, modules/pipe:
12089         * modules/quotearg, modules/regex, modules/rpmatch:
12090         * modules/unicodeio, modules/userspec, modules/version-etc:
12091         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
12092         * modules/xsetenv:
12093         Depend on gettext-h, not gettext.
12094
12095 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12096
12097         * gnulib-tool (func_import): Add support for 'public domain' license.
12098         * modules/alloca, modules/atexit, modules/memmove:
12099         Now public domain, not GPL.
12100         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
12101         * modules/realloc, modules/strerror, modules/strtod:
12102         Now LGPL, not GPL.
12103
12104 2005-07-05  Bruno Haible  <bruno@clisp.org>
12105
12106         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
12107         autoconf CVS. Needed for mingw.
12108
12109 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12110
12111         Remove the dependency of the strftime module on the tzset module.
12112         * modules/strftime (Depends-on): Remove dependency on tzset.
12113
12114 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12115
12116         Remove the dependency of the strftime module on the tzset module.
12117         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
12118         gl_FUNC_TZSET_CLOBBER.
12119
12120 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12121
12122         Remove the dependency of the strftime module on the tzset module.
12123         * lib/strftime.c (my_strftime)
12124         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
12125         Copy the input structure, to work around some of the bug with
12126         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
12127         Solaris releases, you should also use the tzset module, but we won't
12128         require it as a dependency any more since we don't want LGPLed code
12129         to depend on GPLed code.
12130
12131 2005-07-02  Jim Meyering  <jim@meyering.net>
12132
12133         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
12134         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
12135         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
12136         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
12137
12138 2005-07-02  Jim Meyering  <jim@meyering.net>
12139
12140         * lib/backupfile.c (backup_args): Change a `0' to NULL.
12141
12142 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12143
12144         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
12145         declares only 'struct timespec;' (!).
12146
12147 2005-07-01  Jim Meyering  <jim@meyering.net>
12148
12149         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
12150         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
12151         * lib/save-cwd.c, tempname.c:
12152         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12153         and don't include <sys/file.h>).
12154
12155 2005-06-29  Jim Meyering  <jim@meyering.net>
12156
12157         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
12158         type name.  Use the variable name instead.
12159         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
12160         Likewise.
12161
12162 2005-06-28  Simon Josefsson  <jas@extundo.com>
12163
12164         * modules/check-version (Files): Add check-version.m4.
12165
12166 2005-06-28  Simon Josefsson  <jas@extundo.com>
12167
12168         * m4/check-version.m4: New file, suggested by Jim Meyering
12169         <jim@meyering.net>.
12170
12171 2005-06-28  Simon Josefsson  <jas@extundo.com>
12172
12173         * lib/check-version.h, lib/check-version.c: New files.
12174
12175 2005-06-28  Simon Josefsson  <jas@extundo.com>
12176
12177         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
12178         collision with global variable.  Better indentation.  Don't
12179         increment buffer pointer beyond buffer end.  Based on comments
12180         from Paul Eggert <eggert@cs.ucla.edu>.
12181
12182         * lib/base64.h: Indent.
12183
12184 2005-06-28  Simon Josefsson  <jas@extundo.com>
12185
12186         * doc/gnulib.texi (Library version handling): New section.
12187
12188 2005-06-28  Jim Meyering  <jim@meyering.net>
12189
12190         * check-module (find_included_lib_files): Hard-code another
12191         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
12192         but modules/fts-lgpl (correctly) does not list those files.
12193
12194         * modules/canonicalize (Files): Add lib/pathmax.h.
12195
12196 2005-06-25  Simon Josefsson  <jas@extundo.com>
12197
12198         * modules/check-version: New file.
12199
12200 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
12201
12202         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
12203         initializer of struct addrinfo, as an indication that we don't
12204         care how many members the structure has.
12205
12206 2005-06-24  Derek Price  <derek@ximbiot.com>
12207         and Bruno Haible  <bruno@clisp.org>
12208
12209         Remove stat module & update lstat.
12210         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
12211         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
12212         * m4/stat.m4: Remove this file.
12213
12214 2005-06-24  Derek Price  <derek@ximbiot.com>
12215         and Bruno Haible  <bruno@clisp.org>
12216
12217         Remove stat module & update lstat.
12218         * lib/stat.c: Remove this file...
12219         (slash_aware_lstat): ...moving this content and its support...
12220         * lib/lstat.c (rpl_lstat): ...into here.
12221         * lib/lstat.h: New file.
12222
12223 2005-06-24  Derek Price  <derek@ximbiot.com>
12224         and Bruno Haible  <bruno@clisp.org>
12225
12226         Remove stat module & update lstat.
12227         * config/srclist.txt (libc sources): Remove stat.
12228
12229 2005-06-24  Derek Price  <derek@ximbiot.com>
12230         and Bruno Haible  <bruno@clisp.org>
12231
12232         Remove stat module & update lstat.
12233         * MODULES.html.sh (stat): Remove.
12234         * MODULES.html: Regenerated.
12235         * modules/lstat (Description): Correct function name.
12236         (Files): Add "lstat.h".
12237         (Depends-on): Remove stat, add xalloc, stat-macros.
12238         * modules/stat: Remove this file.
12239         (Include): Add "lstat.h", remove <sys/stat.h>.
12240
12241 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
12242
12243         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
12244         (ranged_convert): Don't save conversion in a temporary struct.
12245         This causes a warning with GCC 4.0.0, and anyway in the typical
12246         case it's not worth the extra 100 bytes or so of code.
12247         (ranged_convert, __mktime_internal): When calling a function via a
12248         pointer P, use P () rather than (*P) (), as we now assume C89 or
12249         better.
12250
12251 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12252
12253         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
12254         "who -r" failed to give output.  Problem reported by Tim Waugh.
12255
12256         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
12257         (xcalloc): Use it to avoid needless tests.
12258         Problem reported by Jim Meyering.
12259
12260 2005-06-20  Derek Price  <derek@ximbiot.com>
12261
12262         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
12263         unnecessary for Autoconfs > 2.59c.
12264
12265 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12266
12267         * lib/argp.h (__option_is_short): Check upper limit of
12268         __key. Isprint() requires its argument to have the value
12269         of an unsigned char or EOF.
12270
12271 2005-06-16  Jim Meyering  <jim@meyering.net>
12272
12273         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
12274         when either N or S is zero.
12275
12276 2005-06-16  Derek Price  <derek@ximbiot.com>
12277
12278         * m4/bison.m4: Declare YACC & YFLAGS precious.
12279
12280 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
12281
12282         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
12283         multibyte string or pattern, fall back on unibyte matching.
12284         Problem reported by James Youngman.
12285
12286 2005-06-08  Bruno Haible  <bruno@clisp.org>
12287
12288         * modules/csharpcomp: New file.
12289         * MODULES.html.sh (C#): Add csharpcomp.
12290
12291 2005-06-08  Bruno Haible  <bruno@clisp.org>
12292
12293         * m4/csharpcomp.m4: New file, from GNU gettext.
12294
12295 2005-06-08  Bruno Haible  <bruno@clisp.org>
12296
12297         * lib/csharpcomp.h: New file, from GNU gettext.
12298         * lib/csharpcomp.c: New file, from GNU gettext.
12299         * lib/csharpcomp.sh.in: New file, from GNU gettext.
12300
12301 2005-06-08  Bruno Haible  <bruno@clisp.org>
12302
12303         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
12304         warning on mingw.
12305
12306 2005-06-07  Derek Price  <derek@ximbiot.com>
12307
12308         Sync from CVS.
12309         * lib/glob_.h: Indent nested #ifdef.
12310
12311 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12312
12313         Sync from coreutils.
12314         Use "file name" when talking about file names, instead of "filename"
12315         or "path", as per the GNU coding standards.
12316         * lib/mkdir-p.c: Renamed from makepath.c.
12317         (make_dir_parents): Renamed from make_path.  All callers changed.
12318         * lib/mkdir-p.h: Likewise.  All includers changed.
12319         * lib/filenamecat.c: Renamed from path-concat.c.
12320         (file_name_concat): Renamed from path_concat.  All callers changed.
12321         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
12322         * lib/filenamecat.h: Likewise.  All includers changed.
12323         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
12324         in comments or local variable names.
12325         * lib/basename.c: Likewise.
12326         * lib/canonicalize.c, canonicalize.h: Likewise.
12327         * lib/dirname.c, dirname.h: Likewise.
12328         * lib/euidaccess.c: Likewise.
12329         * lib/exclude.c: Likewise
12330         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
12331         * lib/fsusage.c, fsuage.h: Likewise.
12332         * lib/fts.c, fts_.h: Likewise.
12333         * lib/getcwd.c: Likewise.
12334         * lib/getloadavg.c: Likewise.
12335         * lib/mkstemp.c: Likewise.
12336         * lib/mountlist.c, mountlist.h: Likewise.
12337         * lib/openat.c, openat.h: Likewise.
12338         * lib/readlink-stub.c: Likewise.
12339         * lib/readutmp.c, readutmp.h: Likewise.
12340         * lib/rename.c: Likewise.
12341         * lib/rmdir.c: Likewise.
12342         * lib/same.c: Likewise.
12343         * lib/savedir.c: Likewise.
12344         * lib/stripslash.c: Likewise.
12345         * lib/tempname.c: Likewise.
12346         * lib/xreadlink.c: Likewise.
12347         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
12348         All uses changed.
12349         * lib/exclude.h: Likewise.
12350
12351         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
12352         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12353         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
12354         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12355         * lib/pathmax.h: Include <limits.h> unconditionally, since other
12356         files have been getting away with it for years (MORE/BSD 4.3
12357         is extinct now).
12358         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
12359         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12360
12361         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
12362         Define to 256, not 255, as per modern POSIX.
12363
12364 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12365
12366         Sync from coreutils.
12367         Use "file name" when talking about file names, instead of "filename"
12368         or "path", as per the GNU coding standards.
12369         * MODULES.html.sh: mkdir-p renamed from makepath.
12370         filenamecat renamed from path-concat.
12371         * modules/filenamecat: Renamed from modules/path-concat.
12372         (Files): filenamecat.h and filenamecat.c renamed from
12373         path-concat.h and path-concat.c.
12374         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
12375         (Include): filenamecat.h, not path-concat.h.
12376         * modules/mkdir-p: Renamed from modules/makepath.
12377         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
12378         makepath.c.
12379         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
12380         (Include): mkdir-p.h, not makepath.h.
12381
12382 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12383
12384         Sync from coreutils.
12385         * m4/mkdir-p.m4: Renamed from makepath.m4.
12386         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
12387         Rename files from makepath.c to mkdir-p.c, and from
12388         makepath.h to mkdir-p.h.
12389         * m4/filenamecat.m4: Renamed from path-concat.m4.
12390         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
12391         Rename files from path-concat.c to filenamecat.c,
12392         and from path-concat.h to filenamecat.h.
12393         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
12394         "file name" in local variables or comments.
12395         * m4/rename.m4: Likewise.
12396
12397 2005-06-01  Bruno Haible  <bruno@clisp.org>
12398
12399         * modules/csharpexec: New file.
12400         * MODULES.html.sh (C#): New section.
12401
12402 2005-06-01  Bruno Haible  <bruno@clisp.org>
12403
12404         * m4/csharp.m4: New file, from GNU gettext.
12405         * m4/csharpexec.m4: New file, from GNU gettext.
12406
12407 2005-06-01  Bruno Haible  <bruno@clisp.org>
12408
12409         * lib/csharpexec.h: New file, from GNU gettext.
12410         * lib/csharpexec.c: New file, from GNU gettext.
12411         * lib/csharpexec.sh.in: New file, from GNU gettext.
12412
12413 2005-05-31  Derek Price  <derek@ximbiot.com>
12414             Paul Eggert  <eggert@cs.ucla.edu>
12415
12416         Sync from cvs.
12417         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12418
12419 2005-05-31  Derek Price  <derek@ximbiot.com>
12420             Paul Eggert  <eggert@cs.ucla.edu>
12421
12422         Sync from cvs.
12423         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12424
12425 2005-05-29  Derek Price  <derek@ximbiot.com>
12426
12427         * config/srclist.txt (glob_.h, glob.c): Add these files.
12428
12429 2005-05-29  Derek Price  <derek@ximbiot.com>
12430
12431         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
12432         * modules/glob: New file.
12433         * modules/getlogin_r: Add link to POSIX spec in description.
12434
12435 2005-05-29  Derek Price  <derek@ximbiot.com>
12436             Paul Eggert  <eggert@cs.ucla.edu>
12437
12438         * m4/glob.m4: New file.
12439
12440 2005-05-29  Derek Price  <derek@ximbiot.com>
12441             Paul Eggert  <eggert@cs.ucla.edu>
12442
12443         * lib/glob_.h, lib/glob.c: New files.
12444
12445 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12446
12447         * modules/fts (Files): Remove m4/inttypes-pri.m4.
12448         * modules/fts-lgpl (Depends-on): Remove gettext.
12449
12450 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12451
12452         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
12453         and don't require gt_INTTYPES_PRI.
12454
12455 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12456
12457         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
12458
12459         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
12460         the configuration hassle isn't worth it.
12461         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
12462         (LONGEST_MODIFIER, PRIuMAX): Remove.
12463
12464 2005-05-27  Bruno Haible  <bruno@clisp.org>
12465
12466         * lib/getlogin_r.h: Remove second include of <stddef.h>.
12467
12468 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
12469
12470         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
12471         _POSIX_PTHREAD_SEMANTICS for Solaris.
12472
12473 2005-05-25  Derek Price  <derek@ximbiot.com>
12474
12475         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
12476
12477 2005-05-25  Derek Price  <derek@ximbiot.com>
12478             Paul Eggert  <eggert@cs.ucla.edu>
12479
12480         * modules/getlogin_r, m4/getlogin_r.m4: New files.
12481         * lib/getlogin_r.c, getlogin_r.h: New files.
12482
12483 2005-05-25  Bruno Haible  <bruno@clisp.org>
12484             Derek Price  <derek@ximbiot.com>
12485
12486         * lib/getlogin_r.h: Simplify API documentation.
12487
12488 2005-05-23  Derek Price  <derek@ximbiot.com>
12489
12490         * modules/minmax (Files): Add m4/minmax.m4.
12491         (configure.ac): Add gl_MINMAX.
12492
12493 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
12494
12495         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
12496         so that unistd-safer.h (GPL'ed code) need not be included.
12497
12498 2005-05-22  Bruno Haible  <bruno@clisp.org>
12499
12500         * m4/minmax.m4: New file.
12501         Based on a patch by Derek Price <derek@ximbiot.com>.
12502
12503 2005-05-22  Bruno Haible  <bruno@clisp.org>
12504
12505         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
12506         (INT64_MIN): Fix definition.
12507         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
12508
12509         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
12510         NEED_SIGNED_INT_TYPES.
12511
12512         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
12513         HAVE_SYSTEM_INTTYPES.
12514
12515 2005-05-22  Bruno Haible  <bruno@clisp.org>
12516
12517         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
12518         Also include <sys/param.h> if it defines MIN, MAX.
12519         Based on a patch by Derek Price <derek@ximbiot.com>.
12520
12521 2005-05-21  Jim Meyering  <jim@meyering.net>
12522
12523         * modules/fts (Files): Add m4/inttypes-pri.m4.
12524         (Depends-on): Add lstat and remove gettext.  Alphabetize.
12525
12526 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12527
12528         New fts module.
12529         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
12530         (setup_dir, free_dir): New functions.
12531         (enter_dir, leave_dir): Define trivial
12532         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
12533         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
12534         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
12535         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
12536         Move to fts-cycle.c.
12537         (fts_open): Use setup_dir.
12538         (fts_close): Use free_dir.
12539         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
12540         This adds a label and some gotos, but the alternatives were messier.
12541         Check for memory allocation failure when entering a dir.
12542         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
12543         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
12544         (FTS): New member fts_cycle, that is a union that contains the
12545         old active_dir_ht and cycle_state.  All uses changed to mention
12546         fts_cycle.ht and fts_cycle.state.
12547         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
12548         fts.c, with the following changes:
12549         (setup_dir, free_dir): New functions.
12550         (enter_dir): Now returns bool.  Return true if successful, false
12551         if memory exhausted.  All callers changed.
12552         Do not bother partly cleaning up on
12553         memory allocation failure; that is free_dir's job.
12554         However, free ad if hash_insert fails, to avoid memory leak.
12555         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
12556         fts->fts_options to see which union member to use.
12557
12558 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12559
12560         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
12561         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
12562
12563 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12564
12565         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
12566
12567 2005-05-20  Jim Meyering  <jim@meyering.net>
12568
12569         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
12570         Now a macro, to pacify GCC.
12571
12572 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12573
12574         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
12575         of -1.
12576
12577 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12578
12579         * lib/chown.c (rpl_chown): Return -1 on failure.
12580
12581 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12582
12583         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
12584         Don't check for stddef.h.
12585         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
12586         don't use its results.
12587         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
12588         since we include them unconditionally.  Don't require
12589         AM_STDBOOL_H, since stdbool is a prerequisite.
12590         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
12591         since we assume C89 or better.
12592         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
12593         as we don't use their results.
12594         Don't check for fchdir, memmove, memset, strrchr, as we use
12595         them unconditionally.
12596         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
12597         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
12598
12599 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12600
12601         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
12602         Include <stddef.h> unconditionally, since we assume C89 now.
12603         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
12604         * lib/fts.c: Include fts_.h first, to check interface.
12605         Do not include intprops.h; no longer needed.
12606         Include cycle-check.h and hash.h, since fts_.h no longer does.
12607         Remove unnecessary casts of closedir to void.
12608         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
12609         decide whether to decrement nlinks.
12610         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
12611         (FTS): Use struct hash_table * instead of Hash_table, so that
12612         we no longer need to include hash.h here.
12613
12614 2005-05-18  Jim Meyering  <jim@meyering.net>
12615
12616         * modules/dirfd (License): Change to LGPL.  Most of the code
12617         is already in the public domain.
12618
12619 2005-05-18  Jim Meyering  <jim@meyering.net>
12620
12621         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
12622         Reported by Yoann Vandoorselaere.
12623
12624 2005-05-17  Jim Meyering  <jim@meyering.net>
12625
12626         * m4/fts.m4: New file, from coreutils.
12627
12628 2005-05-17  Jim Meyering  <jim@meyering.net>
12629
12630         * lib/fts.c, lib/fts_.h: New files, from coreutils.
12631
12632 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12633
12634         Sync from coreutils.
12635         * m4/unlinkdir.m4: New file.
12636
12637 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12638
12639         Sync from coreutils.
12640         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
12641         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
12642         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
12643         White space changes only.
12644         * lib/makepath.c (make_path): Port to hosts where leading "//" is
12645         special.
12646         * lib/yesno.c: Include getline.h, not ctype.h.
12647         (yesno): Don't remove leading white space; POSIX doesn't allow it.
12648         Use getline to remove arbitrary restriction on response length.
12649
12650 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12651
12652         * config/srclist-update: Spell out "Street" in FSF postal
12653         mail address; this is the style the FSF seems to prefer.
12654
12655         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
12656         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
12657         this updates FSF postal mail address.
12658
12659         Sync from coreutils.
12660         * modules/unlinkdir: New file.
12661         * modules/yesno (Depends-on): Add getline.
12662         * MODULES.html.sh (File system functions): Add unlinkdir.
12663
12664 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
12665
12666         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
12667         lib/strsep.h:
12668         Change the initial comment to refer to GPL, not LGPL.
12669         gnulib-tool will change it to LGPL as needed.
12670
12671         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
12672         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
12673         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
12674         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
12675         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
12676         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
12677         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
12678         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
12679         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
12680         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
12681         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
12682         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
12683         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
12684         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
12685         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
12686         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
12687         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
12688         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
12689         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
12690         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
12691         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
12692         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
12693         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
12694         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
12695         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
12696         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
12697         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
12698         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
12699         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
12700         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
12701         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
12702         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
12703         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
12704         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
12705         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
12706         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
12707         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
12708         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
12709         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
12710         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
12711         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
12712         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
12713         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
12714         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
12715         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
12716         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
12717         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
12718         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
12719         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
12720         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
12721         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
12722         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
12723         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
12724         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
12725         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
12726         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
12727         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
12728         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
12729         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
12730         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
12731         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
12732         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
12733         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
12734         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
12735         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
12736         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
12737         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
12738         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
12739         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
12740         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
12741         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
12742         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
12743         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
12744         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
12745         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
12746         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
12747         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
12748         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
12749         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
12750         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
12751         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
12752         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
12753         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
12754         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
12755         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
12756         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
12757         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
12758         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
12759         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
12760         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
12761         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
12762         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
12763         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
12764         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
12765         lib/yesno.c, lib/yesno.h:
12766         Update FSF postal mail address.
12767
12768 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
12769
12770         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
12771         tests/test-memmem.c, tests/test-stpncpy.c:
12772         Update FSF postal mail address.
12773
12774 2005-05-13  Bruno Haible  <bruno@clisp.org>
12775
12776         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
12777         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
12778         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
12779         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
12780         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
12781         Add support for 64-bit integers in the MSVC compiler.
12782
12783 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12784
12785         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
12786
12787 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
12788
12789         * gnulib-tool (func_import): Sort and uniquify recommended includes.
12790
12791 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
12792
12793         * doc/getdate.texi (General date syntax): Don't say that date
12794         date --iso-8601=ns generates acceptable dates; it doesn't yet.
12795         Problem reported by Nic Ferrier.
12796
12797 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12798
12799         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
12800         specified in ai_socktype. Fix invalid ai_protocol
12801         check. ai_protocol is usually set to 0 or depending on
12802         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
12803         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
12804         ai_socktype / ai_protocol in the returned addrinfo structure.
12805
12806 2005-05-10  Simon Josefsson  <jas@extundo.com>
12807
12808         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
12809         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12810
12811 2005-05-10  Karl Berry  <karl@gnu.org>
12812
12813         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
12814         (from http://www.gnu.org/licenses).
12815         * doc/COPYING.LIB: also rename to COPYING.LESSER.
12816         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
12817         fdl.texi suffices.
12818
12819 2005-05-10  Karl Berry  <karl@gnu.org>
12820
12821         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
12822         (COPYING.DOC): remove.
12823
12824         * config/srclist-update: new FSF address.
12825
12826 2005-05-10  Derek Price  <derek@ximbiot.com>
12827
12828         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
12829         possible.
12830
12831 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12832             Bruno Haible  <bruno@clisp.org>
12833
12834         * modules/inet_ntop: New file.
12835         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12836         inet_ntop.
12837
12838 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12839             Bruno Haible  <bruno@clisp.org>
12840
12841         * m4/inet_ntop.m4: New file.
12842
12843 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12844             Bruno Haible  <bruno@clisp.org>
12845
12846         * lib/inet_ntop.h: New file.
12847         * lib/inet_ntop.c: New file, from glibc with modifications.
12848
12849 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
12850
12851         * modules/time_r (License): Change to LGPL.
12852         * modules/extensions (License): Change to LGPL.  Actually,
12853         the license is more permissive than that, but currently gnulib-tool
12854         doesn't know how to handle more-permissive licenses.
12855
12856         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
12857         Problem reported by Dave Love.
12858
12859 2005-05-08  Jim Meyering  <jim@meyering.net>
12860
12861         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
12862         blank.
12863
12864 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
12865
12866         * modules/argmatch (Depends-on): Add stdbool.
12867         * modules/backupfile (Depends-on): Likewise.
12868         * modules/chdir-long (Depends-on): Likewise.
12869         * modules/closeout (Depends-on): Likewise.
12870         * modules/cycle-check (Depends-on): Likewise.
12871         * modules/dirname (Depends-on): Likewise.
12872         * modules/fnmatch (Depends-on): Likewise.
12873         * modules/fsusage (Depends-on): Likewise.
12874         * modules/fwriteerror (Depends-on): Likewise.
12875         * modules/getcwd (Depends-on): Likewise.
12876         * modules/getloadavg (Depends-on): Likewise.
12877         * modules/hard-locale (Depends-on): Likewise.
12878         * modules/makepath (Depends-on): Likewise.
12879         * modules/mountlist (Depends-on): Likewise.
12880         * modules/nanosleep (Depends-on): Likewise.
12881         * modules/posixtm (Depends-on): Likewise.
12882         * modules/quotearg (Depends-on): Likewise.
12883         * modules/readtokens (Depends-on): Likewise.
12884         * modules/readtokens0 (Depends-on): Likewise.
12885         * modules/readutmp (Depends-on): Likewise.
12886         * modules/save-cwd (Depends-on): Likewise.
12887         * modules/strftime (Depends-on): Likewise.
12888         * modules/userspec (Depends-on): Likewise.
12889         * modules/utimecmp (Depends-on): Likewise.
12890         * modules/xgetcwd (Depends-on): Likewise.
12891         * modules/xnanosleep (Depends-on): Likewise.
12892         * modules/xstrtod (Depends-on): Likewise.
12893         * modules/yesno (Depends-on): Likewise.
12894
12895 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
12896
12897         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
12898         needless checks.
12899
12900 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12901
12902         Merge from coreutils.  Among other things,
12903         add bulletproofing for cases where stdin, stdout, or stderr are closed.
12904         * lib/fd-safer.c: New file.
12905         * lib/fcntl-safer.h, open-safer.c: Remove.
12906         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
12907         * lib/dup-safer.c: Include unistd-safer.h first.
12908         Don't include errno.h.
12909         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
12910         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
12911         * lib/file-type.c: Rely on file-type.h change.
12912         * lib/getloadavg.c: Include unistd-safer.h.
12913         (getloadavg): Use safer open.
12914         * lib/getusershell.c: Include "stdio-safer.h".
12915         (getusershell): Use safer fopen.
12916         * lib/long-options.c (long_options): Use NULL rather than 0.
12917         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
12918         'free'.
12919         * lib/modechange.c: Likewise.
12920         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
12921         (MODE_DONE): New constant.
12922         (struct mode_change): Remove 'next' member.
12923         (make_node_op_equals): New function; like the old one of the
12924         same name, except it allocates an array.
12925         (mode_compile, mode_create_from_ref): Use it.
12926         (mode_compile): Allocate result as an array, not a linked list.
12927         Parse octal string ourself, so that we catch mistakes like "+0".
12928         (mode_adjust): Arg is an array, not a linked list.
12929         * lib/modechange.c: Include stat-macros.h, xalloc.h.
12930         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
12931         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
12932         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
12933         Remove.  This is now stat-macros.h's job.
12934         (talloc): Remove.  All callers replaced by xalloc, so that
12935         our invokers don't have to worry about reporting memory failures.
12936         (make_node_op_equals): Remove.
12937         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12938         New constants.
12939         (struct mode_change): Moved here from modechange.h.
12940         (mode_append_entry): Remove.
12941         (mode_compile): Remove MASKED_OPS arg, since it encouraged
12942         apps to have incorrect behavior.  Use simpler algorithm for head
12943         and tail.  Don't futz with umask; that's now the job of mode_adjust.
12944         Detect more invalid usages rather than having somewhat-random behavior.
12945         Don't insert an "a=" action, as that leads to incorrect behavior.
12946         (mode_compile, mode_create_from_ref): Return NULL on error instead
12947         of an enum, since now there's only one way to have an error.  All
12948         callers changed.
12949         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
12950         at the correct time.  Simplify calculation of "+u" and its ilk.
12951         Don't mishandle "+X".
12952         (mode_free): Remove "register" and localize decls.
12953         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12954         (struct mode_change): Move to modechange.c; callers don't
12955         need to see this stuff.
12956         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
12957         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
12958         (mode_change, mode_adjust): Reflect the new signatures noted above.
12959         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
12960         that might redefine system include files.
12961         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
12962         (my_usleep): Use NULL rather than (void *) 0.
12963         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
12964         Use siginterrupt to specify that system calls should be interrupted.
12965         (rpl_nanosleep): Move initialization of suspended closer to call of
12966         my_usleep.
12967         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
12968         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
12969         (desirable_utmp_entry): New function.
12970         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
12971         using x2nrealloc, to simplify logic.
12972         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
12973         size calculation.  Do not assume utmp file is a regular file.
12974         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
12975         (READ_UTMP_CHECK_PIDS): New constant.
12976         * lib/save-cwd.c: Include unistd-safer.h.
12977         (save_cwd): Use fd_safer.
12978         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
12979         [!_LIBC] Include "stat-macros.h" instead.
12980         * lib/unistd-safer.h (fd_safer): New decl.
12981
12982 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12983
12984         * modules/getloadavg (Depends-on): Add unistd-safer.
12985         * modules/getusershell (Depends-on): Add stdio-safer.
12986         * modules/lstat (Depends-on): Remove xalloc.
12987         * modules/mkstemp (Depends-on): Add stat-macros.
12988         * modules/modechange (Depends-on): Remove xstrtol.
12989         Add stat-macros, xalloc.
12990         * modules/save-cwd (Depends-on): Add unistd-safer.
12991         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
12992         * modules/unistd-safer (Files): Add lib/fd-safer.c
12993         (Makefile.am): Remove lib_SOURCES.
12994
12995         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
12996         Remove fcntl-safer; unistd-safer supersedes it.
12997
12998 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12999
13000         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
13001         AC_HEADER_STAT.
13002         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
13003         (gl_PREREQ_CHOWN): Remove.
13004         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
13005         it.  Don't require AC_HEADER_STAT.
13006         (gl_PREREQ_LSTAT): Remove.
13007         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
13008         Don't require AC_HEADER_STAT.
13009         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
13010         (gl_PREREQ_RMDIR): Remove.
13011         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
13012         mention stat-macros.h or AC_HEADER_STAT, since we'll make
13013         the stat-macros module a prerequisite.
13014         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
13015         * m4/filemode.m4 (gl_FILEMODE): Likewise.
13016         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
13017         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
13018         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
13019         variable names.
13020         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
13021         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
13022         variable prefixes.
13023         * m4/fcntl-safer.m4: Remove.
13024         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
13025         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
13026         Invoke gl_PREREQ_FD_SAFER.
13027         (gl_PREREQ_FD_SAFER): New macro.
13028         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
13029         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
13030         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
13031         Remove duplicate call to AC_LIBOBJ(readutmp).
13032         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
13033
13034         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
13035         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
13036
13037 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13038
13039         * MODULES.html.sh (Misc): Add byteswap.
13040
13041 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13042
13043         * modules/getcwd (Depends-on): Add extensions.
13044         * modules/openat (Depends-on): Likewise.
13045
13046 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13047
13048         * modules/byteswap: New file.
13049
13050 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13051
13052         * m4/byteswap.m4: New file.
13053
13054 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13055
13056         * lib/byteswap_.h: New file.
13057
13058 2005-04-25  Karl Berry  <karl@gnu.org>
13059
13060         * m4/gettext.m4: Update from GNU gettext 0.14.4.
13061
13062 2005-04-25  Albert Chin  <china@thewrittenword.com>
13063
13064         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
13065         Toolkit C bug.
13066
13067 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
13068
13069         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
13070         (func_ln_if_changed) Remove forcibly for no error message
13071         in case file does not exist.
13072
13073 2005-04-19  Simon Josefsson  <jas@extundo.com>
13074
13075         * gnulib-tool (Options): Make --symlink mean --symbolic.
13076
13077 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
13078
13079         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
13080
13081 2005-04-16  Simon Josefsson  <jas@extundo.com>
13082
13083         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
13084
13085 2005-04-15  Simon Josefsson  <jas@extundo.com>
13086
13087         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
13088
13089 2005-04-15  Simon Josefsson  <jas@extundo.com>
13090
13091         * gnulib-tool: Rename --symlink to --symbolic.
13092
13093 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
13094
13095         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
13096         symbolic links to files instead of copying/moving.  Add --aux-dir,
13097         specifying directory relative --dir where auxiliary build tools
13098         are placed.
13099
13100 2005-04-14  Bruno Haible  <bruno@clisp.org>
13101
13102         * modules/allocsa (License): Change to LGPL.
13103         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
13104
13105 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13106
13107         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
13108         that "UTC +1 second" continues to work.  Problem reported
13109         by Dmitry V. Levin.
13110         (relunit_snumber): New rule.
13111         (relunit): Use it.
13112
13113 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13114
13115         * lib/getdate.y (universal_time_zone_table): New constant.
13116         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
13117         universal_time_zone_table.
13118         (lookup_zone): Prefer universal_time_zone_table to
13119         local_time_zone_table, so that "GMT" time stamps are allowed in
13120         London during the summer.  Problem reported by Ian Abbott.
13121
13122 2005-04-12  Jim Meyering  <jim@meyering.net>
13123
13124         * lib/human.c (humblock): Set *options even when returning due to
13125         xstrtoumax conversion failure.  Thanks to a used-uninitialized
13126         warning from gcc-4.
13127
13128 2005-04-09  Jim Meyering  <jim@meyering.net>
13129
13130         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
13131         -Wuninitialized: initialize tm0.tm_year.
13132
13133 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
13134
13135         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
13136         count, since there's no maximum.  All uses changed.
13137         Add member dsts_seen.
13138         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
13139         not being INT_MAX.
13140         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
13141         Use pc_rels_seen to decide whther a date is absolute.
13142
13143         * lib/getdate.y (number): Don't overwrite year.
13144         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
13145         check.
13146
13147 2005-04-02  Simon Josefsson  <jas@extundo.com>
13148
13149         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
13150         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
13151
13152 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
13153
13154         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
13155         where no absolute path name can be longer than PATH_MAX.
13156
13157 2005-03-27  Jim Meyering  <jim@meyering.net>
13158
13159         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
13160
13161 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
13162
13163         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
13164         "one's complement" -> "ones' complement" in comment, as per Knuth.
13165         "value of type" -> "type or expression" in comment.
13166         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
13167
13168 2005-03-26  Jim Meyering  <jim@meyering.net>
13169
13170         Comment nits.
13171         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
13172         Correct typos: s/or/of/.
13173
13174 2005-03-26  Jim Meyering  <jim@meyering.net>
13175
13176         * modules/check-include-files: Move to ../ and rename to...
13177         * check-module: ...this.
13178
13179 2005-03-25  Jim Meyering  <jim@meyering.net>
13180
13181         * modules/xvasprintf (Files): Add xalloc.h.
13182
13183 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
13184
13185         * modules/gettext (Files): config/config.rpath ->
13186         build-aux/config.rpath
13187         * modules/iconv (Files): Likewise.
13188         Problem reported by Oskar Liljeblad.
13189
13190 2005-03-23  Jim Meyering  <jim@meyering.net>
13191
13192         * modules/check-include-files: New script to check for
13193         missing dependencies, multiple includes, etc.
13194
13195         * modules/c-strtold (Depends-on): Add xalloc.
13196         * modules/c-strtod (Depends-on): Add xalloc.
13197         * modules/hash (Depends-on): Add xalloc.
13198         (Files): Remove lib/xalloc.h.
13199
13200         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
13201         * modules/userspec (Files): Add lib/inttostr.h.
13202
13203 2005-03-23  Jim Meyering  <jim@meyering.net>
13204
13205         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
13206
13207 2005-03-22  Jim Meyering  <jim@meyering.net>
13208
13209         * modules/stat-macros: New module.
13210         * modules/canonicalize, modules/euidaccess, modules/file-type,
13211         * modules/filemode, modules/lchown, modules/makepath,
13212         * modules/rmdir, modules/stat: Depend on new stat-macros module
13213         rather than listing lib/stat-macros.h manually.
13214         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
13215
13216 2005-03-22  Jim Meyering  <jim@meyering.net>
13217
13218         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
13219
13220 2005-03-22  Bruno Haible  <bruno@clisp.org>
13221
13222         * config/srclist.txt: Replace target directory 'config' with
13223         'build-aux'.
13224         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
13225         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
13226         ../build-aux/.
13227
13228 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
13229
13230         * modules/chdir-long (Depends-on): Add mempcpy.
13231
13232         * modules/acl, modules/backupfile, modules/c-strtod,
13233         modules/c-strtold, modules/canon-host, modules/canonicalize,
13234         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
13235         modules/exclude, modules/exitfail, modules/file-type,
13236         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
13237         modules/getdate, modules/getline, modules/getpagesize,
13238         modules/getpass, modules/getugroups, modules/group-member,
13239         modules/hard-locale, modules/hash, modules/human, modules/idcache,
13240         modules/inttostr, modules/long-options, modules/makepath,
13241         modules/md5, modules/memcasecmp, modules/memcoll,
13242         modules/modechange, modules/mountlist, modules/path-concat,
13243         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
13244         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
13245         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
13246         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
13247         modules/strftime, modules/strndup, modules/strverscmp,
13248         modules/timespec, modules/unlocked-io, modules/userspec,
13249         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
13250         modules/yesno:
13251         Remove lib_SOURCES line from Makefile.am section, as this is now
13252         done automatically by the corresponding Autoconf macro.
13253
13254 2005-03-21  Jim Meyering  <jim@meyering.net>
13255
13256         Changes imported from coreutils.
13257
13258         * lib/cycle-check.c: Don't include xalloc.h.
13259
13260         * lib/path-concat.c: Don't include assert.h.
13261         (path_concat): Remove assertion that would have triggered
13262         for ABASE starting with more than one slash.
13263         Reported by Andreas Schwab.
13264
13265         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
13266         properly when ABASE is an absolute file name.
13267         Correct the description of this function.
13268         Include <assert.h>.
13269         Add an assertion and a test driver.
13270         This fixes a bug introduced on 2004-07-02.
13271         Andreas Schwab reported the resulting failure of cp --parents:
13272         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
13273
13274 2005-03-21  Jim Meyering  <jim@meyering.net>
13275
13276         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
13277         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
13278
13279 2005-03-21  Jim Meyering  <jim@meyering.net>
13280         and  Paul Eggert  <eggert@cs.ucla.edu>
13281
13282         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
13283         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
13284         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
13285         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
13286         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
13287         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
13288         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
13289         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
13290         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
13291         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
13292         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
13293         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
13294         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
13295         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
13296         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
13297         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
13298         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
13299         for these modules.
13300
13301 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
13302
13303         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
13304         (which shouldn't happen), generate nothing instead of returning 0
13305         immediately, so that nstrftime (NULL, ...) doesn't return 0.
13306
13307 2005-03-16  Bruno Haible  <bruno@clisp.org>
13308
13309         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
13310         HAVE_LONGLONG_64BIT.
13311
13312 2005-03-16  Bruno Haible  <bruno@clisp.org>
13313
13314         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
13315         HAVE_LONGLONG_64BIT.
13316
13317 2005-03-16  Bruno Haible  <bruno@clisp.org>
13318
13319         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
13320         HAVE_LONGLONG_64BIT.
13321
13322 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13323
13324         * lib/strftime.c (my_strftime): Prepend space to format so that we can
13325         reliably distinguish strftime failure from empty output on POSIX
13326         hosts.
13327
13328 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13329
13330         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
13331         (iconv_string): Don't guess a size-zero buffer, as that might cause
13332         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
13333         result would be 'too large', where 'too large' is (heuristically)
13334         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
13335         overflow concerns.  This will prevent some unwanted malloc failures
13336         when the inputs are very large.
13337
13338 2005-03-15  Karl Berry  <karl@gnu.org>
13339
13340         * config/srclist.txt (config.rpath): from gettext.
13341         * config/config.rpath: update.
13342
13343 2005-03-15  Bruno Haible  <bruno@clisp.org>
13344
13345         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
13346         to 'negate'.
13347
13348         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
13349         variable.
13350
13351         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
13352         results.
13353
13354 2005-03-14  Simon Josefsson  <jas@extundo.com>
13355
13356         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
13357         <fx@gnu.org>.
13358
13359 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
13360
13361         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
13362         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
13363         intprops.h.
13364         * lib/strtol.c: Likewise.
13365
13366 2005-03-14  Jim Meyering  <jim@meyering.net>
13367
13368         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
13369         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
13370         to be nonzero so that we (and caller) can detect the difference
13371         between a valid zero-length expansion and an error return, even
13372         when the underlying strftime fails before writing anything into
13373         that location.
13374
13375 2005-03-14  Bruno Haible  <bruno@clisp.org>
13376
13377         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
13378         Update from GNU gettext 0.14.3.
13379
13380 2005-03-10  Jim Meyering  <jim@meyering.net>
13381
13382         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
13383
13384 2005-03-10  Jim Meyering  <jim@meyering.net>
13385
13386         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
13387         so that this module works on systems without fchdir.
13388
13389 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
13390
13391         Factor int-properties macros into a single file, except for
13392         glibc-related files.
13393         * lib/intprops.h: New file.
13394         * lib/getloadavg.c: Include it instead of limits.h.
13395         (INT_STRLEN_BOUND): Remove.
13396         * lib/human.c: Include intprops.h.
13397         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
13398         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
13399         302/1000.
13400         * lib/inttostr.h: Include intprops.h instead of limits.h.
13401         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
13402         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
13403         for consistency with intprops.h.
13404         (time_t_is_integer, twos_complement_arithmetic): Use them.
13405         * lib/sig2str.h: Include <signal.h>, intprops.h.
13406         (INT_STRLEN_BOUND): Remove.
13407         * lib/strftime.c (TYPE_SIGNED): Remove.
13408         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
13409         * lib/strtol.c: Adjust comments to match intprops.h.
13410         * lib/userspec.c: Include intprops.h.
13411         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
13412         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
13413         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
13414         instead of rolling our own expressions.
13415         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
13416
13417         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
13418         instead of int.
13419         (my_strftime): Do not mishandle years close to INT_MAX, by doing
13420         the right thing even if adding 1900 would overflow.  Similarly
13421         for tm_mon + 1 and tm_yday + 1.
13422         Make %Y always equivalent to %C%y, and similarly for %G and %g.
13423         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
13424         (DO_SIGNED_NUMBER): New macro.
13425         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
13426
13427 2005-03-07  Bruno Haible  <bruno@clisp.org>
13428
13429         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
13430
13431 2005-03-07  Bruno Haible  <bruno@clisp.org>
13432
13433         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
13434
13435 2005-03-04  Derek R. Price  <derek@ximbiot.com>
13436
13437         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
13438         (func_import): Only replace files via --import when they have actually
13439         changed.
13440
13441 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13442
13443         * m4/mmap-anon.m4: New file.
13444         * m4/pagealign_alloc.m4: New file.
13445
13446 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13447             Bruno Haible  <bruno@clisp.org>
13448
13449         * modules/pagealign_alloc: New file.
13450         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
13451
13452 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13453             Bruno Haible  <bruno@clisp.org>
13454
13455         * lib/pagealign_alloc.h: New file.
13456         * lib/pagealign_alloc.c: New file.
13457
13458 2005-03-03  Bruno Haible  <bruno@clisp.org>
13459
13460         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
13461         Use an all-permissive copyright notice, recommended by RMS.
13462
13463 2005-03-02  Bruno Haible  <bruno@clisp.org>
13464
13465         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
13466         of AIX, the replacement has to be done only after <string.h> is
13467         included, therefore not in config.h. stpncpy.h does the replacement,
13468         and stpncpy.c uses it.
13469
13470 2005-03-02  Bruno Haible  <bruno@clisp.org>
13471
13472         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
13473         stpncpy.c uses it.
13474
13475 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13476
13477         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
13478         The workaround isn't strictly needed for POSIX conformance, and
13479         it's too much of a pain to configure and maintain.  We'll ask
13480         people to fix their kernels instead.
13481         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
13482         (NANOSLEEP_BUG_WORKAROUND): Remove.
13483         (xnanosleep): Remove the workaround.
13484
13485 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13486
13487         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
13488         Reported by Derek Price.
13489         (Include): Add "timespec.h".
13490
13491         * modules/xnanosleep (Depends-on): Remove gethrxtime.
13492
13493 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13494
13495         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
13496         to detect nanosleep bug.
13497
13498 2005-03-01  Bruno Haible  <bruno@clisp.org>
13499
13500         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
13501
13502 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
13503
13504         * modules/gethrxtime: New file.
13505         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
13506         (Depends-on): Add gethrxtime.
13507         (configure.ac): Add gl_XNANOSLEEP.
13508         (Makefile.am): Remove lib_SOURCES line.
13509
13510 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13511
13512         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
13513         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
13514
13515 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13516
13517         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
13518         * lib/timespec.h (gettime): Return void, since it always
13519         succeeds now.  All uses changed.
13520         * lib/gettime.c (gettime) Likewise.
13521         [HAVE_NANOTIME]: Prefer nanotime.
13522         Assume gettimeofday succeeds, as POSIX requires.
13523         Assime time () succeeds, since other code already does.
13524         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
13525         (timespec_subtract): Remove.
13526         (NANOSLEEP_BUG_WORKAROUND): New constant.
13527         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
13528         things considerably.  Use it only on GNU/Linux hosts, since the
13529         workaround shouldn't be needed elsewhere.
13530
13531 2005-02-24  Bruno Haible  <bruno@clisp.org>
13532
13533         * modules/gettext (Files): Add m4/glibc2.m4.
13534
13535 2005-02-24  Bruno Haible  <bruno@clisp.org>
13536
13537         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
13538         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
13539         * m4/progtest.m4:
13540         Update from GNU gettext 0.14.2.
13541         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
13542
13543 2005-02-24  Bruno Haible  <bruno@clisp.org>
13544
13545         * lib/localcharset.c: Update from GNU gettext 0.14.2.
13546         * lib/config.charset: Update from GNU gettext 0.14.2.
13547
13548 2005-02-24  Bruno Haible  <bruno@clisp.org>
13549
13550         * lib/gettext.h: Update from GNU gettext 0.14.2.
13551
13552 2005-02-23  Simon Josefsson  <jas@extundo.com>
13553
13554         * m4/iconvme.m4: New file.
13555
13556 2005-02-23  Jim Meyering  <jim@meyering.net>
13557
13558         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
13559         change.
13560         Thanks to Bruno Haible for catching it.
13561
13562 2005-02-22  Simon Josefsson  <jas@extundo.com>
13563
13564         * modules/iconvme: New file.
13565
13566         * MODULES.html.sh: Add iconvme.
13567
13568 2005-02-22  Simon Josefsson  <jas@extundo.com>
13569
13570         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
13571
13572 2005-02-22  Simon Josefsson  <jas@extundo.com>
13573
13574         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
13575
13576 2005-02-22  Jim Meyering  <jim@meyering.net>
13577
13578         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
13579         s/ifndef/ifdef/.
13580
13581 2005-02-20  Neil Conway  <neilc@samurai.com>
13582
13583         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
13584         returned by OSX/Darwin if the specified buffer is not large
13585         enough for the hostname.
13586
13587 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13588
13589         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
13590         pass it to _help, otherwise the latter coredumps trying to
13591         dereference state.root_argp.
13592
13593 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13594
13595         * modules/chdir-long (Depends-on): Add memrchr.
13596         * modules/memrchr (Files): Add lib/memrchr.h.
13597         (Include): "memrchr.h".
13598
13599 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13600
13601         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
13602
13603 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13604
13605         * lib/memrchr.h: New file.
13606         * lib/chdir-long.c: Include it.
13607         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
13608         Don't bother including stddef.h.
13609
13610 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
13611
13612         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
13613         inclusion.
13614         Include <sys/types.h>, for dev_t.
13615         (ME_DUMMY, ME_REMOTE): Move from here....
13616         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
13617         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
13618         Dmitry V. Levin.
13619         Include mountlist.h first, to test the interface.
13620
13621 2005-01-29  Bruno Haible  <bruno@clisp.org>
13622
13623         * lib/progname.c (program_name): Initialize.
13624         Needed when linking statically on MacOS X.
13625
13626 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13627
13628         Sync from coreutils.
13629         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
13630         (Depends-on): Add c-strtod.
13631         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
13632
13633 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13634
13635         Sync from coreutils.
13636         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
13637
13638         Remove files that are specific to coreutils.
13639         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
13640
13641 2005-01-28  Bruno Haible  <bruno@clisp.org>
13642
13643         * modules/javacomp: New file.
13644         * MODULES.html.sh (Java): Add javacomp.
13645
13646 2005-01-28  Bruno Haible  <bruno@clisp.org>
13647
13648         * m4/javacomp.m4: New file, from GNU gettext.
13649
13650 2005-01-28  Bruno Haible  <bruno@clisp.org>
13651
13652         * lib/javacomp.sh.in: New file, from GNU gettext.
13653         * lib/javacomp.h: New file, from GNU gettext.
13654         * lib/javacomp.c: New file, from GNU gettext.
13655
13656 2005-01-26  Simon Josefsson  <jas@extundo.com>
13657
13658         * lib/gai_strerror.c: Use GPL in header.
13659
13660 2005-01-26  Bruno Haible  <bruno@clisp.org>
13661
13662         * modules/javaexec: New file.
13663         * MODULES.html.sh (Java): Add javaexec.
13664
13665 2005-01-26  Bruno Haible  <bruno@clisp.org>
13666
13667         * m4/javaexec.m4: New file, from GNU gettext.
13668
13669 2005-01-26  Bruno Haible  <bruno@clisp.org>
13670
13671         * lib/javaexec.sh.in: New file, from GNU gettext.
13672         * lib/javaexec.h: New file, from GNU gettext.
13673         * lib/javaexec.c: New file, from GNU gettext.
13674
13675 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13676
13677         * modules/lchown (Depends-on): Remove lchown.h
13678
13679 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13680
13681         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
13682         must be defined if the header file was not found, in order
13683         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
13684
13685 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13686
13687         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
13688         initializers for struct pentry_state.
13689         (__argp_error): Check return value of __asprintf
13690         (__argp_failure): Translate error message
13691
13692         * lib/argp-parse.c: Removed braces around the expansion of N_()
13693
13694 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
13695
13696         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
13697         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
13698         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
13699         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
13700         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
13701         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
13702         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
13703         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
13704         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
13705         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
13706         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
13707         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
13708         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
13709         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
13710         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
13711         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
13712         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
13713         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
13714         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
13715         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
13716         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
13717         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
13718         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
13719         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
13720         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
13721         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
13722         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
13723         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
13724         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
13725         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
13726         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
13727         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
13728         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
13729         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
13730         xstrtol.m4, xstrtoumax.m4, yesno.m4:
13731         Use an all-permissive copyright notice, recommended by RMS.
13732
13733 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
13734
13735         * modules/chdir-long (Depends-on): Remove mempcpy.
13736
13737 2005-01-21  Jim Meyering  <jim@meyering.net>
13738
13739         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
13740         same value as for Solaris 9.
13741
13742         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
13743         component length.  This included changing the parameter to be
13744         of type `char *' rather than `char const *'.
13745         * lib/chdir-long.h (chdir_long): Update prototype.
13746
13747         * lib/openat.c (fdopendir, fstatat): New functions.
13748         * lib/openat.h: Include headers required for use of DIR and struct
13749         stat.
13750         [AT_SYMLINK_NOFOLLOW]: Define.
13751         (fdopendir, fstatat): Add prototypes.
13752
13753 2005-01-21  Bruno Haible  <bruno@clisp.org>
13754
13755         * modules/classpath: New file.
13756         * MODULES.html.sh (Java): Add classpath.
13757
13758 2005-01-21  Bruno Haible  <bruno@clisp.org>
13759
13760         * lib/classpath.h: New file, from GNU gettext.
13761         * lib/classpath.c: New file, from GNU gettext.
13762
13763 2005-01-20  Simon Josefsson  <jas@extundo.com>
13764
13765         * modules/version-etc-fsf: New file.
13766
13767 2005-01-20  Simon Josefsson  <jas@extundo.com>
13768
13769         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
13770         * lib/version-etc.c: Remove version_etc_copyright.
13771         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
13772         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
13773
13774 2005-01-20  Simon Josefsson  <jas@extundo.com>
13775
13776         * lib/base64.h (isbase64): Add.
13777
13778         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
13779         using a unsigned prototype, don't inline.
13780         (base64_decode): Use it.
13781
13782 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13783
13784         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
13785         it.
13786
13787 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13788
13789         * lib/save-cwd.c (save_cwd): Remove code to support the case
13790         where fchdir is missing or flaky.
13791
13792 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13793
13794         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
13795
13796 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
13797
13798         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
13799         AC_LIBSOURCES now does this.
13800         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
13801         with new ullong_max module.
13802
13803 2005-01-19  Bruno Haible  <bruno@clisp.org>
13804
13805         * modules/sh-quote: New file.
13806         * MODULES.html.sh (Executing programs): Add sh-quote.
13807
13808 2005-01-19  Bruno Haible  <bruno@clisp.org>
13809
13810         * lib/sh-quote.h: New file, from GNU gettext.
13811         * lib/sh-quote.c: New file, from GNU gettext.
13812
13813 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13814
13815         Merge from coreutils.
13816         * m4/ullong_max.m4: New file.
13817         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
13818         (gl_MACROS): Assume localeconv exists.
13819
13820 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13821
13822         Merge changes from coreutils, as described below in several
13823         changelogs dated today.
13824
13825         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
13826         (O_DIRECTORY): Remove; not needed here, since "." must be
13827         a directory.  All uses removed.
13828         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
13829         universal on Suns, and we also need to test for IRIX.
13830         Revamp code to use 'if' rather than '#if'.
13831         Avoid unnecessary comparison of cwd->desc to 0.
13832
13833         * lib/utimens.c (futimens): Robustify the previous patch, by checking
13834         for known valid error numbers rather than observed invalid ones.
13835
13836 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13837
13838         * modules/ullong_max: New file.
13839
13840         * modules/chdir-long, modules/openat: New files.
13841         * modules/save-cwd (Depends-on): Depend on chdir-long.
13842         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
13843
13844 2005-01-18  Jim Meyering  <jim@meyering.net>
13845
13846         Merge from coreutils.
13847         * m4/chdir-long.m4, m4/openat.m4: New files.
13848         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
13849         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
13850         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
13851         is sane and DOES follow symlinks.  Besides, testing 20 different
13852         systems found no broken chown implementations.
13853         Prompted by a change in rsync's copy of this macro.
13854         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
13855
13856         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
13857
13858         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
13859         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
13860         NULL-means-set-to-current-time semantics.
13861         Remove temporary file immediately, rather than waiting
13862         for configure's at-exit trap code to do it.
13863
13864 2005-01-18  Jim Meyering  <jim@meyering.net>
13865
13866         * lib/version-etc.c (version_etc_copyright): Update copyright date.
13867
13868         * lib/utimens.c (futimens): Account for the fact that futimes
13869         can also fail with errno == ENOSYS or errno == ENOENT.
13870         Patch from Dmitry V. Levin.
13871
13872         Change the name of the robust chdir function from chdir to chdir_long.
13873         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
13874         (restore_cwd): Use chdir_long, not chdir.
13875         * lib/chdir-long.c: Renamed from chdir.c.
13876         * lib/chdir-long.h: Renamed from chdir.h.
13877         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
13878         Hurd.
13879
13880 2005-01-18  Bruno Haible  <bruno@clisp.org>
13881
13882         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
13883         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
13884         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
13885         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
13886         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
13887         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
13888         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
13889         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
13890         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
13891         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
13892         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
13893         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
13894         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
13895         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
13896         Use an all-permissive copyright notice, recommended by RMS.
13897
13898 2005-01-18  Bob Proulx  <bob@proulx.com>
13899
13900         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
13901         simplify offsetof() macro construct to avoid compile failure with
13902         native HP-UX 11.0 ANSI C compiler.
13903
13904 2005-01-17  Bruno Haible  <bruno@clisp.org>
13905
13906         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
13907         redundant because stpncpy.m4 takes care of it.
13908
13909 2005-01-17  Bruno Haible  <bruno@clisp.org>
13910
13911         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
13912
13913 2005-01-17  Bruno Haible  <bruno@clisp.org>
13914
13915         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
13916         used.
13917
13918 2005-01-17  Bruno Haible  <bruno@clisp.org>
13919
13920         * lib/fwriteerror.h (fwriteerror): Change specification to include
13921         fclose.
13922         * lib/fwriteerror.c: Include <stdbool.h>.
13923         (fwriteerror): At the end, close the file stream. Record whether
13924         stdout was already closed.
13925
13926 2005-01-17  Bruno Haible  <bruno@clisp.org>
13927
13928         * lib/execute.c (environ): Declare if needed.
13929         * lib/pipe.c (environ): Likewise.
13930         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
13931
13932 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13933
13934         * modules/argp: Depend on vsnprintf
13935
13936 2005-01-10  Jim Meyering  <jim@meyering.net>
13937
13938         * modules/closeout (Depends-on): Add atexit.
13939
13940 2005-01-06  Bruno Haible  <bruno@clisp.org>
13941
13942         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
13943
13944 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13945
13946         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
13947         definitions to be after all include files, to avoid collisions.
13948         Problem reported by Bob Proulx.
13949
13950 2005-01-04  Jim Meyering  <jim@meyering.net>
13951
13952         Changes imported from coreutils.
13953         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
13954         as the mkstemp template, use a temporary directory and an
13955         8.3-friendly template to avoid trouble on systems like DJGPP.
13956         Reported by Juan M. Guerrero via Stepan Kasal.
13957         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
13958         close. Remove the temporary directory right away, rather than waiting
13959         for configure's at-exit trap code to do it.
13960         Suggestion from Stepan Kasal.
13961
13962 2005-01-01  Simon Josefsson  <jas@extundo.com>
13963
13964         * gnulib-tool: Print #include directives when --import'ing.
13965
13966 2004-12-28  Simon Josefsson  <jas@extundo.com>
13967
13968         * tests/test-base64.c: Include required header files.  Remove
13969         unused variables.
13970
13971 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13972
13973         * modules/error (Depends-on): Remove gettext.
13974
13975 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13976
13977         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
13978         not needed.  This removes a dependency on the gettext module.
13979         [defined _LIBC]: Do not include <libintl.h>; not needed.
13980
13981 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13982
13983         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
13984         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
13985
13986 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13987
13988         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
13989         HAVE_DECL_STRTOLD.
13990
13991 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13992
13993         * modules/getdate (Depends-on): Remove alloca-opt.
13994
13995 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13996
13997         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
13998
13999 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14000
14001         * lib/argp-parse.c: Include <stddef.h>.
14002         (alignof, alignto): New macros.
14003         (parser_init): Don't assume that void * is aligned sufficiently
14004         for struct option.
14005
14006         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
14007         need to extend the stack.
14008         (YYINITDEPTH): New macro, so that the initial stack isn't overly
14009         large.
14010
14011 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14012
14013         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
14014
14015 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14016
14017         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
14018         (2004-10-24) change.  Apparently this was a false alarm.
14019
14020         * modules/getdate: Depend on alloca-opt, not alloca.
14021
14022 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14023
14024         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
14025         Remove now-obsolete comment about AIX.
14026         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
14027         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
14028         (YYMAXDEPTH): New macro.
14029
14030 2004-12-18  Simon Josefsson  <jas@extundo.com>
14031
14032         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
14033
14034 2004-12-18  Bruno Haible  <bruno@clisp.org>
14035
14036         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
14037
14038 2004-12-18  Bruno Haible  <bruno@clisp.org>
14039
14040         * lib/fatal-signal.c (fatal_signals): Make non-const.
14041         (init_fatal_signals): New function.
14042         (uninstall_handlers, install_handlers): Ignore signals that were set to
14043         SIG_IGN.
14044         (at_fatal_signal): Call init_fatal_signals.
14045         (init_fatal_signal_set): Likewise. Ignore signals that were set to
14046         SIG_IGN.
14047         Reported by Paul Eggert.
14048
14049 2004-12-18  Bruno Haible  <bruno@clisp.org>
14050
14051         * doc/alloca.texi: New file.
14052         * doc/alloca-opt.texi: New file.
14053
14054 2004-12-17  Jim Meyering  <jim@meyering.net>
14055
14056         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
14057         Otherwise, install-sh could exit with improper exit status when
14058         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
14059
14060 2004-12-16  Simon Josefsson  <jas@extundo.com>
14061
14062         * tests/test-base64.c: Add license.
14063
14064 2004-12-15  Stepan Kasal  <address@hidden>
14065
14066         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
14067
14068 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
14069
14070         * modules/getcwd (Files): Add m4/d-ino.m4.
14071         Suggested by Mark D. Baushke.
14072
14073 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14074
14075         * lib/getdate.y (textint): New member "negative".
14076         (time_zone_hhmm): New function.
14077         Expect 14 shift-reduce conflicts, not 13.
14078         (o_colon_minutes): New rule.
14079         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
14080         (yylex): Set the "negative" member of signed numbers.
14081
14082 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14083
14084         * doc/getdate.texi (Time of day items, Time zone items):
14085         Describe new formats +00:00, UTC+00:00.
14086
14087 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14088
14089         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
14090         spurious "-l"s.  Problem reported by Stepan Kasal.
14091
14092 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
14093
14094         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
14095         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
14096
14097 2004-12-04  Simon Josefsson  <jas@extundo.com>
14098
14099         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
14100         Vandoorselaere <yoann@prelude-ids.org>.
14101
14102 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14103
14104         Changes imported from coreutils.
14105         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
14106         exist.
14107         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
14108
14109 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14110
14111         Changes imported from coreutils.
14112         * lib/hard-locale.c: Assume <locale.h> exists.
14113         Include "strdup.h".
14114         (GLIBC_VERSION): New macro.
14115         (hard_locale): Assume setlocale exists.
14116         Rewrite to avoid #ifdef.
14117         Use strdup rather than malloc + strcpy.
14118         * lib/human.c: Assume <locale.h> exists.
14119         (human_readable): Assume localeconv exists.
14120
14121 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14122
14123         * modules/hard-locale (Depends-on): Add strdup.
14124
14125 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
14126
14127         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
14128         convert T2, not T.  (Imported from libc.)
14129
14130 2004-11-30  Simon Josefsson  <jas@extundo.com>
14131
14132         * modules/restrict (License): Change to LGPL.
14133
14134 2004-11-30  Simon Josefsson  <jas@extundo.com>
14135
14136         * m4/restrict.m4: Add copyright and copying conditions.
14137
14138 2004-11-30  Simon Josefsson  <jas@extundo.com>
14139
14140         * m4/base64.m4: New file.
14141
14142 2004-11-30  Simon Josefsson  <jas@extundo.com>
14143
14144         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
14145         base64.
14146
14147         * tests/test-base64.c: New file.
14148
14149         * modules/base64: New file.
14150
14151 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14152
14153         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
14154         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
14155
14156         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
14157
14158 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14159
14160         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
14161         (__getcwd.c): Don't restore errno; glibc doesn't.
14162         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
14163         first, falling back to our code only if its results look suspicious.
14164         Ensure that the resulting buffer is only as large as necessary.
14165
14166         * lib/readutmp.c: Include readutmp.h first.
14167         Include <errno.h>, since readutmp.h no longer does that.
14168         * lib/readutmp.h: Don't include <errno.h>,
14169         <sys/param.h>, <time.h>; not needed to establish interface.
14170         (errno): Remove decl.
14171         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
14172         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
14173         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
14174
14175 2004-11-28  Simon Josefsson  <jas@extundo.com>
14176
14177         * lib/base64.h, base64.c: New file.
14178
14179 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
14180
14181         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
14182
14183 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
14184
14185         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
14186         (Depends-on): Remove pathmax, same.  Add mempcpy.
14187         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
14188         (Makefile.am): Append getcwd.h to lib_SOURCES.
14189         (Include): Add getcwd.h.
14190         (Maintainer): Change from Jim Meyering to "all, glibc",
14191         since getdate now uses intended-for-glibc code.
14192         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
14193         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
14194
14195 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14196
14197         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
14198         HP's ANSI C compiler.
14199         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
14200         Declaring int functions causes warnings on some modern systems and
14201         shouldn't be needed to compile on ancient ones.
14202         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
14203         defined.
14204
14205         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
14206         with the following changes.
14207         (__set_errno): Parenthesize properly.
14208         Include <stdbool.h>.
14209         (MIN, MAX, MATCHING_INO): New macros.
14210         (__getcwd): Define with prototype, not K&R form.
14211         Use heuristics to allocate default buffer on stack if possible.
14212         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
14213         behavior, and to avoid the PATH_MAX limit when computing
14214         ../../../../...
14215         Use MATCHING_INO to compare inode number to file.
14216         Check for arithmetic overflow in size calculations.
14217         Fix bug in reallocation of dot array that caused getcwd to fail
14218         on directories nested deeper than 75.
14219         Be more careful about saving errno on error.
14220         Do not use realloc; use only free+malloc, as this is a bit
14221         more flexible and avoids a needless copy operation.
14222         Do not inspect st_dev and st_ino for symbolic links; POSIX
14223         doesn't specify the latter.
14224         Check for closedir errors.
14225         Avoid needless casts.
14226         Use "#ifdef weak_alias" around weak_alias, to be like other
14227         glibc code.
14228         The following changes to getcwd.c have effect only when used in
14229         gnulib; they have no effect inside glibc proper.
14230         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
14231         as alloca isn't used.
14232         (alloca, __alloca): Likewise.
14233         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
14234         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
14235         unconditionally, as gnulib assumes C89 or better.
14236         Do not include <sys/param.h>.
14237         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
14238         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
14239         better.
14240         (NULL) [!defined NULL]: Remove; we assume C89 or better.
14241         Include <dirent.h> in a way that is compatible with modern Autoconf.
14242         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
14243         New macros, if not already defined.
14244         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
14245         Use "_LIBC", not "defined _LIBC", for consistency.
14246         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
14247         a mempcpy module.
14248         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
14249         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
14250         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
14251         credit only to Jim Meyering and adjust the copyright dates.
14252         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
14253         <stdlib.h>, <unistd.h>, "pathmax.h".
14254         Instead, include "xgetcwd.h" (first) and "getcwd.h".
14255         (INITIAL_BUFFER_SIZE): Remove.
14256         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
14257
14258 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14259
14260         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
14261         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
14262         Use the _ONCE methods, for efficiency.
14263         Check for fcntl.h.  In test program, include <errno.h>
14264         and <fcntl.h> if available.  Remove old K&R cruft from
14265         test program.  Check for common errors in GNU/Linux,
14266         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
14267         don't do AC_LIBOBJ, as that's getcwd.m4's job.
14268         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
14269         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
14270         name accordingly.
14271         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
14272         accommodate new getcwd.c.
14273         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
14274         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
14275         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
14276         that's all we need now.
14277
14278 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14279
14280         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
14281         argp-parse.c depends on getopt internals, that means we should
14282         always use our getopt, to be on the safe side.
14283         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
14284         order not to spoil the result of an eventual previous invocation
14285         of gl_GETOPT_SUBSTITUTE.
14286
14287 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14288
14289         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
14290         redefinition warnings. To avoid them, include the defines
14291         in `#if !defined __need_getopt ... #endif'. The only place
14292         where __getopt_argv_const is used is in definitions
14293         of getopt_long and getopt_long_only below, which are as well
14294         protected by `#ifndef __need_getopt'.
14295         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
14296         __need_getopt after including <stdio.h> and <unistd.h> These
14297         headers might have defined it.
14298
14299 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14300
14301         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
14302
14303 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14304
14305         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
14306         (futimens): New function, which uses futimes if available.
14307         (futimens, utimens): Support timespec==NULL, with same semantics
14308         as utime and utimens.
14309         * lib/utimens.h (futimens): New decl.
14310
14311 2004-11-23  Jim Meyering  <jim@meyering.net>
14312
14313         * lib/getopt_.h: Remove trailing blanks.
14314
14315 2004-11-23  Jim Meyering  <jim@meyering.net>
14316
14317         * lib/__fpending.c: Add comment.
14318
14319 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
14320
14321         * modules/canonicalize (Depends-on): Add xreadlink.
14322         Problem reported by James Youngman.
14323
14324 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
14325
14326         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
14327         New macros.
14328         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
14329         optopt): Use them instead of invoking ## directly; otherwise, the
14330         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
14331
14332 2004-11-19  Bruno Haible  <bruno@clisp.org>
14333
14334         * lib/strtok_r.c: Move comments from here...
14335         * lib/strtok_r.h: ... to here.
14336
14337 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14338
14339         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
14340         implementations that mishandle size_t overflow.
14341
14342 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14343
14344         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
14345         might fail.  Problem reported by Yoann Vandoorselaere.
14346         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
14347         implementations that mishandle size_t overflow.
14348
14349 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14350
14351         * modules/canon-host (Depends-on): Add strdup.
14352
14353 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14354
14355         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
14356
14357 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14358
14359         * lib/canon-host.c: Include "strdup.h".
14360         (canon_host): Use getaddrinfo if available, so that IPv6 works.
14361         Use strdup instead of malloc/strcpy to duplicate strings.
14362
14363         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
14364         (human_space_before_unit): New constant.
14365         * lib/human.c (human_readable): Support it.
14366
14367         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
14368         (xgetcwd): Set errno correctly when failing.
14369         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
14370         the failure is actually due to a PATH_MAX problem.
14371
14372         Further getopt changes to make it more likely that glibc will
14373         buy the changes back.
14374         * lib/getopt.c (POSIXLY_CORRECT): New constant.
14375         (getopt): Use it, so to preserve glibc semantic
14376         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
14377         when compiling for libc.
14378         * lib/getopt_.h (__getopt_argv_const): Bring it back.
14379         (getopt_long, getopt_long_only): Use it.
14380
14381         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14382         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
14383         (getopt): Argv is now char * const *, as per standard.
14384         (_getopt_internal_r, _getopt_internal): Argv is now char **,
14385         not char *__getopt_argv_const *.
14386         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14387         _getopt_long_only_r): Likewise.
14388         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
14389         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14390         _getopt_long_r, _getopt_long_only_r): Likewise.
14391         * lib/getopt_.h (__getopt_argv_const): Remove.
14392         (getopt): Argv is now char * const *, as per standard.
14393
14394         * lib/getdate.y (tORDINAL): New token.
14395         (day, relunit): Allow it for relative times.
14396         (relative_time_table): Use tORDINAL for ordinals.
14397
14398 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14399
14400         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
14401         Document that "second" isn't allowed as an ordinal number.
14402
14403 2004-11-16  Jim Meyering  <jim@meyering.net>
14404
14405         * modules/closeout (Depends-on): Add fpending.
14406
14407 2004-11-15  Jim Meyering  <jim@meyering.net>
14408
14409         * lib/closeout.c: Include "__fpending.h" once again.
14410         Include <stdbool.h>.
14411         (close_stdout): Don't fail just because stdout was closed initially,
14412         since some programs don't write to stdout in the normal course of
14413         operation (other than --version and --help), and we don't want this
14414         function to make e.g. `touch file >&-' fail.
14415         But do fail if it was closed and someone has tried to write to it.
14416         E.g., `printf foo >&-' must fail.
14417
14418 2004-11-13  Jim Meyering  <jim@meyering.net>
14419
14420         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
14421
14422 2004-11-12  Simon Josefsson  <jas@extundo.com>
14423
14424         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
14425         small doc fix is still pending.
14426
14427 2004-11-11  Simon Josefsson  <jas@extundo.com>
14428
14429         * modules/strtok_r: New file.
14430
14431         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14432         strtok_r.
14433
14434 2004-11-11  Simon Josefsson  <jas@extundo.com>
14435
14436         * m4/strtok_r.m4: New file.
14437
14438         * m4/getopt.m4: Replace opterr.
14439
14440 2004-11-11  Simon Josefsson  <jas@extundo.com>
14441
14442         * lib/strtok_r.h, strtok_r.c: New file.
14443
14444 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14445
14446         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
14447         of replacing opterr, getopt, etc.  This should handle the
14448         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
14449
14450 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14451
14452         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
14453         we can stop lying to compilers about the constness of argv when we
14454         are compiled outside glibc.
14455         (getopt, getopt_long, getopt_long_only): Use it.
14456         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14457         _getopt_internal, getopt): Likewise.
14458         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14459         _getopt_long_only_r): Likewise.
14460         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14461         _getopt_long_r, _getopt_long_only_r): Likewise.
14462
14463         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
14464         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
14465         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
14466         the other external symbols.
14467         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
14468         declaration, since the above renaming now works around collisions.
14469
14470 2004-11-11  Jim Meyering  <jim@meyering.net>
14471
14472         * lib/linebreak.c: Remove trailing blanks.
14473         * lib/alloca_.h: Likewise.
14474         * lib/acosl.c: Likewise.
14475         * lib/euidaccess.c: Likewise.
14476         * lib/allocsa.h: Likewise.
14477
14478 2004-11-10  Simon Josefsson  <jas@extundo.com>
14479
14480         * m4/getaddrinfo.m4: New file.
14481
14482 2004-11-10  Simon Josefsson  <jas@extundo.com>
14483
14484         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
14485
14486 2004-11-10  Simon Josefsson  <jas@extundo.com>
14487
14488         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14489         getaddrinfo.
14490
14491         * modules/getaddrinfo: New file.
14492
14493 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14494
14495         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
14496
14497 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14498
14499         * lib/mktime.c (SHR): New macro, which is a portable
14500         substitute for >> that should work even on Crays.
14501         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
14502         Problem reported by Mark D. Baushke in
14503         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
14504         * lib/getdate.y (SHR): Likewise.
14505         (tm_diff): Use it.
14506         * lib/strftime.c (SHR): Likewise.
14507         (tm_diff): Use it.
14508         * lib/quotearg.c (struct quoting_options): Use unsigned int for
14509         quote_these_too, so that right shifts are well defined.  All uses
14510         changed.
14511
14512 2004-11-10  Jim Meyering  <jim@meyering.net>
14513
14514         Ensure that no close failure goes unreported.
14515         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
14516         return early when it seems there's nothing to flush.
14517         Don't include __fpending.h.
14518
14519 2004-11-10  Jim Meyering  <jim@meyering.net>
14520
14521         * modules/closeout (Depends-on): Remove fpending.
14522
14523 2004-11-10  Jim Meyering  <jim@meyering.net>
14524
14525         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
14526
14527 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14528
14529         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
14530         gl_FUNC_STRFTIME.
14531         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
14532         and AC_REQUIRE when possible, to avoid duplicate checks.
14533         Check for <wchar.h>.
14534
14535 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14536
14537         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
14538
14539 2004-11-09  Bruno Haible  <bruno@clisp.org>
14540
14541         * m4/sockpfaf.m4: New file.
14542
14543 2004-11-05  Bruno Haible  <bruno@clisp.org>
14544
14545         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
14546         Reported by Mark D. Baushke <mdb@cvshome.org>.
14547
14548 2004-11-04  Bruno Haible  <bruno@clisp.org>
14549
14550         2004-09-11  Bruno Haible  <bruno@clisp.org>
14551                 * allocsa.valgrind: New file.
14552         2004-02-06  Bruno Haible  <bruno@clisp.org>
14553                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
14554                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
14555                 Reported by Christopher Seip <chris.seip@hp.com>.
14556
14557 2004-11-04  Bruno Haible  <bruno@clisp.org>
14558
14559         * modules/allocsa (Files): Add lib/allocsa.valgrind.
14560         (Makefile.am): Distribute it.
14561
14562 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
14563
14564         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
14565         with errno == ERANGE if the buffer is too small.
14566         Problem reported by Mark D. Baushke.
14567
14568 2004-11-03  Albert Chin  <china@thewrittenword.com>
14569             Paul Eggert  <eggert@cs.ucla.edu>
14570
14571         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
14572         equivalent, substitute $ac_type for equivalent type rather than
14573         blindly using uint32_t *always* which won't work if uint32_t is not
14574         available.  Define _UINT32_T to work around typedef of uint32_t if
14575         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
14576         2.5.1.
14577
14578 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14579
14580         * m4/jm-macros.m4: Sync from coreutils.
14581         (gl_MACROS): Check for mbrlen, for pathchk.
14582         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
14583
14584 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14585
14586         * lib/xreadlink.c (MAXSIZE): New macro.
14587         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
14588         size does not exceed MAXSIZE.  Avoid cast.
14589         As suggested by Mark D. Baushke in
14590         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
14591         if readlink fails with buffer size just under MAXSIZE, try again
14592         with MAXSIZE.
14593
14594 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14595
14596         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
14597
14598 2004-11-02  Derek R. Price  <derek@ximbiot.com>
14599         and  Paul Eggert  <eggert@cs.ucla.edu>
14600
14601         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
14602         (get_date): Overparenthesize to avoid GCC warning.
14603
14604 2004-11-02  Bruno Haible  <bruno@clisp.org>
14605
14606         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
14607         returns void.
14608
14609 2004-11-02  Bruno Haible  <bruno@clisp.org>
14610
14611         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
14612         function returns void.
14613
14614 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14615
14616         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
14617         fflush_unlocked, flockfile, funlockfile, funlockfile,
14618         fputs_unlocked, putc_unlocked.
14619
14620 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14621
14622         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14623         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
14624         already declared.
14625
14626 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14627
14628         * modules/getdate (Files): Add doc/getdate.texi.
14629         (Depends-on): Add setenv, xalloc.
14630
14631 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14632
14633         * lib/getdate.y: Add support for TZ="foo" within a date string.
14634         Fix some bugs near time_t boundaries.  Reject dates with
14635         out-of-range components, e.g., "Sept 31".
14636         Include <stdlib.h>, "setenv.h", "xalloc.h".
14637         (ISDIGIT_LOCALE): Remove; unused.
14638         Note that the TZ and time functions used here are not reentrant.
14639         (mktime_ok, get_tz): New functions.
14640         (TZBUFSIZE): New constant.
14641         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
14642         This requires that we sometimes generate our own TZ="XXX..." setting.
14643
14644 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14645
14646         * doc/getdate.texi: New file, from coreutils with modifications for
14647         the new TZ parsing.
14648
14649 2004-10-27  Derek R. Price  <derek@ximbiot.com>
14650
14651         * lib/mktime.c (not_equal_tm): Remove redundant check.
14652
14653 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14654
14655         * modules/regex (lib_SOURCES): Add regex.c.
14656         Reported by James Youngman in
14657         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
14658
14659 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14660
14661         * lib/getdate.y: Use Bison 1.875 features, and some minor
14662         code cleanups.  This change does not affect semantics.
14663         Don't include <stdlib.h>; no longer needed.
14664         Don't include unlocked-io.h; only the "#if TEST" code uses
14665         stdio, and performance isn't crucial there.
14666         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
14667         Bison 1.875 features as described below.
14668         All uses of "PC." replaced by "pc->".
14669         (YYSTYPE): Add a forward declaration.
14670         (yylex, yyerror): Use full prototypes in forward decls.
14671         Use "%pure-parser" rather than obsolescent "%pure_parser".
14672         Use %parse-param and %lex-param instead of obsolescent
14673         YYPARSE_PARAM and YYLEX_PARAM.
14674         (meridian_table, month_and_day_table, time_units_table,
14675         relative_time_table, time_zone_table, military_table,
14676         lookup_zone, lookup_word, get_date):
14677         Use NULL instead of 0 where appropriate.
14678         (to_hour): Avoid abort (), to avoid a dependency on
14679         stdlib.h.
14680         (yyerror, yylex): Now accepts parser_control * arg.
14681         (main) [TEST]: Use '\0' rather than 0 for char.
14682
14683 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14684
14685         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
14686
14687 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14688
14689         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
14690         It's now the caller's responsibility to handle the case where
14691         !HAVE_GETPAGESIZE && !defined getpagesize.
14692
14693         * lib/mktime.c (leapyear): Arg is long int, not int.
14694
14695 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
14696
14697         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
14698
14699 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
14700
14701         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
14702         missing.  Problem reported by James Youngman.
14703
14704 2004-10-16  Simon Josefsson  <jas@extundo.com>
14705
14706         * gnulib-tool: Fix comments.  Fix parse problem.
14707         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
14708
14709 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
14710
14711         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
14712         implementation of getopt_long.  Problem reported by Alexander Taler in:
14713         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
14714
14715 2004-10-15  Bruno Haible  <bruno@clisp.org>
14716
14717         * gnulib-tool: Untabify. Initialize supplied_libname.
14718         (func_usage): More homogenous output.
14719         (func_modules_transitive_closure, func_modules_to_filelist,
14720         func_emit_lib_Makefile_am): New functions.
14721         (func_import): New function, extracted from big case statement. Use
14722         func_get_license, func_modules_transitive_closure,
14723         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
14724         opt_lgpl. Don't use test -a, as it's not portable.
14725         (func_create_testdir): Use func_modules_transitive_closure,
14726         func_modules_to_filelist, func_emit_lib_Makefile_am.
14727
14728 2004-10-15  Bruno Haible  <bruno@clisp.org>
14729
14730         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
14731
14732 2004-10-15  Bruno Haible  <bruno@clisp.org>
14733
14734         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
14735         the portions belonging to each module.
14736         Suggested by Derek Robert Price <derek@ximbiot.com>.
14737
14738 2004-10-12  Simon Josefsson  <jas@extundo.com>
14739
14740         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14741         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
14742         to real functions.
14743
14744 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14745
14746         * modules/vsnprintf: New file.
14747
14748 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14749
14750         * m4/vsnprintf.m4: New file.
14751
14752 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14753
14754         * lib/vsnprintf.h: New file.
14755         * lib/vsnprintf.c: New file.
14756
14757 2004-10-11  Bruno Haible  <bruno@clisp.org>
14758
14759         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
14760         vsnprintf.
14761
14762 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
14763
14764         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
14765
14766 2004-10-07  Bruno Haible  <bruno@clisp.org>
14767
14768         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
14769         fits into the provided buffer.
14770
14771 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
14772
14773         * lib/diacrit.c, diacrit.h: Add GPL notice.
14774
14775         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
14776         notice.
14777         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
14778         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
14779         This avoids a potential constant-folding bug.
14780
14781 2004-10-05  Bruno Haible  <bruno@clisp.org>
14782
14783         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
14784         for the declaration of strsep.
14785
14786 2004-10-05  Bruno Haible  <bruno@clisp.org>
14787
14788         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
14789
14790 2004-10-04  Simon Josefsson  <jas@extundo.com>
14791
14792         * modules/memmem: New file.
14793         * tests/test-memmem.c: New file.
14794         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
14795
14796 2004-10-04  Simon Josefsson  <jas@extundo.com>
14797
14798         * m4/memmem.m4: New file.
14799
14800 2004-10-04  Simon Josefsson  <jas@extundo.com>
14801
14802         * lib/memmem.h: New file.
14803         * lib/memmem.c: New file, taken from glibc.
14804
14805 2004-10-04  Simon Josefsson  <jas@extundo.com>
14806
14807         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
14808         '#ifdef USE_UNLOCKED_IO'.
14809
14810 2004-10-04  Simon Josefsson  <jas@extundo.com>
14811
14812         * config/srclist.txt: Add memmem from glibc.
14813
14814 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14815
14816         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
14817
14818         * modules/argmatch, modules/argp, modules/closeout, modules/error,
14819         modules/exclude, modules/getdate, modules/getline,
14820         modules/getndelim2, modules/getpass, modules/getpass-gnu,
14821         modules/getusershell, modules/linebuffer, modules/md5,
14822         modules/mountlist, modules/posixtm, modules/readtokens,
14823         modules/readutmp, modules/regex, modules/sha1,
14824         modules/version-etc, modules/yesno:
14825         Remove dependency on unlocked-io.
14826
14827 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14828
14829         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
14830
14831         * m4/unlocked-io.m4: Add copyright notice.
14832         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
14833
14834 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14835
14836         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
14837         * lib/xmalloc.c (xmemdup): Likewise.
14838         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
14839         XFREE): Remove these long-obsolescent macros.
14840         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
14841         * lib/xstrdup.c: Remove.
14842
14843         * lib/regex.c (re_comp): Cast gettext return value to char *,
14844         Problem reported by Martin Neitzel via Mark D. Baushke.
14845
14846 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14847
14848         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
14849         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
14850         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
14851         regex.c, sha1.c, version-etc.c, yesno.c:
14852         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
14853         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
14854         the includer's responsibility.
14855
14856         Sync from coreutils.
14857
14858         * lib/modechange.c (mode_compile): Don't decrement a pointer that
14859         points to the start of a string, as the C Standard says the
14860         resulting behavior is undefined.
14861
14862         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
14863         simple -> simple_backups, numbered_existing ->
14864         numbered_existing_backups, numbered -> numbered_backups
14865         to avoid shadowing problems.  All uses changed.
14866         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
14867         * lib/backupfile.c (check_extension, numbered_backup):
14868         Rename locals to avoid shadowing 'basename'.
14869         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
14870         once.
14871
14872         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
14873         * lib/.cvsignore: Add getopt.h.
14874
14875 2004-10-04  Bruno Haible  <bruno@clisp.org>
14876
14877         * modules/README: New file.
14878         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
14879         not a module.
14880
14881 2004-10-02  Jim Meyering  <jim@meyering.net>
14882
14883         * lib/dirfd.h, getpagesize.h: Add copyright notice.
14884
14885 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14886
14887         * modules/strsep: New file.
14888
14889 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14890
14891         * m4/strsep.m4: New file.
14892
14893 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14894
14895         * lib/strsep.h: New file.
14896         * lib/strsep.c: New file.
14897
14898 2004-10-01  Simon Josefsson  <jas@extundo.com>
14899
14900         * lib/snprintf.c (snprintf): Handle size==0.
14901
14902 2004-10-01  Simon Josefsson  <jas@extundo.com>
14903             Bruno Haible  <bruno@clisp.org>
14904
14905         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
14906         (snprintf): Declare 'args'.
14907
14908 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
14909
14910         * lib/snprintf.c: Remove comments as to why each header is needed.
14911
14912 2004-10-01  Bruno Haible  <bruno@clisp.org>
14913
14914         * MODULES.html.sh: Add strsep.
14915
14916 2004-09-30  Simon Josefsson  <jas@extundo.com>
14917
14918         * modules/snprintf: New file.
14919
14920 2004-09-30  Simon Josefsson  <jas@extundo.com>
14921
14922         * m4/snprintf.m4: New file.
14923
14924 2004-09-30  Simon Josefsson  <jas@extundo.com>
14925
14926         * lib/snprintf.h, lib/snprintf.c: New files.
14927
14928 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14929
14930         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
14931         (hol_entry_help): Never translate an empty string.
14932         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
14933         * lib/argp.h (OPTION_NO_TRANS): New option.
14934
14935 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14936
14937         * modules/argp (Maintainer): Replace Simon Josefsson
14938         by Sergey Poznyakoff.
14939
14940 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14941
14942         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
14943         changes merged back into glibc.
14944
14945 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14946
14947         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
14948
14949 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
14950
14951         * lib/xvasprintf.c: Include xalloc.h.
14952         (xvasprintf): Use xalloc_die, not xmalloc_die.
14953
14954 2004-09-29  Bruno Haible  <bruno@clisp.org>
14955
14956         * modules/alloca-opt: New file, derived from modules/alloca.
14957         * modules/allocsa: Depend on alloca-opt instead of alloca.
14958         * modules/setenv: Likewise.
14959         * modules/vasnprintf: Likewise.
14960         * MODULES.html.sh: Add alloca-opt.
14961
14962 2004-09-28  Simon Josefsson  <jas@extundo.com>
14963
14964         * gnulib-tool: New parameter --lgpl, to asseert that modules are
14965         LGPL, and to replace license template from GPL to LGPL.
14966
14967 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14968
14969         * modules/dummy: Change license to LGPL.
14970
14971 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14972
14973         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
14974
14975 2004-09-24  Simon Josefsson  <jas@extundo.com>
14976
14977         * modules/minmax (License): Change from GPL to LGPL.
14978
14979 2004-09-23  Simon Josefsson  <jas@extundo.com>
14980
14981         * gnulib-tool (--import): Typo.
14982
14983 2004-09-23  Simon Josefsson  <jas@extundo.com>
14984
14985         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
14986
14987 2004-09-22  Bruno Haible  <bruno@clisp.org>
14988
14989         * modules/*: Add 'License' field.
14990         * gnulib-tool: Accept --extract-license option.
14991         (func_get_license): New function.
14992
14993 2004-09-21  Bruno Haible  <bruno@clisp.org>
14994
14995         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
14996         Reported by Simon Josefsson.
14997
14998 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14999
15000         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
15001         gl_AC_TYPE_LONG_LONG.
15002
15003 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15004
15005         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
15006
15007 2004-09-18  Simon Josefsson  <jas@extundo.com>
15008         and  Paul Eggert  <eggert@cs.ucla.edu>
15009
15010         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
15011         calls with autoreconf.  Define GL_LIB.
15012
15013 2004-09-14  Karl Berry  <karl@gnu.org>
15014
15015         * config/srclist.txt: unsync setenv.c, sigh.
15016
15017 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15018
15019         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
15020         Problem reported by Bruno Haible in:
15021         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
15022
15023 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15024
15025         * config/srclist.txt: Comment out argp-pvh.c.
15026
15027 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
15028
15029         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
15030         in case some system header has #define'd it.  Problem reported by
15031         Soeren D. Schulze in
15032         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
15033
15034 2004-09-09  Karl Berry  <karl@gnu.org>
15035
15036         * regex.[ch]: delete from the root.  These were supposed to be
15037                 synced with emacs cvs, but this has not happened for about
15038                 a year, and anyway nothing else uses emacs regex.[ch].
15039                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
15040                 lib/regex[.ch] is untouched.
15041
15042 2004-09-09  Bruno Haible  <bruno@clisp.org>
15043
15044         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
15045
15046 2004-09-09  Bruno Haible  <bruno@clisp.org>
15047
15048         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
15049         modifications.
15050         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
15051
15052 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15053
15054         * modules/xvasprintf: New file.
15055         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
15056
15057 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15058
15059         * lib/xvasprintf.h: New file.
15060         * lib/xvasprintf.c: New file.
15061         * lib/xasprintf.c: New file.
15062
15063 2004-09-08  Bruno Haible  <bruno@clisp.org>
15064
15065         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
15066
15067 2004-09-08  Bruno Haible  <bruno@clisp.org>
15068
15069         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
15070         length is > INT_MAX.
15071         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
15072         more.
15073
15074 2004-09-08  Bruno Haible  <bruno@clisp.org>
15075
15076         * lib/stdint_.h: New file, taken from GNU clisp.
15077
15078 2004-09-08  Bruno Haible  <bruno@clisp.org>
15079             Oskar Liljeblad  <oskar@osk.mine.nu>
15080
15081         * modules/stdint: New file.
15082         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
15083
15084 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15085
15086         Import from coreutils.
15087         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
15088         strings on unbounded length.  alloca's performance benefits aren't
15089         that important here.
15090         (V_STRDUP): Remove.
15091         (parse_with_separator): New function, with most of the internals
15092         of the old parse_user_spec.  Allow user to omit both user and group,
15093         for compatibility with FreeBSD.
15094         Clone only the user name, not the entire spec.
15095         Do not set *uid, *gid unless entirely successful.
15096         Avoid memory leak in some failing cases.
15097         Fix regression for USER.GROUP reported by Dmitry V. Levin in
15098         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
15099         (parse_user_spec): Rewrite to use parse_with_separator.
15100
15101 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15102
15103         * modules/userspec: Don't depend on alloca.
15104
15105 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15106
15107         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
15108
15109 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15110
15111         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
15112         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
15113         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
15114
15115 2004-08-16  Simon Josefsson  <jas@extundo.com>
15116
15117         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
15118         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
15119         Add --dry-run for --import.
15120         Let user provided command line parameters override configure.ac
15121         settings.
15122
15123 2004-08-12  Simon Josefsson  <jas@extundo.com>
15124
15125         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
15126         as discussed with Paul Eggert in threads rooted at
15127         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
15128         and
15129         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
15130         Before, the test was empty, and relied on ELIDE_CODE in source
15131         code.)
15132         (gl_PREREQ_GETOPT): New macro.
15133         (gl_GETOPT): Use them.
15134
15135 2004-08-12  Simon Josefsson  <jas@extundo.com>
15136
15137         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
15138         * lib/getopt_.h: Renamed from getopt.h.
15139
15140 2004-08-12  Simon Josefsson  <jas@extundo.com>
15141
15142         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
15143         Change default library name from libfoo to libgnu.
15144         Now, if you have a configure.ac that says:
15145                 gl_SOURCE_BASE(gl)
15146                 gl_M4_BASE(gl/m4)
15147                 gl_MODULES(error getopt etcetera)
15148                 gl_INIT
15149         you can import all you need by running:
15150                 ../gnulib/gnulib-tool --import
15151
15152         * modules/getopt (Files): Rename getopt.h to getopt_.h.
15153         (Makefile.am): Rewrite, use logic from argz.
15154         (Include): Use <getopt.h> instead of "getopt.h".
15155
15156 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15157
15158         * modules/argp (Files): Add m4/unlocked-io.m4.
15159         (Depends-on): Add extensions.
15160
15161 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15162
15163         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
15164         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
15165         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
15166         Check for program_invocation_name, program_invocation_short_name,
15167         flockfile, funlockfile, features.h, _getopt_long_only_r.
15168
15169 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15170
15171         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
15172         its complicated substitute.
15173         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
15174         and program_invocation_name.
15175         (__argp_basename) [!_LIBC]: Remove; the only use was
15176         replaced by its body.
15177         (__argp_short_program_name): Change condition from
15178         !defined __argp_short_program_name to
15179         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
15180         to match argp-namefrob.h.
15181         (__argp_failure): Don't assume strerror_r returns char *.
15182         * lib/argp-parse.c (N_): Define unconditionally.
15183         (argp_default_options): Fill out initializers with 0 to avoid
15184         gcc warnings.
15185
15186 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15187
15188         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
15189         getopt1.c.
15190
15191 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15192
15193         Merge from coreutils.
15194
15195         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
15196
15197         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
15198         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
15199
15200 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15201
15202         Merge from coreutils.
15203
15204         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
15205         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
15206         for Reliant Unix 5.43.
15207
15208         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
15209         (union fooround): Use uintmax_t, not long int.
15210         The rest is a merge from libc:
15211         [defined _LIBC]: Include <shlib-compat.h>.
15212         (_obstack) [defined _LIBC]: Remove after 2.3.4.
15213
15214         * lib/settime.c (settime): Recode to avoid warning with
15215         Sun Forte C 6U2.
15216
15217         * lib/strverscmp.c: Convert to UTF-8.
15218
15219 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15220
15221         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15222         m4/uintmax_t.m4.
15223
15224 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15225
15226         * modules/xalloc-die: New file.
15227         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
15228
15229         * modules/md5 (Files): Add m4/uint32_t.m4.
15230         * modules/sha1: Renamed from modules/sha.
15231         (Files):
15232         Rename lib/sha.h to lib/sha1.h.
15233         Rename lib/sha.c to lib/sha1.c.
15234         Rename m4/sha.m4 to m4/sha1.m4.
15235         (lib_SOURCES): Likewise.
15236         (configure.ac): Rename gl_SHA to gl_SHA1.
15237         (Include): sha.h -> sha1.h.
15238
15239 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15240
15241         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
15242         * m4/sha1.m4: Renamed from sha.m4.
15243         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
15244
15245 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15246
15247         * lib/obstack.h (obstack_empty_p):
15248         Don't assume that chunk->contents is suitably aligned.
15249         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
15250         Likewise. Problem reported by Benno in
15251         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
15252
15253         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
15254         readable.  This could be improved further but it'd take some work.
15255
15256 2004-08-08  Simon Josefsson  <jas@extundo.com>
15257
15258         * modules/xgethostname (Depends-on): Remove exit and error (not
15259         used).
15260
15261         * modules/getpass-gnu: Add getpass.h.
15262         (Depends-on): Add stdbool.
15263         * modules/getpass: Add getpass.h.
15264
15265 2004-08-08  Simon Josefsson  <jas@extundo.com>
15266
15267         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
15268         Check getpass declaration.
15269
15270 2004-08-08  Simon Josefsson  <jas@extundo.com>
15271
15272         * lib/xgethostname.c: Don't include error.h (not used).
15273
15274         * lib/getpass.h: Add.
15275         * lib/getpass.c: Include getpass.h first.
15276
15277 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
15278
15279         * lib/xalloc-die.c: New file.
15280         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
15281         All uses removed.
15282         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
15283         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
15284         xalloc-die.c.
15285         (_, N_, xalloc_die): Move to xalloc-die.c.
15286         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
15287         so that we needn't mess with xalloc_msg_memory_exhausted.
15288
15289         * lib/sha1.h: Renamed from sha.h.
15290         (SHA1_H): Renamed from _SHA_H.
15291         (sha1_ctx): Renamed from sha_ctx.
15292         (sha1_init_ctx): Renamed from sha_init_ctx.
15293         (sha1_process_block): Renamed from sha_process_block.
15294         (sha1_process_bytes): Renamed from sha_process_bytes.
15295         (sha1_finish_ctx): Renamed from sha_finish_ctx.
15296         (sha1_read_ctx): Renamed from sha_read_ctx.
15297         (sha1_stream): Renamed from sha_stream.
15298         (sha1_buffer): Renamed from sha_buffer.
15299         * lib/sha1.c: Likewise; renamed from sha.c.
15300         Do not include <sys/types.h>.
15301         Include <stddef.h> rather than <stdlib.h>.
15302
15303 2004-08-08  Bruno Haible  <bruno@clisp.org>
15304
15305         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
15306         FILESYSTEM_PREFIX_LEN.
15307         * lib/progreloc.c: Likewise.
15308         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
15309
15310 2004-08-06  Simon Josefsson  <jas@extundo.com>
15311
15312         * modules/progname (Depends-on): Don't depend on stdbool.
15313
15314 2004-08-06  Simon Josefsson  <jas@extundo.com>
15315
15316         * modules/getsubopt: New file.
15317         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15318         getsubopt.
15319
15320 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15321
15322         More merge from coreutils.
15323
15324         * m4/utimens.m4, m4/utimecmp.m4: New files.
15325         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
15326         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
15327         prereq.m4, sha.m4: Import changes from coreutils.
15328
15329 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15330
15331         More merge from coreutils.
15332         * modules/raise, modules/readtokens0, modules/utimens:
15333         * modules/utimecmp, module/xnanosleep: New files.
15334         * modules/strftime: Add lib/strftime.h.
15335         Change include from <time.h> to "strftime.h".
15336         * modules/yesno: Add lib/yesno.h.
15337         * modules/backupfile: Remove lib/addext.c.
15338         * modules/euidaccess: Add stat-macros.h.
15339         * modules/canonicalize, modules/euidaccess,
15340         modules/filemode, modules/lchown, modules/makepath,
15341         modules/rmdir, modules/stat: Likewise.
15342
15343 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15344
15345         Merge from tar.
15346         * lib/argp-help.c (make_hol, hol_append): Don't assume that
15347         SIZE_MAX is a valid preprocessor constant.
15348         (__argp_basename): Change from "#ifndef _LIBC"
15349         to "#ifndef __argp_short_program_name", so that
15350         we don't compile these functions for tar.
15351
15352         More merges from coreutils.
15353         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
15354         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
15355         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
15356         * lib/addext.c: Remove; no longer needed.
15357         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
15358         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
15359         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
15360         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
15361         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
15362         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
15363         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
15364         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
15365         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
15366         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15367         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
15368         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
15369         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
15370         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
15371         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
15372         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
15373         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
15374         Import changes from coreutils.
15375
15376 2004-08-05  Simon Josefsson  <jas@extundo.com>
15377
15378         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
15379
15380 2004-08-05  Simon Josefsson  <jas@extundo.com>
15381
15382         * m4/getsubopt.m4: New file.
15383
15384 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15385
15386         Merge from coreutils.
15387
15388         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
15389         * m4/getcwd-path-max.m4: New files.
15390
15391         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
15392         FILESYSTEM_PREFIX_LEN ->
15393         FILE_SYSTEM_PREFIX_LEN.
15394         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
15395         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
15396         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
15397         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
15398
15399         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
15400         prerequisite modules now handle the DOS stuff.
15401         Don't check for unistd.h.
15402
15403 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15404
15405         Merge from coreutils.
15406
15407         * lib/.gdb-history: Remove; this doesn't belong here.
15408
15409         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
15410         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
15411         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
15412         * lib/getcwd.c: New files.
15413
15414         * lib/dirname.h: Include <stdbool.h>.
15415         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
15416         for consistency with POSIX terminology.  All uses changed.
15417         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
15418         (strip_trailing_slashes): Use bool for booleans.
15419         * lib/stripslash.c (strip_trailing_slashes): Likewise.
15420
15421         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
15422         sometimes returns a positive errno value even when it succeeds.
15423         (print_errno_message) [!LIBC]: Fall back on strerror if
15424         __strerror_r fails.
15425
15426         * lib/path-concat.c (mempcpy): Don't define if a system header defines
15427         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
15428         (longest_relative_suffix): New function.
15429         (path_concat): Use it.  Assume first argument is not NULL.
15430         Port to DOS.  Omit redundant separators.
15431         Report an error instead of returning NULL.
15432         Use mempcpy instead of memcpy.
15433         (xpath_concat): Remove: not declared or used.
15434
15435         * lib/same.h: Include <stdbool.h>
15436         (same_name): Return bool, not int.
15437         * lib/same.c (same_name): Likewise.
15438         (errno): Don't declare; we assume C89 or better now.
15439
15440         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
15441         if not already defined.
15442
15443         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
15444         * lib/dup-safer.c (errno): Likewise.
15445
15446 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15447
15448         Merge from coreutils.
15449         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
15450         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
15451         * modules/path-concat: Don't depend on strdup.
15452
15453 2004-08-03  Simon Josefsson  <jas@extundo.com>
15454
15455         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
15456         * lib/progname.h: Don't include stdbool.h.
15457
15458 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15459
15460         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
15461         * MODULES.html.sh (func_all_modules): Remove fatal.
15462
15463 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15464
15465         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
15466
15467 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15468
15469         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
15470         working.
15471
15472 2004-08-02  Simon Josefsson  <jas@extundo.com>
15473
15474         * lib/getsubopt.h: New file, with comments from Bruno Haible.
15475         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
15476         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
15477
15478 2004-08-01  Simon Josefsson  <jas@extundo.com>
15479
15480         * lib/xgetdomainname.c: Include stdlib.h, for free().
15481
15482 2004-07-19  Bruno Haible  <bruno@clisp.org>
15483
15484         * MODULES.html.sh (func_all_modules): Add dummy.
15485
15486 2004-07-16  Simon Josefsson  <jas@extundo.com>
15487
15488         * modules/dummy: New file.
15489
15490 2004-07-16  Simon Josefsson  <jas@extundo.com>
15491
15492         * lib/dummy.c: New file.
15493
15494 2004-07-16  Bruno Haible  <bruno@clisp.org>
15495
15496         * lib/backupfile.h: Add extern "C" for C++.
15497         * lib/closeout.h: Likewise.
15498         * lib/copy-file.h: Likewise.
15499         * lib/findprog.h: Likewise.
15500         * lib/full-write.h: Likewise.
15501         * lib/pathname.h: Likewise.
15502         * lib/progname.h: Likewise.
15503         * lib/stpcpy.h: Likewise.
15504         * lib/stpncpy.h: Likewise.
15505         * lib/strcase.h: Likewise.
15506         * lib/strstr.h: Likewise.
15507         * lib/xalloc.h: Likewise.
15508
15509         * lib/mbswidth.h: Add extern "C" for C++.
15510         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
15511
15512 2004-07-13  Robert Millan  <robertmh@gnu.org>
15513
15514         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
15515
15516 2004-07-09  Simon Josefsson  <jas@extundo.com>
15517
15518         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
15519         failed without this.)
15520
15521 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15522
15523         * modules/chown (Files): Add lib/fchown-stub.c, since
15524         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
15525
15526 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15527
15528         * lib/fchown-stub.c: New file.
15529
15530 2004-06-24  Jim Meyering  <jim@meyering.net>
15531
15532         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
15533
15534 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15535
15536         * modules/argz: Omit "#include".
15537
15538         * MODULES.html.sh (func_all_modules): Add calloc, to match
15539         2004-06-01 addition of calloc module.
15540
15541 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15542
15543         * m4/argz.m4: New file, which is autoupdated from libtool.
15544
15545 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15546
15547         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
15548         libtool.
15549
15550 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15551
15552         * config/srclist-update: Don't insist on "USA." before the
15553         close-comment, as libtool omits the period and puts the */ on a
15554         separate line.
15555         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
15556         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
15557
15558 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
15559
15560         * modules/argz: New file.
15561         * MODULES.html.sh (func_all_modules): Add argz.
15562
15563 2004-06-12  Jim Meyering  <jim@meyering.net>
15564         and  Paul Eggert  <eggert@cs.ucla.edu>
15565
15566         * modules/hash (Files): Add lib/xalloc.h.
15567         * modules/pipe (Depends-on): Add wait-process.
15568         * modules/stat (Depends-on): Add xalloc.
15569         * modules/userspec (Files): Add lib/userspec.h.
15570         * modules/xstrto
15571
15572         Upgrade from gettext-0.13.
15573         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
15574         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
15575         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
15576
15577 2004-06-10  Jim Meyering  <jim@meyering.net>
15578
15579         * lib/calloc.c: New file.
15580
15581 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
15582
15583         * lib/getdate.y (yylex): Allow space between sign and number.
15584         Problem reported by Dan Jacobson.
15585
15586 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15587
15588         Merge from coreutils CVS.
15589
15590         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
15591         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
15592         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
15593         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
15594         xstrtol.m4: Fix copyright date and/or serial number.
15595
15596         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
15597         See if we need an fchown replacement.
15598         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
15599         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
15600         and use the replacement function if we detect either defect.
15601
15602         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
15603         gl_UTIMECMP.
15604
15605 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15606         and  Jim Meyering  <jim@meyering.net>
15607
15608         Merge from coreutils CVS.
15609
15610         * lib/stat-macros.h: New file, with contents from file-type.h
15611         and coreutils' system.h.
15612         * lib/file-type.c: Include "stat-macros.h".
15613         * lib/file-type.h (file_type): Move all macro definitions to new file,
15614         stat-macros.h.
15615
15616         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
15617         Wrap old code with this conditional.
15618         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
15619         function that does not dereference symlinks.
15620         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
15621
15622         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
15623         dependency problems.
15624         (xreadlink): Accept new arg SIZE, for efficiency.
15625         All decls and uses changed.
15626         * lib/xreadlink.h: Include <stddef.h>, for size_t.
15627
15628         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
15629         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
15630
15631         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
15632         sysexits.h.
15633
15634 2004-06-01  Jim Meyering  <jim@meyering.net>
15635
15636         * m4/calloc.m4: New file.
15637
15638 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
15639
15640         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
15641         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
15642         Also, fix a typo in a diagnostic.
15643
15644 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15645
15646         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
15647         or AC_FUNC_REALLOC.
15648
15649 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15650
15651         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
15652         macros to be defined.
15653         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
15654         the allocator returns NULL because the requested size is zero.
15655
15656 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15657
15658         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
15659         var.  Add comment explaining why libc still defines it.  This
15660         merges the following patch from glibc:
15661         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
15662
15663 2004-05-20  Andreas Schwab  <schwab@suse.de>
15664
15665         * m4/free.m4: Replace free if it not known to work, not the other
15666         way round.
15667
15668 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15669
15670         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
15671         present in glibc since revision 1.1 of this file.
15672         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
15673         obstack_alignment_mask, obstack_alloc, obstack_base,
15674         obstack_blank, obstack_blank_fast, obstack_chunk_size,
15675         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
15676         obstack_grow0, obstack_init, obstack_int_grow,
15677         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
15678         obstack_next_free, obstack_object_size, obstack_ptr_grow,
15679         obstack_ptr_grow_fast, obstack_room): Remove declarations of
15680         nonexistent functions.
15681
15682 2004-05-18  Karl Berry  <karl@gnu.org>
15683
15684         * config/srclist.txt: break link for vasnprintf.c.
15685
15686 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15687
15688         Port obstack to the AS/400, where pointers are 16 bytes wide and
15689         you cannot cast an integer to a valid pointer.  This patch is
15690         currently waiting to be integrated into glibc; see
15691         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
15692
15693         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
15694         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
15695         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
15696         (struct obstack): temp member is now a union of a pointer and
15697         an integer, instead of an integer.  All integer uses changed.
15698         This does not affect the physical layout of struct obstack,
15699         except on hosts (like the AS/400) where the size or alignment of
15700         void * is greater than that of ptrdiff_t.
15701         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
15702         __STDC__)]: Store temporary in pointer member of union, not
15703         integer member.
15704         * lib/obstack.c: Include <stddef.h>, for offsetof.
15705         (struct fooalign): Remove; it doesn't need a name.
15706         (union fooround): Change double to long double, and add void *.
15707         (DEFAULT_ALIGNMENT): Use offsetof to compute.
15708         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
15709         not a macro.  Hence the values are always int; so remove all
15710         casts-to-int in uses.
15711
15712 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15713
15714         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
15715         we can get this patch merged into glibc.
15716
15717 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15718             Paul Eggert  <eggert@cs.ucla.edu>
15719
15720         * m4/argp: Depend on alloca.
15721
15722 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15723             Paul Eggert  <eggert@cs.ucla.edu>
15724
15725         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
15726         freecoding.
15727
15728 2004-05-17  Bruno Haible  <bruno@clisp.org>
15729
15730         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
15731         precision that consists of a '.' followed by an empty digit string.
15732         Patch by Tor Lillqvist <tml@iki.fi>.
15733
15734 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15735
15736         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
15737         for backward compatibility with older code.  We need our own
15738         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
15739         it under some other name, and our alloca.h will define it.
15740
15741 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15742             Derek Price  <derek@ximbiot.com>
15743
15744         * lib/alloca.c: Include <alloca.h>, to get our interface.
15745         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
15746         include <alloca.h> first.  Use C89 prototype for alloca; this
15747         requires including <stddef.h> for size_t.  Use extern "C" if C++.
15748         Use #elif for simplicity, since we can assume C89 now.
15749         Don't try to source the system alloca.h since it will not be found
15750         and to prevent recursively including its replacement.
15751         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
15752         * lib/regex.c: Likewise.
15753
15754 2004-05-16  Derek Price  <derek@ximbiot.com>
15755             Paul Eggert  <eggert@cs.ucla.edu>
15756
15757         getline cleanup.  This changes the getndelim2 API: both order of
15758         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
15759         no delimiter).
15760
15761         * lib/getline.c: Don't include stddef.h or stdio.h, since our
15762         interface does that.
15763         (getline): Always use getdelim, so that we don't have two
15764         copies of this code.
15765         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
15766         if available.
15767         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
15768         (GETNDELIM2_MAXIMUM): New macro.
15769         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
15770         instead of the old practice of delim2==0.  All callers changed.
15771         Return -1 on overflow, instead of returning junk.
15772         Do not set *linesize unless allocation succeeds.
15773         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
15774         that we include sys/types.h.
15775         * lib/getnline.h: Likewise.
15776         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
15777         (getndelim2): Reorder arguments.
15778         * lib/getnline.c (getnline, getndelim):
15779         Don't discard the NMAX argument.
15780         (getnline): Invoke getndelim, to avoid code duplication.
15781         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
15782         of (size_t) -1 by callers of the getnline family.
15783
15784 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15785
15786         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
15787         Check for gettimeofday.
15788         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
15789         Check for settimeofday, stime.
15790
15791 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15792
15793         * lib/nanosleep.c (suspended): Change its type from int to
15794         sig_atomic_t volatile.
15795         (first_call): Make it private to rpl_nanosleep, and have it
15796         be zero initially as that's a bit faster.
15797         (my_usleep): Round up fractional times instead of truncating them,
15798         as this is the usual meaning for 'sleep'.
15799
15800         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
15801         doesn't work.
15802         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
15803         (ENOSYS): Define if not defined.
15804         (settime): Fall back on stime if it exists and settimeofday fails.
15805         But don't bother with fallbacks if a method fails with errno == EPERM.
15806
15807 2004-05-11  Jim Meyering  <jim@meyering.net>
15808
15809         Prior to this change, the save_cwd caller required read access to the
15810         current directory on most systems (ones with the fchdir function).
15811
15812         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
15813         fails, try write-only, and finally, resort to using xgetcwd.
15814
15815 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
15816
15817         * lib/obstack.c, obstack.h: Import changes from libc.
15818
15819 2004-04-28  Bruno Haible  <bruno@clisp.org>
15820
15821         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
15822         also implicitly appends .exe to executables.
15823         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
15824         accepts Windows pathnames.
15825         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
15826         Treat Cygwin like Windows, since it now accepts Windows pathnames.
15827         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
15828         Treat Cygwin like Windows, since it now accepts Windows pathnames.
15829         Reported by Derek Robert Price <derek@ximbiot.com>.
15830
15831 2004-04-21  Karl Berry  <karl@gnu.org>
15832
15833         * config/srclist.txt (localcharset.c): break sync.
15834
15835 2004-04-20  Paul Eggert  <eggert@twinsun.com>
15836
15837         * m4/host-os.m4: Add a copyright notice.
15838
15839 2004-04-20  Jim Meyering  <jim@meyering.net>
15840
15841         Change UTILS_ to gl_ in AC_DEFINE'd names.
15842         Change utils_- and jm_-prefixed variables, too.
15843         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
15844         UTILS_FUNC_MKDIR_TRAILING_SLASH.
15845         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
15846
15847         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
15848         Don't emit trailing blanks.
15849         Also rename jm_-prefixed variables to have gl_ prefix.
15850
15851         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
15852         Also rename jm_-prefixed variables to have gl_ prefix.
15853
15854         * m4/jm-macros.m4: Reflect the renamings.
15855         * m4/prereq.m4: Likewise.
15856
15857 2004-04-20  Jim Meyering  <jim@meyering.net>
15858
15859         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
15860         memory.
15861
15862 2004-04-20  Jim Meyering  <jim@meyering.net>
15863             Bruno Haible  <bruno@clisp.org>
15864
15865         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
15866         memory when realloc fails.
15867
15868 2004-04-19  Jim Meyering  <jim@meyering.net>
15869
15870         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
15871         now that readutmp.c may call `free (0)'.
15872
15873 2004-04-19  Bruno Haible  <bruno@clisp.org>
15874
15875         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
15876         * m4/inttypes_h.m4: Likewise.
15877         * m4/stdint_h.m4: Likewise.
15878         * m4/intmax_t.m4: Likewise.
15879         * m4/uintmax_t.m4: Likewise.
15880
15881 2004-04-18  Jim Meyering  <jim@meyering.net>
15882
15883         * m4/prereq.m4: Don't forbid jm_ prefix.
15884
15885         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
15886         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
15887         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
15888         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
15889         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
15890         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
15891         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
15892         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
15893         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
15894         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
15895         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
15896         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
15897         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
15898         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
15899         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
15900         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
15901         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
15902         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
15903         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
15904
15905 2004-04-18  Jim Meyering  <jim@meyering.net>
15906
15907         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
15908         failure, don't leak memory and do call END_UTMP_ENT.
15909
15910 2004-04-16  Jim Meyering  <jim@meyering.net>
15911
15912         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
15913         coreutils' stat program.
15914         (gl_PREREQ): Don't require jm_PREREQ_STAT.
15915
15916 2004-04-11  Paul Eggert  <eggert@twinsun.com>
15917
15918         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
15919         C89.
15920         (CHAR_BIT): Remove, since we assume C89.
15921         Include <stdint.h> if available, as per current Autoconf CVS advice.
15922
15923 2004-03-31  Jim Meyering  <jim@meyering.net>
15924
15925         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
15926         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
15927         * m4/xalloc.m4: Likewise.
15928
15929 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15930
15931         Merge from coreutils.
15932
15933         * m4/inttostr.m4: New file.
15934         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
15935         Require AM_STDBOOL_H and gl_TIMESPEC instead.
15936         Require gl_CLOCK_TIME.
15937         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
15938
15939 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15940
15941         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
15942         not bool, to be more consistent with Unix conventions.
15943         Suggested by Bruno Haible.
15944
15945         Merge from coreutils.
15946
15947         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
15948         * lib/umaxtostr.c: New files.
15949
15950         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
15951         the usual <time.h> dance.
15952         (get_date): Change signature to support fractional time stamps.
15953         All callers changed.
15954         * lib/getdate.y: Include "getdate.h" first, as we can now
15955         assume C89 and don't need to worry about 'const'.
15956         Similarly, include "unlocked-io.h" near start, not in middle.
15957         Include <limits.h>.
15958         (textint.value): Use long int rather than int.
15959         (textint.digits): Use size_t rather than int.
15960         (BILLION, LOG10_BILLION): New constants.
15961         (parser_control): New member rel_ns.  Members day_ordinal,
15962         time_zone, month, day, hour, minutes, rel_year, rel_month,
15963         rel_day, rel_hour, rel_minutes, rel_seconds
15964         are now long int, not int.  Member seconds is now struct timespec,
15965         not int.  New member timespec_seen.  Members dates_seen, days_seen,
15966         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
15967         not int.
15968         (%union.intval): Now long int, not int.
15969         New member timespec.
15970         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
15971         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
15972         (spec): Now is a timespec or an item list.
15973         (timespec, items): New nonterminals.
15974         (time, rel, relunit, number, get_date):
15975         Add support for fractional seconds.
15976         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
15977         (gmtime, localtime, mktime): Remove decls; not needed with C89.
15978         (to_hour): First arg is now long int, not int.
15979         (to_year): Returns long int, not int.
15980         Don't treat year -70 like 70.
15981         (tm_diff): Returns long int, not int.
15982         (lookup_word): Use bool instead of int when appropriate.
15983         (yylex): Use size_t for count, not int.
15984         Detect overflow when parsing large integer constants.
15985         Add support for fractions.
15986         (get_date): Make pointers 'const' if possible.
15987         Use more-portable code to detect integer overflow.
15988         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
15989         Don't use ctime; it's not reliable if the year has >4 digits.
15990
15991         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
15992         This is for compatibility with BSD.
15993
15994         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
15995         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
15996         From coreutils' system.h.
15997
15998         * lib/userspec.c: Don't include "posixver.h".
15999         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
16000         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
16001         compatible extension.  Simplify code by removing a boolean int
16002         that was always nonzero if a string was nonnull.
16003
16004 2004-03-30  Jim Meyering  <jim@meyering.net>
16005
16006         Merge from coreutils.
16007
16008         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
16009         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
16010         on some systems one must include <grp.h> before it.
16011         Reported by Christian Krackowizer.
16012
16013 2004-03-30  Jim Meyering  <jim@meyering.net>
16014
16015         Merge from coreutils.
16016
16017         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
16018
16019         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
16020         an empty input stream.
16021
16022         * lib/readtokens.c: Include <stdbool.h>.
16023         (readtoken): Use `size_t' rather than int/long.
16024         All callers adjusted.
16025         Use `bool' rather than `int' where appropriate.
16026         Use memset rather than an explicit loop.
16027         Use x2nrealloc rather than xrealloc.
16028         Allow the use of `\0' as a delimiter.
16029         (readtokens): Likewise.
16030         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
16031
16032 2004-03-30  Jim Meyering  <jim@meyering.net>
16033
16034         * m4/realloc.m4: Remove file, since now it does no more than
16035         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
16036         the `configure.ac' section of module/realloc.
16037         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
16038
16039 2004-03-30  Bruno Haible  <bruno@clisp.org>
16040
16041         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
16042         nonnull.
16043
16044 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16045
16046         Merge changes to getloadavg.c from coreutils and Emacs.
16047
16048         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
16049         Define to an expression, not to the empty string.
16050         Include cloexec.h and xalloc.h.
16051         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
16052         Use set_cloexec_flag rather than rolling our own.
16053         * lib/cloexec.c, lib/cloexec.h: New files.
16054
16055 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16056
16057         * m4/cloexec.m4: New file.
16058
16059 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16060
16061         * lib/getopt.h: Sync with libc CVS.
16062
16063 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16064             Bruno Haible  <bruno@clisp.org>
16065
16066         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
16067         mbswidth.
16068
16069 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16070             Bruno Haible  <bruno@clisp.org>
16071
16072         * lib/mbswidth.h: Include <wchar.h> only if
16073         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
16074         <wchar.h>.
16075         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
16076
16077 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16078
16079         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
16080         Sync with libc CVS.
16081         * lib/getopt_int.h: New file, also synced from libc.
16082
16083 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16084
16085         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
16086         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
16087         Bring back getopt.c, getopt.h, getopt1.c.
16088
16089 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16090
16091         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
16092         All uses changed.  Check for sa_sigaction member; this fixes
16093         a bug first reported by Jason Andrade in
16094         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16095
16096 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16097
16098         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
16099         '#if' expressions.  Unlike the code it replaces, it does not
16100         depend on (defined _SC_PAGESIZE).  However, it does depend on
16101         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
16102         first reported by Jason Andrade in
16103         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16104
16105 2004-02-25  Simon Josefsson  <jas@extundo.com>
16106
16107         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
16108
16109 2004-02-25  Simon Josefsson  <jas@extundo.com>
16110
16111         * lib/strdup.h: New file.
16112         * lib/strdup.c: Include it.
16113         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
16114         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
16115
16116 2004-02-23  Karl Berry  <karl@gnu.org>
16117
16118         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
16119         (from fencepost.gnu.org:/gd/gnuorg).
16120
16121 2004-02-23  Karl Berry  <karl@gnu.org>
16122
16123         * config/srclistvars.sh (GNUORG) [karl]: redefine.
16124         * config/srclist.txt: add maintain/standards documents.
16125
16126 2004-02-18  Bruno Haible  <bruno@clisp.org>
16127
16128         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
16129         Reported by Derek Robert Price <derek@ximbiot.com>.
16130
16131 2004-02-16  Karl Berry  <karl@gnu.org>
16132
16133         * config/mkinstalldirs, install-sh: update from automake.
16134
16135 2004-02-06  Karl Berry  <karl@gnu.org>
16136
16137         * m4/po.m4: update from gettext 0.14.1.
16138
16139 2004-02-06  Karl Berry  <karl@gnu.org>
16140
16141         * lib/config.charset: update from gettext 0.14.1.
16142
16143 2004-02-05  Paul Eggert  <eggert@twinsun.com>
16144
16145         Add comments and code, prompted by suggestions from Bruno Haible
16146         for sh-quote.
16147         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
16148         describing the enum quoting_style values.
16149         * lib/quotearg.c (quotearg_alloc): New function.
16150         (quotearg_buffer_restyled): Treat lone { and } as special.
16151         Treat = as special.  Work around bug with older shells
16152         that "see" a '\' that is really the 2nd byte of a multibyte char.
16153         Quote empty string with shell_quoting_style.
16154
16155 2004-02-03  Bruno Haible  <bruno@clisp.org>
16156
16157         * m4/pipe.m4: New file, from GNU gettext.
16158
16159 2004-02-03  Bruno Haible  <bruno@clisp.org>
16160
16161         * lib/pipe.h: New file, from GNU gettext.
16162         * lib/pipe.c: New file, from GNU gettext.
16163
16164 2004-01-27  Bruno Haible  <bruno@clisp.org>
16165
16166         * m4/execute.m4: New file, from GNU gettext.
16167
16168 2004-01-27  Bruno Haible  <bruno@clisp.org>
16169
16170         * lib/execute.h: New file, from GNU gettext.
16171         * lib/execute.c: New file, from GNU gettext.
16172         * lib/w32spawn.h: New file, from GNU gettext.
16173
16174 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16175
16176         Merge from diffutils.
16177
16178         * lib/file-type.c (file_type): Add typed memory objects.
16179         * lib/file-type.h (S_TYPEISTMO): New macro.
16180
16181         * lib/c-stack.h (c_stack_action): Remove argv argument.
16182         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
16183         (die): Don't calculate message unless segv_action returns.
16184         (get_stack_location, min_address_from_argv, max_address_from_argv,
16185         volatile stack_base, volatile_stack_size): Remove.
16186         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
16187         that every segmentation violation is a stack overflow.  (Ouch!)
16188         See Debian bug 136249 (still outstanding) for more info about why
16189         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
16190
16191 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16192
16193         Exit-status fix from coreutils.
16194
16195         Use exit_failure consistently in place of EXIT_FAILURE,
16196         so that program exit statuses are consistent on failure.
16197
16198         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
16199         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
16200         * lib/argmatch.h: Comment fix to match the above.
16201         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
16202         Now a macro referring to exit_failure, instead of a separate
16203         variable.  Include "exitfail.h" to get it.
16204         * lib/xstrtol.h: Include "exitfail.h".
16205         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
16206
16207         * lib/long-options.c (parse_long_options): Use prototype
16208         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
16209         for clarity.
16210
16211 2004-01-21  Jim Meyering  <jim@meyering.net>
16212
16213         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
16214         so as not to conflict with a different-sized __mktime_internal
16215         function in GNU libc.
16216         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
16217         Problem building statically-linked `ls' reported by Michael Brunnbauer.
16218
16219 2004-01-20  Karl Berry  <karl@gnu.org>
16220
16221         * config/config.guess: update from config.
16222
16223         * config/srclistvars.sh: GNUWWWLICENSES for karl.
16224
16225 2004-01-20  Bruno Haible  <bruno@clisp.org>
16226
16227         Safer stack allocation.
16228         * lib/setenv.c: Include allocsa.h.
16229         (alloca): Remove fallback definition.
16230         (freea): Remove macro.
16231         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
16232         instead of freea.
16233
16234 2004-01-20  Bruno Haible  <bruno@clisp.org>
16235
16236         * m4/eealloc.m4: New file, from GNU gettext.
16237
16238 2004-01-20  Bruno Haible  <bruno@clisp.org>
16239
16240         * m4/allocsa.m4: New file, from GNU gettext.
16241
16242 2004-01-20  Bruno Haible  <bruno@clisp.org>
16243
16244         * lib/xallocsa.h: New file, from GNU gettext.
16245         * lib/xallocsa.c: New file, from GNU gettext.
16246
16247 2004-01-20  Bruno Haible  <bruno@clisp.org>
16248
16249         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
16250
16251 2004-01-20  Bruno Haible  <bruno@clisp.org>
16252
16253         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
16254         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
16255         specially.
16256
16257 2004-01-20  Bruno Haible  <bruno@clisp.org>
16258
16259         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
16260         patch.
16261
16262 2004-01-20  Bruno Haible  <bruno@clisp.org>
16263
16264         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
16265
16266 2004-01-20  Bruno Haible  <bruno@clisp.org>
16267
16268         * lib/eealloc.h: New file.
16269
16270 2004-01-20  Bruno Haible  <bruno@clisp.org>
16271
16272         * lib/binary-io.h: Avoid warnings on Cygwin.
16273
16274 2004-01-20  Bruno Haible  <bruno@clisp.org>
16275
16276         * lib/allocsa.h: New file, from GNU gettext.
16277         * lib/allocsa.c: New file, from GNU gettext.
16278
16279 2004-01-18  Karl Berry  <karl@gnu.org>
16280
16281         * doc/gpl.texi, doc/lgpl.texi: new files.
16282
16283 2004-01-18  Karl Berry  <karl@gnu.org>
16284
16285         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
16286         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
16287
16288 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16289
16290         Merge from coreutils.
16291
16292         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
16293         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
16294         (gl_DEFAULT_POSIX2_VERSION): Move
16295         the documentation from 'configure' into 'config.hin',
16296         so that 'configure --help' isn't burdened by it and
16297         we don't have to worry about its formatting there.
16298         Reword the documentation so that it's more succinct
16299         and can be run together into a single paragraph.
16300         * m4/same.m4 (gl_SAME): Check for pathconf.
16301
16302 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16303
16304         Merge from coreutils.
16305
16306         * lib/posixver.c: Include posixver.h.
16307
16308         * lib/same.c: Include <stdbool.h>, <limits.h>.
16309         (_POSIX_NAME_MAX): Define if not defined.
16310         (MIN): New macro.
16311         (same_name): If file names are silently truncated, report
16312         that the file names are the same if they are the same after
16313         the silent truncation.
16314
16315         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
16316         conversion function.
16317         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
16318         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
16319         longer needed.
16320
16321 2004-01-15  Jim Meyering  <jim@meyering.net>
16322
16323         Merge from coreutils.
16324
16325         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
16326         if no library is required.
16327         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
16328         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
16329         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
16330         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
16331         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
16332         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
16333         value, $ac_cv_search_crypt, if it's "none required".
16334         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
16335         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
16336         not gl_FUNC_GETLOADAVG.
16337         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
16338         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
16339
16340 2004-01-15  Jim Meyering  <jim@meyering.net>
16341
16342         Merge from coreutils.
16343
16344         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
16345         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
16346         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
16347
16348         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
16349         optional configure-time default.
16350
16351         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16352
16353         * lib/xreadlink.c (xreadlink): Correct outdated comment.
16354
16355 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
16356
16357         Merge from coreutils.
16358
16359         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
16360         value, $ac_cv_search_nanosleep, if it's "none required".
16361
16362 2004-01-14  Paul Eggert  <eggert@twinsun.com>
16363
16364         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
16365         with like-named macro in fnmatch.c.
16366         (EXT): Use an internal constant instead.
16367
16368         Merge fnmatch patches from glibc.
16369         * lib/fnmatch.c (mbsinit): Remove define.
16370         Add libc_hidden_ver (__fnmatch, fnmatch).
16371         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
16372         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
16373
16374 2004-01-14  Karl Berry  <karl@gnu.org>
16375
16376         * config/install-sh: update from automake.
16377
16378 2004-01-13  Karl Berry  <karl@gnu.org>
16379
16380         * config/install-sh: update from automake.
16381
16382 2004-01-09  Karl Berry  <karl@gnu.org>
16383
16384         * config/install-sh: update from automake.
16385
16386 2004-01-05  Karl Berry  <karl@gnu.org>
16387
16388         * config/config.{sub,guess}: update from config.
16389
16390 2003-12-31  Karl Berry  <karl@gnu.org>
16391
16392         * config/depcomp: update from automake.
16393
16394 2003-12-14  Karl Berry  <karl@gnu.org>
16395
16396         * lib/config.charset: update from gettext-runtime.
16397
16398 2003-12-03  Paul Eggert  <eggert@twinsun.com>
16399
16400         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
16401         Bug reported by Alfred M. Szmidt.
16402
16403 2003-12-03  Bruno Haible  <bruno@clisp.org>
16404
16405         * m4/gettext.m4: Upgrade from gettext-0.13.
16406         * m4/po.m4: Upgrade from gettext-0.13.
16407         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
16408         * m4/intmax.m4: New file, from gettext-0.13.
16409         * m4/printf-posix.m4: New file, from gettext-0.13.
16410
16411 2003-11-29  Karl Berry  <karl@gnu.org>
16412
16413         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
16414
16415 2003-11-25  Paul Eggert  <eggert@twinsun.com>
16416             Bruno Haible  <bruno@clisp.org>
16417
16418         * lib/printf-parse.h: Don't include sys/types.h.
16419         (ARG_NONE): New macro.
16420         (char_directive): Change type of *arg_index fields to size_t.
16421         * lib/printf-parse.c: Don't include sys/types.h.
16422         (SSIZE_MAX): Remove macro.
16423         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
16424         Remove unnecessary overflow check.
16425         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
16426         fields.
16427
16428 2003-11-25  Bruno Haible  <bruno@clisp.org>
16429
16430         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
16431
16432 2003-11-25  Bruno Haible  <bruno@clisp.org>
16433
16434         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
16435         gt_TYPE_SSIZE_T.
16436
16437 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16438
16439         * modules/alloca: Remove dependency on xalloc.
16440
16441 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16442
16443         * lib/alloca.c: Remove dependency on xalloc module.
16444         (xalloc_die): Remove.
16445         (memory_full) [!defined emacs]: New macro.
16446         [!defined emacs]: Don't include xalloc.h.
16447         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
16448         address arithmetic overflows.  Change datatypes a bit to avoid
16449         unnecessary casts.
16450
16451 2003-11-22  Jim Meyering  <jim@meyering.net>
16452
16453         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
16454         s/size/size_t/.
16455
16456 2003-11-21  Karl Berry  <karl@gnu.org>
16457
16458         * config/config.{sub,guess}: update from config.
16459
16460 2003-11-18  Karl Berry  <karl@gnu.org>
16461
16462         * config/config.{sub,guess}: update from config.
16463
16464         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
16465
16466 2003-11-17  Paul Eggert  <eggert@twinsun.com>
16467
16468         * README: Mention that S+T cannot overflow if S is the size of
16469         an existing object and T is sufficiently small.
16470
16471 2003-11-17  Jim Meyering  <jim@meyering.net>
16472
16473         On systems without utime and without a utimes function capable of
16474         dealing with a NULL struct utimbuf* argument, this utime replacement
16475         could -- in unusual circumstances -- leak a file descriptor.
16476         * lib/utime.c: Include <unistd.h> and <errno.h>.
16477         (utime_null): Be sure to close `fd' and to preserve errno.
16478         Reported by Geoff Collyer via Arnold Robbins.
16479
16480 2003-11-17  Bruno Haible  <bruno@clisp.org>
16481
16482         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
16483         (Depends-on): Add xsize.
16484
16485 2003-11-17  Bruno Haible  <bruno@clisp.org>
16486
16487         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
16488
16489 2003-11-17  Bruno Haible  <bruno@clisp.org>
16490
16491         * lib/vasnprintf.c (alloca): Remove fallback definition.
16492         (freea): Remove definition.
16493         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
16494         Reported by Paul Eggert.
16495
16496 2003-11-16  Paul Eggert  <eggert@twinsun.com>
16497             Bruno Haible  <bruno@clisp.org>
16498
16499         Protect against address arithmetic overflow.
16500         * lib/printf-args.h: Include stddef.h.
16501         (arguments): Change type of field 'count' to size_t.
16502         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
16503         'unsigned int' where appropriate.
16504         * lib/printf-parse.h: Include sys/types.h.
16505         (char_directive): Change type of *arg_index fields to ssize_t.
16506         (char_directives): Change type of fields 'count', max_*_length to
16507         size_t.
16508         * lib/printf-parse.c: Include sys/types.h and xsize.h.
16509         (SSIZE_MAX): Define fallback value.
16510         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
16511         instead of 'int' where appropriate. Check a_allocated, d_allocated
16512         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
16513         * lib/vasnprintf.c: Include xsize.h.
16514         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
16515         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
16516         overflow. Avoid wraparound when converting a width or precision from
16517         decimal to binary.
16518
16519 2003-11-16  Bruno Haible  <bruno@clisp.org>
16520
16521         Update from GNU gettext.
16522         * lib/printf-parse.c: Generalize to it can be compiled for wide
16523         strings.
16524         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
16525         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
16526         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
16527         SNPRINTF): New macros.
16528         Don't include <alloca.h> if the file is used inside libintl.
16529         (local_wcslen): New function, for Solaris 2.5.1.
16530         (VASNPRINTF): Use it instead of wcslen.
16531
16532 2003-11-16  Bruno Haible  <bruno@clisp.org>
16533
16534         * lib/xsize.h (xmax): New function.
16535         (xsum, xsum3, xsum4): Declare as "pure" functions.
16536
16537 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16538
16539         * modules/xalloc (Files): Undo latest change, since xalloc.h
16540         no longer needs SIZE_MAX or PTRDIFF_MAX.
16541
16542 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16543
16544         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
16545         gl_PTRDIFF_MAX.
16546
16547 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16548
16549         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
16550         "return", to pacify some unknown compiler.  Problem reported
16551         by Joerg Schilling.
16552
16553 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16554
16555         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
16556         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
16557         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
16558         heuristic is just as accurate as far as we know, and it removes a
16559         dependency on size_max.m4 and ptrdiff_max.m4.
16560
16561 2003-11-11  Bruno Haible  <bruno@clisp.org>
16562
16563         * modules/xsize (Files): Add m4/size_max.m4.
16564         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
16565
16566 2003-11-11  Bruno Haible  <bruno@clisp.org>
16567
16568         * m4/size_max.m4: New file.
16569         * m4/ptrdiff_max.m4: New file.
16570         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
16571         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
16572         (gl_XALLOC): Invoke it.
16573
16574 2003-11-11  Bruno Haible  <bruno@clisp.org>
16575
16576         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
16577         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
16578         defined.
16579
16580 2003-11-10  Paul Eggert  <eggert@twinsun.com>
16581
16582         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
16583         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
16584         rejected some allocations of exactly SIZE_MAX - 2 bytes.
16585         From Bruno Haible.
16586         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
16587         not (size_t) -1, since it's defined here.
16588
16589 2003-11-09  Karl Berry  <karl@gnu.org>
16590
16591         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
16592
16593 2003-11-06  Paul Eggert  <eggert@twinsun.com>
16594
16595         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
16596         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
16597         Reject sizes of exactly SIZE_MAX bytes.
16598         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
16599         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
16600
16601 2003-11-05  Bruno Haible  <bruno@clisp.org>
16602
16603         * lib/xsize.h: Include limits.h, to avoid a possible collision with
16604         SIZE_MAX defined in <limits.h> on Solaris.
16605
16606 2003-11-04  Jim Meyering  <jim@meyering.net>
16607
16608         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
16609         variable names, rather than @VAR@.
16610         * modules/poll: Likewise.
16611
16612 2003-11-04  Bruno Haible  <bruno@clisp.org>
16613
16614         * modules/xsize: New file.
16615         * modules/linebreak: Depend on xsize.
16616         * MODULES.html.sh (func_all_modules): Add xsize.
16617
16618 2003-11-04  Bruno Haible  <bruno@clisp.org>
16619
16620         * m4/xsize.m4: New file.
16621
16622 2003-11-04  Bruno Haible  <bruno@clisp.org>
16623
16624         * lib/xsize.h: New file.
16625         * lib/linebreak.c: Include xsize.h.
16626         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
16627         argument for overflow.
16628         Suggested by Paul Eggert.
16629
16630 2003-11-03  Karl Berry  <karl@gnu.org>
16631
16632         * config/config.{guess,sub}: update from config.
16633
16634 2003-11-03  Jim Meyering  <jim@meyering.net>
16635
16636         * modules/userspec (lib_SOURCES): Add userspec.h.
16637         (Include): Add "userspec.h".
16638         Improve description.
16639
16640 2003-11-03  Jim Meyering  <jim@meyering.net>
16641
16642         * lib/userspec.c: Include "userspec.h".
16643         * lib/userspec.h: New file.
16644
16645 2003-11-03  Bruno Haible  <bruno@clisp.org>
16646
16647         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
16648
16649 2003-11-03  Bruno Haible  <bruno@clisp.org>
16650
16651         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
16652         available, to avoid (extremely rare) race condition.
16653         Suggested by Paul Eggert.
16654
16655 2003-11-02  Karl Berry  <karl@gnu.org>
16656
16657         * config/srclist.txt (vasprintf.c): sync broken, sigh.
16658
16659 2003-10-31  Paul Eggert  <eggert@twinsun.com>
16660
16661         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
16662         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
16663         (read_filesystem_list): Set and use me_type_malloced.
16664         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
16665         whatever the type happens to be), for brevity and consistency.
16666         Check for size calculation overflow on Alphas running OSF/1.
16667
16668 2003-10-31  Jim Meyering  <jim@meyering.net>
16669
16670         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
16671
16672         * lib/linebuffer.c: Include <string.h> for declaration of memset.
16673
16674 2003-10-30  Paul Eggert  <eggert@twinsun.com>
16675             Bruno Haible  <bruno@clisp.org>
16676
16677         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
16678         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
16679
16680 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16681
16682         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
16683         netbsd*-gnu*.  Suggested by Robert Millan.
16684
16685 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16686
16687         * modules/group-member: Depend on stdbool.
16688
16689 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16690
16691         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
16692
16693 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16694
16695         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
16696         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
16697         after the 'gnu' in these cases.  This fixes some bugs in the
16698         previous change, and is based on suggestions by Robert Millan.
16699
16700 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16701
16702         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
16703         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
16704         no longer needed.
16705         * lib/quotearg.c (quotearg_n_options): Use it.
16706         * lib/group-member.c: Include <stdbool.h>.
16707         (free_group_info): Arg is now const *; don't free arg.
16708         (get_group_info): Now returns bool and accepts struct group_info *,
16709         rather than returning a malloc'ed struct group_info *.
16710         All uses changed.  Check for overflow in internal size calculation.
16711
16712         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
16713         rather than xmalloc/xrealloc.
16714         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
16715         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
16716         conformance bug: the old code used a pointer after freeing the
16717         storage that it addressed.
16718         * lib/hash.c (hash_initialize): Simplify the code by using
16719         xalloc_oversized rather than doing it by hand.
16720         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
16721         the buffer preserved.  Use free and xmalloc instead.
16722         * lib/quotearg.c (quotearg_n_options): Likewise.
16723         Use a simpler test for size overflow.  Don't use xalloc_oversized
16724         because unsigned int might be wider than size_t (!); this suggests
16725         that we should switch from unsigned int to size_t for slot numbers.
16726
16727 2003-10-28  Paul Eggert  <eggert@twinsun.com>
16728
16729         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
16730         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
16731         NetBSD kernels.  Requested by Richard Stallman.
16732
16733 2003-10-27  Paul Eggert  <eggert@twinsun.com>
16734
16735         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
16736         to allocate the returned structure.  Do not allocate a subarray,
16737         as x2nrealloc will do that.
16738         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
16739         instead of xnrealloc.
16740         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
16741
16742 2003-10-27  Bruno Haible  <bruno@clisp.org>
16743
16744         * lib/stdbool_.h: Better support for BeOS.
16745
16746 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16747
16748         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
16749         now uses inline.
16750
16751 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16752
16753         * lib/xalloc.h (xalloc_oversized): New static inline function, for
16754         callers that want to do their own size-overflow checking.  Include
16755         <stdbool.h>, since xalloc_oversized returns bool.
16756         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
16757         to use xalloc_oversized.
16758
16759         Add two functions x2realloc, x2nrealloc, for programs that grow
16760         arrays dynamically by doubling their sizes.
16761         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
16762         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
16763         New functions.
16764
16765         Port to C99 semantics for 'inline' of external functions.
16766         Bug reported by Bruno Haible.
16767         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
16768         with the old contents of xnmalloc.
16769         (xnmalloc, xmalloc): Use it.
16770         (xnrealloc_inline): New static inline function,
16771         with the old contents of xnrealloc.
16772         (xnrealloc, xrealloc): Use it.
16773
16774         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
16775         that.
16776
16777 2003-10-26  Karl Berry  <karl@gnu.org>
16778
16779         * config/srclist.txt (COPYING.DOC): no longer available from
16780         /gd/gnuorg; don't know where the ultimate source is.
16781
16782 2003-10-25  Paul Eggert  <eggert@twinsun.com>
16783
16784         Fix several address-calculation bugs in the hash modules,
16785         plus some minor code cleanup.
16786
16787         * lib/hash.h: Include <stdbool.h>, for bool.
16788         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
16789         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
16790         hash_get_n_entries, hash_get_max_bucket_length,
16791         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
16792         hash_rehash): Use size_t rather than unsigned.
16793         * lib/hash.c (struct hash_table, hash_get_n_buckets,
16794         hash_get_n_buckets_used, hash_get_n_entries,
16795         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
16796         hash_get_entries, hash_do_for_each, hash_string, is_prime,
16797         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
16798         Likewise.
16799         (SIZE_MAX): Define if not defined.
16800         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
16801         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
16802         hash_print):
16803         Use const * when possible.
16804         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
16805         (check_tuning): Fix bug: if tuning parameters were very close to
16806         0 or 1, rounding errors could have caused subscript violations.
16807         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
16808         (hash_initialize): Add 'fail:' label
16809         to free table and return NULL, and use it to simplify code.
16810         Use calloc rather than clearing the storage ourself.
16811         (hash_initialize, hash_rehash): Check for arithmetic overflow in
16812         buffer size calculations.
16813         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
16814         Include <stddef.h>, for size_t.
16815         * lib/hash-pjw.c (hash_pjw): Likewise.
16816         Switch to method described by Bruno Haible.
16817         Include <limits.h>, for CHAR_BIT.
16818         (SIZE_BITS): New macro.
16819
16820 2003-10-23  Paul Eggert  <eggert@twinsun.com>
16821
16822         * m4/getline.m4 (AM_FUNC_GETLINE):
16823         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
16824         hosts.  Problem reported by Derek Robert Price in
16825         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
16826         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
16827         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
16828
16829 2003-10-21  Paul Eggert  <eggert@twinsun.com>
16830
16831         * lib/getndelim2.c (getndelim2): When size calculation overflows,
16832         ceiling the allocation at NMAX bytes rather than silently
16833         discarding input bytes before NMAX is reached.  This makes
16834         a difference only if NMAX exceeds SIZE_MAX / 2.
16835
16836         * lib/obstack.c: Merge from glibc.
16837         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
16838         Add libc_hidden_def (_obstack_newchunk).
16839         (_obstack_free) [! defined _LIBC]: Remove.
16840         [defined _LIBC]: Make a strong alias from obstack_free, rather than
16841         a clone of the function body.
16842         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
16843         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
16844
16845         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
16846         glibc.
16847         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
16848         arg to memcpy.
16849
16850         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
16851         (obstack_ptr_grow_fast, obstack_int_grow_fast):
16852         Don't use lvalue casts, as GCC plans to remove support for them
16853         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
16854         was also present in the non-GCC version, indicating that this
16855         code had always been buggy and had never been widely used.
16856         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
16857         Use the fast variant of each macro, rather than copying the
16858         definiens of the fast variant; that way, we'll be more likely to
16859         catch future bugs in the fast variants.
16860
16861 2003-10-20  Bruno Haible  <bruno@clisp.org>
16862
16863         * modules/wait-process: New file.
16864         * MODULES.html.sh (func_all_modules): Add wait-process.
16865
16866 2003-10-20  Bruno Haible  <bruno@clisp.org>
16867
16868         * m4/wait-process.m4: New file.
16869
16870 2003-10-20  Bruno Haible  <bruno@clisp.org>
16871
16872         * lib/wait-process.h: New file, from GNU gettext.
16873         * lib/wait-process.c: New file, from GNU gettext.
16874
16875 2003-10-19  Jim Meyering  <jim@meyering.net>
16876
16877         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
16878         HPUX 10.20.
16879
16880 2003-10-18  Karl Berry  <karl@gnu.org>
16881
16882         * config/config.guess: update from config.
16883
16884 2003-10-16  Paul Eggert  <eggert@twinsun.com>
16885
16886         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
16887         (getgroups): First arg is int, not size_t.
16888         Don't let 'free' mangle errno.
16889
16890 2003-10-16  Paul Eggert  <eggert@twinsun.com>
16891
16892         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
16893
16894 2003-10-16  Karl Berry  <karl@gnu.org>
16895
16896         * config/config.{guess,sub}: update from config.
16897
16898 2003-10-16  Jim Meyering  <jim@meyering.net>
16899
16900         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
16901         memcpy.
16902
16903 2003-10-15  Paul Eggert  <eggert@twinsun.com>
16904
16905         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
16906         (SIZE_MAX): Remove.
16907         (new_exclude, add_exclude_file): Initial size no longer needs to
16908         be a power of 2.
16909         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
16910         our own address arithmetic overflow checking.
16911
16912         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
16913         (fnmatch): Do not alloca more than 2000 wide characters;
16914         instead, use malloc for large buffers.
16915         Check for address arithmetic overflow, and return -1
16916         with errno set to ENOMEM in that case.
16917         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
16918         (NEW_PATTERN): Do not alloca more than 8000 bytes;
16919         instead, return -1.  Check for address arithmetic overflow.
16920
16921 2003-10-14  Paul Eggert  <eggert@twinsun.com>
16922
16923         Handle invalid suffixes and overflow independently, so that
16924         callers can treat them independently as needed.  Fix some bugs in
16925         suffix handling, e.g., "100k@" was not diagnosed as an invalid
16926         suffix for a human-readable blocksize.  The major caller-visible
16927         change is the addition of a new
16928         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
16929         that both overflow and suffix chars were found.
16930
16931         * lib/human.c (humblock): Don't check separately for invalid suffix
16932         char; that is xstrtoumax's job (now that its bug is fixed).
16933         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
16934         INTMAX_MAX]: New macros.
16935         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
16936         TYPE_MAXIMUM): New macros.
16937         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
16938         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
16939         if overflow occurs, as it's what __strtol does and it's more useful
16940         in practice.
16941         (__xstrtol): If __strtol reports some error other than ERANGE,
16942         reflect it to the caller as LONGINT_INVALID.  If it reports
16943         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
16944         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
16945         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
16946         value.
16947         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
16948         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
16949         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
16950         [defined UINTMAX_MAX]: New macros.
16951
16952 2003-10-14  Bruno Haible  <bruno@clisp.org>
16953
16954         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
16955
16956 2003-10-14  Bruno Haible  <bruno@clisp.org>
16957
16958         * m4/sig_atomic_t: New file, from GNU gettext.
16959         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
16960
16961 2003-10-14  Bruno Haible  <bruno@clisp.org>
16962
16963         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
16964         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
16965         Also use volatile where needed.
16966
16967 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16968
16969         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
16970         Change maintainer from Bruno Haible to 'all'.
16971
16972 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16973
16974         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
16975
16976 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16977
16978         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
16979         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
16980         and define in terms of the other primitives.
16981         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
16982         (SIZE_MAX): Define if not already defined.
16983         (array_size_overflow): New function.
16984         (xalloc_die): Abort instead of exiting if 'error' returns.
16985         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
16986         (xmalloc, xrealloc): Use them.
16987         (xcalloc): Check for address arithmetic overflow.
16988         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
16989         a bit faster than strcpy.
16990
16991 2003-10-10  Simon Josefsson  <jas@extundo.com>
16992
16993         * modules/argp (Depends-on): Add restrict and strcase.
16994
16995 2003-10-10  Simon Josefsson  <jas@extundo.com>
16996
16997         * m4/argp.m4: Add AC_C_INLINE.
16998
16999 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17000
17001         Merge getpass from libc, plus a few fixes.
17002
17003         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
17004         Include <stdbool.h>.
17005         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
17006         __fsetlocking to empty.
17007         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
17008         do include <bits/libc-lock.h>.
17009         Do not include <fcntl.h>; not needed.
17010         [_LIBC]: Include <wchar.h>.
17011         (NOTCANCEL_MODE): New macro.
17012         (flockfile, funlockfile) [_LIBC]: New macros.
17013         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
17014         [!_LIBC]: New macros.
17015         (call_fclose): New function.
17016         (getpass): Use it.  Save tty stream separately; this simplifies the
17017         code and makes it more reliable if stdin happens to equal stdout.
17018         Invoke __fsetlocking on tty.
17019         Handle thread cancellation if needed.
17020         Namespace cleanup (use __tcgetattr, __getline).
17021         Use bool for Booleans.
17022         [USE_IN_LIBIO]: Handle wide streams.
17023         [!_LIBC]: Unconditionally do the fseek, since we don't know what
17024         stream might go where.
17025
17026         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
17027         doesn't have to include <stdio.h> before us.
17028         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
17029         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
17030         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17031         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
17032         if not declared, so that we can use getpass.c code from libc without
17033         rewriting it.
17034         (flockfile, ftrylockfile, funlockfile): New macros.
17035
17036 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17037
17038         * modules/getpass: Depend on stdbool.
17039
17040 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17041
17042         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
17043
17044 2003-10-07  Karl Berry  <karl@gnu.org>
17045
17046         * config/config.{guess,sub}: update from config.
17047
17048 2003-10-06  Jim Meyering  <jim@meyering.net>
17049             Bruno Haible  <bruno@clisp.org>
17050
17051         This lets translators provide better translations for the
17052         "Written by ..." part of --version output.
17053         * lib/version-etc.h: Include stdarg.h.
17054         (version_etc_copyright): Declare as readonly.
17055         (version_etc): Make this function variadic with a NULL-terminated list
17056         of author name strings.
17057         (version_etc_va): New declaration.
17058         * lib/version-etc.c: Include stdarg.h, stdlib.h.
17059         (version_etc_copyright): Declare as readonly.
17060         (version_etc_va): New function. Provide a different translatable string
17061         for each possible number of authors < 10. Abbreviate when there are 10
17062         authors or more.
17063         (version_etc): Make this function variadic. Call version_etc_va.
17064         Suggestion from Gary V. Vaughan.
17065
17066         * lib/long-options.h (parse_long_options): Change prototype: the
17067         authors string is moved to the end and becomes variadic.
17068         * lib/long-options.c: Include stdarg.h.
17069         (parse_long_options): Make this function variadic, too.
17070         Call version_etc_va, not version_etc.
17071
17072 2003-10-06  Bruno Haible  <bruno@clisp.org>
17073
17074         * modules/version-etc-2: Remove file.
17075         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
17076
17077 2003-10-06  Bruno Haible  <bruno@clisp.org>
17078
17079         * modules/fatal-signal: New file.
17080         * MODULES.html.sh (func_all_modules): Add fatal-signal.
17081
17082 2003-10-06  Bruno Haible  <bruno@clisp.org>
17083
17084         * m4/fatal-signal.m4: New file.
17085         * m4/signalblocking.m4: New file, from GNU gettext.
17086
17087 2003-10-06  Bruno Haible  <bruno@clisp.org>
17088
17089         * lib/version-etc-2.h: Remove file.
17090         * lib/version-etc-2.c: Remove file.
17091
17092 2003-10-06  Bruno Haible  <bruno@clisp.org>
17093
17094         * lib/fatal-signal.h: New file, from GNU gettext.
17095         * lib/fatal-signal.c: New file, from GNU gettext.
17096
17097 2003-10-05  Paul Eggert  <eggert@twinsun.com>
17098
17099         * README: Rework advice for preventing empty .o files.
17100         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
17101         not <sys/types.h>.
17102
17103 2003-10-04  Karl Berry  <karl@gnu.org>
17104
17105         * lib/argp*: update from libc.
17106
17107 2003-10-04  Karl Berry  <karl@gnu.org>
17108
17109         * config/config.{guess,sub}: update from config.
17110
17111 2003-10-02  Bruno Haible  <bruno@clisp.org>
17112
17113         * modules/lchown (Include): Add lchown.h.
17114         * modules/time_r (Include): Use "..." syntax.
17115         * modules/xgetdomainname (Include): Add xgetdomainname.h.
17116
17117 2003-10-01  Simon Josefsson  <jas@extundo.com>
17118
17119         * MODULES.html.sh (func_all_modules): Move gethostname from section
17120         'based on' to section 'lacking' POSIX:2001.
17121
17122 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
17123
17124         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
17125         to output mode on the same stream.
17126
17127 2003-09-29  Paul Eggert  <eggert@twinsun.com>
17128
17129         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
17130         Fix arg typo in previous patch.
17131
17132 2003-09-28  Jim Meyering  <jim@meyering.net>
17133
17134         * lib/error.c: Correct cpp indentation.
17135
17136 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17137
17138         * modules/free: New file.
17139
17140 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17141
17142         * m4/free.m4: New file.
17143
17144 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17145
17146         * lib/minmax.h (MIN, MAX)
17147         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
17148         Omit the special code that used __typeof__, since we worry that
17149         it could be more trouble than it's worth.  See:
17150         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
17151         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
17152
17153         * lib/free.c: New file.
17154
17155 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
17156
17157         Trivial fixes to Makefile.am parts of module listings.
17158         * modules/strstr: Append strstr.h to lib_SOURCES.
17159         * modules/strcase: Likewise, for strcase.h.
17160
17161 2003-09-27  Karl Berry  <karl@gnu.org>
17162
17163         * config/mkinstalldirs: update from automake.
17164
17165 2003-09-26  Paul Eggert  <eggert@twinsun.com>
17166
17167         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
17168         (error_tail): Do not loop, reallocating temporary buffer, since
17169         the output cannot contain more wide characters than the input
17170         contains bytes, the size must be big enough already.  This avoids
17171         one potential size overflow calculation.  Check for size overflow
17172         when calculating temporary buffer size.  Free temporary buffer
17173         when done, if it was allocated with malloc; this plugs a memory
17174         leak.  Remove casts from void * to pointers, that are no longer
17175         needed now that we're assuming C89 or better.
17176
17177         Merge error changes from glibc.
17178
17179         * lib/error.c, error.h: Update copyright notice header to match glibc.
17180         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
17181         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
17182         Disable cancellation while printing error.
17183         * lib/error.h: Prepend __ to parameter names.
17184
17185 2003-09-26  Jim Meyering  <jim@meyering.net>
17186
17187         * lib/error.c (error_tail): Move some declarations
17188         into inner scope where the local variables are used.
17189
17190 2003-09-26  Bruno Haible  <bruno@clisp.org>
17191
17192         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
17193         stpncpy().
17194         Don't define stpncpy through config.h; it's now done through stpncpy.h.
17195
17196 2003-09-26  Bruno Haible  <bruno@clisp.org>
17197
17198         * lib/stpncpy.h (gnu_stpncpy): New declaration.
17199         (stpncpy): Define as alias for gnu_stpncpy.
17200         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
17201
17202 2003-09-25  Simon Josefsson  <jas@extundo.com>
17203
17204         * lib/xgetdomainname.h: New file.
17205         * lib/xgetdomainname.c: New file.
17206
17207 2003-09-25  Simon Josefsson  <jas@extundo.com>
17208             Bruno Haible  <bruno@clisp.org>
17209
17210         * modules/getdomainname: New file.
17211         * modules/xgetdomainname: New file.
17212         * MODULES.html.sh (func_all_modules): Add getdomainname,
17213         xgetdomainname.
17214
17215 2003-09-25  Simon Josefsson  <jas@extundo.com>
17216             Bruno Haible  <bruno@clisp.org>
17217
17218         * m4/getdomainname.m4: New file.
17219
17220 2003-09-25  Simon Josefsson  <jas@extundo.com>
17221             Bruno Haible  <bruno@clisp.org>
17222
17223         * lib/getdomainname.h: New file.
17224         * lib/getdomainname.c: New file.
17225
17226 2003-09-25  Karl Berry  <karl@gnu.org>
17227
17228         * lib/argp-fmtstream.c, argp-help.c: update from libc.
17229
17230 2003-09-25  Karl Berry  <karl@gnu.org>
17231
17232         * config/install-sh: update from automake.
17233
17234 2003-09-25  Bruno Haible  <bruno@clisp.org>
17235
17236         * modules/version-etc-2: New file, from modules/version-etc with
17237         modifications.
17238         * MODULES.html.sh (func_all_modules): Add version-etc-2.
17239
17240 2003-09-25  Bruno Haible  <bruno@clisp.org>
17241
17242         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
17243         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
17244
17245 2003-09-24  Simon Josefsson  <jas@extundo.com>
17246
17247         * modules/xgethostname: Add xgethostname.h.
17248
17249 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17250
17251         * lib/linebuffer.c (freebuffer): Don't free the argument, just
17252         the buffer associated with the argument.  Bug reported by
17253         Simon Josefsson.
17254
17255 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17256
17257         * README: Document assumptions that 'int' is at least 32 bits
17258         wide, that integer arithmetic is 2's complement without overflow,
17259         that there are no holes in integer values, that adding sizes of
17260         two nonoverlapping objects can't overflow, and that all-bits-zero
17261         yields scalar zero.  Fix spelling and capitalization typos.
17262
17263 2003-09-19  Karl Berry  <karl@gnu.org>
17264
17265         * lib/argp.h: update from libc.
17266
17267 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17268
17269         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
17270         to avoid spurious warnings like "AC_RUN_IFELSE was called before
17271         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
17272
17273 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17274
17275         * gnulib-tool: Use "test -h", not "test -L", for portability
17276         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
17277         (tags_regexp): Remove, since \| doesn't conform to POSIX.
17278         (sed_extract_prog): Issue s commands one-by-one, rather than
17279         using \| in one s command.
17280
17281 2003-09-16  Paul Eggert  <eggert@twinsun.com>
17282
17283         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
17284         input error, instead of returning NULL the next time we are called
17285         (and therefore losing track of errno).
17286
17287 2003-09-16  Bruno Haible  <bruno@clisp.org>
17288
17289         * gnulib-tool (func_create_testdir): Warn about duplicated
17290         dependencies.
17291
17292 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17293
17294         * modules/argmatch, modules/fatal, modules/obstack,
17295         modules/xalloc, modules/xgethostname: Sort dependencies by
17296         importance, not alphabetically.
17297
17298 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17299
17300         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
17301         fails, so that the caller gets the proper errno.
17302
17303         * lib/readutmp.c (read_utmp): Likewise.
17304         Check for fstat error.  Close stream and free storage
17305         when failing.
17306
17307 2003-09-14  Karl Berry  <karl@gnu.org>
17308
17309         * config/srclist.txt (strdup.c): disable for c89 changes.
17310
17311 2003-09-14  Jim Meyering  <jim@meyering.net>
17312
17313         * lib/getloadavg.c: Correct cpp indentation.
17314         * lib/strdup.c: Likewise.
17315         * lib/vasnprintf.c: Likewise.
17316
17317 2003-09-14  Bruno Haible  <bruno@clisp.org>
17318
17319         * modules/fwriteerror: New file.
17320         * MODULES.html.sh (func_all_modules): Add fwriteerror.
17321
17322 2003-09-14  Bruno Haible  <bruno@clisp.org>
17323
17324         * lib/fwriteerror.h: New file.
17325         * lib/fwriteerror.c: New file.
17326
17327 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17328
17329         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
17330         modules/xgethostname, modules/xalloc: Depend on exit.
17331
17332 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17333
17334         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
17335
17336         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
17337         and AC_MINIX, too, so that their extensions are available.
17338
17339         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
17340         This macro has been superseded by gl_BACKUPFILE.
17341
17342         More patches to assume C89 or better.
17343
17344         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
17345
17346         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
17347         unconditionally.
17348         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
17349         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
17350         Include <string.h>, <stdlib.h> unconditionally.
17351         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
17352         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
17353         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
17354         headers or for string.h.
17355         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
17356         or strtoul.
17357
17358         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
17359         headers.
17360         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
17361         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17362         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
17363         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
17364         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17365         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
17366         memcpy, memset.
17367         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
17368         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
17369         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
17370         strtol.
17371         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
17372         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
17373         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
17374         strtoul.
17375
17376 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17377
17378         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
17379         * lib/obstack.c [!defined _LIBC]: Likewise.
17380         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
17381         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
17382         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
17383
17384         More changes to assume C89 or better.
17385
17386         * lib/error.c (error_tail): Assume vprintf.
17387
17388         * lib/argmatch.c (getenv): Remove decl.
17389         * lib/progreloc.c (get_full_program_name): Define via prototype.
17390         * lib/setenv.c (clearenv): Likewise.
17391         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
17392         needed.
17393         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
17394         (malloc, memcpy): Remove decls.
17395         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
17396         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
17397         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17398         (memcpy): Remove macro.
17399         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
17400         (__P): Remove.  All uses removed.
17401         (PTR): Remove.  All uses changed to void *.
17402         (CHAR_BIT, NULL): Remove.
17403         (spaces, zeros, memset_space, memset_zero)
17404         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
17405         Remove.
17406         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
17407         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
17408         Define with prototype.
17409         Remove now-unnecessary prototype decl.
17410         (extra_args_spec): Assume ANSI C.  All uses changed.
17411         (extra_args_spec_iso): Remove.
17412         (my_strftime, emacs_strftimeu): Define via prototype.
17413         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
17414         unconditionally.
17415         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
17416         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
17417         (strtoul, strtol): Remove decls.
17418         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
17419         LONG_MAX): Remove.
17420         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17421         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
17422         (LOCALE_PARAM_PROTO): New macro.
17423         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
17424         (INTERNAL (strtol), strtol): Define with a prototype.
17425         (PARAMS): Remove.  All uses removed.
17426         * lib/tempname.c: Include <string.h> unconditionally.
17427         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
17428         * lib/xgethostname.c (main): Define with a prototype.
17429         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
17430         Include <stdlib.h> unconditionally.
17431         (calloc, malloc, realloc, free): Remove decls.
17432         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
17433         Include <stdlib.h> unconditionally.  Sort include file names.
17434         (strtod): Remove.
17435         (xstrtod): Define with a prototype.
17436         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
17437         (strtol, strtoul): Remove decls.
17438
17439 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17440
17441         More patches to assume C89 or better.
17442         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
17443         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
17444         string.h, memchr, STDC_HEADERS.
17445
17446 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17447
17448         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
17449         Include <stdlib.h>, <string.h> unconditionally.
17450         Remove now-unnecessary cast to char *.
17451         * lib/strnlen.c: Include <string.h> unconditionally.
17452         * lib/yesno.c (yesno): Define with a prototype.
17453
17454 2003-09-11  Bruno Haible  <bruno@clisp.org>
17455
17456         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
17457
17458 2003-09-10  Jim Meyering  <jim@meyering.net>
17459
17460         * lib/error.c: Correct indentation of cpp directives.
17461
17462 2003-09-10  Bruno Haible  <bruno@clisp.org>
17463
17464         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
17465         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
17466         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
17467         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
17468         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
17469         <stdlib.h> and <string.h> checks.
17470         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
17471         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
17472
17473 2003-09-10  Bruno Haible  <bruno@clisp.org>
17474
17475         * lib/strcspn.c: Include <string.h> unconditionally.
17476         * lib/strpbrk.c: Include <string.h> unconditionally.
17477         * lib/strstr.c: Include <string.h> unconditionally.
17478         * lib/unicodeio.c: Include <string.h> unconditionally.
17479         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
17480         * lib/unsetenv.c: Likewise.
17481         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
17482         * lib/yesno.c: Include <stdlib.h> unconditionally.
17483         (rpmatch): Add prototype.
17484
17485 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17486
17487         More patches to assume C89 or better.
17488         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
17489         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
17490         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
17491         or for string.h.
17492         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
17493         stdlib.h.
17494         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
17495         C headers.
17496         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
17497         string.h.
17498         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
17499         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
17500         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
17501         or for string.h.
17502         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
17503         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
17504         C headers.
17505         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
17506         memcpy.
17507         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
17508         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
17509         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
17510         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
17511         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
17512         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
17513         string.h, free.
17514         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
17515         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
17516         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
17517         C headers, or for string.h.
17518         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
17519         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
17520         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
17521         headers, memory.h, stdlib.h, string.h, strings.h.
17522         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
17523         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
17524         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
17525         strchr.
17526         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
17527         headers, memory.h, string.h.
17528         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
17529         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
17530         free.
17531         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
17532         headers.
17533         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
17534         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
17535         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
17536         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
17537         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
17538
17539 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17540
17541         More K&R removal.
17542
17543         * lib/acosl.c (main): Use a prototype.
17544         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
17545         tanl.c: Likewise.
17546
17547         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
17548
17549         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
17550         (getopt, etopt_long, getopt_long_only, _getopt_internal)
17551         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
17552         with a prototype.
17553         * lib/getopt.c (const): Remove macro.
17554         Include <string.h> unconditionally.
17555         (my_index): Remove; all uses changed to strchr.
17556         (strlen): Remove decl.
17557         (exchange): Remove forward decl; no longer needed.
17558         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
17559         Define with prototype.
17560         * lib/getopt1.c (const): Remove macro.
17561         (getopt_long, getopt_long_only, main): Define with prototype.
17562
17563         * lib/getugroups.c: Include <string.h> unconditionally.
17564
17565         * lib/getusershell.c: Include <stdlib.h> unconditionally.
17566         (getusershell, setusershell, endusershell, readname, main):
17567         Define with prototypes.
17568
17569         * lib/group-member.c: Include group-member.h first.
17570         Include <stdlib.h> unconditionally.
17571
17572         * lib/hard-locale.c: Include hard-locale.h first.
17573         Include <stdlib.h>, <string.h> unconditionally.
17574
17575         * lib/hash.c (free, malloc): Remove decls.
17576         Include <stdlib.h> unconditionally.
17577
17578         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
17579         (getenv): Do not declare.
17580
17581         * lib/idcache.c: Include <string.h> unconditionally.
17582
17583         * lib/long-options.c: Include long-options.h first, to test interface.
17584         Include <stdlib.h> unconditionally.
17585
17586         * lib/makepath.c: Include makepath.h first, to test interface.
17587         Include <stdlib.h> and <string.h> unconditionally.
17588
17589         * lib/linebuffer.c: Include <stdlib.h>.
17590         (free): Remove decl.
17591
17592         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
17593         stddef.h. rpl_malloc returns void *, not char *.
17594         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
17595         prototype.
17596
17597         * lib/md5.h: Include <limits.h> unconditionally.
17598         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
17599         (__P): Remove; all uses removed.
17600         * lib/md5.c: Include "md5.h" first.
17601         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
17602         md5_buffer, md5_process_bytes, md5_process_block):
17603         Define with prototypes.
17604         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
17605         * lib/sha.c: Include "sha.h" first.
17606         Include <stdlib.h>, <string.h> unconditionally.
17607
17608         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
17609         * lib/memcmp.c (__ptr_t): Likewise.
17610         * lib/memrchr.c (__ptr_t): Likewise.
17611         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
17612         Include <string.h> unconditionally.
17613         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
17614         * lib/memchr.c: Include <stdlib.h> unconditionally.
17615         * lib/memchr.c (LONG_MAX): Remove.
17616         * lib/memrchr.c (LONG_MAX): Likewise.
17617         * lib/memchr.c (__memchr): Define via a prototype.
17618         * lib/memrchr.c (__memrchr): Likewise.
17619         * lib/memcmp.c (__P): Remove, and remove all uses.
17620         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
17621         Remove forward decls; no longer needed.
17622         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
17623         Use types required by C89 in prototype.
17624
17625         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
17626         * lib/savedir.c: Likewise.
17627         * lib/mkdir.c (free): Remove decl.
17628         * lib/rmdir.c (rmdir): Define with a prototype.
17629         * lib/savedir.c: Include savedir.h first, to test interface.
17630
17631         * lib/mktime.c (STDC_HEADERS): Remove.
17632         Include <stdlib.h>, <string.h> unconditionally.
17633
17634         * lib/modechange.c: Include <stdlib.h> unconditionally.
17635         (malloc): Remove decl.
17636
17637         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
17638         (free): Remove decl.
17639
17640         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
17641         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
17642         (This type really should be intptr_t, but that's a C99ism.)
17643         (_obstack_memcpy): Remove: all uses changed to memcpy.
17644         Include <string.h> unconditionally.
17645         (struct obstack): Assume __STDC__ for types of members
17646         chunkfun, freefun, extra_arg.
17647         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
17648         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
17649         obstack_begin, obstack_specify_allocation,
17650         obstack_specify_allocation_with_arg, obstack_chunkfun,
17651         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
17652         Remove unprototyped decls and the macros that use them.
17653         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
17654         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
17655         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
17656         (defined __STDC__ && __STDC__)]:
17657         Remove nonprototyped code.
17658         Include <stdlib.h> unconditionally.
17659         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
17660         _obstack_allocated_p, _obstack_free, obstack_free,
17661         _obstack_memory_used, print_and_abort):
17662         Define using prototypes.
17663         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
17664         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
17665         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
17666         obstack_next_free, obstack_object_size, obstack_room) [0]:
17667         Remove unused, unprototyped code.
17668
17669         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
17670
17671         * lib/physmem.c (physmem_total, physmem_available, main): Define
17672         with prototypes.
17673
17674         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
17675         (main): Define with a prototype.
17676
17677         * lib/posixver.c (getenv): Remove decl.
17678
17679         * lib/putenv.c (malloc): Returns void *, not char *.
17680         Include <string.h> unconditionally.
17681         (strchr, memcpy, NULL): Do not define.
17682
17683         * lib/readtokens.c: Include readtokens.h first, to test interface.
17684         Include <stdlib.h>, <string.h> unconditionally.
17685         (init_tokenbuffer): Define with a prototype.
17686
17687         * lib/regex.c (PARAMS): Remove.  All uses removed.
17688         All uses of _RE_ARGS removed, too.
17689         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
17690         unconditionally.
17691         (bzero): Assume memset exists.
17692         (memcmp, memcpy, NULL): Remove.
17693         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
17694         char, or assignments to local vars of type signed char.
17695         (init_syntax_once, PREFIX(extract_number_and_incr),
17696         PREFIX(print_partial_compiled_pattern),
17697         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
17698         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
17699         PREFIX(regex_grow_registers), PREFIX(regex_compile),
17700         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
17701         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
17702         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
17703         wcs_compile_range, byte_compile_range, truncate_wchar,
17704         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
17705         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
17706         count_mbs_length, wcs_re_match_2_internal,
17707         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
17708         PREFIX(alt_match_null_string_p),
17709         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
17710         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
17711         regfree, PREFIX(extract_number)): Define with prototype.  Remove
17712         now-unnecessary declaration, if any.
17713         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
17714         regcomp, regexec):
17715         Remove now-unnecessary casts among pointer types.
17716         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
17717
17718         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
17719         (free): Remove decl.
17720
17721         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
17722
17723         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
17724         (free): Remove decl.
17725
17726         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
17727         * lib/xgetcwd.c: Likewise.
17728
17729         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
17730         (free): Remove decl.
17731
17732         * lib/strchrnul.c (strchrnul): Define with a prototype.
17733         Fix bug: c_in was not converted to char before searching.
17734
17735         The following changes are not K&R related:
17736
17737         * lib/group-member.h: Include <sys/types.h>, so that this file is
17738         self-contained.
17739         * lib/makepath.h: Likewise.
17740
17741         * lib/getusershell.c (readname, default_index, line_size, readname):
17742         Use size_t, not int, for sizes.
17743         (readname): If the size overflows, report an error instead of
17744         looping forever.
17745
17746 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17747
17748         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
17749         libc.
17750
17751 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17752
17753         * README: New section: portability guidelines.
17754
17755 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17756
17757         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
17758         C89 spec.
17759
17760 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17761
17762         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
17763
17764 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17765
17766         Assume C89 or better; remove K&R cruft.
17767         A few of these changes were first proposed by Derek Robert Price
17768         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
17769
17770         * lib/addext.c: Include <string.h> unconditionally.
17771         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
17772         Don't declare getenv or malloc.
17773
17774         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
17775         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
17776         (NULL): Remove.
17777         (find_stack_direction, alloca): Use prototypes.
17778
17779         * lib/atexit.c (atexit): Define using a prototype.
17780
17781         * lib/basename.c, dirname.c, stripslash.c:
17782         Include <string.h> unconditionally.
17783
17784         * lib/bcopy.c: Include <stddef.h>.
17785         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
17786
17787         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
17788
17789         * lib/error.h (error, error_at_line, error_print_progname)
17790         [! (defined (__STDC__) && __STDC__)]: Remove decls.
17791         * lib/error.c: Include error.h first, to check interface.
17792         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
17793         (VA_START): Remove; all uses changeed to va_start.
17794         (exit, strerror): Remove decls.
17795         (error_print_progname): Prototype uncondionally.
17796         Don't include <errno.h>; no longer needed.
17797         (private_strerror): Remove.
17798         (error_tail): Always define.
17799         (error, error_at_line): Assume C89 or better; always use prototypes.
17800         * lib/fatal.c: Include "fatal.h" first, to test interface.
17801         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
17802         (VA_START): Remove; all uses changed to va_start.
17803         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
17804         this case.
17805         (exit): Remove decl.
17806         (fatal): Prototype unconditionally.  Assume va_start works.
17807         Abort at end, to pacify gcc.
17808
17809         * lib/euidaccess.c (main): Define with a prototype.
17810
17811         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
17812
17813         * lib/exitfail.c: Include <stdlib.h> unconditionally.
17814
17815         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
17816         prototypes.
17817         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
17818         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
17819         (getenv): Remove decl.
17820         (fnmatch): Define using a prototype.
17821         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
17822         (FCT): Define using a prototype.
17823
17824         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
17825
17826         * lib/gethostname.c: Include <stddef.h>.
17827         (gethostname): Define with prototype.  Length is size_t, not int.
17828
17829 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17830
17831         Assume C89 or better; remove K&R cruft.
17832         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
17833         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
17834         string.h, getenv, malloc.
17835         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
17836         headers.
17837         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
17838         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
17839         do not check for strerror.
17840         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
17841         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
17842         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
17843         do not check for doprnt or vprintf.
17844         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
17845         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
17846
17847 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17848
17849         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
17850         getversion.c should have been removed then, but was accidentally
17851         preserved.
17852
17853         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
17854         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
17855
17856 2003-09-08  Karl Berry  <karl@gnu.org>
17857
17858         * config/config.sub, config.guess, srclistvars.sh: update from savannah
17859                 config, forget about prep.
17860
17861         * config/depcomp, missing: update from automake.
17862
17863 2003-09-07  Paul Eggert  <eggert@twinsun.com>
17864
17865         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
17866         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
17867
17868 2003-09-07  Paul Eggert  <eggert@twinsun.com>
17869
17870         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
17871         copy_tm_result.  Bug reported by Simon Josefsson in
17872         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
17873
17874 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17875
17876         * m4/time_r.m4: New file.
17877         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
17878         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
17879         is. Check for timegm declaration.
17880         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
17881         Do not check for gmtime_r.
17882         Replace mktime if __mktime_internal does not exist and if mktime
17883         hasn't been replaced already.
17884
17885 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17886
17887         * lib/time_r.c, lib/time_r.h: New files.
17888
17889         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
17890         __localtime_r.
17891         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
17892         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
17893
17894         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
17895         __gmtime_r.
17896         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
17897         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
17898         Include <time_r.h>.
17899
17900         * lib/timegm.c: Switch to glibc implementation, with the following
17901         changes:
17902         [defined HAVE_CONFIG_H]: Include <config.h>.
17903         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
17904         (__mktime_internal) [!defined _LIBC]: New decl.
17905         (__gmtime_r) [!defined _LIBC]: New macro and function.
17906         (timegm): Use a prototype, since gnulib assumes C89.
17907         Do not bother declaring tmp to be const, as it's not really usefu.
17908         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
17909         (timegm): Declare only if HAVE_DECL_TIMEGM.
17910
17911 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17912
17913         * MODULES.html.sh (func_all_modules): Add time_r.
17914         * modules/time_r: New file.
17915         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
17916         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
17917
17918 2003-09-03  Paul Eggert  <eggert@twinsun.com>
17919
17920         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
17921         Bug reported by Lute Kamstra in
17922         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
17923
17924         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
17925         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
17926         course with correspondingly smaller numbers for tomorrow and
17927         yesterday.  From Tadayoshi Funaba.  Originally installed into
17928         sh-utils on 1999-08-07, but the patch got lost (I guess during the
17929         coreutils merge?).
17930
17931 2003-08-31  Simon Josefsson  <jas@extundo.com>
17932
17933         * modules/timegm: New file.
17934         * MODULES.html.sh (func_all_modules): Add timegm.
17935
17936 2003-08-31  Simon Josefsson  <jas@extundo.com>
17937
17938         * m4/timegm.m4: New file.
17939
17940 2003-08-31  Simon Josefsson  <jas@extundo.com>
17941
17942         * lib/timegm.h: New file.
17943         * lib/timegm.c: New file.  Based on
17944         wget-1.8.2/src/http.c:mktime_from_utc.
17945
17946 2003-08-31  Karl Berry  <karl@gnu.org>
17947
17948         * lib/argp.h: update from libc.
17949
17950 2003-08-28  Bruno Haible  <bruno@clisp.org>
17951
17952         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
17953         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
17954         followed by '#define fnmatch fnmatch_posix' gives an error.
17955
17956 2003-08-28  Bruno Haible  <bruno@clisp.org>
17957
17958         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
17959         warning on QNX, which defines O_BINARY to 000000.
17960
17961 2003-08-27  Jim Meyering  <jim@meyering.net>
17962
17963         * m4/mkstemp.m4: Require that the system mkstemp be able to create
17964         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
17965         would fail after 32.  Reported by Danny Levinson.  Details here:
17966         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
17967
17968 2003-08-24  Bruno Haible  <bruno@clisp.org>
17969
17970         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
17971         MSVC7 <stdio.h> is included later.
17972
17973 2003-08-22  Simon Josefsson  <jas@extundo.com>
17974
17975         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
17976
17977 2003-08-20  Karl Berry  <karl@gnu.org>
17978
17979         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
17980
17981 2003-08-20  Bruno Haible  <bruno@clisp.org>
17982
17983         * modules/progname: New file.
17984         * MODULES.html.sh (func_all_modules): Add progname.
17985
17986 2003-08-20  Bruno Haible  <bruno@clisp.org>
17987
17988         * lib/progname.h: New file, from GNU gettext.
17989         * lib/progname.c: New file, from GNU gettext.
17990         * lib/progreloc.c: New file, from GNU gettext.
17991
17992 2003-08-19  Jim Meyering  <jim@meyering.net>
17993
17994         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
17995         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
17996
17997 2003-08-19  Bruno Haible  <bruno@clisp.org>
17998
17999         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
18000         more.
18001
18002 2003-08-19  Bruno Haible  <bruno@clisp.org>
18003
18004         * lib/xstrdup.c: Assume <string.h> exists.
18005
18006 2003-08-18  Paul Eggert  <eggert@twinsun.com>
18007
18008         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
18009         in makefile rules.
18010
18011 2003-08-18  Jim Meyering  <jim@meyering.net>
18012
18013         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
18014         * m4/lib-ld.m4: Likewise.
18015
18016 2003-08-18  Jim Meyering  <jim@meyering.net>
18017
18018         * lib/setenv.h: Indent nested cpp directive.
18019         * lib/vasnprintf.c: Remove trailing blanks.
18020
18021 2003-08-17  Simon Josefsson  <jas@extundo.com>
18022
18023         * modules/xstrndup: New file.
18024         * MODULES.html.sh (func_all_modules): Add xstrndup.
18025
18026 2003-08-17  Simon Josefsson  <jas@extundo.com>
18027
18028         * modules/argp: Fix autoconf macro name. Add more dependencies.
18029
18030 2003-08-17  Simon Josefsson  <jas@extundo.com>
18031
18032         * m4/xstrndup.m4: New file.
18033
18034 2003-08-17  Simon Josefsson  <jas@extundo.com>
18035
18036         * m4/argp.m4: New file.
18037
18038 2003-08-17  Simon Josefsson  <jas@extundo.com>
18039             Bruno Haible  <bruno@clisp.org>
18040
18041         * lib/xstrndup.h: New file.
18042         * lib/xstrndup.c: New file.
18043
18044 2003-08-17  Bruno Haible  <bruno@clisp.org>
18045
18046         * modules/strndup (Files, Include): Add lib/strndup.h.
18047
18048 2003-08-17  Bruno Haible  <bruno@clisp.org>
18049
18050         * modules/euidaccess (Files): Add lib/euidaccess.h.
18051
18052 2003-08-17  Bruno Haible  <bruno@clisp.org>
18053
18054         * lib/strndup.h: New file.
18055
18056 2003-08-17  Bruno Haible  <bruno@clisp.org>
18057
18058         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
18059         like AC_GNU_SOURCE.
18060         * modules/extensions (configure.ac): Comment out the invocation of
18061         gl_USE_SYSTEM_EXTENSIONS.
18062
18063 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18064
18065         Merges from coreutils, etc.
18066         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
18067         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
18068         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
18069         fixing a typo.
18070         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
18071         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
18072
18073 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18074
18075         Document merge from coreutils.
18076         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
18077         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
18078         * modules/utime: Add m4/utimes-null.m4.
18079
18080 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18081
18082         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
18083         space, undoing this 2003-08-12 change:
18084         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18085
18086 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18087
18088         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
18089         strtoul.c from libc, undoing this 2003-08-12 change:
18090         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18091
18092 2003-08-16  Jim Meyering  <jim@meyering.net>
18093
18094         Merges from coreutils.
18095         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
18096         prefix.  Adjust cache variables similarly.  Create 500 rather than
18097         just 300 files, to exercise bug on Darwin6.5, too.
18098         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
18099         $missing_dir.
18100         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
18101         AM_SYS_POSIX_TERMIOS.
18102         Reported by mkc@mathdogs.com.
18103         Also change use of $am_cv_sys_posix_termios
18104         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
18105         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
18106         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
18107         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
18108         in /proc/mounts until it finds one with matching device number.  This
18109         is unnecessary when the FILE argument *is* a mount point.  No stat call
18110         is necessary in that case.  So, disable the statvfs-testing code on
18111         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
18112         as RedHat bug# 84846.
18113         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18114         to 1MB, so as not to render systems with no stack size limit (e.g.,
18115         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18116         Include <unistd.h>.  On some systems,
18117         it is required for the definition of _SC_PAGESIZE.
18118
18119 2003-08-16  Jim Meyering  <jim@meyering.net>
18120
18121         Merge from coreutils.
18122         * lib/xstrtoimax.c: #else #if -> #elif.
18123         * lib/xstrtoumax.c: Likewise.
18124
18125 2003-08-16  Jim Meyering  <jim@meyering.net>
18126
18127         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
18128         * m4/utimes.m4: Removed.
18129         * m4/utimes-null.m4: Renamed from utimes.m4.
18130
18131         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18132         to 1MB, so as not to render systems with no stack size limit (e.g.,
18133         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18134         Include <unistd.h>.  On some systems,
18135         it is required for the definition of _SC_PAGESIZE.
18136
18137 2003-08-16  Jim Meyering  <jim@meyering.net>
18138         and Paul Eggert  <eggert@cs.ucla.edu>
18139
18140         Merges from coreutils, etc.
18141
18142         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
18143         using the latest version from cvs.  This avoids problems with #line
18144         directives using a vendor (Sun) compiler.
18145         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
18146         Don't set GETGROUPS_LIB here; now it's
18147         done via getgroups.m4's wrapper function.
18148         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
18149         rather than just in sh-util/configure.in, so that the
18150         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
18151         same.
18152         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
18153         AC_FUNC_GETLOADAVG where to find getloadavg.c.
18154         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
18155         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
18156         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
18157         Remove code that is now done by the newly-required macros.
18158         Append $(EXEEXT) to DF_PROG.
18159         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
18160         Do not invoke or require the following here,
18161         since prereq.m4 or some gnulib .m4 now does this for us:
18162         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
18163         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
18164         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
18165         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
18166         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
18167         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
18168         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
18169         AC_FUNC_OBSTACK.
18170         Do not replace the following functions, as this is now the job
18171         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
18172         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
18173         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
18174         atexit getpass, strdup, getpagesize.
18175         Replace 'raise'.
18176         Do not check for the following functions, as this is now the job
18177         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
18178         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
18179         setregid.
18180         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
18181         Check for sys/sysctl.h.
18182         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
18183         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
18184         of checking for ssize_t ourselves.
18185
18186         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
18187         Require every macro that gnulib/modules/* suggests for us.
18188         (jm_PREREQ_ADDEXT): New macro.
18189         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
18190         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
18191
18192         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
18193         (gl_PHYSMEM): Use it.
18194         Also check for `table' function.
18195         Check for new headers and functions.
18196         Add check for sys/sysmp.h.
18197         With suggestions from Kaveh Ghazi.
18198         Ignore headers that are present but cannot be compiled.  This
18199         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
18200         C 5.4.
18201
18202 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18203
18204         Document merge from coreutils.
18205         * modules/userspec: Depend on posixver.
18206         * modules/strftime: Depend on tzset.
18207
18208 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18209
18210         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
18211         rather than tab, after '#' in shell-script copyright notices.
18212         Suggested by Bruno Haible.
18213
18214 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18215
18216         * config/srclist-update: Use three spaces, rather than tab, after '#'
18217         in shell-script copyright notices.  Suggested by Bruno Haible.
18218         Remove unnecessary parenthesization in regular expression.
18219
18220 2003-08-15  Jim Meyering  <jim@meyering.net>
18221
18222         Merge from coreutils.
18223         * lib/xgethostname.c: Include <stdlib.h>.
18224         (xghostname): Don't exit for anything other than memory-related
18225         failure; just return NULL.
18226         * lib/userspec.c: Include "posixver.h".
18227         (parse_user_spec): Accept `.' as a separator only
18228         in pre-POSIX-200112 mode.
18229         * lib/strtoimax.c: Use #elif rather than #else #if.
18230         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
18231         Remove function, now that we can rely on a working tzset function.
18232         [!_LIBC]: Ensure that the required autoconf test has been run.
18233         [!defined _NL_CURRENT && HAVE_STRFTIME]:
18234         Use underlying_strftime for %r.
18235         * lib/sha.c: Merge in some clean-up and optimization changes from
18236         glibc.
18237         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
18238         Ensure that it is a multiple of 64.
18239         Rearrange loop exit tests so as to avoid performing an
18240         additional fread after encountering an error or EOF.
18241         * lib/realloc.c: Update copyright date.
18242
18243 2003-08-15  Jim Meyering  <jim@meyering.net>
18244         and Paul Eggert  <eggert@twinsun.com>
18245
18246         Merge from coreutils.
18247         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
18248         member but strut utmpx does not.  Needed for AIX 4.3.3.
18249         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
18250
18251 2003-08-15  Jim Meyering  <jim@meyering.net>
18252         and Paul Eggert  <eggert@cs.ucla.edu>
18253
18254         Merges from coreutils, etc.
18255         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
18256         Require gl_FUNC_TZSET_CLOBBER.
18257         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
18258         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
18259         members.
18260
18261 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18262
18263         Help the merge from coreutils.
18264         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
18265         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
18266         * m4/tzset.m4: Use it too.
18267
18268 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18269
18270         * modules/tzset: New file.
18271
18272 2003-08-14  Jim Meyering  <jim@meyering.net>
18273
18274         Merges from coreutils.
18275         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
18276         variable names, rather than @FNMATCH_H@.
18277         * modules/alloca: Likewise for $(ALLOCA_H).
18278
18279         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
18280         the three copies of the literal target, `fnmatch.h'.
18281         * modules/alloca (alloca.h): Likewise.
18282
18283 2003-08-14  Jim Meyering  <jim@meyering.net>
18284
18285         Merge from coreutils.
18286         * m4/tzset.m4: New file.
18287         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
18288         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
18289         otherwise, AIX 5.1 systems would end up using the latter.
18290         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
18291         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
18292         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
18293         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
18294
18295 2003-08-14  Jim Meyering  <jim@meyering.net>
18296
18297         Merge from coreutils.
18298         * lib/obstack.h: Whitespace changes.
18299         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
18300         and xcalloc return values.
18301         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
18302         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
18303         hang on OSF/1 5.1 for DIR on both local and remote file systems.
18304         Reported by (and fix confirmed by) Nelson H. F. Beebe.
18305         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18306         error from mntctl.
18307         Use mntctl's return value to drive the entry-processing loop, since
18308         we can't rely on the value of the vmt_length member in the last
18309         entry.  On some systems doing so could result in exhausting
18310         virtual memory.  Based in part on a patch from Mike Jetzer.
18311
18312 2003-08-14  Jim Meyering  <jim@meyering.net>
18313         and Paul Eggert  <eggert@twinsun.com>
18314
18315         Merges from coreutils, plus other fixes.
18316         * lib/physmem.c: Merge in portability changes from gcc/libiberty
18317         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
18318         for credits and details.  Thanks to Kaveh Ghazi for helping
18319         to keep these files in sync.
18320         (ARRAY_SIZE): Define it.
18321         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
18322         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
18323         (memcasecmp): Don't assume size_t fits in unsigned int.
18324         Remove casts and duplicate code.
18325         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
18326         (memcpy): Remove definition.
18327         Merge in some clean-up and optimization changes from glibc.
18328         [BLOCKSIZE]: Move definition to top of file.
18329         Ensure that it is a multiple of 64.
18330         Rearrange loop exit tests so as to avoid performing an
18331         additional fread after encountering an error or EOF.
18332         * lib/md5.h (md5_uintptr): Define.
18333         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
18334         return to the initial working directory.  Preserve errno
18335         for caller.
18336         * lib/idcache.c: Include "xalloc.h".
18337         (xmalloc, xrealloc): Remove decls.
18338         (getuser): Remove casts no longer required in C89.
18339         * lib/human.c: Include stdio.h, for sprintf.
18340         * lib/group-member.c: Include "xalloc.h".
18341         (xmalloc, xrealloc): Remove decls.
18342         (get_group_info): Remove casts no longer required in C89.
18343         * lib/getusershell.c (readname): Remove casts no longer required in
18344         C89.
18345         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
18346         * lib/getline.c: Whitespace fix, from coreutils.
18347
18348 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18349
18350         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
18351         Check for isascii.
18352
18353         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18354         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18355         Undo previous (whitespace-only) change.
18356
18357 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18358
18359         * lib/exclude.c: Include <ctype.h>
18360         (IN_CTYPE_DOMAIN): New macro.
18361         (is_space): New fn.
18362         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
18363         and empty lines.
18364
18365         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18366         Undo previous (whitespace-only) change.
18367
18368 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18369
18370         * config/srclist-update: Change update back to the old behavior,
18371         leaving whitespace alone.  Use one 'sed' command rather than a
18372         pipeline.
18373         (fixlicense): Now a variable, not a function.
18374         (remove_trailing_blanks): Remove.
18375         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
18376         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18377         Undo previous (whitespace-only) change.
18378
18379 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18380
18381         Merge from coreutils.
18382         * modules/euidaccess: Add lib_SOURCES, include for new
18383         file euidaccess.h
18384
18385 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18386
18387         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18388         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18389         Normalize leading white space and remove trailing white space.
18390
18391         Merge from coreutils
18392         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
18393
18394         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
18395         0.12.1.  These files are now being upgraded automatically by
18396         ../config/srclist-update.
18397
18398 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18399
18400         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18401         Normalize leading white space and remove trailing white space.
18402         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
18403         notice, as per ../config/srclist-update.
18404
18405         Merge from coreutils.
18406         * lib/euidaccess.h: New file.
18407         * lib/euidaccess.c: Include it.
18408         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
18409         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
18410         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
18411
18412 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18413
18414         * config/srclist-update: Add copyright notice.
18415         (remove_id_lines, remove_trailing_blanks): New constants.
18416         (fixfile): Use them to normalize spacing a bit in copied files.
18417         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18418         Normalize leading white space and remove trailing white space.
18419
18420         * config/texinfo.tex: Sync with texinfo.
18421
18422         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
18423         strtoul.c from libc, to merge coreutils whitespace changes.
18424
18425         * config/srclist.txt: Get the following m4 files from gettext:
18426         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
18427         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
18428         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
18429         wint_t.m4.
18430
18431 2003-08-12  Karl Berry  <karl@gnu.org>
18432
18433         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
18434         been made.
18435
18436 2003-08-11  Paul Eggert  <eggert@twinsun.com>
18437
18438         * modules/gnu-source, m4/gnu-source.m4:
18439         Remove; we're assuming Autoconf 2.54 or later now.
18440         Suggested by Bruno Haible.
18441         * MODULES.html.sh (func_all_modules): Remove gnu-source.
18442
18443 2003-08-11  Bruno Haible  <bruno@clisp.org>
18444
18445         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
18446
18447 2003-08-11  Bruno Haible  <bruno@clisp.org>
18448
18449         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
18450         (vasnprintf): Use it instead of wcslen.
18451
18452 2003-08-11  Bruno Haible  <bruno@clisp.org>
18453
18454         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
18455         value to ensure that _Bool promotes to int. Use #define for _Bool when
18456         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
18457
18458 2003-08-10  Karl Berry  <karl@gnu.org>
18459
18460         * lib/regex.h: update from libc (whitespace fix).
18461
18462 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18463
18464         Merge some files from coreutils.  These changes were
18465         originally made by Jim Meyering.
18466         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
18467         many older Unixes require this.
18468         * lib/alloca.c (alloca): Remove cast to argument of free;
18469         no longer needed in C89.
18470         * lib/alloca_.h, regex.h: Fix white space to match
18471         what GNU indent does.
18472
18473 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18474
18475         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
18476         apparently Emacs's Unicode mode got confused before my 2003-08-05
18477         checkin.
18478
18479 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18480
18481         * m4/extensions.m4: New file.
18482         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
18483         Require gl_USE_SYSTEM_EXTENSIONS.
18484         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
18485         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
18486
18487 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18488
18489         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
18490         * modules/extensions, modules/gnu-source: New files.
18491         * modules/timespec, modules/unlocked-io: Depend on extensions.
18492
18493 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18494
18495         * modules/restrict: New file.
18496         * MODULES.html.sh (func_all_modules): Add restrict.
18497         * modules/regex: Depend on restrict.
18498
18499 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18500
18501         * m4/restrict.m4: New file.
18502         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
18503
18504 2003-08-07  Bruno Haible  <bruno@clisp.org>
18505
18506         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
18507         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
18508
18509 2003-08-07  Bruno Haible  <bruno@clisp.org>
18510
18511         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
18512         makes the module 'getndelim2' compatible with the module 'getline'.
18513
18514 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18515
18516         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
18517         byte with "\201" to avoid glitches when editing that source file
18518         with multi-gnome-terminal.
18519
18520 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18521
18522         * lib/bumpalloc.h: Remove.
18523
18524 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18525
18526         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
18527         * modules/bumpalloc: Remove.
18528
18529 2003-08-04  Paul Eggert  <eggert@twinsun.com>
18530
18531         * lib/getloadavg.c: Change copyright notice and spacing to conform to
18532         GNU coding style.
18533
18534         Merge from coreutils.
18535         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
18536         1. From glibc.
18537         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
18538         from Karl Berry, implemented by Jim Meyering.
18539         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
18540         from Dmitry V. Levin.
18541         Remove anachronistic cast of xrealloc.
18542         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
18543         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
18544         type. Otherwise, it wouldn't compile with at least /bin/cc on
18545         ymp-cray-unicos9.0.2.X.
18546         Combine two mostly-identical uses of alloca into one.
18547         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
18548
18549 2003-08-04  Dave Love  <d.love@dl.ac.uk>
18550
18551         [From Emacs.]
18552
18553         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
18554         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
18555         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
18556         obsolete NLIST_NAME_UNION.
18557         [__GNU__]: Undef BSD and FSCALE.
18558         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
18559
18560 2003-08-03  Paul Eggert  <eggert@twinsun.com>
18561
18562         * lib/stdbool_.h (_Bool): Make it signed char, instead of
18563         an enum type, so that it's guaranteed to promote to int.  See:
18564         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
18565
18566 2003-08-03  Karl Berry  <karl@gnu.org>
18567
18568         * config/depcomp: update from automake.
18569
18570 2003-07-31  Paul Eggert  <eggert@twinsun.com>
18571
18572         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
18573         (strerror): Don't assume that a printable int fits in 14 bytes.
18574
18575 2003-07-31  Bruno Haible  <bruno@clisp.org>
18576
18577         * modules/getpass-gnu: New file.
18578         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
18579
18580 2003-07-31  Bruno Haible  <bruno@clisp.org>
18581
18582         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
18583
18584 2003-07-24  Karl Berry  <karl@gnu.org>
18585
18586         * config/missing: update from automake.
18587
18588 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
18589             Bruno Haible  <bruno@clisp.org>
18590
18591         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
18592         * lib/getline.c (getline, getdelim): Likewise.
18593         Remove _GNU_SOURCE define; now it's defined in config.h through
18594         m4/getline.m4.
18595
18596 2003-07-23  Karl Berry  <karl@gnu.org>
18597
18598         * config/config.sub: update from prep.
18599
18600 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18601
18602         * modules/xalloc (Depends-on): Add exitfail.
18603         * modules/xmemcoll: Likewise.
18604
18605 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18606
18607         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
18608         over-parenthesization in macros.
18609
18610         Sync with coreutils.
18611
18612         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
18613         required by C99.
18614
18615         Use `exit_failure' for xalloc and xmemcoll instead of their own
18616         private exit-failure variables.
18617         * lib/xalloc.h (xalloc_exit_failure): Remove.
18618         * lib/xmalloc.c: Likewise.  Include exitfail.h.
18619         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
18620         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
18621         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
18622         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
18623
18624 2003-07-20  Jim Meyering  <jim@meyering.net>
18625
18626         * modules/closeout (Depends-on): Add exitfail.
18627         Suggestion from Bruno Haible.
18628
18629 2003-07-19  Karl Berry  <karl@gnu.org>
18630
18631         * config/config.sub: update from prep.
18632
18633 2003-07-18  Paul Eggert  <eggert@twinsun.com>
18634
18635         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
18636         Remove.
18637         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
18638         to test that it can stand by itself.  Include "exitfail.h".
18639         Clients should set exit_failure instead.
18640         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
18641
18642 2003-07-18  Bruno Haible  <bruno@clisp.org>
18643
18644         * modules/getndelim2: New file.
18645         * modules/getline: Share files with module getndelim2.
18646         * modules/getnline: Depend on getndelim2 instead of sharing files with
18647         it. Add getnline.c to lib_SOURCES.
18648         * MODULES.html.sh (func_all_modules): Add getndelim2.
18649
18650 2003-07-18  Bruno Haible  <bruno@clisp.org>
18651
18652         * m4/getndelim2.m4: New file.
18653         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
18654         invoke gl_PREREQ_GETNDELIM2.
18655         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
18656         gl_PREREQ_GETNDELIM2.
18657         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
18658         gl_GETNDELIM2.
18659
18660 2003-07-18  Bruno Haible  <bruno@clisp.org>
18661
18662         * lib/getndelim2.h: New file.
18663         * lib/getndelim2.c: Make into a module of its own. Include config.h,
18664         getndelim2.h.
18665         (getndelim2): Make non-static. Change return type to ssize_t.
18666         * lib/getline.h: Change argument names.
18667         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
18668         * lib/getnline.c: Include getndelim2.h.
18669
18670 2003-07-18  Andreas Schwab  <schwab@suse.de>
18671
18672         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
18673
18674 2003-07-17  Karl Berry  <karl@gnu.org>
18675
18676         * config/config.sub: update from prep.
18677
18678 2003-07-17  Bruno Haible  <bruno@clisp.org>
18679
18680         * modules/getnline: New file.
18681         * modules/getline: Add lib/getndelim2.c to source file list.
18682         * MODULES.html.sh (func_all_modules): Add getnline.
18683
18684 2003-07-17  Bruno Haible  <bruno@clisp.org>
18685
18686         * m4/getnline.m4: New file.
18687
18688 2003-07-17  Bruno Haible  <bruno@clisp.org>
18689
18690         * m4/Makefile.am.in: Remove file.
18691         * m4/Makefile.am: Remove file.
18692         * m4/Makefile.in: Remove file.
18693
18694 2003-07-17  Bruno Haible  <bruno@clisp.org>
18695
18696         * lib/getnline.h: New file.
18697         * lib/getnline.c: New file.
18698         * lib/getndelim2.c: New file, extracted from getline.c.
18699         (getndelim2): Renamed from getdelim2, with added nmax argument.
18700         * lib/getline.c: Include getndelim2.c.
18701         (getdelim2): Moved out to getndelim2.c.
18702         (getline, getdelim): Update.
18703
18704 2003-07-17  Bruno Haible  <bruno@clisp.org>
18705
18706         * lib/Makefile.am: Remove file.
18707         * lib/Makefile.in: Remove file.
18708
18709 2003-07-17  Bruno Haible  <bruno@clisp.org>
18710
18711         * configure.in: Remove file.
18712         * Makefile.in: Remove file.
18713
18714 2003-07-17  Bruno Haible  <bruno@clisp.org>
18715
18716         * MODULES.html.sh: Put the </BODY> right before </HTML>.
18717
18718 2003-07-16  Karl Berry  <karl@gnu.org>
18719
18720         * config/srclist-update: was running fixlicense twice, which caused
18721                 texinfo.tex to be nullified for some reason.  Simplify,
18722                 $gplsrc is no longer needed as far as I can see?
18723
18724 2003-07-16  Jim Meyering  <jim@meyering.net>
18725
18726         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
18727
18728 2003-07-15  Paul Eggert  <eggert@twinsun.com>
18729
18730         * config/srclist.txt: Get the following files from gettext-runtime/intl
18731         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
18732         ref-del.sin.  From Bruno Haible.
18733         * config/srclist-update (fixfile): Change grep pattern again, since the
18734         previous fix didn't work (there was another trailing $).  Use
18735         '[$]' to escape the $s.
18736
18737 2003-07-15  Karl Berry  <karl@gnu.org>
18738
18739         * lib/vasnprintf.c: update from gettext.
18740
18741 2003-07-15  Karl Berry  <karl@gnu.org>
18742
18743         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
18744         gets expanded when surrounded by '$'.
18745
18746 2003-07-15  Jim Meyering  <jim@meyering.net>
18747
18748         * modules/save-cwd: Don't depend on error.  From Derek Price.
18749
18750 2003-07-15  Jim Meyering  <jim@meyering.net>
18751
18752         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
18753
18754 2003-07-14  Simon Josefsson  <jas@extundo.com>
18755
18756         * modules/mempcpy: New file.
18757         * MODULES.html.sh (func_all_modules): Add mempcpy.
18758
18759 2003-07-14  Simon Josefsson  <jas@extundo.com>
18760
18761         * m4/mempcpy.m4: New file.
18762
18763 2003-07-14  Simon Josefsson  <jas@extundo.com>
18764
18765         * lib/mempcpy.h: New file.
18766         * lib/mempcpy.c: New file.
18767
18768 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18769
18770         * modules/getdate, modules/posixtm: Depend on mktime.
18771
18772 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18773
18774         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
18775         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
18776         unicodeio.c, unicodeio.h, unlocked-io.h:
18777         Switch from LGPL to GPL.
18778
18779 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18780
18781         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
18782         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
18783         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
18784         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
18785         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
18786         updated automatically by ../config/srclist-update.  This changes
18787         their license from LPGL to GPL.
18788
18789 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18790
18791         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
18792         assumed to refer to the root of the most recent stable gettext version.
18793         * config/srclistvars.sh: Add defaults for eggert.
18794         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
18795         Match "This program" as well as "The program".  This is needed
18796         for gettext.
18797
18798 2003-07-14  Jim Meyering  <jim@meyering.net>
18799
18800         Don't emit diagnostics.  Let callers do that.
18801         * lib/save-cwd.c: Don't include "error.h".
18802         (save_cwd): Don't call error.  Ensure that errno is valid
18803         when returning nonzero.
18804
18805         * lib/save-cwd.h (restore_cwd): Update prototype.
18806         * lib/save-cwd.c (restore_cwd): Remove two parameters.
18807         Simplify.  Don't call error upon failure.  Let callers do that.
18808         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
18809         when auditing is enabled.  But don't bother updating the #if.
18810
18811 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
18812
18813         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
18814         it breaks C++ compilation.
18815         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
18816
18817 2003-07-10  Simon Josefsson  <jas@extundo.com>
18818
18819         * modules/strchrnul (Makefile.am): Add strchrnul.h.
18820
18821 2003-07-10  Jim Meyering  <jim@meyering.net>
18822
18823         * m4/clock_time.m4: Remove trailing blank.
18824         * m4/intmax_t.m4: Likewise.
18825
18826 2003-07-10  Jim Meyering  <jim@meyering.net>
18827
18828         * lib/vasnprintf.c: Remove trailing blanks.
18829         Make cpp indentation consistent.
18830
18831 2003-07-09  Paul Eggert  <eggert@twinsun.com>
18832
18833         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
18834         posixver.c, strftime.c, strnlen.c, strverscmp.c:
18835         Switch from LGPL to GPL.
18836
18837 2003-07-09  Paul Eggert  <eggert@twinsun.com>
18838
18839         * config/srclist.txt: Sort sublists.  Add
18840         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
18841         that differ from gnulib for one reason or another; we'd like this list
18842         to be smaller but for now let's document what we have.
18843
18844 2003-07-08  Paul Eggert  <eggert@twinsun.com>
18845
18846         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
18847         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
18848         and sweeter "eval x=$x".
18849         * config/srclist.txt: Get lib/argp* from glibc.
18850
18851 2003-07-07  Paul Eggert  <eggert@twinsun.com>
18852
18853         * lib/mktime.c: Fix some boundary cases and remove need for floating
18854         point.
18855
18856         Issue a compile-time diagnostic if time_t is floating point, or if
18857         two's complement arithmetic is not in effect, or if arithmetic
18858         right shift does not propagate the sign.  These assumptions were
18859         all in the original code but they weren't checked.
18860
18861         (TIME_T_MIDPOINT, verify): New macros.
18862         (__isleap): Remove; it has integer overflow problems.
18863         (leapyear): New function, without those problems.
18864         (ydhms_tm_diff): Remove; splitting into two parts.
18865         (ydhms_diff): New function, containing the arithmetic part of
18866         the old ydhms_tm_diff function.  Issue a compile-time
18867         diagnostic if we are not using C99 integer division.
18868         Avoid casts when possible.
18869         (guess_time_tm): New function, containing the checking part of
18870         the old ydhms_tm_diff function.  Return the new value, rather than
18871         the difference between it and the old.  Accept a new argument T
18872         so that *T specifies the old value.  Check for overflow in the result.
18873
18874         (__mktime_internal): Use a time_t offset, not a long int offset.
18875         This undoes the 2003-06-04 change, which is no longer needed now
18876         that we have better overflow checking.
18877         (localtime_offset): Likewise.
18878
18879         (__mktime_internal): Avoid harmful overflow on hosts where time_t
18880         and long are 64-bit but int is only 32-bit.
18881         (ydhms_diff): Use long int to store year1 and yday1.
18882         Issue a compile-time diagnostic if long int is not wide enough.
18883
18884         (__mktime_internal): Use long int to store adjusted year and yday.
18885         Use plain C rather than preprocessor commands, if that doesn't
18886         affect efficiency.
18887         Check for overflow (and try to repair) after each probe
18888         rather than checking only at the very end.  This avoids some bugs
18889         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
18890         does not equal GMT offset at maximum time).
18891         Use integer to check for overflow rather than floating point; this
18892         is more portable to non-IEEE hosts, and is a tad faster.
18893         When we detect that we are oscillating between two values,
18894         don't check whether tm_isdst has the requested value, since
18895         we already know the answer.  When tm_isdst has the wrong value,
18896         use a different heuristic to find the right one, based on the
18897         extreme values actually observed in practice in tz2003a,
18898         rather than the (overly optimistic) "previous 3 calendar quarters".
18899
18900         (not_equal_tm, print_tm, check_result): Use "const T" rather than
18901         "T const" to accommodate glibc style.
18902         (check_result): Use less-confusing report format.  "long" -> "long int.
18903         (main): Likewise.
18904         Don't loop if the iteration overflows time_t.
18905         Allow a negative step in the iteration.
18906
18907 2003-07-06  Karl Berry  <karl@gnu.org>
18908
18909         * config/depcomp: update from automake.
18910         * config/config.sub: update from prep.
18911
18912 2003-07-03  Karl Berry  <karl@gnu.org>
18913
18914         * config/config.guess: update from prep.
18915
18916 2003-07-01  Paul Eggert  <eggert@twinsun.com>
18917
18918         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
18919         xreadlink.c now includes it unconditionally.
18920
18921 2003-07-01  Paul Eggert  <eggert@twinsun.com>
18922
18923         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
18924         having it depend on HAVE_SYS_TYPES_H.
18925
18926 2003-07-01  Bruno Haible  <bruno@clisp.org>
18927
18928         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
18929         <sys/types.h> should be sufficient.
18930         Reported by Paul Eggert.
18931
18932 2003-06-26  Karl Berry  <karl@gnu.org>
18933
18934         * config/depcomp: update from automake.
18935
18936 2003-06-26  Bruno Haible  <bruno@clisp.org>
18937
18938         * modules/human: Depend on module stdbool.
18939
18940 2003-06-25  Bruno Haible  <bruno@clisp.org>
18941
18942         * modules/readlink: New file.
18943         * modules/xreadlink: Depend on it.
18944         * MODULES.html.sh (func_all_modules): Add readlink.
18945
18946 2003-06-25  Bruno Haible  <bruno@clisp.org>
18947
18948         * m4/readlink.m4: New file.
18949
18950 2003-06-25  Bruno Haible  <bruno@clisp.org>
18951
18952         * lib/readlink.c: New file.
18953
18954 2003-06-22  Karl Berry  <karl@gnu.org>
18955
18956         * config/srclist.txt: update mkinstalldirs from automake.
18957         * config/mkinstalldirs: update.
18958
18959 2003-06-22  Bruno Haible  <bruno@clisp.org>
18960
18961         Portability to mingw32.
18962         * m4/ssize_t.m4: New file, from GNU gettext.
18963         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
18964         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
18965
18966 2003-06-22  Bruno Haible  <bruno@clisp.org>
18967
18968         * modules/safe-read: Add m4/ssize_t.m4.
18969         * modules/xreadlink: Add m4/ssize_t.m4.
18970
18971 2003-06-20  Bruno Haible  <bruno@clisp.org>
18972
18973         Assume C89, so PARAMS isn't needed.
18974         * lib/unicodeio.h (PARAMS): Remove.
18975         * lib/unicodeio.c: Don't use PARAMS.
18976
18977 2003-06-18  Karl Berry  <karl@gnu.org>
18978
18979         * config/config.{guess,sub}: update from prep.
18980
18981 2003-06-18  Jim Meyering  <jim@meyering.net>
18982
18983         Merge changes from coreutils.
18984         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
18985         Remove explicit declarations of xmalloc and realloc.
18986         Include xalloc.h.
18987         (read_utmp): Remove anachronistic cast of xmalloc.
18988
18989 2003-06-17  Paul Eggert  <eggert@twinsun.com>
18990
18991         Assume C89, so PARAMS isn't needed.
18992         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
18993         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
18994         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
18995         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
18996         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
18997         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
18998         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
18999         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
19000         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
19001         lib/xstrtod.h, lib/xstrtol.h: Likewise.
19002         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
19003         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
19004         no longer needed. Anyway, config.h should always be included before any
19005         other file.
19006
19007 2003-06-11  Simon Josefsson  <jas@extundo.com>
19008
19009         * modules/sysexits: New file.
19010         * MODULES.html.sh (func_all_modules): Add sysexits.
19011
19012 2003-06-11  Simon Josefsson  <jas@extundo.com>
19013
19014         * lib/sysexit_.h: New file.
19015
19016 2003-06-11  Derek Price  <derek@ximbiot.com>
19017
19018         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
19019         necessary.
19020
19021 2003-06-11  Bruno Haible  <bruno@clisp.org>
19022
19023         * m4/sysexits.m4: New file.
19024
19025 2003-06-10  Simon Josefsson  <jas@extundo.com>
19026
19027         * lib/argp.h: New file, from glibc.
19028         * lib/argp-ba.c: New file, from glibc.
19029         * lib/argp-eexst.c: New file, from glibc.
19030         * lib/argp-fmtstream.c: New file, from glibc.
19031         * lib/argp-fmtstream.h: New file, from glibc.
19032         * lib/argp-fs-xinl.c: New file, from glibc.
19033         * lib/argp-help.c: New file, from glibc.
19034         * lib/argp-namefrob.h: New file, from glibc.
19035         * lib/argp-parse.c: New file, from glibc.
19036         * lib/argp-pv.c: New file, from glibc.
19037         * lib/argp-pvh.c: New file, from glibc.
19038         * lib/argp-xinl.c: New file, from glibc.
19039
19040 2003-06-10  Simon Josefsson  <jas@extundo.com>
19041
19042         * modules/strchrnul: New file.
19043
19044 2003-06-10  Simon Josefsson  <jas@extundo.com>
19045
19046         * modules/argp: New file.
19047
19048 2003-06-10  Simon Josefsson  <jas@extundo.com>
19049
19050         * m4/strchrnul.m4: New file.
19051
19052 2003-06-10  Simon Josefsson  <jas@extundo.com>
19053
19054         * lib/strchrnul.h: New file.
19055         * lib/strchrnul.c: New file.
19056
19057 2003-06-10  Bruno Haible  <bruno@clisp.org>
19058
19059         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
19060
19061 2003-06-07  Karl Berry  <karl@gnu.org>
19062
19063         * config/config.{guess,sub}: update from prep.
19064
19065 2003-06-07  Jim Meyering  <jim@meyering.net>
19066
19067         * modules/strtod: Use $(...) notation, not @...@ for
19068         AC_REPLACE'd variables.
19069         * modules/localcharset: Likewise.
19070
19071 2003-06-07  Jim Meyering  <jim@meyering.net>
19072
19073         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
19074         in place of my name in the copyright comment.
19075         Remove definition and uses of __P.
19076
19077         From coreutils.
19078         * lib/stat.c: Don't declare xmalloc explicitly.
19079         Instead, include "xalloc.h".
19080         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
19081         xrealloc, and xcalloc return values.
19082         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
19083         Improve comment.
19084         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
19085
19086 2003-06-07  Bruno Haible  <bruno@clisp.org>
19087
19088         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
19089         avoid AC_CONFIG_LINKS.
19090         * modules/fnmatch (Makefile.am): Use explicit creation rule for
19091         fnmatch.h, to avoid AC_CONFIG_LINKS.
19092         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
19093
19094 2003-06-07  Bruno Haible  <bruno@clisp.org>
19095
19096         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
19097         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
19098         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19099         directory.
19100         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
19101         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19102         directory.
19103
19104 2003-06-06  Jim Meyering  <jim@meyering.net>
19105
19106         Merge from coreutils.
19107         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
19108         Consolidate declarations and initializations of *_base* locals.
19109
19110         Merge from coreutils.
19111         This avoids a core dump on systems without GNU putenv,
19112         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
19113         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
19114         (unsetenv): New static function, from GNU libc.
19115         (rpl_putenv): Use it.
19116
19117         * lib/modechange.c: Remove trailing blanks.
19118
19119         Merge from coreutils.
19120         * lib/fsusage.c: Remove declaration of statfs.
19121         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
19122
19123         * lib/posixtm.c: Include <stdbool.h> unconditionally.
19124
19125 2003-06-06  Jim Meyering  <jim@meyering.net>
19126
19127         * lib/stdbool_.h: Renamed from stdbool.h.in.
19128
19129 2003-06-06  Jim Meyering  <jim@meyering.net>
19130             Bruno Haible  <bruno@clisp.org>
19131
19132         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
19133         Adjust Makefile.am snippet not to redirect directly to target.
19134         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
19135
19136 2003-06-05  Paul Eggert  <eggert@twinsun.com>
19137
19138         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
19139         mismatch, look in future quarters as well as past.  This fixes a
19140         bug when processing fall-backwards gaps immediately after a long
19141         period of daylight-saving time.
19142
19143         * lib/mktime.c: Assume freestanding C89 or better.
19144         (HAVE_LIMITS_H): Remove.  Assume it's 1.
19145         (__P): Remove; not used.
19146         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
19147         (mktime, not_equal_tm, print_tm, check_result,
19148         main): Use prototypes.  Use const * where appropriate.
19149         (main): Fix typo in testing code that uncovered by above changes.
19150         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
19151
19152 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19153
19154         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
19155         locale.h, localeconv.  This merges changes from coreutils.
19156
19157         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
19158         It can be removed after the next Autoconf is released.
19159         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
19160         needed.
19161
19162 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19163
19164         * lib/mktime.c: Fix Debian bug 177940
19165         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
19166         (localtime_offset): Now long int, not time_t, because we want it
19167         to be guaranteed to be signed.  All uses changed.
19168         (__mktime_internal): If overflow would occur when adding offset,
19169         don't add it.
19170
19171         Merge 'human' changes from coreutils.  Rewrite to support
19172         locale-specific notations like thousands separators.
19173         * lib/human.c: Simplify authorship notice.
19174         Include human.h immediately after config.h.
19175         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
19176         <limits.h>: Do not include, since human.h does.
19177         (SIZE_MAX, UINTMAX_MAX): New macros.
19178         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
19179         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
19180         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
19181         (power_letter): Renamed from suffixes.
19182         (generate_suffix_backwards): Remove.
19183         (adjust_value): Now takes int style (because of human.h changes)
19184         and long double value (for greater precision on some platforms).
19185         (group_number): New function.
19186         (human_readable): Use it.  Use integer options, not enum.
19187         Put the options before the sizes in the arg list.
19188         Support all the new options.
19189         The old human_readable function has been removed;
19190         use inttostr.h instead.
19191         (human_readable, default_block_size, humblock):
19192         Use uintmax_t, not int, for block sizes.
19193         (human_readable_inexact, block_size_types): Remove.
19194         (block_size_opts): New constant.
19195         (human_options): Renamed from human_block_size, with new signature
19196         that allows block sizes up to UINTMAX_MAX.  All callers changed.
19197         * lib/human.h: Add copyright and authorship notice.
19198         Include <limits.h> and <stdbool.h> unconditionally.
19199         (PARAMS): Remove.  All uses removed.
19200         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
19201         (enum human_inexact_style): Remove tag; now a nameless enum.
19202         (human_floor, human_ceiling, human_round_to_even): Now have
19203         values 2, 0, 1 rather than -1, 1, 0.
19204         (human_group_digits, human_suppress_point_zero, human_autoscale,
19205         human_base_1024, human_SI, human_B): New constants.
19206         (human_readable_inexact, human_block_size): Remove.
19207         (human_readable): Size args are now uintmax_t, not int.
19208         (human_options): New decl.
19209
19210         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
19211         unnecessary now that we assume C89 or better.  This change
19212         imported from coreutils.
19213
19214         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19215         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
19216         in the 2003-05-30 sync from glibc.
19217
19218         .h files should stand alone, but we shouldn't include <sys/types.h>
19219         if we can get away with just <stddef.h>.
19220
19221         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
19222         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
19223         rather than <sys/types.h>, as we merely need size_t.
19224         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
19225         to get size_t.
19226         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
19227         Include <stdio.h>, to get FILE.
19228         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
19229         memcasecmp.h has included <stddef.h> and all we need is size_t.
19230         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
19231         our interface, instead of including <sys/types.h>
19232
19233 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19234
19235         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
19236         now, as glibc mktime is buggy on non-glibc systems.
19237
19238 2003-06-03  Karl Berry  <karl@gnu.org>
19239
19240         * config/config.sub: update from prep.
19241
19242 2003-06-02  Paul Eggert  <eggert@twinsun.com>
19243
19244         [from coreutils]
19245         Fix some minor time-related bugs with POSIX time arguments.
19246         Some valid time stamps were being rejected (notably -1, and
19247         time stamps before 1900 on 64-bit hosts).  And some invalid
19248         time stamps were being accepted, e.g. September 31.
19249
19250         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
19251         that we can return (time_t) -1 successfully.
19252         * lib/posixtm.c: Likewise.
19253         [HAVE_STDBOOL_H]: Include <stdbool.h>.
19254         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
19255         (t): Remove static var.
19256         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
19257         of static var.  All uses changed.
19258         (year): Do not reject years before 1900; they can occur with
19259         64-bit time_t.
19260         (posix_time_parse): Do not check for out-of-range components;
19261         that is now the caller's responsibility, since our checks were
19262         only approximations.
19263         (posixtime): Use mktime to check for out-of-range components,
19264         since it knows them exactly.
19265         If mktime returns (time_t) -1, check whether an error actually occurred
19266         by invoking localtime on -1.
19267         (main) [TEST_POSIXTIME]: Check for input data errors, and report
19268         posixtime failures better.
19269         Improve the test data (in comments only).
19270
19271 2003-06-02  Karl Berry  <karl@gnu.org>
19272
19273         * config/mkinstalldirs (version): new variable.
19274         (--version): new option.
19275         (usage): improve message.
19276
19277 2003-05-30  Karl Berry  <karl@gnu.org>
19278
19279         * lib/mktime.c: update from libc.
19280
19281 2003-05-30  Bruno Haible  <bruno@clisp.org>
19282
19283         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
19284         * config/config.rpath: Upgrade to gettext-0.12.1.
19285
19286 2003-05-30  Bruno Haible  <bruno@clisp.org>
19287
19288         * m4/gettext.m4: Upgrade to gettext-0.12.1.
19289         * m4/nls.m4: New file, from gettext-0.12.1.
19290         * m4/po.m4: New file, from gettext-0.12.1.
19291         * m4/progtest.m4: Upgrade to gettext-0.12.1.
19292
19293 2003-05-30  Bruno Haible  <bruno@clisp.org>
19294
19295         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
19296         * lib/localcharset.h: Likewise.
19297         * lib/localcharset.c: Likewise.
19298
19299 2003-05-29  Karl Berry  <karl@gnu.org>
19300
19301         * config/config.rpath: update from gettext.
19302
19303 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19304
19305         Assume the headers required for C89 freestanding compilers.
19306         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
19307         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
19308         * m4/human.m4 (gl_HUMAN): Likewise.
19309         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
19310         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
19311         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19312         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
19313         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19314         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
19315
19316 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19317
19318         Assume the headers required for C89 freestanding compilers.
19319         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
19320         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
19321         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
19322         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
19323         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
19324         define, since <limits.h> is guaranteed to do that.
19325         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
19326         * lib/exclude.c: Include <stdbool.h> unconditionally.
19327         * lib/tempname.c: Include <stddef.h> unconditionally.
19328         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
19329         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
19330         <stddef.h> does that.
19331         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
19332         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
19333         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
19334         needed.
19335         * lib/xstrtol.c: Likewise.
19336         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
19337         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
19338
19339         * lib/addext.c (addext): Use assignment rather than cast, to avoid
19340         warnings on some platforms.
19341
19342         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19343         arbitrarily.
19344
19345 2003-05-26  Jim Meyering  <jim@meyering.net>
19346
19347         Merge in a change from coreutils:
19348         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
19349         that is guaranteed to be `no'.  Use `no_such_member' to indicate
19350         that condition, rather than `-1' which is slightly misleading.
19351         Change the name of the cache variable to have the gl_ prefix.
19352         Prompted by a patch from Richard Dawe for DJGPP.
19353
19354 2003-05-24  Karl Berry  <karl@gnu.org>
19355
19356         * config/config.guess: update from prep.
19357
19358 2003-05-22  Karl Berry  <karl@gnu.org>
19359
19360         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
19361
19362 2003-05-20  Karl Berry  <karl@gnu.org>
19363
19364         * config/config.guess: update from prep.
19365
19366 2003-05-18  Karl Berry  <karl@gnu.org>
19367
19368         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
19369         might actually be set by the user.
19370
19371         * config/depcomp, install-sh, mdate-sh: update from automake.
19372
19373 2003-05-17  Bruno Haible  <bruno@clisp.org>
19374
19375         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
19376         invalid expansion for AC_EGREP_CPP.
19377         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
19378         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
19379         Suggested by Akim Demaille <akim@epita.fr> in
19380         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
19381
19382 2003-05-12  Jim Meyering  <jim@meyering.net>
19383
19384         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
19385         the space-padded-by-default conversion specifiers, %e, %k, %l.
19386
19387 2003-05-12  Bruno Haible  <bruno@clisp.org>
19388
19389         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
19390         the string is longer than 4 KB.
19391
19392 2003-05-11  Karl Berry  <karl@gnu.org>
19393
19394         * config/config.{guess,sub}: update from prep.
19395
19396 2003-05-09  Bruno Haible  <bruno@clisp.org>
19397
19398         * modules/error: Add m4/strerror_r.m4 to file list.
19399
19400 2003-05-03  Bruno Haible  <bruno@clisp.org>
19401
19402         Upgrade to Unicode-4.0.
19403         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
19404         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
19405         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
19406         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
19407         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
19408         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
19409         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
19410         Change width of U+E0100..U+E01EF from 1 to 0.
19411
19412 2003-04-25  Jim Meyering  <jim@meyering.net>
19413
19414         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
19415         of type size_t, not int.
19416
19417 2003-04-25  Bruno Haible  <bruno@clisp.org>
19418
19419         * lib/copy-file.c: Include <stddef.h>, for size_t.
19420
19421 2003-04-21  Paul Eggert  <eggert@twinsun.com>
19422
19423         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
19424         code which expansion is under static control.  Patch imported from
19425         Akim Demaille's patch to Bison; see
19426         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
19427
19428 2003-04-14  Bruno Haible  <bruno@clisp.org>
19429
19430         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
19431
19432 2003-04-11  Jim Meyering  <jim@meyering.net>
19433
19434         Merge changes from Coreutils.
19435
19436         2003-03-22  Jim Meyering  <jim@meyering.net>
19437
19438         * lib/strftime.c (widen): Cast alloca return value to proper type.
19439
19440         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
19441
19442         From GNU libc.
19443         * lib/strftime.c (my_strftime): Handle very large width
19444         specifications for numeric values correctly.  Improve checks for
19445         overflow.
19446
19447         2003-01-19  Jim Meyering  <jim@meyering.net>
19448
19449         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
19450         definitions.
19451         (nl_get_alt_digit) [! defined my_strftime]: Define.
19452         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
19453         _nl_get_alt_digit and _nl_get_walt_digit.
19454
19455         * lib/strftime.c (my_strftime): Merge in locale-related changes from
19456         libc. These changes have no effect outside of _LIBC.
19457
19458 2003-04-10  Bruno Haible  <bruno@clisp.org>
19459
19460         * modules/findprog: New file.
19461         * MODULES.html.sh (func_all_modules): Add it.
19462
19463 2003-04-10  Bruno Haible  <bruno@clisp.org>
19464
19465         * m4/findprog.m4: New file.
19466         * m4/eaccess.m4: New file.
19467
19468 2003-04-10  Bruno Haible  <bruno@clisp.org>
19469
19470         * lib/findprog.h: New file, from GNU gettext.
19471         * lib/findprog.c: New file, from GNU gettext.
19472
19473 2003-04-05  Jim Meyering  <jim@meyering.net>
19474
19475         Merge changes from Coreutils.
19476
19477         * lib/exclude.h (PARAMS): Remove definition and uses.
19478         * lib/exclude.c: Remove uses of `PARAMS'.
19479
19480         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
19481         Add test-cases for DOS filenames. Declare program_name.
19482         (main): Set up program_name.  Patch by Rich Dawe.
19483
19484         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19485         error from mntctl.
19486         Use mntctl's return value to drive the entry-processing loop, since
19487         we can't rely on the value of the vmt_length member in the last
19488         entry.  On some systems doing so could result in exhausting
19489         virtual memory.  Based in part on a patch from Mike Jetzer.
19490
19491 2003-04-04  Bruno Haible  <bruno@clisp.org>
19492
19493         * modules/linebreak: New file.
19494         * MODULES.html.sh (func_all_modules): Add it.
19495
19496 2003-04-04  Bruno Haible  <bruno@clisp.org>
19497
19498         * m4/linebreak.m4: New file.
19499
19500 2003-04-04  Bruno Haible  <bruno@clisp.org>
19501
19502         * lib/linebreak.h: New file, from GNU gettext.
19503         * lib/linebreak.c: New file, from GNU gettext with slight
19504         modifications.
19505         * lib/lbrkprop.h: New file, from GNU gettext.
19506
19507 2003-04-03  Bruno Haible  <bruno@clisp.org>
19508
19509         * modules/utf8-ucs4: New file.
19510         * modules/utf16-ucs4: New file.
19511         * modules/ucs4-utf8: New file.
19512         * modules/ucs4-utf16: New file.
19513         * MODULES.html.sh (func_all_modules): Add them.
19514
19515 2003-04-03  Bruno Haible  <bruno@clisp.org>
19516
19517         * m4/utf-ucs4.m4: New file.
19518         * m4/ucs4-utf.m4: New file.
19519
19520 2003-04-03  Bruno Haible  <bruno@clisp.org>
19521
19522         * lib/utf8-ucs4.h: New file, from GNU gettext.
19523         * lib/utf16-ucs4.h: New file, from GNU gettext.
19524         * lib/ucs4-utf8.h: New file, from GNU gettext.
19525         * lib/ucs4-utf16.h: New file, from GNU gettext.
19526
19527 2003-04-02  Bruno Haible  <bruno@clisp.org>
19528
19529         * modules/binary-io: New file.
19530         * MODULES.html.sh (func_all_modules): Add it.
19531
19532 2003-04-02  Bruno Haible  <bruno@clisp.org>
19533
19534         * lib/binary-io.h: New file, from GNU gettext.
19535
19536 2003-04-01  Bruno Haible  <bruno@clisp.org>
19537
19538         * modules/pathname: New file.
19539         * MODULES.html.sh (func_all_modules): Add it.
19540
19541 2003-04-01  Bruno Haible  <bruno@clisp.org>
19542
19543         * lib/pathname.h: New file, from GNU gettext.
19544         * lib/concatpath.c: New file, from GNU gettext.
19545
19546 2003-03-30  Bruno Haible  <bruno@clisp.org>
19547
19548         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
19549
19550 2003-03-30  Bruno Haible  <bruno@clisp.org>
19551
19552         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
19553         function chown() doesn't exist.
19554
19555 2003-03-28  Bruno Haible  <bruno@clisp.org>
19556
19557         * modules/copy-file: New file.
19558         * MODULES.html.sh (func_all_modules): Add it.
19559
19560 2003-03-28  Bruno Haible  <bruno@clisp.org>
19561
19562         * m4/copy-file.m4: New file.
19563
19564 2003-03-28  Bruno Haible  <bruno@clisp.org>
19565
19566         * lib/copy-file.h: New file, from GNU gettext.
19567         * lib/copy-file.c: New file, from GNU gettext.
19568
19569 2003-03-18  Jim Meyering  <jim@meyering.net>
19570
19571         * lib/quote.c (quote_n): Fix typo in comment.
19572
19573 2003-03-18  Bruno Haible  <bruno@clisp.org>
19574
19575         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
19576         checking.
19577         * m4/onceonly_2_57.m4: Likewise.
19578
19579 2003-03-17  Bruno Haible  <bruno@clisp.org>
19580
19581         * m4/onceonly.m4: Require autoconf 2.54 or newer.
19582         (m4_quote): Remove macro.
19583         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
19584
19585 2003-03-14  Jim Meyering  <jim@meyering.net>
19586
19587         Merge changes from Coreutils.
19588         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
19589         to be const, in order to avoid warnings.
19590         (obstack_room): Likewise.
19591         (obstack_empty_p): Likewise.
19592
19593 2003-03-14  Bruno Haible  <bruno@clisp.org>
19594
19595         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
19596         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
19597
19598 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19599
19600         Merge changes from Bison.
19601         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
19602         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
19603         when compiling Bison 1.875's `bitset bset = obstack_alloc
19604         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
19605         * lib/hash.c: Include <stdbool.h> unconditionally.
19606
19607 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19608
19609         * m4/onceonly.m4 (m4_quote): New macro.
19610         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
19611         Quote AC_FOREACH variable-expansions properly.
19612
19613 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19614
19615         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
19616
19617 2003-03-09  Paul Eggert  <eggert@twinsun.com>
19618
19619         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
19620         Reported by Bruce Becker; see:
19621         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
19622
19623 2003-03-03  Paul Eggert  <eggert@twinsun.com>
19624             Bruno Haible  <bruno@clisp.org>
19625
19626         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
19627         Reported by John Hughes, see
19628         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
19629
19630 2003-02-20  Bruno Haible  <bruno@clisp.org>
19631
19632         * MODULES.html.sh (func_all_modules): Add poll.
19633
19634 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19635
19636         * modules/poll: New file.
19637
19638 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19639
19640         * lib/poll_.h: New file.
19641         * lib/poll.c: New file.
19642
19643 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19644
19645         * m4/poll.m4: New file.
19646
19647 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19648
19649         * modules/mathl: New file.
19650
19651 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19652
19653         * lib/mathl.h: New file.
19654         * lib/acosl.c: New file.
19655         * lib/asinl.c: New file.
19656         * lib/atanl.c: New file.
19657         * lib/ceill.c: New file.
19658         * lib/cosl.c: New file.
19659         * lib/expl.c: New file.
19660         * lib/floorl.c: New file.
19661         * lib/frexpl.c: New file.
19662         * lib/ldexpl.c: New file.
19663         * lib/logl.c: New file.
19664         * lib/sincosl.c: New file.
19665         * lib/sinl.c: New file.
19666         * lib/sqrtl.c: New file.
19667         * lib/tanl.c: New file.
19668         * lib/trigl.c: New file.
19669         * lib/trigl.h: New file.
19670
19671 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19672
19673         * m4/mathl.m4: New file.
19674
19675 2003-02-18  Bruno Haible  <bruno@clisp.org>
19676
19677         * MODULES.html.sh (func_all_modules): Add mathl.
19678
19679 2003-02-17  Bruno Haible  <bruno@clisp.org>
19680
19681         * modules/mkdtemp: New module.
19682         * MODULES.html.sh (func_all_modules): Add it.
19683
19684 2003-02-17  Bruno Haible  <bruno@clisp.org>
19685
19686         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
19687
19688 2003-02-17  Bruno Haible  <bruno@clisp.org>
19689
19690         * lib/mkdtemp.h: New file, from GNU gettext.
19691         * lib/mkdtemp.c: New file, from GNU gettext.
19692
19693 2003-02-02  Jim Meyering  <jim@meyering.net>
19694
19695         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
19696         e.g. glibc-2.2.93.
19697
19698 2003-01-31  Bruno Haible  <bruno@clisp.org>
19699
19700         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
19701         'rpl_rename'.
19702         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
19703         'rpl_strnlen'.
19704         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
19705         'rpl_strtod'.
19706         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
19707         'rpl_utime'.
19708
19709 2003-01-31  Bruno Haible  <bruno@clisp.org>
19710
19711         * lib/rename.c: #undef rename before defining rpl_rename.
19712         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
19713
19714 2003-01-30  Bruno Haible  <bruno@clisp.org>
19715
19716         * modules/vasnprintf, modules/vasprintf: New modules.
19717         * MODULES.html.sh (func_all_modules): Add them.
19718
19719 2003-01-30  Bruno Haible  <bruno@clisp.org>
19720
19721         * m4/signed.m4: New file, from GNU gettext.
19722         * m4/longdouble.m4: New file, from GNU gettext.
19723         * m4/wchar_t.m4: New file, from GNU gettext.
19724         * m4/wint_t.m4: New file, from GNU gettext.
19725         * m4/vasnprintf.m4: New file.
19726         * m4/vasprintf.m4: New file.
19727
19728 2003-01-30  Bruno Haible  <bruno@clisp.org>
19729
19730         * lib/printf-args.h: New file, from GNU gettext.
19731         * lib/printf-args.c: New file, from GNU gettext.
19732         * lib/printf-parse.h: New file, from GNU gettext.
19733         * lib/printf-parse.c: New file, from GNU gettext.
19734         * lib/vasnprintf.h: New file, from GNU gettext.
19735         * lib/vasnprintf.c: New file, from GNU gettext.
19736         * lib/asnprintf.c: New file, from GNU gettext.
19737         * lib/vasprintf.h: New file, from GNU gettext with modifications.
19738         * lib/vasprintf.c: New file, from GNU gettext.
19739         * lib/asprintf.c: New file, from GNU gettext.
19740
19741 2003-01-29  Bruno Haible  <bruno@clisp.org>
19742
19743         * modules/stpncpy: New module.
19744         * MODULES.html.sh (func_all_modules): Add it.
19745
19746 2003-01-29  Bruno Haible  <bruno@clisp.org>
19747
19748         * m4/stpncpy.m4: New file.
19749
19750 2003-01-29  Bruno Haible  <bruno@clisp.org>
19751
19752         * lib/stpncpy.h: New file, from GNU gettext with modifications.
19753         * lib/stpncpy.c: New file, from GNU gettext with modifications.
19754
19755 2003-01-28  Bruno Haible  <bruno@clisp.org>
19756
19757         * modules/c-ctype: New module.
19758         * MODULES.html.sh (func_all_modules): Add it.
19759
19760 2003-01-28  Bruno Haible  <bruno@clisp.org>
19761
19762         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
19763         Paul Eggert.
19764         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
19765         Paul Eggert.
19766
19767 2003-01-27  Bruno Haible  <bruno@clisp.org>
19768
19769         * modules/xsetenv: New module.
19770         * MODULES.html.sh (func_all_modules): Add it.
19771
19772 2003-01-27  Bruno Haible  <bruno@clisp.org>
19773
19774         * lib/xsetenv.h: New file, from GNU gettext.
19775         * lib/xsetenv.c: New file, from GNU gettext.
19776
19777 2003-01-23  Jim Meyering  <jim@meyering.net>
19778
19779         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
19780         from working on systems without dirfd (at least Irix and OSF1/Tru64).
19781
19782 2003-01-23  Bruno Haible  <bruno@clisp.org>
19783
19784         * modules/minmax: New module.
19785         * MODULES.html.sh (func_all_modules): Add it.
19786
19787 2003-01-23  Bruno Haible  <bruno@clisp.org>
19788
19789         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
19790         Eggert.
19791
19792 2003-01-22  Bruno Haible  <bruno@clisp.org>
19793
19794         * modules/exit: New module.
19795         * MODULES.html.sh (func_all_modules): Add it.
19796
19797 2003-01-22  Bruno Haible  <bruno@clisp.org>
19798
19799         * lib/exit.h: New file, from GNU gettext.
19800
19801 2003-01-19  Bruno Haible  <bruno@clisp.org>
19802
19803         * gnulib-tool: Recognize option --extract-maintainer.
19804         (func_get_maintainer): New function.
19805         * modules/*: Add Maintainer entry.
19806
19807 2003-01-16  Jim Meyering  <jim@meyering.net>
19808
19809         * m4/regex.m4: The `regex' struct is both input and output.
19810         Initialize it before each use.  Patch by Tim Waugh.
19811
19812 2003-01-16  Bruno Haible  <bruno@clisp.org>
19813
19814         * MODULES.html.sh: Add a table of contents. Add the module name as
19815         leftmost column. Add hyperlinks.
19816
19817 2003-01-15  Bruno Haible  <bruno@clisp.org>
19818
19819         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
19820
19821 2003-01-15  Bruno Haible  <bruno@clisp.org>
19822
19823         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
19824         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
19825         suffix.
19826
19827 2003-01-15  Bruno Haible  <bruno@clisp.org>
19828
19829         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
19830
19831 2003-01-15  Bruno Haible  <bruno@clisp.org>
19832
19833         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
19834         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
19835
19836 2003-01-14  Jim Meyering  <jim@meyering.net>
19837
19838         * lib/same.c (same_name): Tweak a comment.
19839
19840 2003-01-14  Bruno Haible  <bruno@clisp.org>
19841
19842         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
19843         when a string comparison is sufficient.
19844
19845 2003-01-14  Bruno Haible  <bruno@clisp.org>
19846
19847         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
19848         'unsigned int'.
19849
19850 2003-01-14  Bruno Haible  <bruno@clisp.org>
19851
19852         * lib/hash-pjw.c: Add comment about low quality of this function.
19853
19854 2003-01-13  Bruno Haible  <bruno@clisp.org>
19855
19856         * modules/stpcpy: Distribute lib/stpcpy.h.
19857         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
19858
19859 2003-01-13  Bruno Haible  <bruno@clisp.org>
19860
19861         * modules/*: Add a description.
19862         * modules/strpbrk: Fix Makefile.am snippet.
19863         * modules/strtoimax: Fix dependencies.
19864         * modules/strtoumax: Likewise.
19865
19866 2003-01-13  Bruno Haible  <bruno@clisp.org>
19867
19868         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
19869         * modules/alloca (Makefile.am): All object files depend on alloca.h.
19870         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
19871
19872 2003-01-13  Bruno Haible  <bruno@clisp.org>
19873
19874         * gnulib-tool (func_create_testdir): Store config/* files in the main
19875         directory.
19876         * config.rpath: Move to ...
19877         * config/config.rpath: ... here.
19878         * modules/gettext: Contains config/config.rpath, not config.rpath.
19879         * modules/iconv: Likewise.
19880
19881 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19882
19883         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19884         to avoid collisions with libcurses and libreadline.
19885
19886         * m4/getstr.m4: Remove.
19887         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
19888
19889 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19890
19891         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19892         to avoid collisions with libcurses and libreadline.
19893
19894         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
19895         * lib/getstr.h, getstr.c: Remove.
19896         * lib/getline.c: Include "getline.h", to check interface.
19897         Move body of old getstr.c here: this defines MIN_CHUNK and
19898         declares getdelim2, which is renamed from getstr.
19899         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
19900
19901         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
19902         All uses changed.
19903         * lib/linebuffer.h: Likewise.
19904         (readline): Remove backward-compatibility macro.
19905
19906 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19907
19908         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19909         to avoid collisions with libcurses and libreadline.
19910         * getstr: Remove.
19911         * MODULES.html.sh: Remove getstr.
19912         * modules/getline: Depend on unlocked-io, not getstr.
19913
19914 2003-01-12  Jim Meyering  <jim@meyering.net>
19915
19916         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
19917
19918 2003-01-10  Bruno Haible  <bruno@clisp.org>
19919
19920         * modules/alloca: Change Makefile.am requirements. Simplify Include
19921         requirements. Add lib/alloca_.h to file list.
19922
19923 2003-01-10  Bruno Haible  <bruno@clisp.org>
19924
19925         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
19926
19927 2003-01-10  Bruno Haible  <bruno@clisp.org>
19928
19929         * lib/alloca_.h: New file.
19930         * lib/getdate.y: Unconditionally include alloca.h.
19931         * lib/makepath.c: Likewise.
19932         * lib/setenv.c: Likewise.
19933         * lib/userspec.c: Likewise.
19934
19935 2003-01-09  Karl Berry  <karl@gnu.org>
19936
19937         * MODULES.html.sh: include `dirname $0` in PATH, to find
19938         gnulib-tool.
19939
19940 2003-01-09  Bruno Haible  <bruno@clisp.org>
19941
19942         * modules/stdbool: Change configure.ac, Makefile.am requirements.
19943         Simplify Include requirements. Add lib/stdbool.h.in to file list.
19944
19945 2003-01-09  Bruno Haible  <bruno@clisp.org>
19946
19947         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
19948
19949 2003-01-09  Bruno Haible  <bruno@clisp.org>
19950
19951         * lib/stdbool.h.in: New file.
19952
19953 2003-01-09  Bruno Haible  <bruno@clisp.org>
19954
19955         * gnulib-tool (func_all_modules): Ignore files ending in ~.
19956         * MODULES.html.sh: Likewise.
19957
19958 2003-01-08  Jim Meyering  <jim@meyering.net>
19959
19960         * lib/full-write.c: Undefine and define-away `const' after inclusion
19961         of errno.h, not before.  Suggestion from Bruno Haible.
19962
19963 2003-01-08  Bruno Haible  <bruno@clisp.org>
19964
19965         * modules/full-read: Depend on full-write.
19966
19967 2003-01-08  Bruno Haible  <bruno@clisp.org>
19968
19969         * lib/safe-read.c: Include specification header first, to ensure its
19970         selfcontainedness.
19971         * lib/full-write.c: Likewise.
19972
19973 2003-01-07  Jim Meyering  <jim@meyering.net>
19974
19975         * lib/full-write.c: Rework so that it may serve to define full_read,
19976         too.
19977         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
19978
19979 2003-01-07  Bruno Haible  <bruno@clisp.org>
19980
19981         * lib/strtoimax.c: Include <stdint.h> as an alternative to
19982         <inttypes.h>.
19983         * lib/xstrtol.h: Likewise.
19984         * lib/xstrtoimax.c: Likewise.
19985         * lib/xstrtoumax.c: Likewise.
19986         * lib/human.h: Likewise.
19987
19988         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
19989         on systems that have <inttypes.h> but not <stdint.h>.
19990
19991 2003-01-07  Bruno Haible  <bruno@clisp.org>
19992
19993         * MODULES.html.sh: Add copyright notice.
19994         (missed_files): Omit CVS directory entries.
19995         (func_module): Make it work with sed-3.02.
19996         * MODULES.txt: Remove file.
19997
19998 2003-01-06  Jim Meyering  <jim@meyering.net>
19999
20000         * lib/version-etc.c: Update year in translatable copyright string.
20001
20002 2003-01-03  Karl Berry  <karl@gnu.org>
20003
20004         * config/config.{guess,sub}: update from prep.
20005
20006 2003-01-02  Karl Berry  <karl@gnu.org>
20007
20008         * doc/COPYING.DOC: belatedly updated to 1.2.
20009
20010 2003-01-01  Karl Berry  <karl@gnu.org>
20011
20012         * gnulib-tool (func_verify_module): report module name $module in
20013         error message, not $1.
20014         * gnulib-tool (create-testdir): don't complain if destdir couldn't
20015         be created, only if it doesn't exist.
20016         * gnulib-tool (last_checkin_date): don't expand the $Date here.
20017
20018 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20019
20020         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
20021
20022 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20023
20024         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
20025         memcmp if strcoll doesn't work.
20026
20027 2002-12-31  Bruno Haible  <bruno@clisp.org>
20028
20029         * lib/utime.c (utime_null): No need to call ftruncate if the file was
20030         nonempty.
20031
20032 2002-12-31  Bruno Haible  <bruno@clisp.org>
20033
20034         * lib/memcoll.c (STRCOLL): New macro.
20035         (memcoll): Use it.
20036
20037 2002-12-31  Bruno Haible  <bruno@clisp.org>
20038
20039         * lib/localcharset.h: New file.
20040         * lib/localcharset.c: Include it.
20041         * lib/unicodeio.c: Likewise.
20042
20043 2002-12-31  Bruno Haible  <bruno@clisp.org>
20044
20045         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
20046         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
20047
20048 2002-12-31  Bruno Haible  <bruno@clisp.org>
20049
20050         * lib/getline.h: Include <stddef.h>, for size_t.
20051
20052         * lib/unicodeio.h: Include <stddef.h>, for size_t.
20053         * lib/unicodeio.c: Don't include <stddef.h>.
20054
20055 2002-12-31  Bruno Haible  <bruno@clisp.org>
20056
20057         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
20058         HAVE_TM_ZONE.
20059
20060 2002-12-24  Karl Berry  <karl@gnu.org>
20061
20062         * config/config.guess: update from prep.
20063
20064 2002-12-24  Bruno Haible  <bruno@clisp.org>
20065
20066         General infrasructure.
20067         * m4/README: Rewritten.
20068         * m4/onceonly.m4: New file.
20069         * m4/onceonly_2_57.m4: New file.
20070
20071         Module atexit.
20072         * m4/atexit.m4: New file.
20073
20074         Module strtod.
20075         * m4/strtod.m4: New file.
20076
20077         Module strtol.
20078         * m4/strtol.m4: New file.
20079
20080         Module strtoul.
20081         * m4/strtoul.m4: New file.
20082
20083         Module memchr.
20084         * m4/memchr.m4: New file.
20085
20086         Module memcmp.
20087         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
20088         (jm_FUNC_MEMCMP): Invoke it.
20089
20090         Module memcpy.
20091         * m4/memcpy.m4: New file.
20092
20093         Module memmove.
20094         * m4/memmove.m4: New file.
20095
20096         Module memset.
20097         * m4/memset.m4: New file.
20098
20099         Module strcspn.
20100         * m4/strcspn.m4: New file.
20101
20102         Module strpbrk.
20103         * m4/strpbrk.m4: New file.
20104
20105         Module strstr.
20106         * m4/strstr.m4: New file.
20107
20108         Module strerror.
20109         * m4/strerror.m4: New file.
20110
20111         Module mktime.
20112         * m4/mktime.m4: Renamed from jm-mktime.m4.
20113         (gl_PREREQ_MKTIME): New macro.
20114         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
20115
20116         Module malloc.
20117         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
20118         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
20119         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
20120
20121         Module realloc.
20122         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
20123         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
20124         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
20125
20126         Module strftime.
20127         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
20128         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
20129         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
20130         gl_TM_GMTOFF.
20131         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
20132
20133         Module xalloc.
20134         * m4/xalloc.m4: New file.
20135
20136         Module alloca.
20137         * m4/alloca.m4: New file.
20138
20139         Module putenv.
20140         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
20141         (jm_FUNC_PUTENV): Invoke it.
20142
20143         Module setenv.
20144         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
20145         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
20146         when invoked twice.
20147         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
20148         gt_FUNC_SETENV.
20149
20150         Module memrchr.
20151         * m4/memrchr.m4: New file.
20152
20153         Module stpcpy.
20154         * m4/stpcpy.m4: New file.
20155
20156         Module strcase.
20157         * m4/strcase.m4: New file.
20158
20159         Module strdup.
20160         * m4/strdup.m4: New file.
20161
20162         Module strnlen.
20163         * m4/strnlen.m4: New file.
20164
20165         Module strndup.
20166         * m4/strndup.m4: New file.
20167
20168         Module xstrtod.
20169         * m4/xstrtod.m4: New file.
20170
20171         Module xstrtol.
20172         * m4/xstrtol.m4: New file.
20173
20174         Module getdate.
20175         * m4/getdate.m4: New file.
20176
20177         Module unlocked-io.
20178         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
20179         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
20180         * m4/jm-glibc-io.m4n: Remove file.
20181
20182         Module long-options.
20183         * m4/long-options.m4: New file.
20184
20185         Module md5.
20186         * m4/md5.m4: New file.
20187
20188         Module sha.
20189         * m4/sha.m4: New file.
20190
20191         Module getstr.
20192         * m4/getstr.m4: New file.
20193
20194         Module getline.
20195         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
20196         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
20197         <sys/types.h>, for size_t. Use the function name gnu_getline, not
20198         simply getline. Infoke gl_PREREQ_GETLINE.
20199
20200         Module obstack.
20201         * m4/obstack.m4: New file.
20202
20203         Module hash.
20204         * m4/hash.m4: New file.
20205
20206         Module readtokens.
20207         * m4/readtokens.m4: New file.
20208
20209         Module strverscmp.
20210         * m4/strverscmp.m4: New file.
20211
20212         Module stdbool.
20213         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
20214         OSF/1.
20215
20216         Module strtoll.
20217         * m4/strtoll.m4: New file.
20218
20219         Module strtoull.
20220         * m4/strtoull.m4: New file.
20221
20222         Module strtoimax.
20223         * m4/strtoimax.m4: New file.
20224
20225         Module strtoumax.
20226         * m4/strtoumax.m4: New file.
20227
20228         Module xstrtoimax.
20229         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
20230         jm_AC_PREREQ_XSTRTOIMAX.
20231         Moved the strtol prerequisites to strtol.m4.
20232         Moved the strtoll prerequisites to strtoll.m4.
20233         Moved the strtoimax prerequisites to strtoimax.m4.
20234
20235         Module xstrtoumax.
20236         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
20237         jm_AC_PREREQ_XSTRTOUMAX.
20238         Moved the strtoul prerequisites to strtoul.m4.
20239         Moved the strtoull prerequisites to strtoull.m4.
20240         Moved the strtoumax prerequisites to strtoumax.m4.
20241
20242         Module chown.
20243         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
20244         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
20245
20246         Module dup2.
20247         * m4/dup2.m4: New file.
20248
20249         Module ftruncate.
20250         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
20251         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
20252
20253         Module getgroups.
20254         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
20255         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
20256
20257         Module gettimeofday.
20258         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
20259         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
20260         gl_PREREQ_GETTIMEOFDAY.
20261
20262         Module mkdir.
20263         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
20264         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
20265
20266         Module mkstemp.
20267         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
20268         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
20269         jm_AC_TYPE_UINTMAX_T.
20270         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
20271
20272         Module stat.
20273         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
20274         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
20275
20276         Module lstat.
20277         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
20278         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
20279
20280         Module timespec.
20281         * m4/timespec.m4 (gl_TIMESPEC): New macro.
20282         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
20283         * m4/st_mtim.m4: Indentation.
20284
20285         Module nanosleep.
20286         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
20287         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
20288         gl_PREREQ_NANOSLEEP.
20289
20290         Module regex.
20291         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
20292         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
20293         (gl_REGEX): New macro.
20294
20295         Module rename.
20296         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
20297         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
20298
20299         Module rmdir.
20300         * m4/rmdir.m4: New file.
20301
20302         Module utime.
20303         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
20304         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
20305         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
20306
20307         Module dirname.
20308         * m4/dirname.m4: New file.
20309
20310         Module getopt.
20311         * m4/getopt.m4: New file.
20312
20313         Module unistd-safer.
20314         * m4/unistd-safer.m4: New file.
20315
20316         Module fnmatch.
20317         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
20318         declaration.
20319         (gl_PREREQ_FNMATCH_EXTRA): New macro.
20320         (gl_FUNC_FNMATCH_POSIX): New macro.
20321         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
20322         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
20323         simply fnmatch.
20324
20325         Module exclude.
20326         * m4/exclude.m4: New file.
20327
20328         Module human.
20329         * m4/human.m4: New file.
20330
20331         Module acl.
20332         * m4/acl.m4: Nop.
20333
20334         Module backupfile.
20335         * m4/backupfile.m4: New file.
20336         * m4/d-ino.m4: Indentation.
20337
20338         Module fsusage.
20339         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
20340         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
20341         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
20342
20343         Module dirfd.
20344         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
20345         requirements.
20346
20347         Module euidaccess.
20348         * m4/euidaccess.m4: New file.
20349
20350         Module file-type.
20351         * m4/file-type.m4: New file.
20352
20353         Module fileblocks.
20354         * m4/fileblocks.m4: New file.
20355
20356         Module filemode.
20357         * m4/filemode.m4: New file.
20358
20359         Module isdir.
20360         * m4/isdir.m4: New file.
20361
20362         Module lchown.
20363         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
20364         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
20365
20366         Module makepath.
20367         * m4/makepath.m4: New file.
20368
20369         Module modechange.
20370         * m4/modechange.m4: New file.
20371
20372         Module mountlist.
20373         * m4/mountlist.m4: New file.
20374         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
20375         Indentation.
20376
20377         Module path-concat.
20378         * m4/path-concat.m4: New file.
20379
20380         Module pathmax.
20381         * m4/pathmax.m4: New file.
20382
20383         Module same.
20384         * m4/same.m4: New file.
20385
20386         Module save-cwd.
20387         * m4/save-cwd.m4: New file.
20388
20389         Module savedir.
20390         * m4/savedir.m4: New file.
20391
20392         Module xgetcwd.
20393         * m4/xgetcwd.m4: New file.
20394         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
20395
20396         Module xreadlink.
20397         * m4/xreadlink.m4: New file.
20398
20399         Module safe-read.
20400         * m4/safe-read.m4: New file.
20401
20402         Module safe-write.
20403         * m4/safe-write.m4: New file.
20404
20405         Module closeout.
20406         * m4/closeout.m4: New file.
20407
20408         Module stdio-safer.
20409         * m4/stdio-safer.m4: New file.
20410
20411         Module getpass.
20412         * m4/getpass.m4: New file.
20413
20414         Module getugroups.
20415         * m4/getugroups.m4: New file.
20416
20417         Module group-member.
20418         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
20419         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
20420
20421         Module idcache.
20422         * m4/idcache.m4: New file.
20423
20424         Module userspec.
20425         * m4/userspec.m4: New file.
20426
20427         Module gettime.
20428         * m4/clock_time.m4: New file.
20429         * m4/gettime.m4: New file.
20430
20431         Module settime.
20432         * m4/settime.m4: New file.
20433
20434         Module posixtm.
20435         * m4/posixtm.m4: New file.
20436
20437         Module gethostname.
20438         * m4/gethostname.m4: New file.
20439
20440         Module canon-host.
20441         * m4/canon-host.m4: New file.
20442
20443         Module gettext.
20444         * m4/codeset.m4: New file, from gettext-0.11.5.
20445         * m4/gettext.m4: New file, from gettext-0.11.5.
20446         * m4/glibc21.m4: New file, from gettext-0.11.5.
20447         * m4/iconv.m4: New file, from gettext-0.11.5.
20448         * m4/intdiv0.m4: New file, from gettext-0.11.5.
20449         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
20450         * m4/inttypes.m4: New file, from gettext-0.11.5.
20451         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
20452         * m4/isc-posix.m4: New file, from gettext-0.11.5.
20453         * m4/lcmessage.m4: New file, from gettext-0.11.5.
20454         * m4/lib-ld.m4: New file, from gettext-0.11.5.
20455         * m4/lib-link.m4: New file, from gettext-0.11.5.
20456         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
20457         * m4/progtest.m4: New file, from gettext-0.11.5.
20458         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
20459         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
20460         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
20461
20462         Module localcharset.
20463         * m4/localcharset.m4: New file.
20464
20465         Module hard-locale.
20466         * m4/hard-locale.m4: New file.
20467
20468         Module mbswidth.
20469         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
20470         onceonly macros.
20471         * m4/mbrtowc.m4: Add comment.
20472
20473         Module memcasecmp.
20474         * m4/memcasecmp.m4: New file.
20475
20476         Module memcoll.
20477         * m4/memcoll.m4: New file.
20478
20479         Module unicodeio.
20480         * m4/unicodeio.m4: New file.
20481
20482         Module rpmatch.
20483         * m4/rpmatch.m4: New file.
20484
20485         Module yesno.
20486         * m4/yesno.m4: New file.
20487
20488         Module exitfail.
20489         * m4/exitfail.m4: New file.
20490
20491         Module c-stack.
20492         * m4/c-stack.m4 (gl_C_STACK): New macro.
20493         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
20494
20495         Module error.
20496         * m4/error.m4 (gl_ERROR): New macro.
20497         (jm_PREREQ_ERROR): Use onceonly macros.
20498
20499         Module fatal.
20500         * m4/fatal.m4: New file.
20501
20502         Module getloadavg.
20503         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
20504         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
20505
20506         Module getpagesize.
20507         * m4/getpagesize.m4: New file.
20508
20509         Module getusershell.
20510         * m4/getusershell.m4: New file.
20511
20512         Module physmem.
20513         * m4/physmem.m4: New file.
20514
20515         Module posixver.
20516         * m4/posixver.m4: New file.
20517
20518         Module quotearg.
20519         * m4/quotearg.m4: New file.
20520
20521         Module quote.
20522         * m4/quote.m4: New file.
20523
20524         Module readutmp.
20525         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
20526
20527         Module sig2str.
20528         * m4/sig2str.m4: New file.
20529
20530         Other.
20531         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
20532         ulonglong.m4.
20533         * m4/intmax_t.m4: New file.
20534         * m4/d-type.m4: Indentation.
20535         * m4/jm-macros.m4: Update.
20536         * m4/prereq.m4 (jm_PREREQ): Update.
20537         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
20538         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
20539         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
20540         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
20541         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
20542         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
20543         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
20544         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
20545         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
20546         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
20547         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
20548         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
20549         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
20550         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
20551         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
20552         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
20553         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
20554         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
20555         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
20556
20557 2002-12-24  Bruno Haible  <bruno@clisp.org>
20558
20559         * MODULES.txt: Update according to m4/ changes.
20560
20561         Module gettext.
20562         * config.rpath: New file, from gettext-0.11.5.
20563
20564         * modules/*: New module descriptions.
20565         * gnulib-tool: New file.
20566         * MODULES.html.sh: New file.
20567
20568 2002-12-21  Karl Berry  <karl@gnu.org>
20569
20570         * doc/fdl.texi: update to version 1.2.
20571
20572 2002-12-19  Karl Berry  <karl@gnu.org>
20573
20574         * config/config.guess: update from prep.
20575
20576 2002-12-18  Bruno Haible  <bruno@clisp.org>
20577
20578         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
20579         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
20580
20581 2002-12-17  Bruno Haible  <bruno@clisp.org>
20582
20583         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
20584         stdlib.h, string.h.
20585
20586 2002-12-17  Bruno Haible  <bruno@clisp.org>
20587
20588         * lib/canon-host.c (strdup): Remove unused declaration.
20589
20590         * lib/fsusage.c: Include full_read.h.
20591         (get_fs_usage): Use full_read instead of safe_read.
20592
20593         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
20594
20595 2002-12-12  Karl Berry  <karl@gnu.org>
20596
20597         * config/config.guess: update from prep.
20598
20599 2002-12-11  Bruno Haible  <bruno@clisp.org>
20600
20601         * m4/setenv.m4: New file, from gettext-0.11.5.
20602
20603 2002-12-11  Bruno Haible  <bruno@clisp.org>
20604
20605         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
20606         not unsetenv().
20607         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
20608         modifications:
20609
20610         2002-12-11  Bruno Haible  <bruno@clisp.org>
20611
20612                 * setenv.c (alloca): Fall back to malloc.
20613                 (freea): New macro.
20614                 (setenv): Use freea() to free memory allocated with alloca().
20615
20616         2002-11-13  Bruno Haible  <bruno@clisp.org>
20617
20618                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
20619                 function declarations.
20620                 * unsetenv.c (unsetenv): Likewise.
20621
20622         2002-03-04  Bruno Haible  <bruno@clisp.org>
20623
20624                 Portability to AIX 4.3.3.
20625                 * unsetenv.c: New file, extracted from setenv.c.
20626                 * setenv.c: Move the unsetenv() function to unsetenv.c.
20627
20628         2001-12-20  Bruno Haible  <bruno@clisp.org>
20629
20630                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
20631                 use malloc instead. For SunOS 4.
20632
20633         2001-12-11  Bruno Haible  <bruno@clisp.org>
20634
20635                 * setenv.c: Declare alloca.
20636                 (compar_fn_t): New typedef.
20637                 (KNOWN_VALUE, STORE_VALUE): Use it.
20638
20639         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
20640         setenv.h.
20641
20642 2002-12-10  Paul Eggert  <eggert@twinsun.com>
20643
20644         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
20645         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
20646         Choose values that are less likely to collide with system fnmatch
20647         options.
20648         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
20649         defined (e.g., a pure POSIX system).
20650         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
20651         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
20652
20653 2002-12-06  Paul Eggert  <eggert@twinsun.com>
20654
20655         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
20656         a pain in practice to deal with generated m4 files.  This change
20657         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
20658
20659         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
20660         and jm-glibc-io.m4, as they are no longer a special case.
20661         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
20662         kludge and the auto-generation stuff.  Check only whether the
20663         functions are declared, not whether they exist, since older hosts
20664         that don't declare the functions can't use the optimization anyway.
20665
20666 2002-12-06  Jim Meyering  <jim@meyering.net>
20667
20668         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
20669
20670         Merge in changes from libc's misc/error.c, in preparation
20671         for the merge of gnulib's changes back into libc.
20672
20673         * lib/error.c (_): Define only if not already defined.
20674         Move definition to follow all #include directives.
20675         Include unlocked-io.h only if !_LIBC.
20676         [_LIBC]: Include <libio/libioP.h>.
20677         [USE_IN_LIBIO]: Include <libio/iolibio.h>
20678         (fflush): Tweak definition to use INTUSE.
20679         (putc): Define.
20680
20681 2002-12-05  Paul Eggert  <eggert@twinsun.com>
20682
20683         * lib/alloca.c [defined emacs]: Include "lisp.h".
20684         (xalloc_die) [defined emacs]: New macro.
20685         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
20686         [! defined emacs]: Include <xalloc.h>.
20687         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
20688         (pointer): Typedef to POINTER_TYPE *.
20689         (malloc): Remove decl; we now always use xmalloc.
20690         (alloca): Use old-style definition, since Emacs needs this.
20691         Check for arithmetic overflow when computing combined size.
20692
20693 2002-12-04  Paul Eggert  <eggert@twinsun.com>
20694
20695         Do not generate unlocked-io.h automatically, since it's easier to
20696         maintain it by hand.
20697
20698         * lib/unlocked-io.h: New file, from GNU diffutils,
20699         but with proper copyright notice and attribution.
20700         * lib/gen-uio: Remove.
20701         * lib/Makefile.am: Add copyright notice.
20702         (libfetish_a_SOURCES): Add unlocked-io.h.
20703         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
20704         (DISTCLEANFILES, io_functions): Remove macros.
20705         (EXTRA_DIST): Remove gen_uio.
20706         (unlocked-io.h): Remove rule.
20707
20708 2002-12-04  Jim Meyering  <jim@meyering.net>
20709
20710         Reflect the fact that stat.c and lstat.c are no longer generated.
20711         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
20712         (DISTCLEANFILES): Likewise.
20713         (EXTRA_DIST): Likewise.
20714         (all_local): Don't depend on stat.c or lstat.c.
20715         (stat.c, lstat.c): Remove rules.
20716         (EXTRA_DIST): Remove xstat.in.
20717
20718         * lib/xstat.in: Remove file.  Contents moved into stat.c.
20719         * lib/stat.c: New file.  Contents mostly from xstat.in.
20720         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
20721         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
20722
20723         * lib/safe-read.c: Rework so that it may serve to define safe_write,
20724         too.
20725         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
20726
20727 2002-12-03  Jim Meyering  <jim@meyering.net>
20728
20729         * lib/safe-read.c, safe-write.c: Change variable names and comments,
20730         but not semantics, to minimize the differences between these two files.
20731         (safe_read): Change comment to mention SAFE_READ_ERROR.
20732
20733         * lib/safe-read.c (IS_EINTR): Define.
20734         (safe_read): Use IS_EINTR in place of in-function cpp directives.
20735
20736 2002-12-02  Jim Meyering  <jim@meyering.net>
20737
20738         * lib/safe-read.c (EINTR): Define.
20739         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
20740         (INT_MAX): Provide fallback.
20741         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
20742
20743         * lib/safe-read.h (SAFE_READ_ERROR): Define.
20744
20745 2002-12-02  Bruno Haible  <bruno@clisp.org>
20746
20747         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
20748         Define, taken from safe-read.c.
20749         (INT_MAX): Provide fallback.
20750         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
20751         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
20752
20753         * lib/safe-read.c (EINTR): Remove definition.
20754         (safe_read): Don't use EINTR if it is absent.
20755
20756 2002-12-01  Jim Meyering  <jim@meyering.net>
20757
20758         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
20759         zero.
20760         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
20761
20762 2002-11-27  Paul Eggert  <eggert@twinsun.com>
20763
20764         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
20765         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
20766         with `if (! (value < limit)) abort ();', for readability.
20767
20768 2002-11-26  Karl Berry  <karl@gnu.org>
20769
20770         * lib/strdup.c: copy from libc again, with jim's ok.
20771         * lib/.cppi-disable: re-add strdup.c
20772
20773 2002-11-25  Karl Berry  <karl@gnu.org>
20774
20775         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
20776         instead of "strtol.c".
20777
20778 2002-11-25  Karl Berry  <karl@gnu.org>
20779
20780         * config/install-sh: update from automake for variable quoting, $0 in
20781         error msgs, etc.
20782
20783         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
20784         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
20785         entry.
20786
20787 2002-11-25  Jim Meyering  <jim@meyering.net>
20788
20789         * lib/mktime.c: Sync from libc, now that it has the latest fix.
20790
20791 2002-11-24  Karl Berry  <karl@gnu.org>
20792
20793         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
20794         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
20795
20796 2002-11-24  Jim Meyering  <jim@meyering.net>
20797
20798         Update from coreutils:
20799
20800         * lib/mktime.c: Merge in changes from libc.
20801
20802         Avoid a link-time failure on some Linux systems.
20803         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
20804         (otherwise).
20805         (__mon_yday): Declare with the STATIC attribute.
20806         (__mktime_internal): Likewise.
20807         Based on a report from Greg Schafer.
20808
20809 2002-11-23  Jim Meyering  <jim@meyering.net>
20810
20811         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
20812         Use `unsigned', not `int', as type of index.
20813
20814         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
20815
20816         * lib/fsusage.c: Remove unneeded parentheses around operands of
20817         `defined'.
20818
20819 2002-11-22  Paul Eggert  <eggert@twinsun.com>
20820
20821         * lib/quotearg.h: Allow multiple inclusion by surrounding with
20822         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
20823         so that we can be included first.
20824         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
20825         * lib/quotearg.c: Include quotearg.h immediately after config.h.
20826         No need to include stddef.h or sys/types.h any more.
20827         Surround local include files with "", not "<>".
20828         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
20829         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
20830         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
20831         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20832         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20833         (ISPRINT): Remove; no longer needed now that we assume C89.
20834
20835         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
20836         Preserve errno.
20837
20838         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
20839         quotearg_char): Use SIZE_MAX rather than
20840         (size_t) -1 when we are talking about "infinity".
20841
20842         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
20843
20844 2002-11-22  Paul Eggert  <eggert@twinsun.com>
20845
20846         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
20847         hint that one should use `if (! x) abort ();' rather than `assert
20848         (x);', and anyway it's one less thing to worry about configuring.
20849         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
20850         hash_rehash, hash_insert): Use abort rather than assert.
20851
20852 2002-11-22  Bruno Haible  <bruno@clisp.org>
20853
20854         * lib/safe-read.h: Assume C89. Add comments.
20855         (safe_read): Change return type to size_t.
20856         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
20857         byte counts > SSIZE_MAX correctly.
20858         * lib/safe-write.h: New file.
20859         * lib/safe-write.c: New file.
20860         * lib/full-read.h: New file.
20861         * lib/full-read.c: New file.
20862         * lib/full-write.h: Assume C89. Add comments.
20863         * lib/full-write.c: Include safe-write.h.
20864         (full_write): Rewritten to use safe_write.
20865         Suggested by Jim Meyering and Paul Eggert.
20866
20867 2002-11-21  Jim Meyering  <jim@meyering.net>
20868
20869         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
20870
20871         Merge in changes from the coreutils.
20872
20873         2002-09-25  Paul Eggert  <eggert@twinsun.com>
20874         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
20875         <stdint.h>.
20876         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
20877         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
20878         int.  Work more efficiently if X is the same width as uintmax_t.
20879         Do not compare X to -1, to avoid bogus compiler warning.
20880         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
20881         Don't assume that f_frsize and f_bsize are the same type.
20882
20883         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
20884         warning on FreeBSD.
20885
20886         * lib/makepath.c (make_path): Restore umask *before* creating the final
20887         component.
20888         (make_path): Minor reformatting.
20889
20890         * lib/xmalloc.c: Adjust to work with new autoconf macros,
20891         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
20892         HAVE_MALLOC/HAVE_REALLOC.
20893
20894         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
20895         dummy ones.  At least on GNU/Linux systems, `auto' means something
20896         else.
20897         From Michael Stone.
20898
20899 2002-11-21  Bruno Haible  <bruno@clisp.org>
20900
20901         Remove case insensitive option matching.
20902         * lib/argmatch.h (argcasematch): Remove declaration.
20903         (ARGCASEMATCH): Remove macro.
20904         (__xargmatch_internal): Remove case_sensitive argument.
20905         (XARGMATCH): Update.
20906         (XARGCASEMATCH): Remove macro.
20907         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
20908         case_sensitive argument.
20909         (argcasematch): Remove function.
20910         (__xargmatch_internal): Remove case_sensitive argument.
20911         (main): Use XARGMATCH instead of XARGCASEMATCH.
20912
20913         * lib/xmalloc.c: Change compile-time error message. Add comment about
20914         required autoconf version.
20915
20916 2002-11-20  Paul Eggert  <eggert@twinsun.com>
20917
20918         Merge argmatch cleanups from Bison.  Assume C89.
20919
20920         * lib/argmatch.c: Include config.h here, not in argmatch.h.
20921         Include stdlib.h, for EXIT_FAILURE.
20922         Always include <string.h>, since we assume C89.
20923         (EXIT_FAILURE): Remove pre-C89 bug workaround.
20924         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
20925         Include <stddef.h> instead, since it's all we need for size_t.
20926         (PARAMS): Remove.  All uses removed.
20927         (ARRAY_CARDINALITY): Do not bother to #undef.
20928         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
20929         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20930         Remove unnecessary parentheses.
20931         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20932         Insert necessary parentheses.
20933         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
20934         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
20935
20936 2002-11-19  Bruno Haible  <bruno@clisp.org>
20937
20938         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
20939         * lib/mbswidth.h: Include <stddef.h>, for size_t.
20940
20941         * lib/mbswidth.h (PARAMS): Remove macro.
20942         (mbswidth, mbsnwidth): Use ANSI C function declarations.
20943         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
20944
20945         * lib/gcd.h (PARAMS): Remove macro.
20946         (gcd): Use ANSI C function declarations.
20947         * lib/gcd.c (gcd): Likewise.
20948
20949 2002-11-15  Bruno Haible  <bruno@clisp.org>
20950
20951         * lib/strcspn.c: Include <stddef.h>.
20952         (strcspn): Use ANSI C function declaration. Change return type to
20953         size_t. Use NULL.
20954         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
20955         (strpbrk): Use NULL.
20956         * lib/strpbrk.h (PARAMS): Remove macro.
20957         (strpbrk): Use ANSI C function declaration.
20958         * lib/strstr.c: Don't include <sys/types.h>.
20959         * lib/strstr.h (PARAMS): Remove macro.
20960         (strstr): Use ANSI C function declarations.
20961
20962 2002-11-14  Karl Berry  <karl@gnu.org>
20963
20964         * config/mkinstalldirs: `do' on separate line, instead of
20965         `for var; do'.
20966
20967 2002-11-06  Bruno Haible  <bruno@clisp.org>
20968
20969         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
20970         * lib/gcd.c (gcd): Likewise.
20971
20972 2002-11-05  Bruno Haible  <bruno@clisp.org>
20973
20974         * lib/gcd.h: New file, from gettext-0.11.5.
20975         * lib/gcd.c: New file, from gettext-0.11.5.
20976
20977 2002-11-05  Bruno Haible  <bruno@clisp.org>
20978
20979         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20980         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20981         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20982         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20983
20984         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
20985         <libintl.h>.
20986         * lib/makepath.c: Include gettext.h instead of <locale.h> and
20987         <libintl.h>.
20988
20989         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
20990         * lib/human.c: Include gettext.h instead of <libintl.h>.
20991         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
20992         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
20993         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
20994         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
20995         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
20996         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
20997         (textdomain): Remove definition.
20998         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
20999
21000         * lib/long-options.c: Remove include of <libintl.h> and definition of
21001         _.
21002         * lib/same.c: Remove include of <libintl.h> and definition of _.
21003
21004 2002-11-04  Owen Taylor  <otaylor@redhat.com>
21005
21006         * lib/config.charset: A few additions for Solaris.
21007
21008 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21009
21010         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
21011         * lib/localcharset.c (locale_charset): Declare as extern "C".
21012
21013 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21014
21015         * lib/config.charset: msdos in uk_UA uses CP1125.
21016
21017 2002-11-04  Bruno Haible  <bruno@clisp.org>
21018
21019         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
21020         * lib/strcase.h: New file, from GNU gettext-0.11.5.
21021         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
21022         * lib/strstr.h: New file, from GNU gettext-0.11.5.
21023         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
21024
21025 2002-11-04  Bruno Haible  <bruno@clisp.org>
21026
21027         * lib/localcharset.c (locale_charset): Don't return an empty string.
21028
21029 2002-11-04  Bruno Haible  <bruno@clisp.org>
21030
21031         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
21032         aliases.
21033
21034 2002-11-04  Bruno Haible  <bruno@clisp.org>
21035
21036         * lib/config.charset: Update for newest glibc. Add canonical names
21037         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
21038
21039 2002-11-04  Bruno Haible  <bruno@clisp.org>
21040
21041         * lib/config.charset: Add support for NetBSD.
21042
21043 2002-11-04  Bruno Haible  <bruno@clisp.org>
21044
21045         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
21046
21047 2002-11-01  Bruno Haible  <bruno@clisp.org>
21048
21049         * configure.in: Add AC_CONFIG_AUX_DIR call.
21050         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
21051         test/Makefile.
21052         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
21053
21054 2002-09-28  Karl Berry  <karl@gnu.org>
21055
21056         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
21057         installed automake until the next release, since changes have been
21058         made.
21059
21060 2002-09-25  Karl Berry  <karl@gnu.org>
21061
21062         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
21063         * lib/getopt*: copy from libc/posix.
21064         * lib/gettext.h: copy from gettext.
21065         * lib/.cppi-disable: add strdup.c, gettext.h.
21066
21067 2002-09-25  Karl Berry  <karl@gnu.org>
21068
21069         * config/srclist.txt: enable gettext.h check.
21070         * config/config.{guess,sub}: update from prep.
21071         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
21072                 from automake 1.6.3.
21073         See srclist*.
21074
21075 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
21076
21077         * regex.c (PATFETCH): Remove the translating fetch.
21078         (PATFETCH_RAW): Rename to PATFETCH.
21079         (set_image_of_range): New fun.
21080         (SET_RANGE_TABLE_WORK_AREA): Use it.
21081         (regex_compile): Don't translate the pattern chars so eagerly.
21082         Only do it when inserting an `exactn' bytecode or when handling
21083         a char-range.
21084         (mutually_exclusive_p): Avoid empty statement.
21085
21086 2002-07-06  Jim Meyering  <meyering@lucent.com>
21087
21088         * m4/README: Don't mention Makefile.am.in.
21089         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
21090
21091 2002-07-01  Jim Meyering  <meyering@lucent.com>
21092
21093         * lib/c-stack.c: Include sys/time.h.
21094         From Volker Borchert.
21095
21096 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21097
21098         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
21099
21100 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21101
21102         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
21103         New macro.  Use it uniformly instead of
21104         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
21105         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
21106         reported by Vin Shelton.
21107
21108 2002-06-22  Paul Eggert  <eggert@twinsun.com>
21109
21110         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
21111         Do not assume SA_SIGINFO behavior.
21112         Bug reported by Jim Meyering on NetBSD 1.5.2.
21113
21114 2002-06-22  Jim Meyering  <meyering@lucent.com>
21115
21116         * m4/c-stack.m4: New file, from diffutils-2.8.2.
21117         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
21118
21119         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
21120         now that configure.ac uses AC_GNU_SOURCE.
21121         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
21122         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
21123
21124         Update to latest tools.  Suggestions from Paul Eggert.
21125         * m4/stdbool.m4: New file, from diffutils-2.8.2.
21126         * m4/gnu-source.m4: Update from diffutils-2.8.2.
21127         * m4/fnmatch.m4: Likewise.
21128         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
21129         to AC_HEADER_STDBOOL
21130
21131 2002-06-22  Jim Meyering  <meyering@lucent.com>
21132
21133         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
21134         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
21135
21136 2002-06-22  Jim Meyering  <meyering@lucent.com>
21137
21138         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
21139
21140         * lib/exitfail.c, exitfail.h: Likewise.
21141         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
21142
21143         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
21144         of fnmatch.h.
21145         (EXTRA_DIST): Add fnmatch_loop.c.
21146         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
21147
21148         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
21149         * lib/fnmatch.c: Update from diffutils-2.8.2.
21150         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
21151         * lib/fnmatch.h: Remove file.
21152
21153 2002-06-21  Jim Meyering  <meyering@lucent.com>
21154
21155         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
21156         * m4/mbrtowc.m4: Likewise.
21157
21158         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
21159         * m4/mbswidth.m4: Reflect name change:
21160         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
21161         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21162
21163         * m4/lib-link.m4: Update from gettext-0.11.2.
21164         * m4/gettext.m4: Likewise.
21165
21166         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
21167         From Alfred M. Szmidt.
21168
21169 2002-06-18  Paul Eggert  <eggert@twinsun.com>
21170
21171         * lib/file-type.h: Report an error if neither S_ISREG nor
21172         S_IFREG is defined, instead of using a test specific to glibc
21173         2.2.  This should be safe, since POSIX requires S_ISREG and
21174         Unix Version 7 had S_IFREG.  We don't need to check for
21175         <sys/types.h> since we don't use any symbols that it defines.
21176
21177 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
21178
21179         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
21180         $@-t, so that each temporary file name is unique and valid in the first
21181         8 characters, for operation under DOS.
21182
21183 2002-06-15  Paul Eggert  <eggert@twinsun.com>
21184
21185         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
21186
21187 2002-06-15  Jim Meyering  <meyering@lucent.com>
21188
21189         Work even with DJGPP 2.03, which lacks support for symlinks.
21190         From Richard Dawe.
21191         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
21192         is defined.
21193         * lib/lchown.c (S_ISLNK): Likewise.
21194
21195 2002-06-15  Jim Meyering  <meyering@lucent.com>
21196
21197         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
21198         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
21199         have been included before this file.
21200
21201 2002-06-14  Jim Meyering  <meyering@lucent.com>
21202
21203         * lib/file-type.h: Use the version from diffutils-2.8.2.
21204         * lib/file-type.c: Likewise.
21205
21206 2002-06-07  Jim Meyering  <meyering@lucent.com>
21207
21208         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
21209         They're needed at least for NetBSD 1.5.2.
21210         ($statxfs_includes): Include those same headers.
21211         ($statxfs_includes): Include sys/vfs.h if available.
21212         ($statxfs_includes): Likewise for sys/statvfs.h.
21213         Check for the following members in both structs statfs and statvfs:
21214         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
21215
21216 2002-06-01  Jim Meyering  <meyering@lucent.com>
21217
21218         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
21219         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
21220
21221 2002-05-28  Jim Meyering  <meyering@lucent.com>
21222
21223         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
21224         Reported by Volker Borchert.
21225
21226 2002-05-27  Jim Meyering  <meyering@lucent.com>
21227
21228         Fix a problem seen only on nonconforming systems whereby ls.c's
21229         use of localtime, and then of gettimeofday would cause trouble:
21230         the localtime call used to initialize rpl_gettimeofday's save
21231         mechanism would clobber ls's current local time information so
21232         that in any long listing the first file would always be listed
21233         with date 1970-01-01.  Analysis by Volker Borchert.
21234
21235         * lib/gettimeofday.c (localtime): Undefine.
21236         (rpl_localtime): New function.
21237
21238 2002-05-27  Jim Meyering  <meyering@lucent.com>
21239
21240         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
21241         localtime.
21242
21243         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
21244         use the replacement function; it wouldn't resolve at link time.
21245         Reported by Volker Borchert.
21246
21247 2002-05-22  Jim Meyering  <meyering@lucent.com>
21248
21249         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
21250         file-type.h.
21251         * lib/file-type.h: New file.
21252         * lib/file-type.c (file_type): New file/function.  Extracted from
21253         diffutils.
21254
21255 2002-04-30  Jim Meyering  <meyering@lucent.com>
21256
21257         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
21258
21259 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21260
21261         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
21262
21263 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21264
21265         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
21266         Do not check for alloca.h (no longer used) or stdbool.h (was never
21267         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
21268
21269 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21270
21271         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
21272
21273 2002-04-29  Jim Meyering  <meyering@lucent.com>
21274
21275         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
21276         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
21277         Use AC_FUNC_STRNLEN here instead.
21278
21279         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
21280         With autoconf-2.53a, it's part of AC_PROG_CC.
21281
21282 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21283
21284         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
21285         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
21286
21287 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21288
21289         * lib/sig2str.h, lib/sig2str.c: New files.
21290         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
21291
21292 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21293
21294         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
21295         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
21296         of 127, since 64 is the largest conceivable number for ancient
21297         nonstandard hosts.
21298         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
21299
21300 2002-04-28  Jim Meyering  <meyering@lucent.com>
21301
21302         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
21303
21304 2002-04-24  Jim Meyering  <meyering@lucent.com>
21305
21306         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
21307         (jm_PREREQ): Use it.
21308
21309         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
21310         mach/mach.h fcntl.h.
21311         Check for this function: setlocale.
21312
21313 2002-04-24  Jim Meyering  <meyering@lucent.com>
21314
21315         * lib/gettext.h: New file, from Gettext.
21316         * lib/Makefile.am (INCLUDES): Remove -I../intl.
21317         (libfetish_a_SOURCES): Add gettext.h.
21318
21319 2002-04-16  Jim Meyering  <meyering@lucent.com>
21320
21321         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
21322         ut_pid, ut_id, ut_exit.
21323
21324 2002-04-16  Jim Meyering  <meyering@lucent.com>
21325
21326         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
21327         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
21328         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
21329
21330 2002-04-12  Jim Meyering  <meyering@lucent.com>
21331
21332         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
21333         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
21334         existence of the getmntinfo function.  Needed for Darwin 5.3.
21335
21336         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
21337         This is necessary at least on Darwin 5.3.
21338
21339         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
21340         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
21341         strnlen.o in the library, and that makes some versions of ranlib
21342         object.
21343
21344 2002-04-12  Jim Meyering  <meyering@lucent.com>
21345
21346         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
21347
21348 2002-04-09  Jim Meyering  <meyering@lucent.com>
21349
21350         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
21351         to be more precise.  Rather than saying we're checking whether the
21352         function `works', say what we're testing.
21353         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
21354         Reported by Bruno Haible.
21355
21356 2002-03-10  Jim Meyering  <meyering@lucent.com>
21357
21358         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
21359         Suggestion from Santiago Vila.
21360
21361 2002-03-08  Jim Meyering  <meyering@lucent.com>
21362
21363         * lib/rename.c: Mention that this wrapper is needed also on
21364         mips-dec-ultrix4.4 systems.
21365
21366 2002-03-02  Jim Meyering  <meyering@lucent.com>
21367
21368         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
21369         not HAVE_CLOCK_SETTIME.
21370
21371 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21372
21373         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
21374         Check for clock_settime.
21375
21376 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21377
21378         * lib/nanosleep.h: Rename to....
21379         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
21380
21381         * lib/gettime.c: New file.
21382         * lib/settime.c: New file.
21383         * lib/stime.c: Remove.
21384
21385         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
21386         timespec.h.  Remove nanosleep.h.
21387
21388 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21389
21390         * m4/acl.m4: New file.
21391         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
21392         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
21393
21394 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21395
21396         * lib/acl.c, lib/acl.h: New files.
21397         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
21398
21399 2002-02-24  Jim Meyering  <meyering@lucent.com>
21400
21401         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
21402         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
21403         cause trouble.  Reported by Nelson Beebe.
21404
21405 2002-02-23  Paul Eggert  <eggert@twinsun.com>
21406
21407         * lib/path-concat.c (xpath_concat): Reorder code to pacify
21408         compilers that don't know that xalloc_die never returns.
21409
21410 2002-02-20  Jim Meyering  <meyering@lucent.com>
21411
21412         * lib/getdate.c: Regenerate using bison-1.33.
21413
21414 2002-02-17  Jim Meyering  <meyering@lucent.com>
21415
21416         * config/config.guess (main): Don't use `head -1'; it's no longer
21417         portable. Use `sed 1q' instead.
21418
21419 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
21420
21421         * m4/codeset.m4: Upgrade to gettext-0.11.
21422         * m4/gettext.m4: Upgrade to gettext-0.11.
21423         * m4/glibc21.m4: Upgrade to gettext-0.11.
21424         * m4/iconv.m4: Upgrade to gettext-0.11.
21425         * m4/isc-posix.m4: Upgrade to gettext-0.11.
21426         * m4/lcmessage.m4: Upgrade to gettext-0.11.
21427         * m4/lib-ld.m4: New file, from gettext-0.11.
21428         * m4/lib-link.m4: New file, from gettext-0.11.
21429         * m4/lib-prefix.m4: New file, from gettext-0.11.
21430         * m4/progtest.m4: Upgrade to gettext-0.11.
21431
21432 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21433
21434         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
21435         (jm_PREREQ): Use it.
21436
21437 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21438
21439         * lib/posixver.c, lib/posixver.h: New files.
21440         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21441
21442 2002-02-02  Paul Eggert  <eggert@twinsun.com>
21443             Bruno Haible  <bruno@clisp.org>
21444
21445         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
21446         (fwrite_success_callback): New declaration.
21447         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
21448         print_unicode_char. Call failure callback instead of error.
21449         (fwrite_success_callback): New function.
21450         (exit_failure_callback): New function.
21451         (fallback_failure_callback): New function.
21452         (print_unicode_char): Call unicode_to_mb.
21453
21454 2002-01-26  Jim Meyering  <meyering@lucent.com>
21455
21456         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
21457         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
21458
21459 2002-01-26  Jim Meyering  <meyering@lucent.com>
21460
21461         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
21462
21463 2002-01-22  Paul Eggert  <eggert@twinsun.com>
21464
21465         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
21466
21467 2002-01-22  Jim Meyering  <meyering@lucent.com>
21468
21469         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
21470         Otherwise, some versions of automake would omit the rule that makes
21471         Makefile from Makefile.in.
21472
21473 2002-01-21  Paul Eggert  <eggert@twinsun.com>
21474
21475         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
21476         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21477         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
21478         (memcoll): Set errno to zero if there is no error.
21479
21480         * lib/quotearg.c (quotearg_buffer_restyled):
21481         Fix bug with quoting buffers containing NUL when backslashing escapes.
21482         This bug was exposed by the other changes in this patch.
21483         (quotearg_n_options): New arg ARGSIZE.
21484         All callers changed.
21485         (quoting_options_from_style): New function.
21486         (quotearg_n_style): Use it.
21487         (quotearg_n_style_mem): New function.
21488
21489         * lib/quotearg.h (quotearg_n_style_mem): New function.
21490
21491 2002-01-19  Jim Meyering  <meyering@lucent.com>
21492
21493         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
21494         Remove useless quotes: DF_PROG="df".
21495         * m4/strnlen.m4: New file.
21496
21497 2002-01-16  Paul Eggert  <eggert@twinsun.com>
21498
21499         * lib/backupfile.c (ISDIGIT): Comment fix.
21500         * lib/getdate.y (ISDIGIT): Likewise.
21501         * lib/posixtm.c (ISDIGIT, year): Likewise.
21502         * lib/strverscmp.c (ISDIGIT): Likewise.
21503         * lib/userspec.c (ISDIGIT): Likewise.
21504
21505 2002-01-16  Jim Meyering  <meyering@lucent.com>
21506
21507         * lib/getdate.y: Add three semicolons, each just before a closing
21508         brace. Bison (as of version 1.31) no longer papers over that mistake.
21509
21510 2002-01-05  Jim Meyering  <meyering@lucent.com>
21511
21512         * lib/version-etc.c (version_etc_copyright): Update copyright year.
21513
21514 2001-12-19  Paul Eggert  <eggert@twinsun.com>
21515
21516         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
21517         not silently exit merely because the output buffer happens to
21518         have nothing pending.
21519
21520 2001-12-18  Paul Eggert  <eggert@twinsun.com>
21521
21522         See the big note in ../ChangeLog.
21523         * lib/human.c (suffixes): Prefer K to k for 1024.
21524         (generate_suffix_backwards): New function.
21525         (human_readable_inexact): Use it.
21526         * lib/xstrtol.c (__xstrtol): If there is no number but there
21527         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
21528         Accept 'K' as well as 'k'.
21529
21530 2001-12-15  Jim Meyering  <meyering@lucent.com>
21531
21532         * lib/regex.h (__restrict_arr): Update from libc.
21533
21534         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
21535         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
21536         (STREQ): Define.
21537
21538 2001-12-14  Jim Meyering  <meyering@lucent.com>
21539
21540         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
21541         Suggestion from Bruno Haible.
21542
21543 2001-12-10  Jim Meyering  <meyering@lucent.com>
21544
21545         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
21546         xrealloc, Instead, include "xalloc.h".
21547         (initbuffer): Don't cast xmalloc return value to char*.
21548         (readline): Reword comment.
21549         Don't cast xrealloc return value to char*
21550         Return NULL, not 0.
21551
21552 2001-12-09  Jim Meyering  <meyering@lucent.com>
21553
21554         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
21555         about `signed and unsigned type in conditional expression'.
21556         * lib/posixtm.c (posix_time_parse): Likewise.
21557
21558         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
21559
21560         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
21561         to avoid a pedantic warning.
21562
21563         * lib/getstr.c: Don't include assert.h.
21564         (getstr): Remove warning-evoking assertions.
21565         Return -1 if offset parameter is out of bounds.
21566         Change the type of a local from int to size_t.
21567
21568         * lib/strftime.c (my_strftime_localtime_r): Include this function
21569         definition in the `#if ! HAVE_TM_GMTOFF' block.
21570
21571         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
21572         Include xalloc.h instead.
21573
21574 2001-12-02  Jim Meyering  <meyering@lucent.com>
21575
21576         * lib/tempname.c: Don't declare getenv, thus reverting the change of
21577         2001-11-18.  It's no longer necessary, now that stdlib.h is always
21578         included.
21579
21580         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
21581         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
21582
21583 2001-11-30  Akim Demaille  <akim@epita.fr>
21584
21585         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
21586         before being defined.
21587
21588 2001-11-27  Paul Eggert  <eggert@twinsun.com>
21589
21590         * lib/quotearg.h (quotearg_n, quotearg_n_style):
21591         First arg is int, not unsigned.
21592         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21593         (SIZE_MAX, UINT_MAX): New macros.
21594         (quotearg_n_options): Abort if N is negative.
21595         Avoid overflow check on hosts where size_t is 64 bits and int
21596         is 32 bits, as overflow is impossible there.
21597         Fix off-by-one typo that caused unnecessary reallocation.
21598
21599 2001-11-27  Jim Meyering  <meyering@lucent.com>
21600
21601         * lib/tempname.c: Merge with version from libc.
21602         * lib/regex.c: Likewise.
21603
21604         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
21605         systems for which STDC_HEADERS is 0, it was not included, resulting in
21606         a warning about an integer-to-pointer conversion problem with getenv.
21607         Reported by Volker Borchert.
21608
21609 2001-11-26  Jim Meyering  <meyering@lucent.com>
21610
21611         * lib/gtod.h: Remove file.
21612         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
21613         * lib/gettimeofday.c: Don't include gtod.h.
21614         (GTOD_init): Remove function.
21615         (rpl_gettimeofday): Do its job here instead, rather than aborting.
21616         Suggestion from Volker Borchert.
21617
21618 2001-11-23  Jim Meyering  <meyering@lucent.com>
21619
21620         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
21621         it.
21622         * lib/hash.c (struct hash_table): Define it here instead.
21623
21624 2001-11-22  Jim Meyering  <meyering@lucent.com>
21625
21626         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
21627
21628 2001-11-20  Jim Meyering  <meyering@lucent.com>
21629
21630         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
21631         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
21632
21633 2001-11-19  Jim Meyering  <meyering@lucent.com>
21634
21635         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
21636         directory.  Use "conftestXXXXXX" as the template.
21637         Suggestion from Paul Eggert.
21638
21639         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
21640         immediately, so the test doesn't mistakenly hit the max-open-files
21641         limit.
21642
21643 2001-11-18  Paul Eggert  <eggert@twinsun.com>
21644
21645         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
21646         (TEMPORARIES): New macro.
21647         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
21648         removes an artificial limitation (e.g. HP-UX 10.20, where
21649         TMP_MAX is 17576).
21650
21651 2001-11-18  Jim Meyering  <meyering@lucent.com>
21652
21653         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
21654
21655 2001-11-18  Jim Meyering  <meyering@lucent.com>
21656
21657         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
21658         on SunOS 4.
21659
21660         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
21661         files will be created before anything else.
21662
21663 2001-11-17  Paul Eggert  <eggert@twinsun.com>
21664
21665         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
21666         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
21667
21668 2001-11-17  Jim Meyering  <meyering@lucent.com>
21669
21670         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
21671         Prompted by a report from Bob Proulx.
21672
21673         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
21674         Instead, require UTILS_FUNC_MKSTEMP.
21675
21676 2001-11-17  Jim Meyering  <meyering@lucent.com>
21677
21678         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
21679         Now, that's done as part of AC_FUNC_STRTOD.
21680
21681 2001-11-17  Jim Meyering  <meyering@lucent.com>
21682
21683         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
21684         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
21685         rather than group writable.  Patch by Juan F. Codagnone.
21686
21687         * lib/readtokens.c: Remove explicit declarations of xmalloc and
21688         xrealloc, Instead, include "xalloc.h".
21689
21690         * lib/mountlist.c: Include unlocked-io.h after all system headers.
21691         Remove explicit declarations of xmalloc, xrealloc,
21692         and xstrdup.  Instead, include "xalloc.h".
21693
21694         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
21695         unlocked-io.h.
21696         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
21697         Likewise.
21698         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
21699
21700         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
21701         Reported by Padraig Brady.
21702
21703         * lib/mkstemp.c: #undef mkstemp.
21704         Include config.h.
21705         (rpl_mkstemp): Rename from mkstemp.
21706         Protoize.
21707
21708 2001-11-16  Jim Meyering  <meyering@lucent.com>
21709
21710         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
21711         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
21712         determine the amount of total physical memory, use pstat_getstatic.
21713         HPUX-11 doesn't define _SC_PHYS_PAGES.
21714         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
21715         If sysconf couldn't be used to determine the amount of available
21716         physical memory, use both pstat_getstatic and pstat_getdynamic.
21717         Based on a patch from Bob Proulx.
21718
21719 2001-11-10  Jim Meyering  <meyering@lucent.com>
21720
21721         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
21722         (jm_PREREQ): Use it.
21723
21724 2001-11-09  Jim Meyering  <meyering@lucent.com>
21725
21726         * m4/jm-macros.m4: Require autoconf-2.52f.
21727         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
21728         Use these AC_-prefixed names, not the AM_-prefixed ones.
21729
21730         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
21731
21732 2001-11-05  Jim Meyering  <meyering@lucent.com>
21733
21734         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
21735
21736 2001-11-04  Jim Meyering  <meyering@lucent.com>
21737
21738         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
21739         $DEFS.
21740
21741 2001-11-03  Jim Meyering  <meyering@lucent.com>
21742
21743         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
21744         of AC_DEFUN.
21745
21746         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
21747         know the name of the variable in the macro definition.
21748
21749 2001-11-03  Jim Meyering  <meyering@lucent.com>
21750
21751         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
21752         in argmatch_to_argument call.
21753
21754         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
21755         argument.
21756
21757         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
21758         e.g., a fault due to an attempt to free a NULL pointer.
21759
21760 2001-11-01  Jim Meyering  <meyering@lucent.com>
21761
21762         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
21763         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
21764
21765 2001-11-01  Jim Meyering  <meyering@lucent.com>
21766
21767         * lib/dirfd.c, lib/dirfd.h: New files.
21768         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
21769
21770         * lib/hash.c (hash_print) [TESTING]: Clean up.
21771
21772 2001-10-22  Paul Eggert  <eggert@twinsun.com>
21773
21774         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
21775         to avoid a warning if -Wall.
21776
21777 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
21778
21779         * README: New file
21780         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
21781         (per RMS's instructions, this is now the canonical source)
21782         * lgpl/, gpl/: New directories.
21783
21784 2001-10-21  Paul Eggert  <eggert@twinsun.com>
21785
21786         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
21787
21788 2001-10-21  Jim Meyering  <meyering@lucent.com>
21789
21790         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
21791         this code would end up calling gettext even in packages built
21792         with --disable-nls.
21793         * lib/getopt.c (_): Likewise.
21794         * lib/regex.c (_): Likewise.
21795
21796 2001-10-20  Paul Eggert  <eggert@twinsun.com>
21797
21798         * m4/error.m4 (jm_PREREQ_ERROR):
21799         Do not invoke AC_CHECK_FUNCS with strerror_r, as
21800         AC_FUNC_STRERROR_R does that.
21801         Check for strerror declaration.
21802
21803         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
21804         are supposed to have them these days.
21805         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
21806         Merge changes from latest Autoconf CVS.
21807         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
21808         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
21809         POSIX decided to standardize on the int flavor of strerror_r.
21810
21811 2001-10-20  Paul Eggert  <eggert@twinsun.com>
21812
21813         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
21814         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
21815         Use strerror_r that is only a macro, even if it is not a function.
21816         (strerror): Check for HAVE_DECL_STRERROR before declaring.
21817         (private_strerror): Use prototypes, not old-style function definition.
21818         (print_errno_message): New function.
21819         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
21820         char*-flavored one.
21821         (error_tail, error, error_at_line): Use it.
21822
21823 2001-10-11  Jim Meyering  <meyering@lucent.com>
21824
21825         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
21826         and quote_n (1, ... to avoid clobbering a buffer.
21827
21828 2001-10-05  Jim Meyering  <meyering@lucent.com>
21829
21830         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
21831         hash-pjw.h.
21832         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
21833         * lib/hash-pjw.h: New file.
21834
21835 2001-09-30  Jim Meyering  <meyering@lucent.com>
21836
21837         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
21838         `struct fsstat' has the `f_fstypename' member.
21839         Use that to define FS_TYPE, which is now used to make
21840         the getfsstat link test tighter.
21841
21842 2001-09-30  Jim Meyering  <meyering@lucent.com>
21843
21844         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
21845         Include <sys/ucred.h>, for Apple Darwin.
21846         Include sys/mount.h and sys/fs_types.h only if available.
21847         (FS_TYPE): Define.
21848         (read_filesystem_list): Use FS_TYPE.
21849
21850 2001-09-29  Paul Eggert  <eggert@twinsun.com>
21851
21852         * lib/exclude.c (excluded_filename): 0 -> false, since it's
21853         a boolean context.
21854
21855 2001-09-29  Jim Meyering  <meyering@lucent.com>
21856
21857         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
21858         [one-argument getmntent function]): Include stdio.h before mntent.h.
21859         SunOS 4.1.x needs it for the declaration of `FILE'.
21860         Patch by Volker Borchert.
21861
21862         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
21863         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
21864         sys/fs_types.h, and make the link-test for getfsstat guard #include
21865         directives with appropriate #if HAVE_*_H tests so that we can
21866         detect getfsstat on Apple Darwin1.3.7 systems.
21867         Reported by Nelson Beebe.
21868         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
21869
21870 2001-09-28  Paul Eggert  <eggert@twinsun.com>
21871
21872         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
21873         #defines strtoimax.  Also treat the other strto* functions
21874         like strtoimax.
21875
21876         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
21877         Check for strtoul and strtoumax,
21878         as those declarations are made even in the signed case.
21879         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
21880         Likewise, for strtol and strtoimax.
21881
21882 2001-09-28  Paul Eggert  <eggert@twinsun.com>
21883
21884         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
21885         #defines strtoimax.  Also treat the other strto* functions
21886         like strtoimax.
21887
21888         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
21889         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
21890         (strtoimax, strtoumax): Do not declare if already defined as a macro.
21891
21892 2001-09-26  Jim Meyering  <meyering@lucent.com>
21893
21894         Most macros in unlocked-io.h had the wrong number of arguments.
21895         * lib/gen-uio: New script.
21896         (USE_UNLOCKED_IO): Define to 1 if not already defined.
21897         * lib/unlocked-io.hin: Remove file.
21898         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
21899         rather than trying to embed it here.
21900         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
21901         Reported by Padraig Brady.
21902
21903 2001-09-25  Volker Borchert  <bt@teknon.de>
21904
21905         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
21906         `result'.
21907
21908 2001-09-24  Jim Meyering  <meyering@lucent.com>
21909
21910         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
21911
21912 2001-09-23  Jim Meyering  <meyering@lucent.com>
21913
21914         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
21915         instead of the mere test for existence of mntent.h.  The latter
21916         would get a false-positive on AIX 3.4 systems.
21917         In the outer getmntent if-block, don't die if neither of the getmntent
21918         tests succeeds.  Instead, just fall through and continue with the
21919         remaining tests.
21920
21921 2001-09-23  Jim Meyering  <meyering@lucent.com>
21922
21923         * lib/mountlist.c: Remove useless parentheses in #if directives.
21924         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
21925         the deprecated MOUNTED symbol is no longer defined in mntent.h.
21926
21927 2001-09-22  Jim Meyering  <meyering@lucent.com>
21928
21929         * m4/gettext.m4: New file.  From gettext.
21930         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
21931         * m4/progtest.m4: Likewise
21932         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
21933         * m4/glibc21.m4: Likewise.
21934
21935         * m4/libintl.m4: Remove.  No longer used.
21936
21937 2001-09-22  Jim Meyering  <meyering@lucent.com>
21938
21939         * lib/localcharset.c: Update from latest gettext.
21940         * lib/config.charset: Likewise.
21941
21942 2001-09-20  Jim Meyering  <meyering@lucent.com>
21943
21944         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
21945         strtoimax.
21946         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
21947         strtoumax.
21948
21949 2001-09-20  Jim Meyering  <meyering@lucent.com>
21950
21951         * lib/xstrtol.c (strtoimax): Guard declaration with
21952         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
21953         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
21954         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
21955         (strtoumax): Likewise, for completeness (it wasn't necessary).
21956
21957 2001-09-17  Paul Eggert  <eggert@twinsun.com>
21958
21959         * lib/strtoimax.c (HAVE_LONG_LONG):
21960         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
21961         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
21962         to work around bug in IBM C compiler.
21963
21964 2001-09-17  Jim Meyering  <meyering@lucent.com>
21965
21966         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
21967         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
21968         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
21969         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
21970         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
21971         whenever the right hand side need not be expanded by the shell.
21972
21973 2001-09-16  Paul Eggert  <eggert@twinsun.com>
21974
21975         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
21976         library.  It's not correct, as some older glibcs are buggy.
21977         fnmatch wasn't fixed until glibc 2.2.
21978
21979         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
21980         special shell magic here.
21981
21982 2001-09-16  Jim Meyering  <meyering@lucent.com>
21983
21984         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
21985         * m4/jm-macros.m4: Require it.
21986
21987 2001-09-16  Jim Meyering  <meyering@lucent.com>
21988
21989         * lib/mkdir.c: New file.
21990
21991 2001-09-15  Jim Meyering  <meyering@lucent.com>
21992
21993         * m4/jm-macros.m4: Check for help2man.
21994
21995 2001-09-11  Jim Meyering  <meyering@lucent.com>
21996
21997         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
21998         The body, by Paul Eggert, was moved here from configure.in.
21999         * m4/jm-macros.m4: Require UTILS_HOST_OS.
22000
22001 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22002
22003         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
22004         (jm_PREREQ): Use it.
22005
22006 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22007
22008         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
22009         Use ssize_t, not int, to store result of readlink.
22010         Check for ssize_t overflow as well as size_t overflow,
22011         as POSIX says the result of readlink is implementation-defined
22012         when ssize_t overflows.
22013         Remove unnecessary cast to char*.
22014         Use free+malloc instead of realloc, as the storage doesn't need
22015         to be preserved and it's clearer and can be more efficient that way.
22016         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
22017         * lib/xreadlink.h (xreadlink): Update prototype.
22018
22019 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22020
22021         * lib/xgetcwd.c: Revert some of the previous change; intead,
22022         fix the HAVE_GETCWD_NULL code to behave more like the
22023         !HAVE_GETCWD_NULL code used to.
22024
22025         Include "xalloc.h".
22026         (xgetcwd): Do not return NULL when memory is exhausted; instead,
22027         invoke xalloc_die.
22028
22029 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22030
22031         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
22032         sys/param.h, as pathmax.h includes them.
22033
22034 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22035
22036         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
22037         (jm_PREREQ_XGETCWD): New macro.
22038
22039         * m4/getcwd.m4: New file.
22040
22041 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22042
22043         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
22044         like the HAVE_GETCWD_NULL code.
22045         Include pathmax.h if not HAVE_GETCWD.
22046         Do not include xalloc.h.
22047         (INITIAL_BUFFER_SIZE): New symbol.
22048         Do not use xmalloc / xrealloc, since the caller is responsible for
22049         handling errors.  Preserve errno around `free' during failure.
22050         Do not overrun buffer when using getwd.
22051
22052 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22053
22054         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
22055         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
22056         getcwd (NULL, 0).
22057
22058 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22059
22060         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
22061         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
22062         spotted by Jim Meyering.
22063
22064 2001-09-03  Jim Meyering  <meyering@lucent.com>
22065
22066         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
22067         failure.
22068
22069 2001-09-02  Jim Meyering  <meyering@lucent.com>
22070
22071         * lib/error.c: Update from GNU libc.
22072
22073 2001-09-01  Jim Meyering  <meyering@lucent.com>
22074
22075         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
22076         Used by df.
22077
22078 2001-09-01  Jim Meyering  <meyering@lucent.com>
22079
22080         * lib/xreadlink.c: New file.
22081         * lib/xreadlink.h: New file.
22082         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
22083         xreadlink.h.
22084
22085         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
22086         doesn't conflict with sparc Solaris 7's definition in
22087         /usr/include/sys/int_types.h.
22088
22089         * lib/exclude.c: Use `""', not `<>' to #include non-system header
22090         files.
22091         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
22092         and strncasecmp as r-values.  Unixware didn't have declarations.
22093
22094 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22095
22096         * lib/xstrtol.h: Add copyright notice.
22097         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
22098         LONGINT_INVALID_SUFFIX_CHAR.
22099
22100 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22101
22102         * lib/xstrtol.c (strtoimax): New decl.
22103
22104 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22105
22106         * lib/xgetcwd.c: Don't include pathmax.h.
22107         Include stdlib.h and unistd.h if available.
22108         Include xalloc.h.
22109         (xmalloc, xstrdup, free): Remove decls.
22110         (xgetcwd): Don't assume sizes fit in unsigned.
22111         Check for overflow when computing sizes.
22112         Simplify reallocation code.
22113
22114 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22115
22116         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
22117         a directory's st_size can have an arbitrary value, so the old
22118         usage could waste an arbitrary amount of memory.  All uses
22119         changed.
22120         * lib/savedir.h: Update prototype.
22121
22122 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22123
22124         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
22125
22126         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
22127         old strtoimax.c.
22128
22129         Also, make the following further changes to make this file's
22130         configuration more similar to that of strtol.c:
22131         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
22132         (strtoumax, uintmax_t, strtoull, strtol): Remove.
22133         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
22134         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
22135         changed to signed values.
22136
22137         And make the following changes as well:
22138         Fix copyright notice, as 1999 was missing.
22139         (verify): New macro.
22140         (strtoimax): Check sizes at compile-time, not run-time.
22141         Prefer strtol to strtoll if both work.
22142         (main): Remove; it was not that useful and was a pain to maintain.
22143
22144         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
22145
22146 2001-08-31  Jim Meyering  <meyering@lucent.com>
22147
22148         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
22149         Use an initial, malloc'd, buffer of length 128 rather than
22150         a statically allocated one of length 1024.
22151
22152 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22153
22154         Simplify code, partly by assuming autoconf 2.52 semantics.
22155
22156         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
22157
22158         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
22159         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
22160         All uses removed.
22161         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
22162         Move AC_REQUIRE to next-to-top level, to avoid confusion.
22163         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
22164         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
22165         jm_AC_HEADER_INTTYPES_H.
22166         * m4/jm-macros.m4 (jm_MACROS): Likewise.
22167
22168         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
22169
22170         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22171         Quote first arg of AC_DEFUN.
22172         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
22173         since they are needed to parse the include file even if we need
22174         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
22175         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
22176         but with opposite signedness.
22177
22178 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22179
22180         Merge 'exclude' changes from tar 1.13.22.
22181         This fixes one or two unlikely storage allocation overflow bugs,
22182         but doesn't change user-visible behavior otherwise.
22183
22184 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22185
22186         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
22187         (jm_PREREQ_EXCLUDE): New macro.
22188
22189 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22190
22191         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22192         tm to be declared.
22193
22194 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22195
22196         * lib/hash.c: Remove '2001' from copyright notice.
22197
22198 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22199
22200         * lib/full-write.h: New file.
22201         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
22202         * lib/full-write.c: Correct credits, as cccp.c no longer
22203         exists and anyway it was so heavily changed from the old cccp
22204         code as to be unrecognizable.  Include full-write.h.
22205         (full_write) Return size_t, with short writes meaning failure.
22206         All callers changed.  This fixes a bug with large buffers
22207         on 64-bit hosts.
22208         * lib/utime.c: Include full-write.h.
22209
22210 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22211
22212         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
22213         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
22214         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
22215         Include if available.
22216         (<xalloc.h>): Include
22217         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
22218         (verify): New macro.  Use it to verify that EXCLUDE macros do not
22219         collide with FNM macros.
22220         (struct patopts): New struct.
22221         (struct exclude): Use it, as exclude patterns now come with options.
22222         (new_exclude): Support above changes.
22223         (new_exclude, add_exclude_file):
22224         Initial size must now be a power of two to simplify overflow checking.
22225         (free_exclude, fnmatch_no_wildcards): New function.
22226         (excluded_filename): No longer requires options arg, as the options
22227         are determined by add_exclude.  Now returns bool, not int.
22228         (excluded_filename, add_exclude):
22229         Add support for the fancy new exclusion options.
22230         (add_exclude, add_exclude_file): Now takes int options arg.
22231         Check for arithmetic overflow when computing sizes.
22232         (add_exclude_file): xrealloc might modify errno, so don't
22233         realloc until after errno might be used.
22234
22235         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
22236         New macros.
22237         (free_exclude): New decl.
22238         (add_exclude, add_exclude_file): Now takes int options arg.
22239         (excluded_filename): No longer requires options arg, as the options
22240         are determined by add_exclude.  Now returns bool, not int.
22241
22242 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22243
22244         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
22245
22246 2001-08-27  Jim Meyering  <meyering@lucent.com>
22247
22248         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
22249
22250         * lib/version-etc.c (N_): Remove definition.
22251         Revert most of last change.
22252         Instead, simply don't mark the `Copyright...' string for translation.
22253         Based on advice from Paul Eggert.
22254
22255         * lib/strtoxmax.c: Tweak comment.
22256
22257 2001-08-26  Jim Meyering  <meyering@lucent.com>
22258
22259         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
22260
22261         * m4/xstrtoimax.m4: New file.
22262         * m4/xstrtoumax.m4: Add comments explaining why we
22263         AC_REPLACE_FUNCS(strtol).
22264
22265 2001-08-26  Jim Meyering  <meyering@lucent.com>
22266
22267         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
22268         of copyright with `%s' so translators don't get an untranslated
22269         message in 2002.
22270         (COPYRIGHT_YEAR): Define.
22271         (version_etc): Use fprintf rather than fputs.
22272         Suggestion from Ulrich Drepper.
22273
22274         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
22275
22276         * lib/strtoll.c: New file, from GNU libc.
22277         * lib/xstrtoimax.c: New file.
22278
22279         * lib/xstrtol.h: Add xstrtoimax.
22280         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
22281         * lib/strtoimax.c: New file.  Likewise, but first define
22282         STRTOUXMAX_SIGNED.
22283
22284         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
22285         ...
22286         * lib/strtoxmax.c: ... then renamed to this.
22287
22288 2001-08-18  Paul Eggert  <eggert@twinsun.com>
22289
22290         * m4/inttypes.m4: Add AC_PREREQ(2.13).
22291         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
22292         (jm_AC_TYPE_INTMAX_T): New macro.
22293         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
22294
22295         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
22296
22297         * m4/longlong.m4: Renamed from ulonglong.m4.
22298         * m4/inttypes.m4: Renamed from inttypes_h.m4.
22299         * m4/uintmax_t.m4: Removed.
22300
22301 2001-08-13  Paul Eggert  <eggert@twinsun.com>
22302
22303         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
22304         Port to Solaris 8, where 'sed' requires a space after the 'r'
22305         command, and where sh dislikes "$/".  Clean up the spacing a bit.
22306         Redirect output to $tmp just once.
22307
22308 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
22309
22310         * lib/addext.c (<errno.h>): Include.
22311         (errno): Declare if not defined.
22312         (addext): Work correctly when pathconf returns -1 and leaves
22313         errno alone because there is no limit.  Also, work even if
22314         pathconf returns a value greater than SIZE_MAX.
22315
22316 2001-08-12  Jim Meyering  <meyering@lucent.com>
22317
22318         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
22319         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
22320         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
22321         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
22322         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
22323         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
22324         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
22325         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
22326         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
22327         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
22328         utime.m4, utimes.m4, xstrtoumax.m4:
22329         Quote the first argument in each use of AC_DEFUN.
22330
22331 2001-08-12  Jim Meyering  <meyering@lucent.com>
22332
22333         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
22334         Simply `return getcwd (NULL, 0);'.
22335         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
22336         Use 1300 as initial value for length, not PATH_MAX.
22337
22338         * lib/pathmax.h: Clean up cpp syntax.
22339
22340 2001-08-12  Jim Meyering  <meyering@lucent.com>
22341
22342         * lib/gettimeofday.c: New file.
22343         * lib/gtod.h: New file.
22344         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
22345
22346 2001-08-05  Jim Meyering  <meyering@lucent.com>
22347
22348         * m4/jm-macros.m4: Require autoconf-2.52.
22349
22350 2001-08-04  Jim Meyering  <meyering@lucent.com>
22351
22352         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
22353         stmt, to get in sync with glibc.
22354
22355 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22356
22357         The following changes are from gettext 0.10.39 as maintained by
22358         Bruno Haible.
22359
22360         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
22361         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
22362         with inverted sense.  All uses changed.
22363
22364         * lib/mbswidth.c: Don't include <limits.h>.
22365         Include <stdlib.h> and <string.h> unconditionally.
22366         (iswcntrl, mbsinit, ISCNTRL): New macros.
22367         (mbsnwidth): Use K&R style function declarations.
22368         Don't bother checking for MB_LEN_MAX == 1, since the compiler
22369         can optimize it when MB_CUR_MAX == 1.
22370         The width of control characters is zero, not 1.
22371
22372 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22373
22374         The following changes are from gettext 0.10.39 as maintained by
22375         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
22376
22377         * m4/codeset.m4: Upgrade to serial AM1.
22378         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
22379         all uses changed.  Quote first arg of AC_DEFUN.
22380         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
22381
22382         * m4/iconv.m4: Upgrade to serial AM2.
22383         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
22384         Add --with-libconv-prefix.
22385         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
22386         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
22387         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
22388         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
22389         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
22390
22391         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
22392         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
22393         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
22394         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
22395         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
22396         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
22397         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
22398         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
22399         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
22400
22401         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
22402         string.h any more.
22403
22404         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
22405         not the default value.
22406
22407         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
22408         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
22409         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
22410         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
22411         Also check for iswcntrl, used for wcwidth fallback.
22412         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
22413         to Autoconf 2.13.
22414
22415 2001-08-03  Jim Meyering  <meyering@lucent.com>
22416
22417         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
22418         as it was in the original.  Reported by Paul Eggert.
22419
22420 2001-07-16  Jim Meyering  <meyering@lucent.com>
22421
22422         * m4/gettimeofday.m4: New file.
22423         Prompted by a report from Bernhard Baehr.
22424
22425 2001-07-15  Jim Meyering  <meyering@lucent.com>
22426
22427         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
22428         stuff. Now it's in ../Makefile.cfg.
22429
22430 2001-07-15  Jim Meyering  <meyering@lucent.com>
22431
22432         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
22433         (BUILT_SOURCES): Add unlocked-io.h.
22434         (io_functions): Define.
22435         (unlocked-io.h): New rule.
22436         (DISTCLEANFILES): Add unlocked-io.h.
22437         (all-local): Depend on unlocked-io.h, to ensure it is created.
22438
22439         * lib/unlocked-io.hin: New file
22440
22441         * lib/regex.c: Update from glibc.
22442
22443 2001-07-05  Jim Meyering  <meyering@lucent.com>
22444
22445         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
22446         recommendation.
22447         (libfetish_a_SOURCES): Put all .h files here instead.
22448         Remove a thus-exposed (better checks in automake) duplicate and
22449         two unnecessary .h files.
22450
22451 2001-07-04  Jim Meyering  <meyering@lucent.com>
22452
22453         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
22454         that generates jm-glibc-io.m4 so that it doesn't trigger any make
22455         distcheck failure.
22456
22457 2001-07-02  Jim Meyering  <meyering@lucent.com>
22458
22459         The following changes were prompted by suggestions from Bruno Haible.
22460
22461         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
22462         is now generated.
22463         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
22464         definition of EXTRA_DIST.
22465         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
22466         ensure that the generated file is created/updated whenever the list
22467         of $(unlocked_functions) is changed.
22468         (jm-glibc-io.m4): New rule.
22469         (unlocked-io.h): New rule -- currently unused.
22470
22471 2001-06-24  Jim Meyering  <meyering@lucent.com>
22472
22473         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
22474         unmatched right bracket, rather than kludging it with an extra,
22475         falsely-matching quote in a comment.  Patch by Akim Demaille.
22476
22477 2001-06-11  Jim Meyering  <meyering@lucent.com>
22478
22479         * lib/regex.c: Update from GNU libc.
22480
22481 2001-05-27  Jim Meyering  <meyering@lucent.com>
22482
22483         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
22484         Check for ut_type in struct utmp.
22485
22486 2001-05-27  Jim Meyering  <meyering@lucent.com>
22487
22488         * lib/readutmp.h (UT_TYPE): Define.
22489
22490 2001-05-24  Jim Meyering  <meyering@lucent.com>
22491
22492         * lib/argmatch.c: Include "quote.h".
22493         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
22494         quote function.  Reported by Göran Uddeborg.
22495
22496 2001-05-22  Jim Meyering  <meyering@lucent.com>
22497
22498         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
22499         now that we use the package-supplied version unconditionally.
22500         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
22501
22502 2001-05-21  Jim Meyering  <meyering@lucent.com>
22503
22504         * m4/regex.m4: Change a couple backticks to single quotes to avoid
22505         shell syntax errors.
22506
22507 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22508
22509         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
22510
22511 2001-05-20  Paul Eggert  <eggert@twinsun.com>
22512
22513         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
22514         Don't bother to check library strftime, since
22515         we'll be using our own my_strftime function anyway.
22516         Define my_strftime instead of strftime.
22517
22518 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
22519
22520         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
22521         which is not yet declared.
22522
22523 2001-05-15  Jim Meyering  <meyering@lucent.com>
22524
22525         * m4/regex.m4: Use proper quoting so brackets appear in the test
22526         program.
22527         Reported by, and with help from, Bruno Haible.
22528
22529 2001-05-13  Jim Meyering  <meyering@lucent.com>
22530
22531         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
22532         undefined.
22533
22534 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22535
22536         dirname code cleanup.  base_name now behaves more compatibly
22537         with POSIX basename when given file names that have trailing
22538         slashes, and similarly for dir_name.  Add new primitives
22539         base_len and dir_len.  Put the directory-name-related decls
22540         into dirname.h.
22541
22542         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
22543         * lib/backupfile.c (base_name): Likewise.
22544         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
22545         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
22546         * lib/makepath.c (strip_trailing_slashes): Likewise.
22547         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
22548         ISSLASH): Likewise.
22549         * lib/rename.c (strip_trailing_slashes): Likewise.
22550         * lib/same.c (base_name): Likewise.
22551         * lib/stripslash.c (ISSLASH): Likewise.
22552
22553         * lib/addext.c: Include <dirname.h> after size_t is defined.
22554         * lib/backupfile.c: Likewise.
22555
22556         * lib/addext.c (addext): Use base_len to trim redundant
22557         trailing slashes instead of doing it ourselves.
22558         But do not trim the last slash if it is not redundant.
22559
22560         * lib/backupfile.c (find_backup_file_name,
22561         max_backup_version): Use base_len instead of rolling it ourselves.
22562         Handle the case of "" and (on DOS) "C:" correctly.
22563
22564         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
22565         needed. Include <string.h>, <dirname.h>.
22566         (base_name): Allow file names ending in slashes, other than names
22567         that are all slashes.  In this case, return the basename followed
22568         by the slashes.  This is more general, and can be used in places
22569         where the original base_name purposely had an assertion failure.
22570         (base_len): New function.
22571
22572         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
22573         Do not include <assert.h>; no longer needed.
22574         Include xalloc.h.
22575         (memrchr): Remove decl.
22576         (dir_name_r): Remove.
22577         (dir_len): Renamed from dirlen.  All callers changed.
22578         Rewrite in terms of base_name, for simplicity and consistency.
22579         (dir_name): Never return NULL.  All callers changed.
22580         Do not include <stdlib.h> in test program; no longer needed.
22581         return 0; is fine for test program.
22582
22583         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
22584         New macros.
22585         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
22586
22587         * lib/path-concat.c (path_concat): Use base_len to compute
22588         base length, not strlen; this means we cannot rely on memcpy
22589         to null-terminate.
22590
22591         * lib/same.c (STREQ): Remove.
22592         (same_name): Handle the case where the basename ends in trailing '/'.
22593
22594         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
22595         a slash was stripped.  Do not strip the last slash after a
22596         file system prefix.
22597
22598 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22599
22600         * lib/Makefile.am (libfetish_a_SOURCES):
22601         Add strftime.c, since we now compile it on all hosts.
22602
22603         * lib/strftime.c (my_strftime):
22604         Define to nstrftime if emacs, but only if my_strftime is not defined.
22605         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
22606         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
22607         Add one more extra argument: a nanoseconds value.
22608         All uses changed.
22609         (ns): New macro.
22610         (my_strftime function): Add %N format.
22611         (emacs_strftimeu): Renamed from emacs_strftime,
22612         with extra ut argument.
22613
22614 2001-05-09  Paul Eggert  <eggert@twinsun.com>
22615
22616         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
22617
22618 2001-04-21  Jim Meyering  <meyering@lucent.com>
22619
22620         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
22621         doesn't interfere.
22622
22623 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22624
22625         * m4/ftruncate.m4: Check for chsize.
22626         Link with ftruncate.o unconditionally if ftruncate is missing.
22627         This was required when cross-compiling to i586-mingw32msvc.
22628
22629 2001-04-08  Jim Meyering  <meyering@lucent.com>
22630
22631         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
22632         recomputed; that's necessary when the offset spans a DST transition.
22633         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
22634
22635 2001-04-02  Jim Meyering  <meyering@lucent.com>
22636
22637         * lib/regex.h, regex.c: Update from GNU libc.
22638
22639 2001-03-24  Jim Meyering  <meyering@lucent.com>
22640
22641         * m4/jm-macros.m4: Require autoconf-2.49d.
22642
22643 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
22644
22645         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
22646
22647 2001-03-19  Paul Eggert  <eggert@twinsun.com>
22648
22649         * lib/version-etc.c (version_etc_copyright): Update to 2001.
22650
22651 2001-03-17  Jim Meyering  <meyering@lucent.com>
22652
22653         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
22654         now that the version in autoconf is equivalent.
22655         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
22656
22657         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
22658         Suggestion from Akim Demaille.
22659
22660         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
22661         (jm_PREREQ_TEMPNAME): New function.
22662
22663 2001-03-16  Paul Eggert  <eggert@twinsun.com>
22664
22665         * lib/tempname.c (uint64_t): Define to uintmax_t if
22666         not defined, and if UINT64_MAX is not defined.
22667         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
22668         Reported by John David Anglin.
22669
22670 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
22671
22672         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
22673         resolve alias if codeset is empty.
22674         * lib/config.charset (BeOS): Use wildcard syntax.
22675
22676 2001-03-13  Jim Meyering  <meyering@lucent.com>
22677
22678         * lib/path-concat.c (path_concat)
22679         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
22680         concatenating e.g., `C:' and `foo'.
22681         From Bruno Haible.
22682
22683 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22684
22685         * lib/localcharset.c (locale_charset): Don't use
22686         setlocale(LC_CTYPE,NULL). Don't return NULL.
22687         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
22688
22689 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22690
22691         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
22692         support for DOS/DJGPP.
22693
22694 2001-03-01  Paul Eggert  <eggert@twinsun.com>
22695
22696         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
22697         lacks mkstemp.  Compile our own tempname.c if we compile our own
22698         mkstemp.c, as mkstemp relies on tempname.
22699
22700 2001-03-01  Jim Meyering  <meyering@lucent.com>
22701
22702         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
22703         AH_VERBATIM really does output its argument verbatim.
22704
22705 2001-02-28  Paul Eggert  <eggert@twinsun.com>
22706
22707         * lib/Makefile.am (libfetish_a_SOURCES):
22708         Add dup-safer.c, fopen-safer.c.
22709         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
22710
22711         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
22712         * lib/unistd-safer.h: New files.
22713
22714 2001-02-25  Paul Eggert  <eggert@twinsun.com>
22715
22716         The mkstemp replacement is taken from glibc 2.2.2, with some
22717         portability fixes for use outside glibc, as follows:
22718
22719         * lib/tempname.c (struct_stat64): New macro.
22720         (direxists, __gen_tempname): Use it.
22721         This avoids a portability problem with Solaris 8.
22722
22723         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
22724         (<stddef.h>, <stdint.h>, <string.h>):
22725         Include only if STDC_HEADERS || _LIBC.
22726         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
22727         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
22728         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
22729         (__set_errno): Define this macro if <errno.h> doesn't.
22730         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
22731         Define these macros if <stdio.h> doesn't.
22732         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
22733         Define these macros if <sys/stat.h>
22734         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
22735         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
22736         __xstat64): Define if not _LIBC.
22737         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
22738         (__gen_tempname): Invoke gettimeofday only if
22739         HAVE_GETTIMEOFDAY || _LIBC;
22740         otherwise, fall back on plain "time".
22741         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
22742
22743         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
22744
22745         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
22746
22747 2001-02-18  Paul Eggert  <eggert@twinsun.com>
22748
22749         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
22750
22751 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22752
22753         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
22754         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
22755         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
22756         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22757
22758 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22759
22760         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
22761         Remove workaround macros for hosts that have mbrtowc but not
22762         mbstate_t, as we now insist on proper declarations for both
22763         before using mbrtowc.
22764
22765 2001-02-17  Jim Meyering  <meyering@lucent.com>
22766
22767         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
22768         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
22769         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
22770         UnixWare 7.1.1.
22771
22772         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
22773         rather than AC_CACHE_VAL.
22774
22775 2001-02-17  Jim Meyering  <meyering@lucent.com>
22776
22777         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
22778         around included file name.
22779
22780         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
22781
22782         * lib/strftime.c: Update from GNU libc (the only changes were to
22783         comments).
22784
22785 2001-02-17  Jim Meyering  <meyering@lucent.com>
22786
22787         * lib/regex.c: Update from libc.
22788
22789 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
22790
22791         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
22792         clash.
22793
22794 2001-02-16  Paul Eggert  <eggert@twinsun.com>
22795
22796         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
22797         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
22798         Reported by Mark Hounschell via Paul Eggert.
22799
22800 2001-02-07  Jim Meyering  <meyering@lucent.com>
22801
22802         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
22803
22804 2001-02-05  Jim Meyering  <meyering@lucent.com>
22805
22806         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
22807         it includes the patch required for `large file' support with at least
22808         HP-UX's 10.20 /bin/cc.
22809
22810 2001-02-03  Jim Meyering  <meyering@lucent.com>
22811
22812         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
22813         AS_IF, now that it works once again (mysteriously).
22814         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
22815
22816 2001-01-30  Jim Meyering  <meyering@lucent.com>
22817
22818         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
22819         * m4/chown.m4: Rename conftestchown to conftest.chown.
22820         * m4/rename.m4: s/conftestdir/conftest.d1/ and
22821         s/conftestdir2/conftest.d2/.
22822         * m4/utimes.m4: s/conftestdata/conftest.data/
22823         Inspired by Pavel Roskin's change in autoconf.
22824
22825 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
22826
22827         * lib/config.charset: Update for FreeBSD 4.2.
22828
22829 2001-01-27  Jim Meyering  <meyering@lucent.com>
22830
22831         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
22832         a use of AS_IF.
22833         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
22834
22835 2001-01-26  Jim Meyering  <meyering@lucent.com>
22836
22837         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
22838         quotearg.c includes it.
22839
22840 2001-01-26  Jim Meyering  <meyering@lucent.com>
22841
22842         * lib/quotearg.c: Include stddef.h.
22843         * lib/quote.c: Include stddef.h.
22844         Reported by Axel Kittenberger.
22845
22846         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
22847         line in double quotes so that it evokes a better diagnostic.
22848         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
22849         Reported by Axel Kittenberger.
22850
22851 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
22852
22853         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
22854         as if it was a `charset'.
22855
22856 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
22857
22858         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
22859         has const.
22860
22861 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
22862
22863         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
22864         to avoid a warning.  Add back 'const' to inptr.
22865
22866 2001-01-20  Jim Meyering  <meyering@lucent.com>
22867
22868         Be sure that headers are checked before used in code compiled
22869         for the type checks.
22870         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
22871         In place of that, invoke jm_CHECK_ALL_TYPES.
22872         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
22873         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
22874         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
22875         The check for ssize_t was mistakenly run before the test for unistd.h.
22876
22877         The configure-time check for stdbool.h was missing.
22878         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
22879         (jm_PREREQ_HASH): New function.
22880
22881 2001-01-17  Jim Meyering  <meyering@lucent.com>
22882
22883         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
22884         for autoconf-2.49c.
22885         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
22886
22887 2001-01-16  Jim Meyering  <meyering@lucent.com>
22888
22889         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
22890         From Bruno Haible.
22891
22892 2001-01-14  Jim Meyering  <meyering@lucent.com>
22893
22894         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
22895         foo and bar.  Create conftestdir/ in the script, not in the C code.
22896         Remove directories in the script, not in the C code.
22897         Remove conftestdir{,2} before trying to create the directory.
22898         Make the entire configure script fail if the mkdir fails.
22899
22900 2001-01-14  Jim Meyering  <meyering@lucent.com>
22901
22902         * lib/rename.c: New file.  From Volker Borchert.
22903         Include stdlib.h, string.h or strings.h, and xalloc.h.
22904         Use strip_trailing_slashes rather than open-coding it.
22905
22906 2001-01-03  Paul Eggert  <eggert@twinsun.com>
22907
22908         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
22909
22910 2001-01-03  Jim Meyering  <meyering@lucent.com>
22911
22912         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
22913         of local `inptr' to avoid warning with some system declarations of
22914         iconv.
22915
22916 2001-01-02  Volker Borchert  <bt@teknon.de>
22917
22918         * m4/rename.m4: New file.
22919         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
22920
22921 2001-01-01  Jim Meyering  <meyering@lucent.com>
22922
22923         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
22924         even on systems with utmpx.h.  It's necessary for the declaration of
22925         utmp's ut_user member.  Reported by Andreas Jaeger.
22926
22927         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
22928         available. They are required for the declarations of getgrgid and
22929         getpwuid resp.
22930         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
22931         Reported by Andreas Jaeger.
22932
22933 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
22934
22935         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
22936         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
22937         so `make install' also works in VPATH builds.
22938
22939 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
22940
22941         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
22942         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
22943         can be used in subdirectories.
22944
22945 2000-12-29  Paul Eggert  <eggert@twinsun.com>
22946
22947         * lib/modechange.c: Do not assume that mode_t uses the
22948         traditional octal encoding.  E.g. "chmod 1 FOO" should set
22949         the other-execute bit of FOO even if S_IXOTH != 1.
22950
22951         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
22952         WOTH, XOTH, ALLM): New macros.
22953         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
22954          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
22955         Use them.
22956         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
22957         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
22958         (mode_compile):
22959         No need to use uintmax_t; unsigned long is long enough.
22960         Don't bother to get suffix since we don't use it.
22961
22962 2000-12-26  Jim Meyering  <meyering@lucent.com>
22963
22964         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
22965         better with autoheader.
22966
22967 2000-12-24  Jim Meyering  <meyering@lucent.com>
22968
22969         * lib/hash.c (is_prime): Return explicit boolean values.
22970         (hash_get_first): Return NULL to appease Irix5.6's 89.
22971         Reported by Nelson Beebe.
22972
22973 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
22974
22975         * lib/localcharset.c (locale_charset): Add support for Win32.
22976
22977 2000-12-18  Paul Eggert  <eggert@twinsun.com>
22978
22979         * lib/physmem.h, lib/physmem.c: New files.
22980
22981         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
22982         (noinst_HEADERS): Add physmem.h.
22983
22984         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
22985         't' for compatibility with Solaris 8 sort.
22986
22987 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
22988
22989         * lib/config.charset: Add support for BeOS.
22990
22991 2000-12-17  Jim Meyering  <meyering@lucent.com>
22992
22993         * m4/dos.m4 (jm_AC_DOS): New file and macro.
22994         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
22995
22996 2000-12-16  Jim Meyering  <meyering@lucent.com>
22997
22998         This bug had a serious impact on chown: `chown N:M FILE' (for integer
22999         N and M) would have treated it like `chown N:N FILE'.
23000
23001         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
23002
23003 2000-12-16  Jim Meyering  <meyering@lucent.com>
23004
23005         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
23006         SHELLS_FILE to a file name that's useful on djgpp systems.
23007         Include stdlib.h.
23008         (ADDITIONAL_DEFAULT_SHELLS): Define.
23009         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
23010         Based mostly on a patch from Prashant TR.
23011
23012 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
23013
23014         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
23015         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
23016         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
23017
23018 2000-12-08  Andreas Schwab  <schwab@suse.de>
23019
23020         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
23021         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
23022
23023 2000-12-07  Jim Meyering  <meyering@lucent.com>
23024
23025         * lib/stripslash.c (ISSLASH): Define.
23026         (strip_trailing_slashes): Use ISSLASH rather than comparing against
23027         `/'.
23028         From Prashant TR.
23029
23030         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
23031         (dir_name_r): Declare this function as static.
23032         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
23033         manifest itself on a name containing a mix of slashes and
23034         backslashes.
23035         Make this function work with names starting with a DOS-style
23036         drive letter and colon prefix.
23037         (dir_name): Append `.' if necessary.
23038         Based mostly on patches from Prashant TR and Eli Zaretskii.
23039
23040         * lib/dirname.h (dir_name_r): Remove prototype.
23041
23042 2000-12-06  Paul Eggert  <eggert@twinsun.com>
23043
23044         * m4/off_t-format.m4: Remove this file.
23045         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
23046
23047 2000-12-06  Jim Meyering  <meyering@lucent.com>
23048
23049         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
23050         replacement strtoull, we may well need the replacement strtoul, too.
23051         Check for declarations of strtoul and strtoull.
23052         Check for strtol.  Mainly as a cue to cause automake to include
23053         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
23054         Check for limits.h -- strtol.c needs it.
23055
23056 2000-12-05  Jim Meyering  <meyering@lucent.com>
23057
23058         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
23059
23060 2000-12-04  Jim Meyering  <meyering@lucent.com>
23061
23062         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
23063         Also include memory.h, stdlib.h, unistd.h if appropriate.
23064         Reported by Andreas Jaeger (conflicting declaration of malloc).
23065
23066 2000-12-02  Jim Meyering  <meyering@lucent.com>
23067
23068         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
23069         * m4/jm-macros.m4 (jm_MACROS): require it.
23070
23071 2000-12-02  Jim Meyering  <meyering@lucent.com>
23072
23073         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
23074
23075 2000-12-01  Paul Eggert  <eggert@twinsun.com>
23076
23077         * lib/memrchr.c: Include <config.h> before any system include file.
23078
23079 2000-11-30  Jim Meyering  <meyering@lucent.com>
23080
23081         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
23082
23083 2000-11-30  Jim Meyering  <meyering@lucent.com>
23084
23085         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
23086
23087 2000-11-29  Paul Eggert  <eggert@twinsun.com>
23088
23089         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
23090
23091 2000-11-26  Jim Meyering  <meyering@lucent.com>
23092
23093         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
23094
23095 2000-11-22  Paul Eggert  <eggert@twinsun.com>
23096
23097         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
23098         size of (size_t) -1; it's not portable.
23099
23100 2000-11-17  Jim Meyering  <meyering@lucent.com>
23101
23102         * lib/strstr.c: Update from GNU libc.
23103
23104 2000-11-17  Akim Demaille  <akim@epita.fr>
23105
23106         * lib/obstack.h: Formatting changes.
23107         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
23108         prevent type checking.
23109         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23110         cast the value to (void *): assigning a `foo *' to a `void *'
23111         variable is valid.
23112         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23113
23114 2000-11-16  Jim Meyering  <meyering@lucent.com>
23115
23116         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
23117
23118 2000-11-11  Jim Meyering  <meyering@lucent.com>
23119
23120         * lib/error.c: Add a couple #includes, merging from GNU libc version.
23121
23122 2000-11-10  Jim Meyering  <meyering@lucent.com>
23123
23124         * lib/obstack.h: Update from GNU libc.
23125         * lib/obstack.c: Likewise.
23126
23127 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
23128
23129         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
23130
23131 2000-11-06  Paul Eggert  <eggert@twinsun.com>
23132
23133         * lib/getusershell.c (setusershell): Use rewind rather than
23134         fseek/fseeko, to avoid configuration hassles with fseeko.
23135         Don't bother opening SHELLS_FILE if shellstream is NULL;
23136         it's not necessary.
23137
23138 2000-11-05  Jim Meyering  <meyering@lucent.com>
23139
23140         * lib/makepath.h (make_dir): Declare.
23141         * lib/makepath.c (make_dir): Remove `static' attribute.
23142         Tweak a comment.
23143
23144 2000-11-04  Jim Meyering  <meyering@lucent.com>
23145
23146         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
23147
23148 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
23149
23150         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
23151         last one in a bucket, advance to the next bucket.
23152
23153 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
23154
23155         * lib/fnmatch.c: Do not comment out all the code if we are using
23156         the GNU C library, because in some cases we are replacing buggy
23157         code in the GNU C library itself.
23158
23159 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
23160
23161         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
23162         (regex_compile): Catch bogus \(\1\).
23163
23164 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23165
23166         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
23167         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
23168         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
23169
23170 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23171
23172         * lib/error.h, getline.h, modechange.h:
23173         Remove "2000" from Copyright line, as the file hasn't been
23174         changed this year other than in the copyright notice.
23175
23176         * lib/xalloc.h: Add "2000" to Copyright line, as this file
23177         was changed this year.
23178
23179 2000-10-29  Jim Meyering  <meyering@lucent.com>
23180
23181         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
23182         renaming.
23183         * m4/ls-mntd-fs.m4: Likewise
23184
23185 2000-10-29  Jim Meyering  <meyering@lucent.com>
23186
23187         * lib/xstat.in: Fix grammar in comment.
23188
23189 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
23190
23191         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
23192         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
23193         doesn't define __restrict_arr.
23194
23195 2000-10-28  Jim Meyering  <meyering@lucent.com>
23196
23197         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
23198         (jm_PREREQ_MEMCHR): New function.
23199
23200 2000-10-28  Jim Meyering  <meyering@lucent.com>
23201
23202         * lib/memchr.c: Update from libc.
23203         Adjust for portability:
23204         [HAVE_STDLIB_H]: Include stdlib.h.
23205         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
23206         Undef __memchr, too.
23207         [!weak_alias]: Define __memchr to memchr.
23208
23209         * lib/regex.c: Update from libc.
23210         * lib/regex.h: Likewise.
23211         * lib/getopt1.c: Likewise.
23212         * lib/memcmp.c: Likewise.
23213
23214         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
23215         Avoid using fseek, when possible -- it's broken by design.
23216         Patch by Ulrich Drepper.
23217
23218 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
23219
23220         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
23221         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
23222         Giving in to popular pressure to shut up the compiler with casts.
23223
23224 2000-10-26  Jim Meyering  <meyering@lucent.com>
23225
23226         * lib/strftime.c: Update from libc.
23227
23228 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
23229
23230         * regex.c: More `unsigned char' -> `re_char' changes.
23231         Also change several `int' into `re_wchar_t'.
23232         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
23233         (PUSH_FAILURE_POINTER): Don't cast any more.
23234         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
23235         We want GCC to complain, since this piece of code makes
23236         re_match non-reentrant, which *should* be fixed.
23237         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
23238         (EXTEND_BUFFER): Use RETALLOC.
23239         (SET_LIST_BIT): Don't cast.
23240         (re_wchar_t): New type.
23241         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
23242         that those two functions will always properly return.
23243         (IMMEDIATE_QUIT_CHECK): Cast to void.
23244         (analyse_first): Use recursion rather than an explicit stack.
23245         (re_compile_fastmap): Can't fail anymore.
23246         (re_search_2): Don't check re_compile_fastmap for failure.
23247         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
23248         Now also sets the new value (passed in a new argument).
23249         (re_match_2_internal): Use it.
23250         Also, use a new var `reg' of type size_t when looping through regs
23251         rather than reuse the inappropriate `mcnt'.
23252
23253 2000-10-25  Jim Meyering  <meyering@lucent.com>
23254
23255         * lib/obstack.c: Update from libc.
23256
23257 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
23258
23259         * regex.c (regex_compile): Change the way of handling a range from
23260         a char less than 256 to a char not less than 256.
23261
23262 2000-10-24  Andrew Innes  <andrewi@gnu.org>
23263
23264         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
23265         NT-Emacs only.
23266         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
23267         so that re_search functions only quit when callers expect them to.
23268
23269 2000-10-23  Jim Meyering  <meyering@lucent.com>
23270
23271         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
23272         wrong.  That set_locale call must not have any side effects.
23273         From Paul Eggert.
23274
23275 2000-10-22  Jim Meyering  <meyering@lucent.com>
23276
23277         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
23278         [CYCLIC]: Remove now-unused definition.
23279
23280         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
23281         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
23282         Suggestion from Ulrich Drepper.
23283
23284 2000-10-21  Jim Meyering  <meyering@lucent.com>
23285
23286         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
23287         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
23288         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
23289
23290 2000-10-21  Jim Meyering  <meyering@lucent.com>
23291
23292         * lib/dirname.c (memrchr): Declare if necessary.
23293         (dir_name): Remove the restriction that there be no
23294         trailing slashes.  Now, this code skips past them, effectively
23295         ignoring them.
23296         [TEST_DIRNAME] (main): New unit tests.
23297
23298         * lib/memrchr.c: New file from GNU libc.
23299         Undef __memrchr, too.
23300         [!weak_alias]: Define __memrchr to memrchr.
23301         Guard weak_alias use with `#ifdef weak_alias'.
23302
23303 2000-10-21  Jim Meyering  <meyering@lucent.com>
23304
23305         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
23306         (dir_name): Use dir_name_r.
23307         * lib/dirname.h (dir_name_r): Declare it.
23308
23309 2000-10-17  Jim Meyering  <meyering@lucent.com>
23310
23311         * lib/quote.h (PARAMS): Define and use.
23312         Reported by Akim Demaille.
23313
23314         * lib/getopt.c: Update from libc.
23315
23316 2000-10-16  Jim Meyering  <meyering@lucent.com>
23317
23318         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
23319         setlocale.
23320         From Jan Fedak.
23321
23322 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
23323
23324         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
23325
23326 2000-09-25  Jim Meyering  <meyering@lucent.com>
23327
23328         * lib/md5.h (rol): Define (from GnuPG).
23329
23330         * lib/sha.c: Give credit (GnuPG) where due.
23331         (M): Use rol rather than open-coding it.
23332         Add a FIXME comment.
23333
23334 2000-09-21  Jim Meyering  <meyering@lucent.com>
23335
23336         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
23337         Reported by Michael Stone.
23338
23339 2000-09-20  Jim Meyering  <meyering@lucent.com>
23340
23341         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
23342         (noinst_HEADERS): Add sha.h.
23343         Based on code from Scott G. Miller and from GnuPG.
23344
23345 2000-09-18  Jim Meyering  <meyering@lucent.com>
23346
23347         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
23348         LIBS. Otherwise, everyone ends up linking with -lelf for some
23349         configurations.
23350         Reported by Mike Stone.
23351
23352 2000-09-15  Jim Meyering  <meyering@lucent.com>
23353
23354         * lib/regex.c: Update from libc.
23355
23356 2000-09-10  Jim Meyering  <meyering@lucent.com>
23357
23358         * lib/getopt.c (_getopt_internal): Update from glibc.
23359
23360 2000-09-09  Jim Meyering  <meyering@lucent.com>
23361
23362         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
23363         think it should be used as a general replacement for isascii.
23364         * lib/fnmatch.c: Likewise.
23365         * lib/mbswidth.c: Likewise
23366         * lib/regex.c: Likewise.
23367
23368         Don't use atoi.
23369         * lib/userspec.c: Include sys/param.h and limits.h.
23370         Include xstrtol.h.
23371         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23372         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
23373         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
23374         UID, GID.  Check range.
23375
23376 2000-09-06  Jim Meyering  <meyering@lucent.com>
23377
23378         * lib/getopt.c (_getopt_internal): Update from glibc.
23379
23380 2000-08-30  Jim Meyering  <meyering@lucent.com>
23381
23382         * lib/strftime.c: Merge in changes from GNU libc.
23383
23384 2000-08-26  Jim Meyering  <meyering@lucent.com>
23385
23386         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
23387         * m4/fpending.m4: New file.
23388
23389 2000-08-26  Jim Meyering  <meyering@lucent.com>
23390
23391         * lib/closeout.c: Include "__fpending.h".
23392         (close_stdout_status): Return right away if there's nothing to flush.
23393
23394         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
23395         * lib/__fpending.c: New file.
23396         * lib/__fpending.h: New file.
23397
23398 2000-08-20  Jim Meyering  <meyering@lucent.com>
23399
23400         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
23401         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
23402         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
23403
23404 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
23405
23406         Improve fileutils installation on systems where running
23407         programs (like install) can't be unlinked.
23408         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
23409         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
23410
23411 2000-08-07  Paul Eggert  <eggert@twinsun.com>
23412
23413         Standardize on "memory exhausted" instead of "Memory exhausted"
23414         or "virtual memory exhausted".
23415         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
23416         "virtual memory exhausted".
23417         * lib/same.c (same_name): Invoke xalloc_die instead of printing
23418         our own message.
23419         * lib/userspec.c (parse_user_spec): Likewise.
23420         * lib/bumpalloc.h: comment fix
23421         * lib/same.c, userspec.c: Include xalloc.h.
23422
23423         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
23424         not char *const and pointing to a constant array.
23425         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
23426         (xrealloc): Comment fix.
23427
23428         * lib/userspec.c (parse_user_spec):
23429         Don't translate a message until just before returning,
23430         to avoid unnecessary translation.
23431
23432 2000-08-07  Jim Meyering  <meyering@lucent.com>
23433
23434         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
23435         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
23436         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
23437         getgroups.c, gethostname.c, getopt.h, group-member.c,
23438         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
23439         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
23440         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
23441         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
23442         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
23443         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
23444         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
23445         yesno.c: Back out Copyright date changes for each file with no change
23446         this year.  This eases coordination with other programs using the same
23447         source code modules.  From Paul Eggert.
23448
23449 2000-08-06  Paul Eggert  <eggert@twinsun.com>
23450
23451         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
23452         not char, for compatibility with glibc 2.1.3 strftime.c.
23453
23454 2000-08-03  Greg McGary  <greg@mcgary.org>
23455
23456         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
23457         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
23458         (EXTEND_BUFFER): Use them.
23459
23460 2000-08-01  Jim Meyering  <meyering@lucent.com>
23461
23462         * lib/dirname.c (ISSLASH): Define.
23463         (BACKSLASH_IS_PATH_SEPARATOR): Define.
23464         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
23465         both `\' and `/' may be use as path separators.
23466         Based on a patch from Prashant TR.
23467
23468 2000-07-31  Paul Eggert  <eggert@twinsun.com>
23469
23470         * lib/quotearg.c (quotearg_n_options): Don't make the initial
23471         slot vector a constant, since it might get modified.
23472
23473 2000-07-31  Jim Meyering  <meyering@lucent.com>
23474
23475         * lib/xmalloc.c: Use `virtual memory exhausted', not
23476         `Memory exhausted'.
23477         * lib/obstack.c (print_and_abort): Likewise.
23478
23479 2000-07-30  Paul Eggert  <eggert@twinsun.com>
23480
23481         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
23482         buffer, so that the caller can always quote one small
23483         component of a "memory exhausted" message in slot 0.
23484         From a suggestion by Jim Meyering.
23485
23486 2000-07-30  Jim Meyering  <meyering@lucent.com>
23487
23488         * lib/makepath.c (make_path): Quote the other instance, too.
23489
23490         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
23491         (STATIC_BUF_SIZE): Define.
23492         (quotearg_n_options): Use only statically allocated storage when
23493         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
23494         than STATIC_BUF_SIZE.
23495
23496 2000-07-29  Jim Meyering  <meyering@lucent.com>
23497
23498         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
23499         * lib/dirname.c (dir_name): Likewise.
23500
23501         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
23502         `/'.
23503
23504         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
23505         (dir_name): Assert that there are no trailing slashes.
23506
23507 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
23508
23509         * lib/mbswidth.h (mbswidth): Add a flags argument.
23510         (mbswidth): New declaration.
23511         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
23512         * lib/mbswidth.c (mbswidth): Add a flags argument.
23513         (mbsnwidth): New function.
23514
23515 2000-07-24  Jim Meyering  <meyering@lucent.com>
23516
23517         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
23518
23519 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23520
23521         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
23522
23523 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23524
23525         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
23526         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
23527         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
23528         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
23529         invoke multibyte primitives.
23530
23531 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23532
23533         * lib/quotearg.c:
23534         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
23535         so that mbstate_t is always defined.
23536
23537         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
23538         be 1 in at least one GCC installation, and this configuration
23539         error is likely to be common.  Ignoring MB_LEN_MAX hurts
23540         performance on hosts that have mbrtowc but have only unibyte
23541         locales, but I assume these hosts are rare.
23542
23543 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23544
23545         * lib/mbswidth.c (_XOPEN_SOURCE):
23546         Don't define; this causes problems on Solaris 7.
23547         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
23548
23549 2000-07-23  Jim Meyering  <meyering@lucent.com>
23550
23551         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
23552         too: getgrgid, getpwuid, getuid.
23553
23554 2000-07-23  Jim Meyering  <meyering@lucent.com>
23555
23556         * lib/basename.c (base_name): Add an assertion.
23557
23558 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
23559
23560         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
23561         shadow its mbsinit function.
23562
23563 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23564
23565         * lib/mbswidth.h: New file.
23566         * lib/mbswidth.c: New file.
23567         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
23568         (noinst_HEADERS): Add mbswidth.h.
23569
23570 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23571
23572         * lib/config.charset: Add support for FreeBSD. Improve support for
23573         HP-UX and IRIX 6.
23574
23575 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
23576
23577         * m4/mbswidth.m4: New file.
23578         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
23579
23580 2000-07-15  Jim Meyering  <meyering@lucent.com>
23581
23582         * lib/makepath.c: Include quote.h.
23583         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
23584         corresponding argument in a `quote (...)' call.
23585         Give better diagnostics.
23586
23587         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
23588         (noinst_HEADERS): Add quote.h.
23589
23590         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
23591         from tar's src/misc.c.
23592         * lib/quote.h: New file.  Prototypes for same.
23593
23594 2000-07-14  Paul Eggert  <eggert@twinsun.com>
23595
23596         From a suggestion by Bruno Haible.
23597         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
23598         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
23599         to decide whether to define the BeOS workaround macro;
23600         this adjusts to the change to AC_MBSTATE_T.
23601
23602 2000-07-14  Jim Meyering  <meyering@lucent.com>
23603
23604         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
23605         jm_AC_TYPE_UINTMAX_T.
23606
23607 2000-07-13  Paul Eggert  <eggert@twinsun.com>
23608
23609         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
23610
23611         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
23612         quotearg_buffer_restyled): Add support for
23613         clocale_quoting_style.  Undo previous change to
23614         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
23615         and "{RIGHT QUOTATION MARK}" msgids.
23616
23617 2000-07-10  Paul Eggert  <eggert@twinsun.com>
23618
23619         From a suggestion by Bruno Haible.
23620         * m4/mbstate_t.m4 (AC_MBSTATE_T):
23621         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
23622         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
23623         and mbstate_t, to a single-part test that simply defines mbstate_t.
23624         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
23625         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
23626
23627 2000-07-10  Jim Meyering  <meyering@lucent.com>
23628
23629         * m4/strerror_r.m4: Mirror the correction made in autoconf.
23630
23631         * m4/gnu-source.m4: Output to confdefs.h directly.
23632         Suggestion from Akim Demaille.
23633
23634 2000-07-09  Paul Eggert  <eggert@twinsun.com>
23635
23636         The old behavior of quoting `like this' doesn't look good with
23637         newer, ISO-style fonts.  See:
23638         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
23639
23640         Instead, quote "like this" by default.  Let the translator
23641         tailor the locale-specific quoting behavior by providing
23642         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
23643
23644         * lib/quotearg.c (N_): New macro.
23645         (gettext_default): New function.
23646         (quotearg_buffer_restyled): Use
23647         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
23648         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
23649
23650 2000-07-09  Jim Meyering  <meyering@lucent.com>
23651
23652         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
23653         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
23654
23655         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
23656         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
23657
23658 2000-07-09  Jim Meyering  <meyering@lucent.com>
23659
23660         * lib/Most files: Update copyright dates to include 2000.
23661
23662 2000-07-08  Jim Meyering  <meyering@lucent.com>
23663
23664         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
23665         if not defined.
23666         (xgethostname): Remove now-unnecessary #ifdef.
23667         Move declaration of `err' into loop where it's used.
23668
23669 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23670         and Bruno Haible  <haible@clisp.cons.org>
23671
23672         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
23673         only if the test for an object-type mbstate_t fails.  This
23674         prevents us from mistakenly reporting that mbstate_t is a
23675         system object type after we "#define mbstate_t int" to work
23676         around its lack.
23677
23678 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23679         and Bruno Haible  <haible@clisp.cons.org>
23680
23681         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
23682
23683 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23684
23685         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
23686         to strerror_r.
23687         Include <ctype.h> for use of isalpha.
23688
23689 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23690
23691         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
23692         by allocating a larger buffer. Test the gethostname return value for
23693         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
23694         returns an error and ENAMETOOLONG isn't defined.
23695
23696 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23697
23698         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
23699         dimension.
23700
23701 2000-07-04  Jim Meyering  <meyering@lucent.com>
23702
23703         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
23704         of the deprecated AC_CHECKING.
23705
23706 2000-07-04  Jim Meyering  <meyering@lucent.com>
23707
23708         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
23709         Reported by Bruno Haible.
23710
23711 2000-07-04  Jim Meyering  <meyering@lucent.com>
23712
23713         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
23714         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
23715         lacks mbrtowc.
23716
23717 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23718
23719         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
23720         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
23721
23722 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23723         and Bruno Haible  <haible@clisp.cons.org>
23724
23725         * lib/quotearg.c (mbrtowc):
23726         Assign to *pwc, and return 1 only if result is nonzero.
23727         (iswprint): Use ISPRINT when substituting our own mbrtowc.
23728
23729 2000-07-03  Jim Meyering  <meyering@lucent.com>
23730
23731         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
23732
23733 2000-07-03  Jim Meyering  <meyering@lucent.com>
23734
23735         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
23736         This is necessary to get a definition of e.g., UTMP_FILE on
23737         HP-UX 10.20.
23738         From Bob Proulx.
23739
23740 2000-07-02  Jim Meyering  <meyering@lucent.com>
23741
23742         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
23743
23744         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
23745         AC_LIBOBJ(function_name).
23746         * m4/chown.m4: Likewise.
23747         * m4/fnmatch.m4: Likewise.
23748         * m4/ftruncate.m4: Likewise.
23749         * m4/getgroups.m4: Likewise.
23750         * m4/getline.m4: Likewise.
23751         * m4/group-member.m4: Likewise.
23752         * m4/jm-macros.m4: Likewise.
23753         * m4/lstat.m4: Likewise.
23754         * m4/malloc.m4: Likewise.
23755         * m4/memcmp.m4: Likewise.
23756         * m4/nanosleep.m4: Likewise.
23757         * m4/putenv.m4: Likewise.
23758         * m4/realloc.m4: Likewise.
23759         * m4/regex.m4: Likewise.
23760         * m4/stat.m4: Likewise.
23761         * m4/strftime.m4: Likewise.
23762
23763 2000-07-02  Jim Meyering  <meyering@lucent.com>
23764
23765         * lib/quotearg.c (mbstate_t): Don't define here.
23766
23767 2000-07-02  Jim Meyering  <meyering@lucent.com>
23768
23769         * lib/nanosleep.c (SIGCONT): Define if not already defined.
23770
23771 2000-07-01  Jim Meyering  <meyering@lucent.com>
23772
23773         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
23774
23775 2000-07-01  Jim Meyering  <meyering@lucent.com>
23776
23777         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
23778         problem.
23779
23780 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
23781
23782         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
23783         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
23784
23785 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
23786
23787         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
23788         per change in ../m4/ls-mntd-fs.m4.
23789         (read_filesystem_list): Ignore symbolic links.
23790
23791 2000-06-29  Jim Meyering  <meyering@lucent.com>
23792
23793         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
23794         for declaration of strcmp.
23795
23796         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
23797
23798         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
23799         Avoid warning by casting result to `char *' to remove `const'.
23800
23801 2000-06-28  Jim Meyering  <meyering@lucent.com>
23802
23803         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
23804         included by quotearg.c, for which we perform this test.  From
23805         Bruno Haible.
23806
23807 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
23808
23809         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
23810         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
23811         <utmpx.h> exists, put readutmp.o into LIBOBJS.
23812
23813 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
23814
23815         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
23816
23817 2000-06-26  Paul Eggert  <eggert@twinsun.com>
23818
23819         savedir now sets errno on failure and invokes xmalloc to get memory.
23820         Fix a couple of other minor bugs while we're at it.
23821
23822         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
23823         (NAMLEN): Remove macro.
23824         (malloc, realloc): Remove decls.
23825         (stpcpy): Likewise.
23826         ("xalloc.h"): Include.
23827         (NAME_SIZE_DEFAULT): New macro.
23828         (savedir): Use xmalloc / xrealloc to allocate memory.
23829         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
23830         Skip "" directory entries.
23831         Use strlen to calculate directory entry length, since the old method
23832         is rarely used these days and isn't worth supporting.
23833         Don't use a pointer after freeing it.
23834         Check for integer overflow when calculating allocation size.
23835         Use memcpy to copy entries, instead of stpcpy.
23836         Set errno properly when returning NULL.
23837         Check for readdir error.
23838
23839 2000-06-26  Jim Meyering  <meyering@lucent.com>
23840
23841         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
23842
23843 2000-06-25  Jim Meyering  <meyering@lucent.com>
23844
23845         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
23846         Linux header bug when _XOPEN_SOURCE is defined to 500.
23847
23848 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
23849
23850         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
23851         deficiency.
23852
23853 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
23854
23855         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
23856         Include xalloc.h.
23857         Don't include <stdlib.h>.  Don't declare malloc, realloc.
23858
23859 2000-06-24  Jim Meyering  <meyering@lucent.com>
23860
23861         * m4/strerror_r.m4: Revive this file -- to try out an experimental
23862         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
23863         for which strerror does return char*, but which lacks a conveniently
23864         accessible declaration of the function.  If the compile-test says
23865         strerror_r doesn't work, then resort to a `run'-test that works on
23866         BeOS and segfaults on DEC Unix.
23867
23868 2000-06-24  Jim Meyering  <meyering@lucent.com>
23869
23870         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
23871
23872 2000-06-23  Paul Eggert  <eggert@twinsun.com>
23873
23874         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
23875         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
23876
23877 2000-06-23  Paul Eggert  <eggert@twinsun.com>
23878
23879         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
23880         (mbrtowc, mbstate_t): Define substitutes if
23881         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
23882         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
23883         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
23884
23885 2000-06-23  Jim Meyering  <meyering@lucent.com>
23886
23887         * m4/afs.m4: Add missing AC_MSG_RESULT.
23888         Reported by Bruno Haible.
23889
23890         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
23891         Suggestion from Bruno Haible.
23892
23893 2000-06-23  Jim Meyering  <meyering@lucent.com>
23894
23895         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
23896
23897 2000-06-21  Jim Meyering  <meyering@lucent.com>
23898
23899         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
23900
23901 2000-06-21  Jim Meyering  <meyering@lucent.com>
23902
23903         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
23904         (noinst_HEADERS): Add getstr.h.
23905
23906         * lib/getline.c (getstr): Move into a separate file.
23907         * lib/getstr.c (getstr): New file, extracted from getline.c, with
23908         the following changes: new parameter, delim2; both delim[12]
23909         parameters have type `int', not `char'.  The latter would lose
23910         with 8-bit delimiters.
23911         * lib/getstr.h: New file.
23912
23913 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23914
23915         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
23916         than 1024, return a memory chunk of least possible size, instead
23917         of size PATH_MAX + 2. In the loop, increment the size proportionally.
23918         Use free/xmalloc instead of xrealloc to avoid copying for very long
23919         paths.
23920
23921 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23922
23923         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
23924         the empty string.
23925
23926 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23927
23928         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
23929         address, not strdup.  Include <stdlib.h> and don't declare free().
23930
23931 2000-06-19  Jim Meyering  <meyering@lucent.com>
23932
23933         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
23934
23935 2000-06-18  Jim Meyering  <meyering@lucent.com>
23936
23937         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
23938
23939         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
23940         `checking whether...' message to be consistent with that of the
23941         lstat test.
23942
23943 2000-06-18  Jim Meyering  <meyering@lucent.com>
23944
23945         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
23946         Besides, these days every porting target provides a mkdir function.
23947
23948         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
23949         needed. (this snippet comes from src/system.h).
23950
23951 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
23952
23953         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
23954
23955 2000-06-15  Paul Eggert  <eggert@twinsun.com>
23956
23957         * lib/human.c (adjust_value): New function.
23958         (human_readable_inexact): Apply rounding style even when
23959         printing approximate values.
23960
23961 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23962
23963         * lib/human.c (human_readable_inexact): Allow an input block
23964         size that is not a multiple of the output block size, and vice versa.
23965         Reported by Piergiorgio Sartor.
23966
23967 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23968
23969         * lib/getdate.y (get_date): Apply relative times after time
23970         zone indicator, not before.  Reported by Todd A. Jacobs.
23971
23972 2000-06-13  Jim Meyering  <meyering@lucent.com>
23973
23974         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
23975
23976         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
23977
23978 2000-06-12  Paul Eggert  <eggert@twinsun.com>
23979
23980         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
23981
23982 2000-06-12  Jim Meyering  <meyering@lucent.com>
23983
23984         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
23985         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
23986         optional argument.
23987         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
23988         the optional argument, `lib'.
23989
23990 2000-06-08  Jim Meyering  <meyering@lucent.com>
23991
23992         * m4/largefile.m4: Remove file (now that it's part of autoconf).
23993
23994 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23995
23996         Rewrite largefile configuration so that we don't need to run
23997         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
23998         AC_CANONICAL_HOST in configure.in -- jmm]
23999
24000         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
24001         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
24002         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
24003         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
24004         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
24005         All uses changed.
24006         Instead of inspecting the output of getconf, try to compile the
24007         test program without and with the macro definition.
24008         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
24009         for getconf.  Instead, check for the needed flags by compiling
24010         test programs.
24011
24012 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24013
24014         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
24015
24016 2000-06-04  Jim Meyering  <meyering@lucent.com>
24017
24018         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
24019         SunOS 4.1.4 for which gid_t is an unsigned type.
24020
24021 2000-06-03  Jim Meyering  <meyering@lucent.com>
24022
24023         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
24024         now that autoconf requires that.
24025
24026         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
24027         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
24028         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
24029
24030 2000-06-03  Jim Meyering  <meyering@lucent.com>
24031
24032         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
24033
24034 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24035
24036         * m4/glibc21.m4: New file.
24037         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
24038
24039 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24040
24041         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
24042         newer, don't install charset.alias.
24043         * lib/config.charset: Change the Linux/glibc rules so they become empty
24044         on glibc-2.1 or newer.
24045
24046 2000-06-02  Jim Meyering  <meyering@lucent.com>
24047
24048         * lib/mountlist.c: Back out last change.  Instead, do this...
24049         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
24050         me_dummy member using the same `ignore'-testing code.
24051         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
24052         fs_type strings.
24053         From Mark D. Roth.
24054
24055 2000-05-29  Jim Meyering  <meyering@lucent.com>
24056
24057         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
24058         mounts with the `ignore' attribute.  Based on a patch from
24059         Mark D. Roth.
24060
24061 2000-05-28  Jim Meyering  <meyering@lucent.com>
24062
24063         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
24064         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24065         * m4/stat.m4: Likewise.
24066         * m4/lstat.m4: Likewise.
24067         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
24068
24069         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
24070         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
24071
24072 2000-05-26  Jim Meyering  <meyering@lucent.com>
24073
24074         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
24075
24076 2000-05-24  Jim Meyering  <meyering@lucent.com>
24077
24078         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
24079         autoconf requires that.
24080         * m4/lib-check.m4: Likewise.
24081         * m4/jm-macros.m4: Likewise.
24082         * m4/strftime.m4: Likewise.
24083
24084         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
24085         AC_CHECK_DECLS, now that autoconf requires that.
24086
24087 2000-05-22  Jim Meyering  <meyering@lucent.com>
24088
24089         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24090         * m4/lstat.m4: Likewise.
24091
24092 2000-05-22  Jim Meyering  <meyering@lucent.com>
24093
24094         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
24095
24096 2000-05-20  Jim Meyering  <meyering@lucent.com>
24097
24098         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
24099         (jm_PREREQ): Use it.
24100
24101 2000-05-18  Jim Meyering  <meyering@lucent.com>
24102
24103         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
24104         back, too, since it may have been modified by allocate_entry.
24105         (hash_delete): Rewrite to use neither the assignment operator
24106         nor the comma operator in an if-expression.
24107
24108 2000-05-15  Paul Eggert  <eggert@twinsun.com>
24109
24110         * lib/closeout.c:
24111         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
24112         Remove; no longer needed.
24113         "quotearg.h": Add include.
24114         (file_name): Do not bother to explicitly initialize to NULL; it's less
24115         efficient on some hosts.
24116         (close_stdout_status): Remove test as to whether stdout was already
24117         closed; it breaks for the case "echo x | sort >&-".
24118         Quote file name colons.
24119         Do not assume that _("write error") lacks format strings.
24120
24121 2000-05-15  Jim Meyering  <meyering@lucent.com>
24122
24123         * lib/version-etc.c (version_etc_copyright): Update the copyright
24124         string used in all --version output.
24125
24126 2000-05-14  Jim Meyering  <meyering@lucent.com>
24127
24128         * lib/closeout.c (close_stdout_set_file_name): New function.
24129         (close_stdout_status): Use new file-scoped global.
24130         Return right away if fstat says the stdout file descriptor is invalid.
24131         * lib/closeout.h (close_stdout_set_file_name): Declare.
24132
24133 2000-05-10  Jim Meyering  <meyering@lucent.com>
24134
24135         * lib/closeout.c [default_exit_status]: New file-scoped variable.
24136         (close_stdout_set_status): New function.
24137         * lib/closeout.h (close_stdout_set_status): Declare.
24138
24139 2000-05-09  Jim Meyering  <meyering@lucent.com>
24140
24141         * m4/gettext.m4: Rename this...
24142         * m4/libintl.m4: ...to this.
24143
24144 2000-05-08  Jim Meyering  <meyering@lucent.com>
24145
24146         * lib/long-options.c: Don't include closeout.h.
24147         (parse_long_options): Don't call close_stdout for --version.
24148
24149 2000-05-06  Paul Eggert  <eggert@twinsun.com>
24150
24151         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
24152         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
24153         2.1.3 bug.  This avoids a clash when files like regex.c define
24154         _GNU_SOURCE.
24155
24156 2000-05-06  Jim Meyering  <meyering@lucent.com>
24157
24158         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
24159         (AC_REPLACE_FUNCS): Add strnlen.
24160
24161         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
24162         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
24163
24164         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
24165         AC_SEARCH_LIBS call for nanosleep.
24166         (LIB_NANOSLEEP): Set and AC_SUBST.
24167
24168 2000-05-06  Jim Meyering  <meyering@lucent.com>
24169
24170         * lib/strnlen.c: Undefine __strnlen and strnlen.
24171         [!weak_alias]: Define __strnlen to strnlen.
24172
24173         * lib/atexit.c: New file, from libiberty.
24174
24175 2000-05-06  Jim Meyering  <meyering@lucent.com>
24176
24177         * lib/closeout.c (close_stdout_status): Also check for errors on the
24178         stderr stream.
24179
24180 2000-05-05  Jim Meyering  <meyering@lucent.com>
24181
24182         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
24183         AC_SEARCH_LIBS call for clock_gettime.
24184         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
24185
24186         * m4/search-libs.m4: Update from autoconf.
24187
24188         su doesn't work on Solaris 2.6.
24189         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
24190         <shadow.h>.  Reported by Dragos Harabor.
24191
24192 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
24193
24194         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
24195         memcpy instead of xmalloc, xrealloc, path_concat.
24196         (locale_charset): Treat empty environment variables as absent.
24197         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
24198
24199 2000-05-04  Jim Meyering  <meyering@lucent.com>
24200
24201         * lib/getopt.c: Update from glibc.
24202         * lib/obstack.c: Likewise.
24203         * lib/obstack.h: Likewise.
24204         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
24205         file
24206
24207         * lib/regex.h: Likewise.
24208         * lib/strndup.c: Likewise.
24209         * lib/strnlen.c: New file, from glibc.
24210
24211 2000-05-03  Jim Meyering  <meyering@lucent.com>
24212
24213         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
24214
24215 2000-05-02  Paul Eggert  <eggert@twinsun.com>
24216
24217         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
24218         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
24219         compile-time test, rather than inspecting host and OS, to
24220         decide whether to define _LARGEFILE_SOURCE.
24221
24222 2000-05-01  Jim Meyering  <meyering@lucent.com>
24223
24224         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
24225
24226         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
24227         Based on a patch from Bruno Haible.
24228
24229 2000-05-01  Jim Meyering  <meyering@lucent.com>
24230
24231         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
24232
24233 2000-04-29  Jim Meyering  <meyering@lucent.com>
24234
24235         * lib/path-concat.c: Declare strdup only if it's not defined.
24236         * lib/canon-host.c: Likewise.
24237
24238 2000-04-28  Jim Meyering  <meyering@lucent.com>
24239
24240         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
24241         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
24242         is included first, then limits.h is included by locale.h by libintl.h.
24243         From John David Anglin.
24244
24245 2000-04-25  Jim Meyering  <meyering@lucent.com>
24246
24247         * lib/makepath.c (S_IRWXUGO): Define.
24248         (make_path): Always perform explicit chmod if MODE specifies any
24249         of the `special' permission bits.  Prompted by a bug report against
24250         install from Mate Wierdl and Joost van Baal.
24251
24252 2000-04-18  Jim Meyering  <meyering@lucent.com>
24253
24254         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
24255         (jm_PREREQ): Use it.
24256
24257 2000-04-18  Jim Meyering  <meyering@lucent.com>
24258
24259         * lib/README: New file.
24260
24261         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
24262         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
24263
24264 2000-04-17  Jim Meyering  <meyering@lucent.com>
24265
24266         Get it right :-)
24267         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
24268         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
24269         Suggestion from Akim Demaille.
24270
24271 2000-04-17  Jim Meyering  <meyering@lucent.com>
24272
24273         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
24274         the definition of it to rpl_strftime also defined-away the system's
24275         declaration.
24276
24277 2000-04-15  Jim Meyering  <meyering@lucent.com>
24278
24279         Use `C' to denote so-called `contiguous' files, the same way
24280         that tar does.
24281         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
24282         (ftypelet): Use S_ISCTG.
24283         From Michael Deutschmann.
24284
24285 2000-04-14  Jim Meyering  <meyering@lucent.com>
24286
24287         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
24288         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
24289         clobbered.
24290
24291 2000-04-14  Jim Meyering  <meyering@lucent.com>
24292
24293         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
24294
24295 2000-04-13  Jim Meyering  <meyering@lucent.com>
24296
24297         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
24298         AH_VERBATIM to insert required #ifndef into config.h.in.
24299         Suggestion from Akim Demaille.
24300
24301 2000-04-12  Jim Meyering  <meyering@lucent.com>
24302
24303         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
24304         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
24305         Christian Krackowizer.
24306
24307         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
24308         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
24309         (AC_SYS_LARGEFILE): Require.
24310         (AM_C_PROTOTYPES): Require.
24311
24312 2000-04-08  Jim Meyering  <meyering@lucent.com>
24313
24314         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
24315         names don't conflict.  Reported by Eli Zaretskii.
24316
24317 2000-04-07  Jim Meyering  <meyering@lucent.com>
24318
24319         * lib/putenv.c: Move inclusion of errno.h so it follows that of
24320         sys/types.h, to work around system header problems on AIX 3.2.5.
24321         From Bruno Haible.
24322
24323 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
24324
24325         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
24326         bug.  Deal with the different error behavior of Irix iconv.
24327
24328 2000-04-05  Paul Eggert  <eggert@twinsun.com>
24329
24330         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
24331         IRIX if the installer said otherwise.
24332
24333 2000-04-05  Jim Meyering  <meyering@lucent.com>
24334
24335         Portability tweaks required for ultrix4.3.
24336         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
24337         (jm_CHECK_DECLS): Add getutent to the list of functions.
24338         (_jm_DECL_HEADERS): Add utmpx.h.
24339         From John David Anglin.
24340
24341         * m4/strftime.m4: Back out the 2000-04-02 change.
24342         Instead of that change, simply undefine putenv in the test program.
24343
24344 2000-04-05  Jim Meyering  <meyering@lucent.com>
24345
24346         Portability tweaks required for ultrix4.3.
24347         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
24348         getutent.
24349         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
24350         * lib/canon-host.c: Declare strdup.
24351         * lib/path-concat.c: Likewise.
24352         From John David Anglin.
24353
24354 2000-04-04  Jim Meyering  <meyering@lucent.com>
24355
24356         Be more DOS 8.3-friendly.
24357         * lib/ref-add.sin: Renamed from ref-add.sed.in.
24358         * lib/ref-del.sin: Renamed from ref-del.sed.in.
24359         * lib/Makefile.am: Reflect renaming.
24360         Reported by Eli Zaretskii.
24361
24362         Use a temporary file name that won't clash with `charset.alias'
24363         in the DOS 8.3 name space.
24364         * lib/Makefile.am (charset_tmp): Define.
24365         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
24366         (uninstall-local): Likewise.
24367         Reported by Eli Zaretskii.
24368
24369 2000-04-03  Jim Meyering  <meyering@lucent.com>
24370
24371         * m4/gettext.m4: Fix typo in comment.
24372
24373         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
24374         textutils/configure.in).  Suggestion from Paul Eggert.
24375         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
24376
24377 2000-04-02  Paul Eggert  <eggert@twinsun.com>
24378
24379         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
24380         variable in the shell rather than using putenv, which isn't
24381         portable.  This avoids the configure-time inter-test dependency
24382         on the potentially-renamed putenv function.
24383
24384 2000-03-30  Paul Eggert  <eggert@twinsun.com>
24385
24386         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
24387         before checking struct stat.st_blksize, so that
24388         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
24389
24390 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24391
24392         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
24393         since strftime.c uses HAVE_STRFTIME to decide whether to use
24394         the underlying strftime.
24395
24396 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24397
24398         * lib/time/strftime.c (my_strftime): Make sure we call the system
24399         strftime, not ourselves, when invoking the underlying strftime.
24400
24401 2000-03-24  Jim Meyering  <meyering@lucent.com>
24402
24403         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
24404         (charset_alias): Define.
24405         (install-exec-local): Factor out common code.
24406         (uninstall-local): Split lines longer than 80.
24407         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
24408         (SUFFIXES): Define.
24409         (.sed.in.sed): New rule.  Don't redirect directly to $@.
24410         (CLEANFILES): Add ref-add.sed and ref-del.sed.
24411
24412 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
24413
24414         * lib/config.charset: Output a line containing "Packages using this
24415         file".
24416         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
24417         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
24418         ref-del.sed): New rules.
24419
24420 2000-03-17  Jim Meyering  <meyering@lucent.com>
24421
24422         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
24423         Otherwise, include <strings.h>
24424
24425 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
24426
24427         * lib/unicodeio.c (utf8_wctomb): New function.
24428         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
24429         format instead of in UCS-4 with platform dependent endianness.
24430
24431 2000-03-10  Jim Meyering  <meyering@lucent.com>
24432
24433         * m4/lib-check.m4: Look for getspnam in -lgen, too.
24434         From Marco Franzen.
24435
24436 2000-03-07  Paul Eggert  <eggert@twinsun.com>
24437
24438         * lib/savedir.c (savedir): Work even if directory size is
24439         negative; this can happen with some screwy NFS configurations.
24440
24441 2000-03-06  Jim Meyering  <meyering@lucent.com>
24442
24443         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
24444         if it's NULL (because we ran out of memory).  From Bruno Haible.
24445
24446 2000-03-05  Jim Meyering  <meyering@lucent.com>
24447
24448         * lib/localcharset.c ("path-concat.h"): Include.
24449         (get_charset_aliases): Use path_concat instead of ANSI string
24450         concatenation.
24451
24452         * lib/unicodeio.h (PARAMS): Define.
24453         Use it to guard prototype.
24454
24455 2000-03-04  Jim Meyering  <meyering@lucent.com>
24456
24457         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
24458         for lib/localcharset.c.
24459
24460 2000-03-04  Jim Meyering  <meyering@lucent.com>
24461
24462         * lib/Makefile.am (install-exec-local): Create $(libdir) before
24463         installing into it.
24464         (uninstall-local): Uncomment this rule so `make distcheck' works
24465         once again.
24466
24467         * lib/unicodeio.c (<errno.h>): Include it.
24468         (errno): Declare if not defined.
24469
24470         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
24471
24472         * lib/config.charset: New version, incorporating remarks from a linux
24473         i18n mailing list.  From Bruno Haible.
24474
24475 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
24476
24477         * m4/codeset.m4: New file.
24478         * m4/iconv.m4: New file.
24479         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
24480
24481 2000-03-03  Jim Meyering  <meyering@lucent.com>
24482
24483         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
24484
24485 2000-03-02  Jim Meyering  <meyering@lucent.com>
24486
24487         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
24488         the messages come out on separate lines.
24489
24490         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
24491         rather than jm_CHECK_DECLARATIONS.
24492         * m4/decl.m4: Remove now-unused file.
24493
24494         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
24495         geteuid.
24496
24497 2000-03-02  Jim Meyering  <meyering@lucent.com>
24498
24499         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
24500
24501 2000-03-01  Jim Meyering  <meyering@lucent.com>
24502
24503         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
24504         * lib/unicodeio.c: Likewise.
24505
24506 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
24507
24508         * lib/config.charset: New file.
24509         * lib/localcharset.c: New file.
24510         * lib/unicodeio.h, lib/unicodeio.c: New files.
24511         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
24512         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
24513         (noinst_HEADERS): Add unicodeio.h.
24514         (all-local, install-exec-local, charset.alias): New targets.
24515
24516 2000-02-28  Paul Eggert  <eggert@twinsun.com>
24517
24518         * lib/quotearg.c (ALERT_CHAR): New macro.
24519         (quotearg_buffer_restyled): Use it.
24520
24521 2000-02-27  Jim Meyering  <meyering@lucent.com>
24522
24523         * m4/check-decl.m4: Add getenv to the list.
24524
24525 2000-02-27  Jim Meyering  <meyering@lucent.com>
24526
24527         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
24528         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
24529
24530         * lib/backupfile.c: Guard inclusion of stdlib.h with
24531         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
24532         Declare malloc if needed.
24533
24534         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
24535         `#ifndef HAVE_DECL..'
24536         now that autoconf always defines the HAVE_DECL_ symbols.
24537         * lib/human.c: Likewise.
24538         * lib/same.c: Likewise.
24539         * lib/strtoumax.c: Likewise.
24540
24541         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
24542         declaration check was not run.
24543         * lib/hash.c: Likewise.
24544         * lib/human.c: Likewise.
24545         * lib/same.c: Likewise.
24546         * lib/strtoumax.c: Likewise.
24547
24548         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
24549         `.', then first look up the entire `.'-containing string as a login
24550         name.
24551
24552 2000-02-23  Jim Meyering  <meyering@lucent.com>
24553
24554         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
24555         in place of my hack.
24556
24557 2000-02-18  Paul Eggert  <eggert@twinsun.com>
24558
24559         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
24560         (textint): New typedef.
24561         (parser_control): Member year changed from int to textint.
24562         All uses changed.
24563         (YYSTYPE): Removed; replaced by %union with int and textint members.
24564         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
24565         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
24566         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
24567         (tSNUMBER, tUNUMBER): Now of type <textintval>.
24568         (date, number, to_year): Use width of number in digits, not its value,
24569         to determine whether it's a 2-digit year, or a 2-digit time.
24570         (yylex): Store number of digits of numeric tokens.
24571         Reported by John Kendall.
24572
24573         (parser_control): Changed from struct parser_control to typedef (for
24574         consistency).  All uses changed.
24575
24576         (tID): Removed; not used.
24577         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
24578
24579 2000-02-14  Paul Eggert  <eggert@twinsun.com>
24580
24581         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
24582         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
24583
24584 2000-02-12  Jim Meyering  <meyering@lucent.com>
24585
24586         * lib/userspec.c (ISDIGIT): Define it.
24587         (isdigit): Remove definition.
24588         (is_number): Use ISDIGIT, not isdigit.
24589         <libintl.h>: Include.
24590         (_ and N_): Define.
24591         (parse_user_spec): Mark translatable strings.
24592
24593 2000-02-10  Jim Meyering  <meyering@lucent.com>
24594
24595         With these changes, nanosleep.[ch] are finally enough like the other
24596         lib/* replacement files to compile on a few more losing systems.
24597
24598         * lib/nanosleep.h: Don't include config.h.
24599         Remove prototype from declaration of nanosleep.
24600         (PARAMS): Remove now-unneeded definition.
24601         * lib/nanosleep.c: #undef nanosleep.
24602         (rpl_nanosleep): Rename from nanosleep.
24603
24604 2000-02-10  Jim Meyering  <meyering@lucent.com>
24605
24606         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
24607         gnu_nanosleep to rpl_nanosleep.
24608
24609 2000-02-09  Jim Meyering  <meyering@lucent.com>
24610
24611         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
24612         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
24613
24614 2000-02-08  Akim Demaille  <akim@epita.fr>
24615
24616         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
24617         `[' and `]' and remove uses of `changequote'.
24618         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
24619         (AC_SYS_LARGEFILE): Likewise.
24620         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
24621         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
24622         of changequote.
24623         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
24624         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
24625         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
24626         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
24627
24628 2000-02-05  Jim Meyering  <meyering@lucent.com>
24629
24630         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
24631         Remove explicit use of AC_HEADER_TIME.  It is required by
24632         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
24633         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
24634         in autoconf whereby the expansion of the latter ended up preceding
24635         the expansion of its prerequisite, AC_HEADER_TIME.
24636         Reported by Volker Borchert.
24637
24638 2000-02-03  Jim Meyering  <meyering@lucent.com>
24639
24640         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
24641
24642 2000-02-03  Jim Meyering  <meyering@lucent.com>
24643
24644         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
24645         rather than with `#if HAVE_UTMPNAME'.
24646
24647 2000-02-02  Jim Meyering  <meyering@lucent.com>
24648
24649         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
24650         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
24651         Reported by Eli Zaretskii.
24652
24653 2000-02-01  Jim Meyering  <meyering@lucent.com>
24654
24655         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
24656
24657 2000-01-31  Jim Meyering  <meyering@lucent.com>
24658
24659         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
24660         functions.  Add the time.h and sys/time.h headers along with the
24661         AC_REQUIRE'ment of AC_HEADER_TIME.
24662
24663 2000-01-31  Jim Meyering  <meyering@lucent.com>
24664
24665         * lib/nanosleep.h (nanosleep): Guard declaration with
24666         `#if ! HAVE_DECL_NANOSLEEP'.
24667         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
24668         the declaration in that vendor's sys/timers.h.
24669         Reported by Christian Krackowizer.
24670
24671         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
24672         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
24673         (ISPRINT): Likewise.
24674         Reported by Tom Tromey.
24675
24676 2000-01-30  Jim Meyering  <meyering@lucent.com>
24677
24678         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
24679
24680         * m4/prereq.m4 (utmp_includes): Define.
24681         Check for ut_user and ut_name members in both struct utmpx
24682         and struct utmp.
24683
24684 2000-01-30  Jim Meyering  <meyering@lucent.com>
24685
24686         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
24687         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
24688         header files where only utmpx.ut_user is declared.
24689
24690         * lib/readutmp.h (UT_USER): Define.
24691
24692 2000-01-29  Jim Meyering  <meyering@lucent.com>
24693
24694         * m4/lib-check.m4: New file containing library-related checks from
24695         fileutils and sh-utils (textutils had none).
24696
24697 2000-01-28  Jim Meyering  <meyering@lucent.com>
24698
24699         * m4/perl.m4: Change format of warning message to look more like that
24700         from the missing script.  Suggestion from François Pinard.
24701
24702 2000-01-25  Jim Meyering  <meyering@lucent.com>
24703
24704         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
24705         well as time.h in the compile check.
24706         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
24707         Fix typo in cross-compiling case: s/yes/no/.
24708
24709 2000-01-23  Jim Meyering  <meyering@lucent.com>
24710
24711         * m4/jm-macros.m4: Move df-related tests here from
24712         fileutils/configure.in
24713
24714         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
24715         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
24716
24717         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
24718         s/space/ac_fsusage_space/.
24719         (jm_FILE_SYSTEM_USAGE): Take two parameters.
24720
24721         * m4/ftruncate.m4: New file (derived from part of
24722         fileutils/configure.in).
24723         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
24724         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
24725
24726         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
24727         AC_SUBST these here, rather than just in sh-util/configure.in, so
24728         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
24729         all the same.
24730         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
24731         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
24732         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
24733         (AC_SUBST(POW_LIBM)): Likewise.
24734         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
24735
24736 2000-01-23  Jim Meyering  <meyering@lucent.com>
24737
24738         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
24739         obstack.c.
24740
24741 2000-01-22  Jim Meyering  <meyering@lucent.com>
24742
24743         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
24744
24745         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
24746
24747         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
24748         configure.in
24749         (AC_CHECK_HEADERS): Likewise for sh-utils.
24750         (AC_CHECK_HEADERS): Likewise for textutils.
24751         Merge the three lists of headers.
24752
24753         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
24754         from fileutils' configure.in.
24755
24756         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
24757         code. Moved tests into their own function (_jm_DECL_HEADERS) in
24758         check-decl.m4.
24759
24760         * m4/check-decl.m4: Use #if rather than #ifdef.
24761         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
24762         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
24763         (_jm_DECL_HEADERS): Define new function.
24764         (jm_CHECK_DECLARATIONS): Require it.
24765
24766 2000-01-22  Jim Meyering  <meyering@lucent.com>
24767
24768         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
24769         [! HAVE_DECL_STRTOULL]: Declare strtoull.
24770         Required for some AIX systems.  Reported by Christian Krackowizer.
24771         [TESTING] (main): New function.
24772
24773         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
24774         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
24775         letters.
24776
24777         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
24778         iswprint.
24779
24780         * lib/strverscmp.c (ISDIGIT): Define.
24781         (strverscmp): Use ISDIGIT, not isdigit.
24782
24783 2000-01-19  Jim Meyering  <meyering@lucent.com>
24784
24785         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
24786         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
24787         defines `struct timespec' in <sys/time.h>
24788
24789         * m4/c-bs-a.m4: Remove uses of changequote altogether.
24790         Thanks to Akim for explaining.
24791
24792 2000-01-17  Paul Eggert  <eggert@twinsun.com>
24793
24794         * lib/nanosleep.c (nanosleep):
24795         Don't use SA_INTERRUPT to decide whether to call sigaction, as
24796         POSIX.1 doesn't require SA_INTERRUPT and some systems
24797         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
24798         it's been part of POSIX.1 since day 1 (in 1988).
24799
24800 2000-01-17  Jim Meyering  <meyering@lucent.com>
24801
24802         * lib/interlock: Remove unused file.  Reported by François Pinard.
24803
24804 2000-01-16  Paul Eggert  <eggert@twinsun.com>
24805
24806         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
24807         alert, backslash, formfeed, and vertical tab unnecessarily in
24808         shell quoting style.
24809
24810 2000-01-16  Jim Meyering  <meyering@lucent.com>
24811
24812         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
24813         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
24814         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
24815         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
24816
24817 2000-01-16  Jim Meyering  <meyering@lucent.com>
24818
24819         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
24820         because the latter didn't work.
24821
24822 2000-01-15  Jim Meyering  <meyering@lucent.com>
24823
24824         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
24825         (AC_REPLACE_FUNCS): Add memcpy and memset.
24826         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
24827         Add strpbrk.
24828         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
24829
24830 2000-01-12  Jim Meyering  <meyering@lucent.com>
24831
24832         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
24833         (jm_PREREQ): Use it.
24834         (jm_PREREQ_READUTMP): New macro.
24835         (jm_PREREQ): Use it.
24836
24837 2000-01-11  Paul Eggert  <eggert@twinsun.com>
24838
24839         Quote multibyte characters correctly.
24840         * m4/c-bs-a.m4: New file.
24841         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
24842         (jm_PREREQ): Use it.
24843
24844 2000-01-11  Paul Eggert  <eggert@twinsun.com>
24845
24846         * m4/uintmax_t.m4: Port to autoconf 2.13.
24847
24848 2000-01-08  Jim Meyering  <meyering@ascend.com>
24849
24850         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
24851         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
24852
24853 2000-01-04  Jim Meyering  <meyering@ascend.com>
24854
24855         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
24856         jm_STRUCT_DIRENT_D_TYPE.
24857         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
24858         jm_STRUCT_DIRENT_D_INO.
24859         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
24860         jm_STRUCT_UTIMBUF.
24861         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
24862         renamings.
24863         * m4/utime.m4: Likewise.
24864
24865         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
24866         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
24867
24868 2000-01-03  Paul Eggert  <eggert@twinsun.com>
24869
24870         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
24871         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
24872
24873 2000-01-02  Jim Meyering  <meyering@ascend.com>
24874
24875         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
24876         remember if this is necessary.
24877
24878 1999-12-26  Jim Meyering  <meyering@ascend.com>
24879
24880         * m4/jm-macros.m4: Use it here.
24881         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
24882
24883 1999-12-23  Jim Meyering  <meyering@ascend.com>
24884
24885         * m4/jm-macros.m4: Check for clock_gettime (moved from
24886         fileutils/configure.in)
24887         Check for gettimeofday.
24888
24889 1999-12-20  Jim Meyering  <meyering@ascend.com>
24890
24891         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
24892         autoconf-2.14a-1999-12-20.
24893
24894 1999-12-19  Jim Meyering  <meyering@ascend.com>
24895
24896         * m4/lstat-slash.m4: New file.
24897         * m4/jm-macros.m4: Use the new macro:
24898         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24899
24900 1999-12-07  Jim Meyering  <meyering@ascend.com>
24901
24902         * m4/perl.m4: Require that File::Compare be available, too.
24903         Too many systems seem to lack it.
24904
24905         * m4/strftime.m4: Add checks for most of the cpp macros tested in
24906         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
24907
24908 1999-11-18  Paul Eggert  <eggert@twinsun.com>
24909
24910         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
24911         problem with the QNX 4.25 shell, which doesn't propagate exit
24912         status of failed commands inside shell assignments.
24913
24914 1999-11-17  Jim Meyering  <meyering@ascend.com>
24915
24916         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
24917
24918 1999-11-07  Jim Meyering  <meyering@ascend.com>
24919
24920         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
24921
24922 1999-11-06  Jim Meyering  <meyering@ascend.com>
24923
24924         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
24925         * m4/jm-macros.m4 (jm_MACROS): Use it here.
24926
24927 1999-11-05  Jim Meyering  <meyering@ascend.com>
24928
24929         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
24930         configure.in of textutils, fileutils, and sh-utils into this one
24931         (shared between those packages) file.
24932         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
24933         AC_STRUCT_ST_BLKSIZE.
24934
24935 1999-11-03  Jim Meyering  <meyering@ascend.com>
24936
24937         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
24938         of AC_CHECK_TYPE checks includes unistd.h.
24939         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
24940         Suggestion from Akim Demaille.
24941
24942 1999-10-30  Jim Meyering  <meyering@ascend.com>
24943
24944         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
24945         m4-quoted string.
24946         * m4/ls-mntd-fs.m4: Likewise.
24947         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
24948         * m4/jm-winsz1.m4: Likewise.
24949
24950         * m4/const.m4: Remove file, since the fix made it into the experimental
24951         version of autoconf.
24952         * m4/mktime.m4: Likewise.
24953
24954         * m4/check-type.m4: Remove file, now that the latest version of
24955         AC_CHECK_TYPE takes a third arg to specify additional #includes.
24956
24957         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
24958         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
24959         AC_CHECK_TYPE.
24960
24961 1999-10-04  Jim Meyering  <meyering@ascend.com>
24962
24963         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
24964
24965 1999-09-22  Paul Eggert  <eggert@twinsun.com>
24966
24967         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
24968         2.95.1 bug with HP-UX 10.20.
24969
24970 1999-09-17  Jim Meyering  <meyering@ascend.com>
24971
24972         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
24973         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
24974         due to missing strdup (against sh-utils-2.0).
24975
24976 1999-08-29  Jim Meyering  <meyering@ascend.com>
24977
24978         * m4/jm-macros.m4: Require jm_BISON.
24979         * m4/bison.m4: New file.
24980
24981 1999-08-17  Paul Eggert  <eggert@twinsun.com>
24982
24983         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
24984         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
24985
24986 1999-08-05  Jim Meyering  <meyering@ascend.com>
24987
24988         * m4/getline.m4: Rename test file from conftestdata to conftest.data
24989         to avoid conflicts with `conftest' on 8+3 filesystems.
24990         Suggestion from Eli Zaretskii.
24991
24992 1999-08-04  Jim Meyering  <meyering@ascend.com>
24993
24994         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
24995         fileutils and sh-utils (textutils's getline test was inadequate).
24996         (AM_FUNC_GETLINE): Run this test.
24997         (AC_CHECK_FUNCS): Check for getdelim.
24998         Reported by Bob Proulx.
24999
25000 1999-08-02  Jim Meyering  <meyering@ascend.com>
25001
25002         * m4/jm-macros.m4: Add a comment.
25003
25004 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25005
25006         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
25007         <inttypes.h> defines strtoumax as a macro (and not as a
25008         function).
25009
25010 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25011
25012         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
25013         that we can shift, multiply and divide unsigned long long
25014         values; Ultrix cc can't do it.
25015
25016 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25017
25018         * m4/mktime.m4: New file, which is a preview of what should appear
25019         in the next public autoconf release.
25020
25021 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25022
25023         * m4/lfs.m4: Remove this file.
25024         * m4/largefile.m4: New file.  It contains the old contents of
25025         lfs.m4, except that all names with prefix AC_LFS have been
25026         changed to use the prefix AC_SYS_LARGEFILE instead, to be
25027         compatible with future autoconf versions.  Also, some minor m4
25028         quoting problems have been fixed.
25029
25030 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25031
25032         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
25033         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
25034         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
25035         and simplify the shell code.
25036
25037 1999-08-01  Jim Meyering  <meyering@ascend.com>
25038
25039         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
25040         m4.
25041
25042 1999-07-20  Jim Meyering  <meyering@ascend.com>
25043
25044         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
25045
25046 1999-07-15  Jim Meyering  <meyering@ascend.com>
25047
25048         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
25049
25050 1999-05-22  Jim Meyering  <meyering@ascend.com>
25051
25052         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
25053
25054 1999-05-20  Jim Meyering  <meyering@ascend.com>
25055
25056         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
25057         Add a colon after each `then' in case $4 is empty.
25058
25059 1999-05-16  Jim Meyering  <meyering@ascend.com>
25060
25061         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
25062
25063 1999-05-10  Jim Meyering  <meyering@ascend.com>
25064
25065         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
25066
25067         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
25068         AC_FUNC_MKTIME.
25069
25070 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
25071
25072         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
25073
25074 1999-05-04  Paul Eggert  <eggert@twinsun.com>
25075
25076         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
25077         not CPPFLAGS, so that linking works correctly in IRIX.
25078
25079 1999-04-30  Paul Eggert  <eggert@twinsun.com>
25080
25081         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
25082
25083 1999-04-20  Paul Eggert  <eggert@twinsun.com>
25084
25085         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
25086         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
25087         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
25088         jm_AC_TYPE_UNSIGNED_LONG_LONG.
25089         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
25090
25091         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
25092
25093 1999-04-20  Jim Meyering  <meyering@ascend.com>
25094
25095         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
25096         AC_REPLACE xstroull if necessary.  From Paul Eggert.
25097         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
25098
25099 1999-04-18  Jim Meyering  <meyering@ascend.com>
25100
25101         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
25102         * m4/jm-macros.m4: Use it.
25103
25104 1999-04-06  Jim Meyering  <meyering@ascend.com>
25105
25106         * m4/strftime.m4: Remove test for %f.
25107
25108 1999-03-29  Jim Meyering  <meyering@ascend.com>
25109
25110         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
25111         superset of the AC_TYPE_* checks in the textutils, fileutils,
25112         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
25113         AC_TYPE_PID_T.
25114
25115 1999-03-28  Jim Meyering  <meyering@ascend.com>
25116
25117         * m4/jm-macros.m4: Define GNU_PACKAGE here.
25118         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
25119         replaced e.g., in the *.sh files of the sh-utils.
25120
25121 1999-03-20  Jim Meyering  <meyering@ascend.com>
25122
25123         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
25124         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
25125         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
25126
25127 1999-03-19  Jim Meyering  <meyering@ascend.com>
25128
25129         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
25130
25131 1999-03-12  Jim Meyering  <meyering@ascend.com>
25132
25133         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
25134
25135 1999-03-07  Jim Meyering  <meyering@ascend.com>
25136
25137         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
25138         declared.
25139
25140 1999-02-17  Jim Meyering  <meyering@ascend.com>
25141
25142         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
25143         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
25144
25145 1999-02-07  Jim Meyering  <meyering@ascend.com>
25146
25147         * m4/group-member.m4: New file -- extracted from sh-utils'
25148         configure.in.
25149
25150         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
25151         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
25152
25153 1999-02-06  Jim Meyering  <meyering@ascend.com>
25154
25155         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
25156         * m4/fnmatch.m4: Likewise.
25157         * m4/getgroups.m4: Likewise.
25158         * m4/lstat.m4: Likewise.
25159         * m4/malloc.m4: Likewise.
25160         * m4/putenv.m4: Likewise.
25161         * m4/realloc.m4: Likewise.
25162         * m4/regex.m4: Likewise.
25163         * m4/stat.m4: Likewise.
25164         * m4/strftime.m4: Likewise.
25165         Suggestion from Alain Magloire.
25166
25167         * m4/chown.m4: Use `.$ac_objext', not `.o'.
25168         * m4/fnmatch.m4: Likewise.
25169         * m4/getgroups.m4: Likewise.
25170         * m4/getline.m4: Likewise.
25171         * m4/lstat.m4: Likewise.
25172         * m4/malloc.m4: Likewise.
25173         * m4/memcmp.m4: Likewise.
25174         * m4/putenv.m4: Likewise.
25175         * m4/realloc.m4: Likewise.
25176         * m4/regex.m4: Likewise.
25177         * m4/stat.m4: Likewise.
25178         * m4/strftime.m4: Likewise.
25179         Suggestion from Alain Magloire.
25180
25181         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
25182         an argument.
25183
25184         * m4/regex.m4: Add a run-time Test for proper operation of
25185         re_compile_pattern.
25186
25187 1999-01-31  Jim Meyering  <meyering@ascend.com>
25188
25189         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
25190
25191 1999-01-30  Jim Meyering  <meyering@ascend.com>
25192
25193         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
25194
25195         * m4/jm-mktime.m4: Make this a wrapper around the official
25196         AM_FUNC_MKTIME rather than my private copy, now that the official one
25197         is up to date.
25198         * m4/mktime.m4: Remove file.
25199
25200         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
25201         * m4/uptime.m4: Likewise.
25202         * m4/uintmax_t.m4: Likewise.
25203
25204 1999-01-28  Jim Meyering  <meyering@ascend.com>
25205
25206         * m4/jm-macros.m4: Use jm_AFS.
25207         * m4/afs.m4: New file (from fileutils' configure.in).
25208
25209         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
25210         * m4/chown.m4: Likewise.
25211         * m4/d-ino.m4: Likewise.
25212         * m4/d-type.m4: Likewise.
25213         * m4/fnmatch.m4: Likewise.
25214         * m4/getgroups.m4: Likewise.
25215         * m4/gettext.m4: Likewise.
25216         * m4/jm-mktime.m4: Likewise.
25217         * m4/jm-winsz2.m4: Likewise.
25218         * m4/lcmessage.m4: Likewise.
25219         * m4/ls-mntd-fs.m4: Likewise.
25220         * m4/malloc.m4: Likewise.
25221         * m4/memcmp.m4: Likewise.
25222         * m4/putenv.m4: Likewise.
25223         * m4/realloc.m4: Likewise.
25224         * m4/st_mtim.m4: Likewise.
25225         * m4/strftime.m4: Likewise.
25226
25227 1999-01-16  Jim Meyering  <meyering@ascend.com>
25228
25229         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
25230         (ARGMATCH_DIE_DECL): Define.
25231
25232 1999-01-12  Jim Meyering  <meyering@ascend.com>
25233
25234         * m4/Makefile.am.in: Rewrite to avoid using fmt.
25235         Reported by Lars Hecking.
25236
25237 1999-01-10  Jim Meyering  <meyering@ascend.com>
25238
25239         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
25240         gross kludge.
25241         * m4/inttypes_h.m4: Likewise.
25242         * m4/lstat.m4: Likewise.
25243         * m4/malloc.m4: Likewise.
25244         * m4/readdir.m4: Likewise.
25245         * m4/realloc.m4: Likewise.
25246         * m4/st_dm_mode.m4: Likewise.
25247         * m4/stat.m4: Likewise.
25248         * m4/utimbuf.m4: Likewise.
25249         * m4/utimes.m4: Likewise.
25250
25251         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
25252         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
25253         comments in config.h.in are meaningful.
25254
25255         * m4/jm-macros.m4: Require autoconf-2.13 here.
25256
25257         * m4/regex.m4: By default, don't use the included regex.c on systems
25258         with glibc 2.  Suggestion from Uli Drepper.
25259
25260 1999-01-02  Jim Meyering  <meyering@ascend.com>
25261
25262         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
25263
25264 1998-12-18  Jim Meyering  <meyering@ascend.com>
25265
25266         * m4/Makefile.am.in (Makefile.am): Simplify rule.
25267         Based on a suggestion from Lars Hecking.
25268
25269 1998-11-16  Paul Eggert  <eggert@twinsun.com>
25270
25271         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
25272
25273 1998-11-16  Jim Meyering  <meyering@ascend.com>
25274
25275         * m4/lfs.m4: Double-quote the `uname...` expression.
25276
25277 1998-11-14  Jim Meyering  <meyering@ascend.com>
25278
25279         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
25280         * m4/stat.m4: Likewise.
25281
25282 1998-11-03  Jim Meyering  <meyering@ascend.com>
25283
25284         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
25285         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
25286
25287 1998-10-18  Jim Meyering  <meyering@ascend.com>
25288
25289         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
25290
25291 1998-10-17  Jim Meyering  <meyering@ascend.com>
25292
25293         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
25294         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
25295         calls for those previously hard-coded headers.  Instead, take a new
25296         parameter.
25297         (jm_CHECK_DECLARATIONS): Reflect interface change.
25298         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
25299         (jm_CHECK_DECL_LOCALTIME_R): New macro.
25300
25301         * m4/mktime.m4: Test for spring-forward gap before long-running test.
25302
25303 1998-10-14  Jim Meyering  <meyering@ascend.com>
25304
25305         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
25306         instead of "TZ=America/Vancouver".  From Paul Eggert.
25307
25308 1998-10-11  Jim Meyering  <meyering@ascend.com>
25309
25310         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
25311         This adds a test for a recently added compatibility fix for mktime.c.
25312         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
25313
25314 1998-09-27  Jim Meyering  <meyering@ascend.com>
25315
25316         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
25317
25318         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
25319         ../configure.in, including a change from Gordon Matzigkeit to allow
25320         cross-compiling for the Hurd.
25321
25322         * m4/glibc.m4: New file/macro to test for the GNU C Library
25323         versions 1 and 2.  From Gordon Matzigkeit.
25324         Indent.
25325
25326 1998-09-21  Jim Meyering  <meyering@ascend.com>
25327
25328         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
25329
25330 1998-08-18  Paul Eggert  <eggert@twinsun.com>
25331
25332         Port nanosecond-resolution times to UnixWare 2.1.2 and
25333         pedantic Solaris 2.6.
25334
25335         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
25336         AC_STRUCT_ST_MTIM.
25337         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
25338         Generate name of ns member, instead of just 1 or undef.
25339         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
25340
25341 1998-08-15  Jim Meyering  <meyering@ascend.com>
25342
25343         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
25344         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
25345         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
25346         instead of jm_TYPE_SSIZE_T.
25347
25348 1998-08-12  Jim Meyering  <meyering@ascend.com>
25349
25350         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
25351
25352 1998-08-02  Jim Meyering  <meyering@ascend.com>
25353
25354         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
25355         in acconfig.h manually.
25356
25357 1998-07-31  Paul Eggert  <eggert@twinsun.com>
25358
25359         * m4/st_mtim.m4: New file.
25360
25361 1998-07-28  Jim Meyering  <meyering@ascend.com>
25362
25363         * m4/utimes.m4: Undef stat.
25364
25365 1998-07-25  Jim Meyering  <meyering@ascend.com>
25366
25367         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
25368         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
25369
25370 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
25371
25372         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
25373         uid and gid actually remain unchanged.
25374
25375 1998-07-07  Jim Meyering  <meyering@ascend.com>
25376
25377         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
25378
25379 1998-07-04  Jim Meyering  <meyering@ascend.com>
25380
25381         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
25382         to prove that this macro can be used in packages without regex.c.
25383
25384 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
25385
25386         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
25387         is to be used.
25388
25389 1998-07-03  Jim Meyering  <meyering@ascend.com>
25390
25391         * m4/gettext.m4: Add -lintl if it's found to be necessary.
25392
25393         * m4/gettext.m4: New file -- from gettext-0.10.35.
25394         * m4/lcmessage.m4: Likewise.
25395         * m4/progtest.m4: Likewise.
25396
25397         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
25398         * m4/jm-macros.m4: Require the new macro.
25399
25400 1998-06-29  Jim Meyering  <meyering@ascend.com>
25401
25402         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
25403         for the definition of NGROUPS (used in a system header included
25404         by sys/mount.h).
25405
25406 1998-06-28  Jim Meyering  <meyering@ascend.com>
25407
25408         * m4/ls-mntd-fs.m4: New file.
25409         * m4/fstypename.m4: New file.
25410
25411         * m4/jm-macros.m4: Require the new macro.
25412         * m4/jm-glibc-io.m4: New file.
25413
25414 1998-05-19  Jim Meyering  <meyering@ascend.com>
25415
25416         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
25417         * m4/lchown.m4: New file.
25418
25419         * m4/Makefile.am.in: New file.
25420         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
25421
25422 1998-05-14  Jim Meyering  <meyering@ascend.com>
25423
25424         * m4/Makefile.am (EXTRA_DIST): Add them.
25425         * m4/jm-macros.m4: New file.
25426         * m4/utimbuf.m4: New file.
25427
25428 1998-05-12  Jim Meyering  <meyering@ascend.com>
25429
25430         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
25431
25432 1998-05-11  Jim Meyering  <meyering@ascend.com>
25433
25434         * m4/isc-posix.m4: New file.
25435
25436 1998-05-10  Jim Meyering  <meyering@ascend.com>
25437
25438         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
25439
25440 1998-05-09  Jim Meyering  <meyering@ascend.com>
25441
25442         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
25443         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
25444         with automake.
25445
25446         * m4/ssize_t.m4: New file.
25447         * m4/mktime.m4: Remove file -- the new automake has this now.
25448
25449 1998-04-26  Jim Meyering  <meyering@ascend.com>
25450
25451         * m4/assert.m4: New file.
25452         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
25453
25454 1998-04-05  Jim Meyering  <meyering@ascend.com>
25455
25456         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
25457         (jm_PREREQ): Use it here.
25458
25459 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
25460
25461         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
25462         in acconfig.h.
25463
25464 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
25465
25466         * m4/prereq.m4: New file.
25467         * m4/error.m4: New file.
25468         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
25469
25470 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
25471
25472         * m4/getline.m4: Don't set am_cv_func_working_getline before the
25473         cache-check for the same variable -- that defeated the purpose of
25474         the test; the test program was never run.  This was a problem only
25475         on systems with losing getline functions -- HP-UX 10.20 is one.
25476         Reported by Bjorn Helgaas.
25477
25478 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
25479
25480         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
25481
25482 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
25483
25484         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
25485
25486         * m4/const.m4: New file.  Use an initializer in this declaration
25487         typedef int charset[2]; const charset x;
25488         Reported by Bob Glickstein.
25489
25490 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
25491
25492         * m4/chown.m4: Fix reversed types on -1 args to chown.
25493         From Kaveh Ghazi.
25494
25495 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
25496
25497         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
25498         Add lseek and memchr.
25499
25500         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
25501         T.E.Dickey <dickey@clark.net> said that some older preprocessors
25502         have a 20-character limit on names.
25503
25504 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
25505
25506         * m4/inttypes_h.m4: New file.
25507         * m4/uintmax_t.m4: New file.
25508         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
25509
25510 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
25511   Free Software Foundation, Inc.
25512 Copying and distribution of this file, with or without modification,
25513 are permitted provided the copyright notice and this notice are preserved.