Enforce that GETTIMEOFDAY_REPLACEMENT=0 is only expanded once.
[gnulib.git] / ChangeLog
1 2007-01-18  Bruno Haible  <bruno@clisp.org>
2
3         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
4         gl_HEADER_SYS_TIME_H.
5         (gl_HEADER_SYS_TIME_H): New macro.
6
7         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
8         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
9         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
10         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
11         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
12         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
13         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
14         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
15         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
16         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
17         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
18
19         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
20         last change; it caused a compilation error when cross-compiling to
21         Cygwin.
22
23 2007-01-18  Jim Meyering  <jim@meyering.net>
24
25         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
26         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
27         than the race-prone "test -d sys || mkdir sys".
28         (configure.ac): Use AC_PROG_MKDIR_P.
29         * modules/sys_select: Likewise.
30         * modules/sys_socket: Likewise.
31         * modules/sys_time: Likewise.
32
33 2007-01-18  Eric Blake  <ebb9@byu.net>
34
35         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
36         replace gettimeofday.
37         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
38         name, to avoid infinite recursion.
39
40 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
41
42         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
43         module sys_time.
44         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
45         assume timespec.h defines struct timeval.
46         * lib/settime.c: Likewise.
47         * lib/utimens.c: Likewise.
48         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
49         since we now assume the gettimeofday module.
50         * lib/tempname.c (__gen_tempname): Likewise.
51         * lib/gettimeofday.h: Remove.
52         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
53         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
54         Include <time.h>, for 'time()'.
55         (localtime_buffer_addr): Also use this workaround if
56         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
57         to simplify the uses.  All uses changed.
58         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
59         that #undef is inside {}, and 'const' follows type name consistently.
60         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
61         (gettimeofday): Do not use the maximum possible value for
62         tv->tv_usec, since that might break usages other than ls.c.
63         Instead, we'll leave ls.c alone.  This undoes today's patch
64         by Bruno.  Add a compile-time warning for 1s-clock resolution;
65         we've never observed the problem but might as well keep the
66         canary.
67         * lib/nanosleep.c: Include timespec.h first, for interface check.
68         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
69         now assume the sys_time module.
70         * lib/tempname.c: Likewise.
71         * lib/timespec.h: Likewise.
72         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
73         needed.
74         * lib/strftime.c: Likewise.
75         * lib/timespec.h: Likewise.
76         * lib/posixtm.c: Include posixtm.h first, for interface check.
77         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
78         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
79         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
80         * lib/sys_time_.h: New file.
81         * lib/timespec.h (struct timespec): Use long int, not long.
82         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
83         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
84         Remove obsolescent call to AC_HEADER_TIME.
85         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
86         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
87         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
88         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
89         Likewise.
90         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
91         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
92         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
93         into the sys_time module.  Check for gettimeofday just once.
94         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
95         for gettimeofday signature to just check the signature.  Merely
96         compile it, since linking doesn't test signature.  Improve test for
97         whether gettimeofday.o is actually needed.
98         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
99         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
100         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
101         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
102         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
103         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
104         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
105         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
106         than worrying about sys/time.h.
107         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
108         Don't bother worrying about TIME_WITH_SYS_TIME.
109         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
110         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
111         * m4/sys_time_h.m4: New file.
112         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
113         Don't include sys/time.h.  Return from main rather than exiting.
114         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
115         all uses changed.
116         * modules/gethrxtime (Depends-on): Add sys_time.
117         * modules/gettime (Depends-on): Likewise.
118         * modules/gettimeofday (Depends-on): Likewise.
119         * modules/nanosleep (Depends-on): Likewise.
120         * modules/settime (Depends-on): Likewise.
121         * modules/tempname (Depends-on): Likewise.
122         * modules/utimens (Depends-on): Likewise.
123         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
124         (Include:) Change back to <sys/time.h>.
125         (Maintainer:) Add self.
126         * modules/sys_time: New file.
127         * modules/tempname (Depends-on): Add gettimeofday.
128         * tests/test-gettimeofday.c: Include <sys/time.h>
129         rather than gettimeofday.h.
130
131 2007-01-17  Bruno Haible  <bruno@clisp.org>
132
133         * gnulib-tool (func_get_license): Revert last patch. Instead, let
134         the license default to GPL.
135         (func_create_testdir): Don't complain if a module is LGPL and its
136         tests module depends on GPLed modules.
137
138 2007-01-17  Bruno Haible  <bruno@clisp.org>
139
140         * lib/gettimeofday.c (gettimeofday): Add code for the case
141         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
142         maximum possible value for tv->tv_usec, rather than the minimum one.
143
144 2005-10-08  Martin Lambers  <marlam@marlam.de>
145 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
146 2007-01-16  Bruno Haible  <bruno@clisp.org>
147
148         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
149         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
150         gl_FUNC_GETTIMEOFDAY.
151         (Include): Add gettimeofday.h.
152         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
153         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
154         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
155         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
156         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
157         * lib/gettimeofday.h: New file.
158         * lib/gettimeofday.c: Include <sys/timeb.h>.
159         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
160         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
161         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
162         fall back on time().
163
164         * tests/test-gettimeofday.c: New file.
165         * modules/gettimeofday-tests: New file.
166
167 2007-01-16  Eric Blake  <ebb9@byu.net>
168
169         * modules/fnmatch (Depends-on): Depend on wchar.
170         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
171         * m4/fnmatch.m4: Likewise.
172         * modules/mbchar (Makefile.am): Assume <wchar.h>.
173         * m4/mbchar.m4: Likewise.
174         * modules/mbswidth (Depends-on): Depend on wchar.
175         * lib/mbswidth.c: Assume <wchar.h>.
176         * m4/mbswidth.m4: Likewise.
177         * modules/quotearg (Depends-on): Depend on wchar.
178         * lib/quotearg.c: Assume <wchar.h>.
179         * m4/quotearg.m4: Likewise.
180         * modules/regex (Depends-on): Depend on wchar.
181         * lib/regex_internal.h: Assume <wchar.h>.
182         * m4/regex.m4: Likewise.
183         * modules/stdint (Depends-on): Depend on wchar.
184         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
185         * m4/stdint.m4: Likewise.
186         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
187         * modules/strftime (Depends-on): Depend on wchar.
188         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
189         * modules/strtol (Depends-on): Depend on wchar.
190         * lib/strtol.c: Assume <wchar.h>.
191         * modules/wcwidth (Depends-on): Depend on wchar.
192         * lib/wcwidth.h: Assume <wchar.h>.
193         * m4/wcwidth.m4: Likewise.
194
195 2007-01-16  Bruno Haible  <bruno@clisp.org>
196
197         * modules/csharpexec-script: New, created from...
198         * modules/csharpexec: ... this.
199
200 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
201
202         * modules/javaexec-script: New, created from...
203         * modules/javaexec: ... this.
204
205 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
206
207         * modules/poll (Dependencies): Add sys_select.
208
209 2007-01-15  Jim Meyering  <jim@meyering.net>
210
211         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
212         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
213         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
214         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
215
216 2007-01-15  Bruno Haible  <bruno@clisp.org>
217
218         * modules/striconveh: New file.
219         * lib/striconveh.h: New file.
220         * lib/striconveh.c: New file.
221         * MODULES.html.sh (Internationalization functions): Add striconveh.
222
223         * modules/striconveh-tests: New file.
224         * tests/test-striconveh.c: New file.
225
226 2007-01-15  Bruno Haible  <bruno@clisp.org>
227
228         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
229         not from GNU libiconv or GNU libc.
230
231 2007-01-15  Bruno Haible  <bruno@clisp.org>
232
233         * doc/gnulib-intro.texi (Copyright): Explain the different license
234         terms for module descriptions, autoconf macros, tests, documentation.
235
236 2007-01-14  Bruno Haible  <bruno@clisp.org>
237
238         * modules/striconv-tests: New file.
239         * tests/test-striconv.c: New file.
240
241 2007-01-14  Bruno Haible  <bruno@clisp.org>
242
243         * modules/iconv-tests: New file.
244         * tests/test-iconv.c: New file.
245
246 2007-01-14  Bruno Haible  <bruno@clisp.org>
247
248         * gnulib-tool (func_get_license): For test modules, use the license of
249         the main module.
250
251 2007-01-14  Bruno Haible  <bruno@clisp.org>
252
253         * modules/iconv (Include): Clarify that <iconv.h> can only be included
254         if iconv is found to exist.
255
256 2007-01-14  Bruno Haible  <bruno@clisp.org>
257
258         * modules/c-ctype-tests: New file.
259         * tests/test-c-ctype.c: New file.
260
261 2007-01-14  Bruno Haible  <bruno@clisp.org>
262
263         * modules/binary-io-tests: New file.
264         * tests/test-binary-io.sh: New file.
265         * tests/test-binary-io.c: New file.
266
267 2007-01-14  Bruno Haible  <bruno@clisp.org>
268
269         * modules/array-oset-tests: New file.
270         * tests/test-array_oset.c: New file.
271
272 2007-01-14  Bruno Haible  <bruno@clisp.org>
273
274         * modules/array-list-tests: New file.
275         * tests/test-array_list.c: New file.
276
277 2007-01-14  Bruno Haible  <bruno@clisp.org>
278
279         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
280         and make.
281         Reported by Simon Josefsson in
282         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
283
284 2007-01-14  Bruno Haible  <bruno@clisp.org>
285
286         * modules/allocsa-tests: New file.
287         * tests/test-allocsa.c: New file.
288
289 2007-01-14  Bruno Haible  <bruno@clisp.org>
290
291         * modules/fchdir (Depends-on): Add absolute-header.
292         * modules/unistd (Depends-on): Likewise.
293
294 2006-12-30  Bruno Haible  <bruno@clisp.org>
295
296         * modules/fchdir: New file.
297         * modules/unistd (Files): Add lib/unistd_.h.
298         (Makefile.am): Generate unistd.h from unistd_.h.
299         * lib/fchdir.c: New file.
300         * lib/dirent_.h: New file.
301         * lib/unistd_.h: New file.
302         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
303         * m4/fchdir.m4: New file.
304         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
305         (gl_HEADER_UNISTD): Invoke it.
306         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
307         function.
308         * lib/backupfile.c (opendir, closedir): Undefine.
309         * lib/chown.c (open, close): Undefine.
310         * lib/clean-temp.c (open, close): Undefine.
311         * lib/copy-file.c (open, close): Undefine.
312         * lib/execute.c (open, close): Undefine.
313         * lib/fsusage.c (open, close): Undefine.
314         * lib/gc-gnulib.c (open, close): Undefine.
315         * lib/getcwd.c (opendir, closedir): Undefine.
316         * lib/glob.c (opendir, closedir): Undefine.
317         * lib/javacomp.c (open, close): Undefine.
318         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
319         * lib/openat-proc.c (open, close): Undefine.
320         * lib/pagealign_alloc.c (open, close): Undefine.
321         * lib/pipe.c (open, close): Undefine.
322         * lib/progreloc.c (open, close): Undefine.
323         * lib/savedir.c (opendir, closedir): Undefine.
324         * lib/utime.c (open, close): Undefine.
325         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
326
327 2007-01-10  Bruno Haible  <bruno@clisp.org>
328
329         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
330
331 2007-01-12  Eric Blake  <ebb9@byu.net>
332
333         Provide a robust <wchar.h>.  Further simplifications are now
334         possible in other modules, but not included here.
335         * modules/wchar: New module.
336         * m4/wchar.m4: New file.
337         * lib/wchar_.h: Likewise.
338         * modules/mbchar (Depends-on): Depend on wchar, as the first use
339         of the new module.
340         * MODULES.html.sh (Extended multibyte and wide character utilities):
341         New section.
342
343 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
344
345         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
346         to a reasonable default for memory allocation.
347         (xreadlink): Don't allocate a huge buffer, to work around a buggy
348         file system that reports garbage st_size values for symlinks.
349         Problem reported by Liyang Hu.
350
351 2007-01-11  Simon Josefsson  <simon@josefsson.org>
352
353         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
354         Emacs .#* auto-save files).
355
356 2007-01-11  Bruno Haible  <bruno@clisp.org>
357
358         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
359         directory.
360
361 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
362
363         Use @...@ consistently in lib/wctype_.h.
364         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
365         on it being set to 1 or 0.
366         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
367         go back to AC_SUBSTing it.
368         * modules/wctype (Makefile.am): Undo previous change.
369
370 2007-01-10  Eric Blake  <ebb9@byu.net>
371
372         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
373         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
374         * modules/wctype (Makefile.am): Likewise.
375         Reported by Chris McGuire.
376
377 2007-01-10  Jim Meyering  <jim@meyering.net>
378
379         fts.c: a small readability/maintainability improvement
380         * lib/fts.c (fts_read): Make this code slightly more readable and
381         maintainable by hoisting the "sp->fts_cur = p" assignments to
382         immediately follow the statements that set P.  Derived from
383         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
384
385 2007-01-10  Eric Blake  <ebb9@byu.net>
386
387         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
388         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
389         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
390         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
391         Reported by Chris McGuire.
392
393 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
394
395         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
396         in sed script.
397
398 2007-01-09  Bruno Haible  <bruno@clisp.org>
399
400         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
401         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
402         variables.
403         (func_module): Use them.
404
405 2007-01-09  Bruno Haible  <bruno@clisp.org>
406
407         * modules/unistr/base: New file.
408         * lib/unistr.h: New file.
409
410         * modules/unistr/u8-to-u16: New file.
411         * lib/unistr/u8-to-u16.c: New file.
412
413         * modules/unistr/u8-to-u32: New file.
414         * lib/unistr/u8-to-u32.c: New file.
415
416         * modules/unistr/u16-to-u8: New file.
417         * lib/unistr/u16-to-u8.c: New file.
418
419         * modules/unistr/u16-to-u32: New file.
420         * lib/unistr/u16-to-u32.c: New file.
421
422         * modules/unistr/u32-to-u8: New file.
423         * lib/unistr/u32-to-u8.c: New file.
424
425         * modules/unistr/u32-to-u16: New file.
426         * lib/unistr/u32-to-u16.c: New file.
427
428         * modules/unistr/u8-check: New file.
429         * modules/unistr/u16-check: New file.
430         * modules/unistr/u32-check: New file.
431         * lib/unistr/u8-check.c: New file.
432         * lib/unistr/u16-check.c: New file.
433         * lib/unistr/u32-check.c: New file.
434
435         * modules/unistr/u8-chr: New file.
436         * modules/unistr/u16-chr: New file.
437         * modules/unistr/u32-chr: New file.
438         * lib/unistr/u8-chr.c: New file.
439         * lib/unistr/u16-chr.c: New file.
440         * lib/unistr/u32-chr.c: New file.
441
442         * modules/unistr/u8-cmp: New file.
443         * modules/unistr/u16-cmp: New file.
444         * modules/unistr/u32-cmp: New file.
445         * lib/unistr/u8-cmp.c: New file.
446         * lib/unistr/u16-cmp.c: New file.
447         * lib/unistr/u32-cmp.c: New file.
448
449         * modules/unistr/u8-cpy: New file.
450         * modules/unistr/u16-cpy: New file.
451         * modules/unistr/u32-cpy: New file.
452         * lib/unistr/u8-cpy.c: New file.
453         * lib/unistr/u16-cpy.c: New file.
454         * lib/unistr/u32-cpy.c: New file.
455         * lib/unistr/u-cpy.h: New file.
456
457         * modules/unistr/u8-cpy-alloc: New file.
458         * modules/unistr/u16-cpy-alloc: New file.
459         * modules/unistr/u32-cpy-alloc: New file.
460         * lib/unistr/u8-cpy-alloc.c: New file.
461         * lib/unistr/u16-cpy-alloc.c: New file.
462         * lib/unistr/u32-cpy-alloc.c: New file.
463         * lib/unistr/u-cpy-alloc.h: New file.
464
465         * modules/unistr/u8-endswith: New file.
466         * modules/unistr/u16-endswith: New file.
467         * modules/unistr/u32-endswith: New file.
468         * lib/unistr/u8-endswith.c: New file.
469         * lib/unistr/u16-endswith.c: New file.
470         * lib/unistr/u32-endswith.c: New file.
471         * lib/unistr/u-endswith.h: New file.
472
473         * modules/unistr/u8-mblen: New file.
474         * modules/unistr/u16-mblen: New file.
475         * modules/unistr/u32-mblen: New file.
476         * lib/unistr/u8-mblen.c: New file.
477         * lib/unistr/u16-mblen.c: New file.
478         * lib/unistr/u32-mblen.c: New file.
479
480         * modules/unistr/u8-mbtouc: New file.
481         * modules/unistr/u16-mbtouc: New file.
482         * modules/unistr/u32-mbtouc: New file.
483         * lib/unistr/u8-mbtouc.c: New file.
484         * lib/unistr/u16-mbtouc.c: New file.
485         * lib/unistr/u32-mbtouc.c: New file.
486
487         * modules/unistr/u8-mbtouc-safe: New file.
488         * modules/unistr/u16-mbtouc-safe: New file.
489         * modules/unistr/u32-mbtouc-safe: New file.
490         * lib/unistr/u8-mbtouc-safe.c: New file.
491         * lib/unistr/u16-mbtouc-safe.c: New file.
492         * lib/unistr/u32-mbtouc-safe.c: New file.
493
494         * modules/unistr/u8-move: New file.
495         * modules/unistr/u16-move: New file.
496         * modules/unistr/u32-move: New file.
497         * lib/unistr/u8-move.c: New file.
498         * lib/unistr/u16-move.c: New file.
499         * lib/unistr/u32-move.c: New file.
500         * lib/unistr/u-move.h: New file.
501
502         * modules/unistr/u8-next: New file.
503         * modules/unistr/u16-next: New file.
504         * modules/unistr/u32-next: New file.
505         * lib/unistr/u8-next.c: New file.
506         * lib/unistr/u16-next.c: New file.
507         * lib/unistr/u32-next.c: New file.
508
509         * modules/unistr/u8-prev: New file.
510         * modules/unistr/u16-prev: New file.
511         * modules/unistr/u32-prev: New file.
512         * lib/unistr/u8-prev.c: New file.
513         * lib/unistr/u16-prev.c: New file.
514         * lib/unistr/u32-prev.c: New file.
515
516         * modules/unistr/u8-set: New file.
517         * modules/unistr/u16-set: New file.
518         * modules/unistr/u32-set: New file.
519         * lib/unistr/u8-set.c: New file.
520         * lib/unistr/u16-set.c: New file.
521         * lib/unistr/u32-set.c: New file.
522         * lib/unistr/u-set.h: New file.
523
524         * modules/unistr/u8-startswith: New file.
525         * modules/unistr/u16-startswith: New file.
526         * modules/unistr/u32-startswith: New file.
527         * lib/unistr/u8-startswith.c: New file.
528         * lib/unistr/u16-startswith.c: New file.
529         * lib/unistr/u32-startswith.c: New file.
530         * lib/unistr/u-startswith.h: New file.
531
532         * modules/unistr/u8-stpcpy: New file.
533         * modules/unistr/u16-stpcpy: New file.
534         * modules/unistr/u32-stpcpy: New file.
535         * lib/unistr/u8-stpcpy.c: New file.
536         * lib/unistr/u16-stpcpy.c: New file.
537         * lib/unistr/u32-stpcpy.c: New file.
538         * lib/unistr/u-stpcpy.h: New file.
539
540         * modules/unistr/u8-stpncpy: New file.
541         * modules/unistr/u16-stpncpy: New file.
542         * modules/unistr/u32-stpncpy: New file.
543         * lib/unistr/u8-stpncpy.c: New file.
544         * lib/unistr/u16-stpncpy.c: New file.
545         * lib/unistr/u32-stpncpy.c: New file.
546         * lib/unistr/u-stpncpy.h: New file.
547
548         * modules/unistr/u8-strcat: New file.
549         * modules/unistr/u16-strcat: New file.
550         * modules/unistr/u32-strcat: New file.
551         * lib/unistr/u8-strcat.c: New file.
552         * lib/unistr/u16-strcat.c: New file.
553         * lib/unistr/u32-strcat.c: New file.
554         * lib/unistr/u-strcat.h: New file.
555
556         * modules/unistr/u8-strchr: New file.
557         * modules/unistr/u16-strchr: New file.
558         * modules/unistr/u32-strchr: New file.
559         * lib/unistr/u8-strchr.c: New file.
560         * lib/unistr/u16-strchr.c: New file.
561         * lib/unistr/u32-strchr.c: New file.
562
563         * modules/unistr/u8-strcmp: New file.
564         * modules/unistr/u16-strcmp: New file.
565         * modules/unistr/u32-strcmp: New file.
566         * lib/unistr/u8-strcmp.c: New file.
567         * lib/unistr/u16-strcmp.c: New file.
568         * lib/unistr/u32-strcmp.c: New file.
569
570         * modules/unistr/u8-strcpy: New file.
571         * modules/unistr/u16-strcpy: New file.
572         * modules/unistr/u32-strcpy: New file.
573         * lib/unistr/u8-strcpy.c: New file.
574         * lib/unistr/u16-strcpy.c: New file.
575         * lib/unistr/u32-strcpy.c: New file.
576         * lib/unistr/u-strcpy.h: New file.
577
578         * modules/unistr/u8-strcspn: New file.
579         * modules/unistr/u16-strcspn: New file.
580         * modules/unistr/u32-strcspn: New file.
581         * lib/unistr/u8-strcspn.c: New file.
582         * lib/unistr/u16-strcspn.c: New file.
583         * lib/unistr/u32-strcspn.c: New file.
584         * lib/unistr/u-strcspn.h: New file.
585
586         * modules/unistr/u8-strdup: New file.
587         * modules/unistr/u16-strdup: New file.
588         * modules/unistr/u32-strdup: New file.
589         * lib/unistr/u8-strdup.c: New file.
590         * lib/unistr/u16-strdup.c: New file.
591         * lib/unistr/u32-strdup.c: New file.
592         * lib/unistr/u-strdup.h: New file.
593
594         * modules/unistr/u8-strlen: New file.
595         * modules/unistr/u16-strlen: New file.
596         * modules/unistr/u32-strlen: New file.
597         * lib/unistr/u8-strlen.c: New file.
598         * lib/unistr/u16-strlen.c: New file.
599         * lib/unistr/u32-strlen.c: New file.
600         * lib/unistr/u-strlen.h: New file.
601
602         * modules/unistr/u8-strmblen: New file.
603         * modules/unistr/u16-strmblen: New file.
604         * modules/unistr/u32-strmblen: New file.
605         * lib/unistr/u8-strmblen.c: New file.
606         * lib/unistr/u16-strmblen.c: New file.
607         * lib/unistr/u32-strmblen.c: New file.
608
609         * modules/unistr/u8-strmbtouc: New file.
610         * modules/unistr/u16-strmbtouc: New file.
611         * modules/unistr/u32-strmbtouc: New file.
612         * lib/unistr/u8-strmbtouc.c: New file.
613         * lib/unistr/u16-strmbtouc.c: New file.
614         * lib/unistr/u32-strmbtouc.c: New file.
615
616         * modules/unistr/u8-strncat: New file.
617         * modules/unistr/u16-strncat: New file.
618         * modules/unistr/u32-strncat: New file.
619         * lib/unistr/u8-strncat.c: New file.
620         * lib/unistr/u16-strncat.c: New file.
621         * lib/unistr/u32-strncat.c: New file.
622         * lib/unistr/u-strncat.h: New file.
623
624         * modules/unistr/u8-strncmp: New file.
625         * modules/unistr/u16-strncmp: New file.
626         * modules/unistr/u32-strncmp: New file.
627         * lib/unistr/u8-strncmp.c: New file.
628         * lib/unistr/u16-strncmp.c: New file.
629         * lib/unistr/u32-strncmp.c: New file.
630
631         * modules/unistr/u8-strncpy: New file.
632         * modules/unistr/u16-strncpy: New file.
633         * modules/unistr/u32-strncpy: New file.
634         * lib/unistr/u8-strncpy.c: New file.
635         * lib/unistr/u16-strncpy.c: New file.
636         * lib/unistr/u32-strncpy.c: New file.
637         * lib/unistr/u-strncpy.h: New file.
638
639         * modules/unistr/u8-strnlen: New file.
640         * modules/unistr/u16-strnlen: New file.
641         * modules/unistr/u32-strnlen: New file.
642         * lib/unistr/u8-strnlen.c: New file.
643         * lib/unistr/u16-strnlen.c: New file.
644         * lib/unistr/u32-strnlen.c: New file.
645         * lib/unistr/u-strnlen.h: New file.
646
647         * modules/unistr/u8-strpbrk: New file.
648         * modules/unistr/u16-strpbrk: New file.
649         * modules/unistr/u32-strpbrk: New file.
650         * lib/unistr/u8-strpbrk.c: New file.
651         * lib/unistr/u16-strpbrk.c: New file.
652         * lib/unistr/u32-strpbrk.c: New file.
653         * lib/unistr/u-strpbrk.h: New file.
654
655         * modules/unistr/u8-strrchr: New file.
656         * modules/unistr/u16-strrchr: New file.
657         * modules/unistr/u32-strrchr: New file.
658         * lib/unistr/u8-strrchr.c: New file.
659         * lib/unistr/u16-strrchr.c: New file.
660         * lib/unistr/u32-strrchr.c: New file.
661
662         * modules/unistr/u8-strspn: New file.
663         * modules/unistr/u16-strspn: New file.
664         * modules/unistr/u32-strspn: New file.
665         * lib/unistr/u8-strspn.c: New file.
666         * lib/unistr/u16-strspn.c: New file.
667         * lib/unistr/u32-strspn.c: New file.
668         * lib/unistr/u-strspn.h: New file.
669
670         * modules/unistr/u8-strstr: New file.
671         * modules/unistr/u16-strstr: New file.
672         * modules/unistr/u32-strstr: New file.
673         * lib/unistr/u8-strstr.c: New file.
674         * lib/unistr/u16-strstr.c: New file.
675         * lib/unistr/u32-strstr.c: New file.
676         * lib/unistr/u-strstr.h: New file.
677
678         * modules/unistr/u8-strtok: New file.
679         * modules/unistr/u16-strtok: New file.
680         * modules/unistr/u32-strtok: New file.
681         * lib/unistr/u8-strtok.c: New file.
682         * lib/unistr/u16-strtok.c: New file.
683         * lib/unistr/u32-strtok.c: New file.
684         * lib/unistr/u-strtok.h: New file.
685
686         * modules/unistr/u8-uctomb: New file.
687         * modules/unistr/u16-uctomb: New file.
688         * modules/unistr/u32-uctomb: New file.
689         * lib/unistr/u8-uctomb.c: New file.
690         * lib/unistr/u16-uctomb.c: New file.
691         * lib/unistr/u32-uctomb.c: New file.
692
693         * MODULES.html.sh (Unicode string functions): Add the new modules.
694
695 2007-01-08  Bruno Haible  <bruno@clisp.org>
696
697         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
698         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
699         subdirectories.
700
701 2007-01-08  Karl Berry  <karl@gnu.org>
702
703         * doc/error.texi: mention that main() fns must set program_name
704         when progname is used.
705
706 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
707
708         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
709         WCTYPE_H is empty, for the benefit of builds from non-distclean
710         directories.  Problem reported by Eric Blake in
711         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
712
713 2007-01-08  Bruno Haible  <bruno@clisp.org>
714
715         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
716         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
717         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
718         PROVIDE_CANONICALIZE_FILENAME_MODE.
719         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
720
721 2007-01-08  Bruno Haible  <bruno@clisp.org>
722
723         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
724         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
725         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
726         * lib/fts.c: Likewise.
727         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
728
729 2006-12-25  Bruno Haible  <bruno@clisp.org>
730
731         * modules/utf8-ucs4-safe: New file.
732         * lib/utf8-ucs4-safe.h: New file.
733         * lib/unistr/utf8-ucs4-safe.c: New file.
734
735         * modules/utf16-ucs4-safe: New file.
736         * lib/utf16-ucs4-safe.h: New file.
737         * lib/unistr/utf16-ucs4-safe.c: New file.
738
739         * MODULES.html.sh (Unicode string functions): Add the new modules.
740
741 2007-01-08  Bruno Haible  <bruno@clisp.org>
742
743         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
744         (Depends-on): Add unitypes.
745         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
746         (u8_mbtouc_aux): Move out to separate file.
747         (u8_mbtouc): Use ucs4_t, uint8_t types.
748         * lib/unistr/utf8-ucs4.c: New file.
749
750         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
751         (Depends-on): Add unitypes.
752         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
753         (u16_mbtouc_aux): Move out to separate file.
754         (u16_mbtouc): Use ucs4_t, uint16_t types.
755         * lib/unistr/utf16-ucs4.c: New file.
756
757         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
758         (Depends-on): Add unitypes.
759         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
760         (u8_uctomb_aux): Move out to separate file.
761         (u8_uctomb): Use ucs4_t, uint8_t types.
762         * lib/unistr/ucs4-utf8.c: New file.
763
764         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
765         (Depends-on): Add unitypes.
766         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
767         (u16_uctomb_aux): Move out to separate file.
768         (u16_uctomb): Use ucs4_t, uint16_t types.
769         * lib/unistr/ucs4-utf16.c: New file.
770
771 2006-12-25  Bruno Haible  <bruno@clisp.org>
772
773         * modules/unitypes: New file.
774         * lib/unitypes.h: New file.
775         * MODULES.html.sh (func_all_modules): New section "Unicode string
776         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
777         this section. Add unitypes.
778
779 2007-01-08  Bruno Haible  <bruno@clisp.org>
780
781         Avoid variable names that conflict with those from libtool.
782         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
783         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
784         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
785         library_names_spec to acl_library_names_spec, hardcode_* to
786         acl_hardcode_*.
787         Reported by Ralf Wildenhues.
788
789 2007-01-08  Bruno Haible  <bruno@clisp.org>
790
791         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
792         definition.
793         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
794         definition.
795         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
796         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
797         definition.
798         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
799         definition.
800         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
801         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
802         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
803         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
804         definition.
805         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
806         definition.
807         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
808         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
809         GC_USE_<algorithm>.
810         * lib/gc-libgcrypt.c: Likewise.
811         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
812         * modules/gc-arctwo (configure.ac): Likewise.
813         * modules/gc-des (configure.ac): Likewise.
814         * modules/gc-hmac-md5 (configure.ac): Likewise.
815         * modules/gc-hmac-sha1 (configure.ac): Likewise.
816         * modules/gc-md2 (configure.ac): Likewise.
817         * modules/gc-md4 (configure.ac): Likewise.
818         * modules/gc-md5 (configure.ac): Likewise.
819         * modules/gc-random (configure.ac): Likewise.
820         * modules/gc-rijndael (configure.ac): Likewise.
821         * modules/gc-sha1 (configure.ac): Likewise.
822
823 2007-01-08  Bruno Haible  <bruno@clisp.org>
824
825         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
826         macro definition.
827         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
828         definition.
829         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
830         definition.
831         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
832         * modules/fcntl-safer (configure.ac): Likewise.
833         * modules/fopen-safer (configure.ac): Likewise.
834         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
835         GNULIB_FWRITEERROR macro definition.
836
837 2007-01-08  Bruno Haible  <bruno@clisp.org>
838
839         * m4/gnulib-common.m4: New file.
840         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
841         (func_get_filelist): Add m4/gnulib-common.m4.
842
843 2007-01-08  Bruno Haible  <bruno@clisp.org>
844
845         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
846         command.
847
848 2007-01-08  Jim Meyering  <jim@meyering.net>
849
850         Use a more robust test for a "can't happen" condition.
851         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
852         narrowed the st_size value.  Presuming the "can't happen" condition
853         is true, that narrowing could conceivably convert an invalid st_size
854         value into a valid one.  Instead, use a change based on Matthew
855         Woehlke's original patch.
856
857         Slight readability improvement: use an assert-like macro
858         in place of literal "abort ()" uses.
859         * lib/fts.c (fts_assert): Define.
860         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
861         Use this macro instead of a bare 'abort'.
862
863 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
864
865         Don't worry about using IRIX 5.3's wctype.h broken definitions;
866         simply work around them.
867         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
868         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
869         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
870         Don't bother to define as macros, since the standard doesn't require it.
871         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
872         longer worry about IRIX 5.3.
873         (HAVE_WCTYPE_CTMP_BUG): Remove.
874
875 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
876
877         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
878         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
879         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
880         Problems reported by Georg Schwarz for IRIX 5.3.
881
882         * gnulib-tool (autoconf_minversion): Take the maximum version number
883         found, not the minimum.  Problem reported by James Youngman.
884
885 2007-01-03  Karl Berry  <karl@gnu.org>
886
887         * doc/error.texi: new file, explaining interaction with progname.
888         * doc/gnulib.texi: include it.  Update copyright.
889
890 2007-01-03  Simon Josefsson  <simon@josefsson.org>
891
892         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
893         AC_CANONICAL_HOST, to improve autobuild outputs.
894
895 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
896             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
897
898         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
899         sockets, server sockets, and other file descriptors.  Count errors
900         to compute the return value.  Reorder the code a bit to be easier
901         to follow.  Don't set event bits that were not requested (except
902         POLLERR and POLLHUP).
903
904 2007-01-01  Bruno Haible  <bruno@clisp.org>
905
906         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
907
908 2007-01-03  Jim Meyering  <jim@meyering.net>
909
910         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
911
912 2007-01-02  Bruno Haible  <bruno@clisp.org>
913
914         * modules/settime (Include): Require timespec.h.
915         * modules/nanosleep (Include): Likewise.
916
917 2007-01-01  Bruno Haible  <bruno@clisp.org>
918
919         * gnulib-tool (func_emit_copyright_notice): Bump year.
920         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
921
922 2007-01-01  Bruno Haible  <bruno@clisp.org>
923
924         Improve support for OpenBSD.
925         * build-aux/config.rpath (libname_spec): Export.
926         (library_names_spec): New variable. Export.
927         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
928         library_names_spec from the config.rpath output. Locate shared library
929         through the name pattern in library_names_spec.
930
931 2007-01-01  Eric Blake  <ebb9@byu.net>
932
933         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
934
935 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
936
937         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
938         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
939         assume the C locale, and avoid an "eval" that could cause trouble.
940         Problem with SORT reported by Bob Proulx.
941
942         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
943         Define.  Trivial patch from Henning Nielsen Lund, originally
944         sent to bug-grep@gnu.org today.
945
946 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
947
948         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
949         struct stat.  Problem reported by Henning Nielsen Lund.
950         * lib/acl.c: Include acl.h first, to check interface.  Don't
951         bother to include sys/types.h and sys/stat.h again.
952
953 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
954
955         Import the following change from libc; problem reported by
956         Sven Verdoolaege.
957
958         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
959
960         [BZ #1373]
961         * lib/argp.h: Remove __NTH for __argp_usage inline function.
962
963 2006-12-28  Jim Meyering  <jim@meyering.net>
964
965         * build-aux/announce-gen: Do not assume that the package
966         builds any of tar.gz, tar.bz2, and .xdelta files.
967         Suggestion from Simon Josefsson.
968
969 2006-12-28  Simon Josefsson  <simon@josefsson.org>
970
971         * modules/announce-gen: New file.
972
973 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
974
975         * lib/mbchar.h: Just include <wctype.h>; the wctype module
976         handles its gotchas now.
977         * lib/mbswidth.c: Likewise.
978         * lib/wcwidth.h: Likewise.
979         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
980         and iswcntrl; the wctype module does this stuff now.
981         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
982         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
983         * modules/mbchar (Depends-on): Add wctype.
984         * modules/mbswidth (Depends-on): Likewise.
985         * modules/wcwidth (Depends-on): Likewise.
986
987 2006-12-27  Eric Blake  <ebb9@byu.net>
988
989         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
990         module uses more than what <wctype.h> is required to provide.
991
992 2006-12-26  Eric Blake  <ebb9@byu.net>
993
994         * gnulib-tool (sed_extract_prog): Avoid space-tab.
995
996 2006-12-26  Eric Blake  <ebb9@byu.net>
997
998         * modules/absolute-header: New module.
999         * modules/fcntl (Depends-on): Depend on it.
1000         * modules/inttypes (Depends-on): Likewise.
1001         * modules/stdint (Depends-on): Likewise.
1002         * modules/sys_stat (Depends-on): Likewise.
1003         * modules/wctype (Depends-on): Likewise.
1004         * MODULES.html.sh (Support for building libraries and
1005         executables): Document it.
1006
1007 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
1008
1009         * gnulib-tool (SED): Remove, undoing previous change.
1010         The problem was that it broke coreutils on Solaris, because
1011         "sed --posix" leaked into a makefile.
1012         (sed): New alias, if 'alias' and GNU sed.
1013
1014 2006-12-24  Jim Meyering  <jim@meyering.net>
1015
1016         Work around an fchownat bug in glibc-2.4:
1017         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
1018         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
1019         in spite of the -P option.
1020         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
1021         New macros.
1022         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
1023         * modules/openat (Files): Add lib/fchownat.c.
1024         * lib/openat.c (fchownat): Don't define here.  Move to...
1025         * lib/fchownat.c: ...this new file.
1026
1027 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
1028
1029         Fix bug reported by Bruno Haible in
1030         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
1031         where quotearg.c didn't compile on Mac OS X 10.2 because it
1032         lacks <wchar.h> and wint_t.
1033         * lib/wctype_.h (__wctype_wint_t): New type.
1034         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
1035         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
1036         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
1037         Arg is now of type __wctype_wint_t, not wint_t.
1038         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
1039         substitute HAVE_WINT_T.
1040         * modules/wctype (Files): Add m4/wint_t.m4.
1041         (wctype.h): Substitute HAVE_WINT_T.
1042
1043 2006-12-23  Bruno Haible  <bruno@clisp.org>
1044
1045         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
1046
1047 2006-12-23  Bruno Haible  <bruno@clisp.org>
1048
1049         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
1050         S_ISLNK.
1051         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
1052         mingw.
1053
1054 2006-12-22  Bruno Haible  <bruno@clisp.org>
1055
1056         * lib/copy-file.c: Include acl.h.
1057         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
1058         Close the file descriptors only after being done with copy_acl.
1059         * modules/copy-file (Depends-on): Add acl.
1060
1061 2006-12-22  Bruno Haible  <bruno@clisp.org>
1062
1063         * gnulib-tool (SED): New variable.
1064         Use $SED instead of sed everywhere.
1065
1066 2006-12-22  Bruno Haible  <bruno@clisp.org>
1067
1068         * modules/no-c++: New file.
1069         * m4/no-c++.m4: New file.
1070         * MODULES.html.sh (Support for building libraries and executables):
1071         Add no-c++.
1072
1073 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
1074
1075         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1076         Include <limits.h>, and use its INT_MAX to rewrite the
1077         j loop so that it does not overflow 'int'.  Problem reported by
1078         Ralf Wildenhues in
1079         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
1080         Play it safe by shifting left by 1 rather than multiplying by 2,
1081         as GCC is less likely to optimize this away when the value
1082         is signed (when it assumes overflow leads to undefined behavior).
1083         Also, don't assume time_t uses two's complement.
1084
1085 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1086
1087         * MODULES.html.sh: New module wctype.
1088         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
1089         * lib/fnmatch.c: Don't bother to include <wchar.h> before
1090         <wctype.h>, since the new wctype module should fix this.
1091         * lib/quotearg.c: Include <wctype.h> unconditionally, since
1092         the wctype module should arrange for it.
1093         * lib/regex_internal.h: Likewise.
1094         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
1095         since the wctype module should handle this now.
1096         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
1097         * modules/fnmatch (Depends-on): Add wctype.
1098         * modules/quotearg (Depends-on): Likewise.
1099         * modules/regex (Depends-on): Likewise.
1100
1101 2006-12-19  Bruno Haible  <bruno@clisp.org>
1102
1103         * lib/strdup.h [C++]: Wrap definitions in extern "C".
1104         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
1105
1106 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1107
1108         * modules/savewd (Depends-on): Fix dependency on fcntl.
1109
1110 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1111
1112         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
1113         conforms to C99, rather than relying on the user's environment
1114         setting of STDINT_H.
1115
1116 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1117         and Eric Blake  <ebb9@byu.net>
1118
1119         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
1120         This is more consistent with the other defines here.
1121         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
1122         Port to z/OS.  Problem reported by Paul Gilmartin.
1123         Change local vars to use gl_ prefix rather than ac_.
1124         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
1125         with other defines.
1126         * modules/double-slash-root: New module.
1127         * modules/dirname (Files): Remove m4/double-slash-root.m4.
1128         (Depends-on): Add double-slash-root.
1129         * MODULES.html.sh (File system functions): Mention new module.
1130
1131 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1132
1133         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
1134         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
1135         This is for the benefit of gzip, which doesn't do i18n.
1136
1137 2006-12-12  Jim Meyering  <jim@meyering.net>
1138
1139         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
1140         Reported by Andreas Schwab <schwab@suse.de>.
1141
1142 2006-12-12  Bruno Haible  <bruno@clisp.org>
1143
1144         Merge these changes.
1145         2006-09-05  Bruno Haible  <bruno@clisp.org>
1146         * lib/iconvme.c (iconv_string): No need to save and restore errno when
1147         iconv_alloc succeeded.
1148         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
1149         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
1150         test for " && dest " at the end - dest is always != NULL there. Call
1151         iconv with 4xNULL arguments initially, to reset the state. Call iconv
1152         with 2xNULL arguments, also to flush the state storage. Handle the
1153         IRIX iconv behaviour. Realloc the final result, to throw away unused
1154         memory.
1155
1156 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1157
1158         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
1159         and fchmodat unconditionally, since glibc 2.4 has them.
1160         Problem reported by Arkadiusz Miskiewicz.
1161
1162 2006-12-10  Bruno Haible  <bruno@clisp.org>
1163
1164         * gnulib-tool (func_import): Show the include files only for those
1165         modules that are copied and specified.
1166         Reported by Karl Berry.
1167
1168 2006-12-08  Jim Meyering  <jim@meyering.net>
1169
1170         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
1171         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
1172
1173         * build-aux/announce-gen: Add two new options, both optional:
1174         --bootstrap-tools=TOOL_LIST
1175               a comma-separated list of tools, e.g.,
1176               autoconf,automake,bison,gnulib
1177         --gnulib-snapshot-date=DATE
1178               if gnulib is in the bootstrap tool list,
1179               then report this as the snapshot date.
1180               If not specified, use the current date/time.
1181               If you specify a date here, be sure it's UTC.
1182
1183 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1184
1185         * tests/test-argp-2.sh: Fix test to match actual output.
1186         (func_compare): Fix sed script to be portable.
1187
1188 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
1189
1190         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
1191         workaround for this case.  It is not autoconfigured now; offhand
1192         it's hard to see how to autoconfigure it.
1193
1194 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1195
1196         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
1197         a directory that is about to be chowned.  Such a directory's
1198         initial file permissions should permit the owner only and this
1199         should not be changed until after the chown, since the group and
1200         other bits would be incorrect if they granted permission before
1201         the chown.
1202
1203         Fix porting problem for iswctype reported by Georg Schwarz in:
1204         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
1205         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
1206         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
1207         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
1208         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1209
1210 2006-12-03  Jim Meyering  <jim@meyering.net>
1211
1212         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
1213         p->fts_statp may not yet be defined.
1214         (fts_read): Instead, set it in the caller, once p->fts_statp is
1215         sure to be defined, and corresponds to a top-level directory.
1216         This bug made du -x fail.  Here's the coreutils test case:
1217         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
1218         Reported by Mike Frysinger.
1219
1220 2006-12-01  Jim Meyering  <jim@meyering.net>
1221
1222         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
1223         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
1224         Reported by Simon Josefsson.
1225
1226 2006-11-30  Jim Meyering  <jim@meyering.net>
1227
1228         * m4/warning.m4: Use the all-permissive copyright notice
1229         recommended by RMS (rather than LGPL).
1230         * m4/vararrays.m4: Likewise.
1231         * m4/flexmember.m4: Likewise.
1232
1233 2006-11-29  Bruno Haible  <bruno@clisp.org>
1234
1235         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1236         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
1237         using +=.
1238         Reported by Simon Josefsson <simon@josefsson.org>.
1239
1240 2006-11-28  James Youngman <jay@gnu.org>
1241
1242         * README: Advise users that they might find the bug-gnulib@gnu.org
1243         and autotools-announce@gnu.org mailing lists useful.
1244
1245 2006-11-28  Bruno Haible  <bruno@clisp.org>
1246
1247         * m4/ptrdiff_max.m4: Remove file.
1248
1249 2006-11-21  Bruno Haible  <bruno@clisp.org>
1250
1251         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
1252         _AC_COMPUTE_INT.
1253         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1254         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
1255         _AC_COMPUTE_INT.
1256         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1257         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
1258         _AC_COMPUTE_INT.
1259         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1260
1261 2006-11-28  Jim Meyering  <jim@meyering.net>
1262
1263         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
1264         warning from "gcc -Wshadow" about shadowing the builtin.
1265
1266 2006-11-27  Bruno Haible  <bruno@clisp.org>
1267
1268         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
1269         _AC_COMPUTE_INT.
1270         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1271
1272 2006-11-27  Bruno Haible  <bruno@clisp.org>
1273             Paul Eggert  <eggert@cs.ucla.edu>
1274
1275         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
1276
1277 2006-11-26  Bruno Haible  <bruno@clisp.org>
1278
1279         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1280         noinst_LTLIBRARIES.
1281
1282 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
1283             Bruno Haible  <bruno@clisp.org>
1284
1285         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
1286         if compiling with "gcc -ansi".
1287
1288 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1289
1290         Fix some incompatibilities with gcc -ansi -pedantic.
1291         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
1292         if compiling pedantically with GCC, unless it's C99 or later.
1293         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
1294         it mishandles gcc -ansi -pedantic as well.
1295         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
1296         if gcc -pedantic.
1297         * lib/regexec.c (check_node_accept_bytes): Don't use auto
1298         initializers for struct if -pedantic, unless it's C99 or later.
1299
1300 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
1301
1302         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
1303         Don't close an fd more than once. Identical atimes indicate
1304         success, not failure.
1305
1306 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
1307
1308         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
1309
1310 2006-11-23  Jim Meyering  <jim@meyering.net>
1311
1312         * build-aux/announce-gen: New file.  From coreutils.
1313
1314 2006-11-22  Jim Meyering  <jim@meyering.net>
1315
1316         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
1317         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
1318         (fts_read): Use a temporary to narrow the overused st_size member
1319         before using it in a switch statement.  Reported by Matthew Woehlke.
1320
1321         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
1322         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
1323
1324 2006-11-20  Bruno Haible  <bruno@clisp.org>
1325
1326         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
1327         changequote instead of pairs of brackets.
1328         Reported by Andreas Schwab <schwab@suse.de>.
1329
1330 2006-11-21  Jim Meyering  <jim@meyering.net>
1331
1332         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
1333         so as to remain compatible with older compilers.
1334         Patch from Michael Deutschmann.
1335
1336 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1337
1338         * MODULES.html.sh (File system functions): Add openat.
1339
1340         * lib/openat.h (rpl_fstatat): New macro, if
1341         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
1342         (fstatat): Define to rpl_fstatat under the same conditions,
1343         unless COMPILING_FSTATAT.
1344         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
1345         seems to have the bug.
1346         * lib/fstatat.c: New file.
1347         * modules/openat (Files): Add it.
1348
1349 2006-11-20  Bruno Haible  <bruno@clisp.org>
1350
1351         * Makefile: New file.
1352
1353 2006-11-20  Jim Meyering  <jim@meyering.net>
1354
1355         The beginnings of syntax-related checks for gnulib.
1356         * lib/Makefile: New file.
1357         * lib/t-idcache: New script.  Ensure that the two halves of
1358         idcache.c stay in sync.
1359
1360         * lib/idcache.c: Adjust comments in user- and group- portions to
1361         be more accurate, and to be consistent with one another.
1362
1363 2006-11-20  Jim Meyering  <jim@meyering.net>
1364
1365         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
1366         continue using the flexible array member (thus, this module performs
1367         half as many malloc calls), with the addition that...
1368         (getgroup, getuser): Consistently record a non-match via an empty
1369         "name" string, and map an empty string match to a NULL return value.
1370         * modules/idcache (Depends-on): Re-add flexmember.
1371
1372         * lib/idcache.c (getuser): Remove all uses of the register keyword.
1373         (getuidbyname, getgroup, getgidbyname): Likewise.
1374
1375         Use cleaner syntax: NULL rather than 0.
1376         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
1377
1378 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1379
1380         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
1381         It mishandled the case where the group was missing.
1382         Problem reported by Greg Schafer.
1383         * modules/idcache: Likewise.
1384
1385 2006-11-18  Jim Meyering  <jim@meyering.net>
1386
1387         * check-module (%exempt_header): Add exception for some
1388         conditionally-included headers.
1389
1390         * modules/i-ring (Depends-on): Add verify.
1391         (License): Change to LGPL.
1392
1393 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1394
1395         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
1396         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
1397         and inttostr.h.  Use snprintf rather than uinttostr, so that
1398         LGPLed code doesn't depend on GPLed.
1399
1400 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
1401
1402         * modules/inline (License): Change from GPL to LGPL.
1403
1404 2006-11-17  Jim Meyering  <jim@meyering.net>
1405
1406         * modules/d-type (License): Switch to LGPL.
1407
1408 2006-11-15  Bruno Haible  <bruno@clisp.org>
1409
1410         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
1411
1412 2006-11-15  Eric Blake  <ebb9@byu.net>
1413
1414         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
1415         the module dependency.
1416
1417 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1418             Bruno Haible  <bruno@clisp.org>
1419
1420         * gnulib-tool (func_create_testdir): Add license consistency check.
1421
1422 2006-11-15  Eric Blake  <ebb9@byu.net>
1423
1424         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
1425         random "(cached)" in configure output.
1426
1427 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1428
1429         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
1430         test for conforming inttypes.h is both announced and cached.
1431
1432         * MODULES.html.sh (seen_modules, seen_files): New variables.
1433         (func_module): Rewrite to use a few less gnulib-tool and sed
1434         invocations.  Avoid a couple of quadratic algorithms for ...
1435         (missed_modules, missed_files): ... these, with ...
1436         (func_append, func_tmpdir): ... these new functions, from
1437         gnulib-tool.  Analogously, install traps for cleanup.
1438
1439         * tests/test-gc.c (main): Remove unused variables.
1440         * tests/test-read-file.c: Include stdlib.h, for 'free'.
1441
1442 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
1443
1444         * modules/inttostr (License): Change to LGPL.
1445
1446 2006-11-14  Eric Blake  <ebb9@byu.net>
1447
1448         * modules/tempname (License): Change to LGPL.
1449
1450 2006-11-14  Eric Blake  <ebb9@byu.net>
1451
1452         * doc/functions.texi (Function Portability): *printf functions on
1453         Cygwin now understand all POSIX size specifiers.
1454
1455 2006-11-14  Bruno Haible  <bruno@clisp.org>
1456
1457         * modules/c-ctype (License): Change to LGPL.
1458
1459 2006-11-12  Bruno Haible  <bruno@clisp.org>
1460
1461         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
1462         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
1463         for GNOME libraries, for which the include files are installed in
1464         subdirectories of $prefix/include.
1465
1466 2006-11-12  Bruno Haible  <bruno@clisp.org>
1467
1468         * m4/lib-link.m4: Require at least autoconf-2.54.
1469         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
1470         name to underscores for the --with option.
1471
1472 2006-11-13  Bruno Haible  <bruno@clisp.org>
1473
1474         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
1475         the tests directory.
1476         Reported by Ralf Wildenhues.
1477
1478 2006-11-13  Bruno Haible  <bruno@clisp.org>
1479
1480         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
1481         (func_emit_initmacro_end): Undo the override here.
1482         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
1483         Works around the famous automake error in coreutils.
1484
1485 2006-11-13  Eric Blake  <ebb9@byu.net>
1486
1487         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
1488         element, not its node.
1489
1490 2006-11-12  Bruno Haible  <bruno@clisp.org>
1491
1492         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
1493         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
1494
1495 2006-11-12  Bruno Haible  <bruno@clisp.org>
1496
1497         * gnulib-tool: New option --local-symlink.
1498         (func_usage): Document it.
1499         (lsymbolic): New variable.
1500         (func_import, func_create_testdir): If --symlink was not specified,
1501         test whether --local-symlink was specified and the file comes from
1502         the local_gnulib_dir.
1503
1504 2006-11-12  Bruno Haible  <bruno@clisp.org>
1505
1506         * gnulib-tool (func_ln): New function.
1507         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
1508
1509 2006-11-12  Bruno Haible  <bruno@clisp.org>
1510
1511         Finish support for source files in subdirectories.
1512         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
1513         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
1514         AUTOMAKE_OPTIONS.
1515         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
1516
1517 2006-11-12  Bruno Haible  <bruno@clisp.org>
1518
1519         * gnulib-tool (func_get_automake_snippet): Synthesize also an
1520         EXTRA_lib_SOURCES augmentation.
1521         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
1522
1523 2006-11-12  Jim Meyering  <jim@meyering.net>
1524
1525         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
1526         file descriptors.  This also averts a failure on systems with
1527         native openat support when a traversed directory lacks "x" access.
1528         * lib/fts_.h: Include "i-ring.h"
1529         (struct FTS) [fts_fd_ring]: New member.
1530         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
1531         (FCHDIR): Add parentheses.
1532         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
1533         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
1534         When descending, rather than simply closing the previous
1535         fts_cwd_fd value, push that file descriptor onto the ring.
1536         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
1537         (fts_open): Initialize the new fd_ring member.
1538         (fts_close): Clear the ring.
1539         (fts_safe_changedir): When possible, use our new fd_ring to skip
1540         the diropen and fstat and dev/ino comparison that would normally
1541         accompany a virtual `chdir ("..")'.
1542
1543         * modules/fts (Depends-on): Add i-ring.
1544         * modules/i-ring: New module.
1545         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
1546         * m4/i-ring.m4: New file.
1547
1548 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1549
1550         * gnulib-tool (func_create_testdir): Fix replacement of
1551         `build-aux' in configure.ac.  Run autotools in gltests
1552         subdirectory.
1553         (func_create_testdir, func_create_megatestdir, test): There is
1554         no need for '--force' in most autotool invocations in a new
1555         tree.  Actually fail the whole test if any of the tools, or the
1556         configure or make stages fail.
1557
1558         Sync from Automake.
1559         * build-aux/gnupload: Revert last change.  Add pointer to upload
1560         instructions of the GNU Maintenance Instructions.
1561         Suggestion by Karl Berry.
1562
1563 2006-11-10  Jim Meyering  <jim@meyering.net>
1564
1565         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
1566
1567 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1568
1569         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
1570         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
1571         (bind_textdomain_codeset) [! ENABLE_NLS]:
1572         Evaluate all the arguments.  That way, callers get compatible behavior
1573         if the arguments have side effects.  Also, it avoids some GCC
1574         diagnostics in some cases; Joel E. Denny reported problems when Bison
1575         was configured with --enable-gcc-warnigs.
1576
1577 2006-11-10  Jim Meyering  <jim@meyering.net>
1578
1579         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
1580         relevant options in CFLAGS (like -O, -fno-inline) are taken into
1581         account.
1582
1583 2006-11-10  Jim Meyering  <jim@meyering.net>
1584
1585         * modules/inline: New file/module.
1586         * modules/xalloc (Files): Remove m4/inline.m4.
1587         (Depends-on): Add inline, instead.
1588         * modules/oset: Likewise.
1589         * modules/list: Likewise.
1590
1591 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1592
1593         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
1594         Problem reported by Matthew Woehlke.
1595
1596 2006-11-09  Bruno Haible  <bruno@clisp.org>
1597
1598         * lib/tempname.c (gen_tempname): Remove variant that invokes
1599         __gen_tempname.
1600         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
1601         __gen_tempname.
1602
1603 2006-11-08  Bruno Haible  <bruno@clisp.org>
1604
1605         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
1606         to 'yes' instead of 'cross-compiling'.
1607
1608 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
1609
1610         * lib/quotearg.h (quotearg_free): New decl.
1611         * lib/quotearg.c (quotearg_free): New function.
1612         (slot0, nslots, slotvec0, slotvec):
1613         Now file-scope so that quotearg_free can get at them.
1614
1615 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1616
1617         Sync from Automake.
1618         * build-aux/gnupload: Add missing 'gnu' to example URL.
1619         Report by Karl Berry.
1620
1621 2006-11-08  Bruno Haible  <bruno@clisp.org>
1622
1623         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
1624         Suggested by Paul Eggert.
1625
1626 2006-11-08  Jim Meyering  <jim@meyering.net>
1627
1628         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
1629         It's already included if !_LIBC.
1630         (fts_safe_changedir): Add a comment.
1631
1632 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1633
1634         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
1635         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
1636         Matthew Woehlke.
1637
1638         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
1639         definitions up, to avoid colliding with change below.
1640         (static_inline) [HAVE_INLINE]: New macro.
1641         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
1642         Provide extern decls when !HAVE_INLINE.  Do not define unless
1643         static_inline is defined, either by us or by xmalloc.c.  Use
1644         static_inline rather than static inline.
1645         (XCALLOC): Optimize sizeof(T) = 1 case.
1646         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
1647
1648 2006-11-07  Bruno Haible  <bruno@clisp.org>
1649
1650         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
1651         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
1652         AC_C_INLINE.
1653         * modules/xalloc (Files): Add m4/inline.m4.
1654
1655 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1656
1657         * README: Fix typo.
1658         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
1659         (Miscellanous Notes): ...from this.
1660
1661 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1662
1663         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
1664         Mention that offsetof should be used instead of sizeof.
1665         From Bruno Haible.
1666
1667 2006-11-07  Bruno Haible  <bruno@clisp.org>
1668
1669         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
1670
1671 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1672
1673         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1674         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
1675         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1676         (gl_tree_add_before, gl_tree_add_after):
1677         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
1678         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
1679         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
1680         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
1681         (gl_linked_add_after, gl_linked_add_at): Likewise.
1682         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
1683         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1684         (gl_tree_add_before, gl_tree_add_after): Likewise.
1685         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
1686         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
1687         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
1688
1689 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1690
1691         * lib/gl_oset.h: Use C comment style, not C++ comment style.
1692
1693 2006-11-06  Bruno Haible  <bruno@clisp.org>
1694
1695         * m4/inline.m4: New file.
1696         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
1697         * modules/list (Files): Add m4/inline.m4.
1698         * modules/oset (Files): Likewise.
1699
1700 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1701
1702         * lib/idcache.c: Include <stddef.h>, for offsetof.
1703         (struct userid.name): Change from char * to a flexible array member.
1704         All uses changed.
1705         * modules/idcache (Depends-on): Add flexmember.
1706
1707         * MODULES.html.sh (Core language properties): New module flexmember.
1708         * modules/flexmember, m4/flexmember.m4: New files.
1709
1710         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
1711         inline functions that are identical with the old xnmalloc_inline,
1712         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
1713         that we can avoid some unnecessary integer multiplications and
1714         divisions in the common case where the element size is known at
1715         compile time.
1716         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
1717         needed.
1718         (xnboundedmalloc): Remove.
1719         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
1720         arguments, for consistency with rest of this header.
1721         (xcharalloc): Rewrite using XNMALLOC.
1722         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
1723         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
1724         versions have been moved to lib/xalloc.h and renamed to be the
1725         non-*_inline versions.
1726         (xmalloc, xrealloc): Implement without reference to the xnmalloc
1727         and xnrealloc functions, since those functions are now inline and
1728         now call us.
1729         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
1730         renaming described above.
1731         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
1732         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
1733         captures the dependency in AC_C_INLINE.
1734
1735         New module canonicalize-lgpl, proposed by Charles Wilson in
1736         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
1737         with a few small changes afterwards.
1738         * MODULES.html.sh (File system functions): New module
1739         canonicalize-lgpl.
1740         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
1741         and canonicalize_file_name.
1742         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
1743         * modules/canonicalize-lgpl: New files.
1744
1745 2006-11-05  Bruno Haible  <bruno@clisp.org>
1746
1747         * gnulib-tool (func_import, func_create_testdir): Create directories
1748         also for files in subdirectories of lib/.
1749
1750 2006-11-05  Bruno Haible  <bruno@clisp.org>
1751
1752         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
1753         ANSI C compliant.
1754
1755 2006-11-03  Bruno Haible  <bruno@clisp.org>
1756
1757         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1758         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
1759         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
1760         (xnboundedmalloc): New inline function.
1761         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
1762         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
1763         xmalloc.
1764         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
1765         xmalloc.
1766         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
1767         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
1768         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
1769         xmalloc.
1770         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1771         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
1772         xmalloc.
1773         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
1774         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1775         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
1776         xmalloc.
1777         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1778         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
1779         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1780         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
1781         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
1782         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
1783         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
1784
1785 2006-11-03  Bruno Haible  <bruno@clisp.org>
1786
1787         * lib/c-ctype.h [C++]: Define functions without name mangling.
1788         * lib/fwriteerror.h [C++]: Likewise.
1789         * lib/gcd.h [C++]: Likewise.
1790         * lib/linebreak.h [C++]: Likewise.
1791
1792 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
1793
1794         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
1795         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
1796         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
1797         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
1798         Check for functions and headers just once.
1799         Check for declaration of canonicalize_file_name.
1800         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
1801
1802 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1803
1804         * gnulib-tool (func_import): Fix typo in actioncmd.
1805
1806 2006-11-02  Bruno Haible  <bruno@clisp.org>
1807
1808         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
1809         newline sequence in the Makefile.am snippet as a space, like "make"
1810         does.
1811         Reported by Roger Persson <perrog@gmail.com>.
1812
1813 2006-11-01  Bruno Haible  <bruno@clisp.org>
1814
1815         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
1816         already declared in <string.h>.
1817         * lib/strcase.h (strncasecmp): Don't declare it if yes.
1818
1819 2006-11-01  Bruno Haible  <bruno@clisp.org>
1820
1821         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
1822         * lib/strcase.h: Include <string.h>.
1823         (strcasecmp): Define to rpl_strcasecmp here.
1824
1825 2006-11-01  Bruno Haible  <bruno@clisp.org>
1826
1827         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
1828
1829 2006-11-01  Eric Blake  <ebb9@byu.net>
1830
1831         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
1832
1833         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
1834
1835 2006-10-29  Bruno Haible  <bruno@clisp.org>
1836
1837         Make it compile in C++ mode.
1838         * lib/full-write.c (full_rw): Add a cast.
1839
1840 2006-11-01  Bruno Haible  <bruno@clisp.org>
1841
1842         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
1843         be POSIX compliant.
1844         Reported by Roger Persson <perrog@gmail.com>.
1845
1846 2006-11-01  Eric Blake  <ebb9@byu.net>
1847
1848         * lib/getopt_.h: Fix comments.
1849
1850 2006-10-31  Eric Blake  <ebb9@byu.net>
1851
1852         * modules/tmpdir (Depends-on): Add sys_stat.
1853         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
1854         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
1855         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
1856         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
1857         tempname.
1858
1859 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
1860
1861         Avoid some C++ diagnostics reported by Bruno Haible.
1862         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
1863         xmalloc.
1864         (quotearg_alloc): Use xcharalloc rather than xmalloc.
1865         (struct slotvec): Move to top level.
1866         (quotearg_n_options): Rewrite to avoid xmalloc.
1867         * lib/xalloc.h (xcharalloc): New function.
1868         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
1869         [defined __cplusplus]: Add function template that provides result
1870         type propagation.  This part of the change is from Bruno Haible.
1871
1872 2006-10-29  Bruno Haible  <bruno@clisp.org>
1873
1874         Make it compile in C++ mode.
1875         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
1876         * lib/strnlen1.c (strnlen1): Cast memchr result.
1877         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
1878         * lib/clean-temp.c (string_equals, string_hash): Add casts.
1879         (create_temp_dir): Rename local variable 'template'.
1880         (compile_csharp_using_sscli): Add cast.
1881         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
1882         * lib/findprog.c (find_in_path): Likewise.
1883         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
1884         * lib/wait-process.c (register_slave_subprocess): Likewise.
1885
1886 2006-10-22  Bruno Haible  <bruno@clisp.org>
1887
1888         * modules/tsearch: New file.
1889         * lib/tsearch.h: New file.
1890         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
1891         * m4/tsearch.m4: New file.
1892         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
1893
1894 2006-10-29  Eric Blake  <ebb9@byu.net>
1895
1896         * lib/arcfour.c: Assume config.h.
1897         * lib/arctwo.c: Likewise.
1898         * lib/base64.c: Likewise.
1899         * lib/check-version.c: Likewise.
1900         * lib/crc.c: Likewise.
1901         * lib/des.c: Likewise.
1902         * lib/gc-gnulib.c: Likewise.
1903         * lib/gc-libgcrypt.c: Likewise.
1904         * lib/gc-pbkdf2-sha1.c: Likewise.
1905         * lib/getaddrinfo.c: Likewise.
1906         * lib/getdelim.c: Likewise.
1907         * lib/getline.c: Likewise.
1908         * lib/hmac-md5.c: Likewise.
1909         * lib/hmac-sha1.c: Likewise.
1910         * lib/iconvme.c: Likewise.
1911         * lib/md2.c: Likewise.
1912         * lib/md4.c: Likewise.
1913         * lib/memxor.c: Likewise.
1914         * lib/read-file.c: Likewise.
1915         * lib/readline.c: Likewise.
1916         * lib/rijndael-alg-fst.c: Likewise.
1917         * lib/rijndael-api-fst.c: Likewise.
1918         * lib/xgetdomainname.c: Likewise.
1919
1920 2006-10-28  Eric Blake  <ebb9@byu.net>
1921
1922         * lib/xstrndup.c: Assume config.h.
1923
1924 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
1925
1926         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
1927         stat-macros.h is now for our own macros, whereas stat_h is for
1928         macros in the <sys/stat.h> name space.
1929         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
1930         (STAT_MACROS_H): Remove.
1931         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
1932         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
1933         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
1934         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
1935         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
1936         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
1937         Move these macros to ...
1938         * lib/stat_.h: here.  Don't include stat-macros.h.
1939         * lib/canonicalize.c: Don't include stat-macros.h.
1940         * lib/chown.c: Likewise.
1941         * lib/euidaccess.c: Likewise.
1942         * lib/file-type.c: Likewise.
1943         * lib/filemode.c: Likewise.
1944         * lib/glob.c: Likewise.
1945         * lib/isapipe.c: Likewise.
1946         * lib/lchown.c: Likewise.
1947         * lib/lstat.c: Likewise.
1948         * lib/mkdir-p.c: Likewise.
1949         * lib/rmdir.c: Likewise.
1950         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
1951         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
1952         unless mkdir isn't declared, to speed up 'configure'.
1953         Always create sys/stat.h, since it's unlikely any real sys/stat.h
1954         would define all the S_* symbols.
1955         * modules/canonicalize (Depends-on):
1956         Depend on sys_stat, not stat-macros.
1957         * modules/chown: Likewise.
1958         * modules/euidaccess: Likewise.
1959         * modules/filemode: Likewise.
1960         * modules/file-type: Likewise.
1961         * modules/glob: Likewise.
1962         * modules/isapipe: Likewise.
1963         * modules/lchown: Likewise.
1964         * modules/lstat: Likewise.
1965         * modules/mkancesdirs: Likewise.
1966         * modules/rmdir: Likewise.
1967         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
1968         * modules/modechange: Likewise.
1969         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
1970         (configure.ac): Remove gl_STAT_MACROS.
1971         * modules/sys_stat (Depends-on): Remove stat-macros.
1972
1973 2006-10-27  Bruno Haible  <bruno@clisp.org>
1974
1975         * m4/signed.m4: Remove file.
1976         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
1977         invocation.
1978         * modules/vasnprintf (Files): Remove m4/signed.m4.
1979
1980 2006-10-27  Bruno Haible  <bruno@clisp.org>
1981
1982         Update to GNU gettext 0.16.
1983         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
1984         m4/inttypes-h.m4, m4/signed.m4.
1985         * m4/gettext.m4: Update to GNU gettext 0.16.
1986         * m4/intl.m4: New file, from GNU gettext.
1987         * m4/intldir.m4: New file, from GNU gettext.
1988         * config/srclist.txt: Update
1989
1990 2006-10-27  Eric Blake  <ebb9@byu.net>
1991
1992         * MODULES.html.sh: Document tempname.
1993         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
1994         dependencies.
1995         (Files): Move lib/tempname.c...
1996         * modules/tempname: ...to this new module.
1997         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
1998         (gl_PREREQ_TEMPNAME): Move...
1999         * m4/tempname.m4: ...to this new file.
2000         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
2001         * modules/sys_stat (Depends-on): Add stat-macros.
2002         * lib/stat_.h (includes): Pick up stat macros.
2003         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
2004         if stat macros are broken.
2005         * lib/tempname.c (includes): No need to include "stat-macros.h".
2006         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
2007         (direxists, __path_search) [!_LIBC]: Don't compile these in
2008         gnulib; the tmpdir module covers that.
2009         * lib/tempname.h: New file.
2010
2011 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
2012
2013         * COPYING: Explain how gnulib-tool converts licence headers.
2014         Almost all wording by Eric Blake.
2015
2016 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2017
2018         * lib/mbchar.h (is_basic_table): Make read-only.
2019         * lib/mbchar.c (is_basic_table): Likewise.
2020         Reported by John Darrington.
2021
2022 2006-10-25  Bruno Haible  <bruno@clisp.org>
2023
2024         * lib/progname.h (set_program_name): Undefine before defining.
2025
2026 2006-10-25  Bruno Haible  <bruno@clisp.org>
2027
2028         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
2029         false for non-gcc C++ compilers.
2030         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
2031
2032 2006-10-24  Bruno Haible  <bruno@clisp.org>
2033
2034         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
2035         iconv implementations like Irix iconv.
2036
2037 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2038
2039         * modules/vararrays: New file.
2040         * m4/vararrays.m4: New file, taken from diffutils.
2041         * MODULES.html.sh: New module vararrays.
2042
2043 2006-10-24  Karl Berry  <karl@gnu.org>
2044
2045         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
2046         Don't call GNU Unix.
2047
2048 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2049
2050         * users.txt: Add Libtool.
2051
2052         Sync from Libtool:
2053
2054         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2055
2056         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
2057         to gnulib's policy of including config.h unconditionally.
2058
2059 2006-10-24  Bruno Haible  <bruno@clisp.org>
2060
2061         * modules/wcwidth (Files): Add m4/wint_t.m4.
2062         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
2063         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
2064
2065 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2066
2067         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
2068         to pacify GCC with some -W flags enabled.  Problem reported by
2069         Bruno Haible.
2070
2071 2006-10-24  Jim Meyering  <jim@meyering.net>
2072
2073         * MODULES.html.sh: Remove uinttostr.  It's not a module.
2074         Reported by Karl Berry.
2075
2076 2006-10-23  Bruno Haible  <bruno@clisp.org>
2077
2078         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
2079
2080 2006-10-24  Bruno Haible  <bruno@clisp.org>
2081
2082         * lib/gl_list.h: Use C comment style, not C++ comment style.
2083
2084 2006-10-23  Eric Blake  <ebb9@byu.net>
2085
2086         * lib/getaddrinfo.c (includes): Add missing include.
2087
2088 2006-10-23  Bruno Haible  <bruno@clisp.org>
2089             Paul Eggert  <eggert@cs.ucla.edu>
2090
2091         Ability to rename obstack_free.
2092         * lib/obstack.h (__obstack_free): New macro. Declare instead of
2093         obstack_free.
2094         (obstack_free): Invoke the __obstack_free macro.
2095         * lib/obstack.c (obstack_free): Use __obstack_free macro.
2096
2097 2006-10-23  Bruno Haible  <bruno@clisp.org>
2098             Paul Eggert  <eggert@cs.ucla.edu>
2099
2100         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
2101         __argc, __argv from the declaration. (They are defined as macros on
2102         mingw.)
2103
2104 2006-10-22  Bruno Haible  <bruno@clisp.org>
2105
2106         * doc/gnulib-intro.texi: New file.
2107         * doc/gnulib.texi: Include it.
2108
2109 2006-10-21  Bruno Haible  <bruno@clisp.org>
2110
2111         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
2112         "Introduction", "Miscellanous Notes", "Particular Modules".
2113
2114 2006-10-21  Bruno Haible  <bruno@clisp.org>
2115
2116         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2117         Change mostlyclean-local rule to avoid sh syntax error from bash
2118         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
2119
2120 2006-10-23  Jim Meyering  <jim@meyering.net>
2121
2122         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
2123         in place of snprintf.
2124
2125         * modules/inttostr (Files): Add lib/uinttostr.c.
2126         * lib/uinttostr.c (inttostr): New file/function.
2127         * lib/inttostr.h (uinttostr): Declare.
2128         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
2129         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
2130         Add uinttostr.
2131         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
2132
2133 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2134
2135         * lib/canonicalize.c (ELOOP): Define if not already defined.
2136         Problem reported by Bruno Haible in
2137         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
2138
2139 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2140
2141         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
2142         Problem reported by Perry Smith and Ville Laurikari.
2143
2144         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
2145         uses.
2146
2147 2006-10-19  Bruno Haible  <bruno@clisp.org>
2148
2149         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
2150         for mingw.
2151
2152 2006-10-19  Bruno Haible  <bruno@clisp.org>
2153
2154         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
2155         Needed for mingw.
2156
2157 2006-10-19  Bruno Haible  <bruno@clisp.org>
2158
2159         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
2160
2161 2006-10-19  Bruno Haible  <bruno@clisp.org>
2162
2163         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
2164         it.
2165
2166 2006-10-19  Bruno Haible  <bruno@clisp.org>
2167
2168         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
2169         invocation.
2170
2171 2006-10-19  Bruno Haible  <bruno@clisp.org>
2172
2173         * gnulib-tool (func_create_testdir): Don't include ftruncate and
2174         mountlist by default.
2175
2176 2006-10-16  Bruno Haible  <bruno@clisp.org>
2177
2178         * lib/c-strstr.c: Include c-strstr.h.
2179
2180 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2181
2182         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
2183         in a slash.
2184
2185 2006-10-18  Bruno Haible  <bruno@clisp.org>
2186
2187         * lib/lock.h [C++]: Wrap definitions in extern "C".
2188
2189 2006-10-18  Bruno Haible  <bruno@clisp.org>
2190
2191         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
2192         gl_LIBOBJS list.
2193
2194 2006-10-18  Bruno Haible  <bruno@clisp.org>
2195
2196         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
2197
2198 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
2199
2200         * lib/xstrtol.h: Include gettext.h.
2201         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
2202         Problem reported by Eric Blake.
2203         * modules/xstrtol (Depends-on): Add gettext-h.
2204
2205 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2206
2207         * lib/strftime.c (advance): New macro.
2208         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
2209         incomplete type, so you can't add 0 to it.  Problem and patch
2210         reported by Eelco Dolstra for dietlibc.
2211
2212 2006-10-18  Jim Meyering  <jim@meyering.net>
2213
2214         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
2215         type for a local, and rename it: s/up/user_proc/.
2216
2217 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2218
2219         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
2220         READ_UTMP_USER_PROCESS.
2221         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
2222
2223 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
2224
2225         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
2226         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
2227
2228 2006-10-17  Eric Blake  <ebb9@byu.net>
2229
2230         * lib/sigprocmask.c (sigprocmask): Fix typo.
2231
2232         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
2233
2234         * modules/clean-temp (Makefile.am): Don't add to make output...
2235         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
2236         config.h.
2237
2238 2006-10-17  Bruno Haible  <bruno@clisp.org>
2239
2240         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
2241         differently if DEFAULT_TEXT_DOMAIN is set.
2242
2243 2006-10-16  Bruno Haible  <bruno@clisp.org>
2244
2245         * lib/clean-temp.c: Include fwriteerror.h.
2246
2247 2006-10-16  Bruno Haible  <bruno@clisp.org>
2248
2249         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
2250
2251 2006-10-16  Bruno Haible  <bruno@clisp.org>
2252
2253         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
2254         * lib/sigprocmask.h: Include <sys/types.h>.
2255         (sigset_t): Use the system's definition if present.
2256
2257 2006-10-17  Eric Blake  <ebb9@byu.net>
2258
2259         * lib/xvasprintf.c (includes): Assume config.h.
2260         * lib/xasprintf.c (includes): Likewise.
2261
2262 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
2263
2264         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
2265         at least as wide as intmax_t.
2266
2267 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
2268
2269         (Imported from Automake.)
2270         * build-aux/gnupload: Update to version 1.1 of directive file.
2271
2272 2006-10-16  Eric Blake  <ebb9@byu.net>
2273
2274         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
2275         match Automake 1.10a.
2276
2277 2006-10-14  Bruno Haible  <bruno@clisp.org>
2278
2279         * modules/sigprocmask: New file.
2280         * lib/sigprocmask.h: New file.
2281         * lib/sigprocmask.c: New file.
2282         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
2283         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
2284         request sigprocmask.o.
2285         (gl_PREREQ_SIGPROCMASK): New macro.
2286         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
2287         (Depends-on): Add sigprocmask.
2288         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
2289         gt_SIGNALBLOCKING. Test for 'raise' only once.
2290         * lib/fatal-signal.c: Include sigprocmask.h.
2291         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
2292         unblock_fatal_signals): Define always.
2293         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2294         sigprocmask.
2295
2296 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
2297
2298         Sync from Automake.
2299         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
2300         which incorrectly sets the mode of an existing destination
2301         directory.  In some cases the unpatched install-sh could do the
2302         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
2303         system.  We hope this is rare in practice, but it's clearly worth
2304         fixing.  Problem reported by Alex Unleashed in
2305         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
2306         Also, don't bother to check for -m bugs unless we're using -m;
2307         suggested by Stepan Kasal.
2308
2309 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2310
2311         Sync from Automake.
2312         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
2313         `-c' flag, so they appear at the same position as in %FASTDEP%
2314         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
2315         which ignores unknown options only after the first non-option.
2316         Bug report against M4 by Nelson H. F. Beebe.
2317
2318 2006-10-13  Jim Meyering  <jim@meyering.net>
2319
2320         Fix a bug in yesterday's change.
2321         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
2322         p->fts_statp->st_dev would be used uninitialized.
2323         Ensures that we always call fts_stat on the very first entry.
2324         Miklos Szeredi reported that find -xdev stopped working.
2325
2326 2006-10-12  Bruno Haible  <bruno@clisp.org>
2327
2328         * gnulib-tool (func_get_automake_snippet): Append an automatically
2329         computed EXTRA_DIST augmentation.
2330         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
2331         * modules/alloca-opt (Makefile.am): Likewise.
2332         * modules/allocsa (Makefile.am): Likewise.
2333         * modules/arcfour (Makefile.am): Likewise.
2334         * modules/arctwo (Makefile.am): Likewise.
2335         * modules/argmatch (Makefile.am): Likewise.
2336         * modules/argz (Makefile.am): Likewise.
2337         * modules/atexit (Makefile.am): Likewise.
2338         * modules/backupfile (Makefile.am): Likewise.
2339         * modules/byteswap (Makefile.am): Likewise.
2340         * modules/c-strtod (Makefile.am): Likewise.
2341         * modules/c-strtold (Makefile.am): Likewise.
2342         * modules/calloc (Makefile.am): Likewise.
2343         * modules/canon-host (Makefile.am): Likewise.
2344         * modules/canonicalize (Makefile.am): Likewise.
2345         * modules/chdir-long (Makefile.am): Likewise.
2346         * modules/chdir-safer (Makefile.am): Likewise.
2347         * modules/check-version (Makefile.am): Likewise.
2348         * modules/chown (Makefile.am): Likewise.
2349         * modules/cloexec (Makefile.am): Likewise.
2350         * modules/close-stream (Makefile.am): Likewise.
2351         * modules/closeout (Makefile.am): Likewise.
2352         * modules/crc (Makefile.am): Likewise.
2353         * modules/csharpexec (Makefile.am): Likewise.
2354         * modules/cycle-check (Makefile.am): Likewise.
2355         * modules/des (Makefile.am): Likewise.
2356         * modules/dev-ino (Makefile.am): Likewise.
2357         * modules/dirfd (Makefile.am): Likewise.
2358         * modules/dirname (Makefile.am): Likewise.
2359         * modules/dup2 (Makefile.am): Likewise.
2360         * modules/eealloc (Makefile.am): Likewise.
2361         * modules/error (Makefile.am): Likewise.
2362         * modules/euidaccess (Makefile.am): Likewise.
2363         * modules/exclude (Makefile.am): Likewise.
2364         * modules/exitfail (Makefile.am): Likewise.
2365         * modules/fcntl-safer (Makefile.am): Likewise.
2366         * modules/fcntl (Makefile.am): Likewise.
2367         * modules/file-type (Makefile.am): Likewise.
2368         * modules/fileblocks (Makefile.am): Likewise.
2369         * modules/filemode (Makefile.am): Likewise.
2370         * modules/filenamecat (Makefile.am): Likewise.
2371         * modules/fnmatch (Makefile.am): Likewise.
2372         * modules/fopen-safer (Makefile.am): Likewise.
2373         * modules/fpending (Makefile.am): Likewise.
2374         * modules/fprintftime (Makefile.am): Likewise.
2375         * modules/free (Makefile.am): Likewise.
2376         * modules/fsusage (Makefile.am): Likewise.
2377         * modules/ftruncate (Makefile.am): Likewise.
2378         * modules/fts (Makefile.am): Likewise.
2379         * modules/gc-arcfour (Makefile.am): Likewise.
2380         * modules/gc-des (Makefile.am): Likewise.
2381         * modules/gc-hmac-md5 (Makefile.am): Likewise.
2382         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
2383         * modules/gc-md4 (Makefile.am): Likewise.
2384         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2385         * modules/gc-sha1 (Makefile.am): Likewise.
2386         * modules/gc (Makefile.am): Likewise.
2387         * modules/getaddrinfo (Makefile.am): Likewise.
2388         * modules/getcwd (Makefile.am): Likewise.
2389         * modules/getdelim (Makefile.am): Likewise.
2390         * modules/getdomainname (Makefile.am): Likewise.
2391         * modules/getgroups (Makefile.am): Likewise.
2392         * modules/gethostname (Makefile.am): Likewise.
2393         * modules/gethrxtime (Makefile.am): Likewise.
2394         * modules/getline (Makefile.am): Likewise.
2395         * modules/getloadavg (Makefile.am): Likewise.
2396         * modules/getlogin_r (Makefile.am): Likewise.
2397         * modules/getndelim2 (Makefile.am): Likewise.
2398         * modules/getopt (Makefile.am): Likewise.
2399         * modules/getpagesize (Makefile.am): Likewise.
2400         * modules/getpass-gnu (Makefile.am): Likewise.
2401         * modules/getpass (Makefile.am): Likewise.
2402         * modules/getsubopt (Makefile.am): Likewise.
2403         * modules/gettime (Makefile.am): Likewise.
2404         * modules/gettimeofday (Makefile.am): Likewise.
2405         * modules/getugroups (Makefile.am): Likewise.
2406         * modules/getusershell (Makefile.am): Likewise.
2407         * modules/glob (Makefile.am): Likewise.
2408         * modules/group-member (Makefile.am): Likewise.
2409         * modules/hard-locale (Makefile.am): Likewise.
2410         * modules/hash (Makefile.am): Likewise.
2411         * modules/hmac-md5 (Makefile.am): Likewise.
2412         * modules/hmac-sha1 (Makefile.am): Likewise.
2413         * modules/human (Makefile.am): Likewise.
2414         * modules/idcache (Makefile.am): Likewise.
2415         * modules/imaxabs (Makefile.am): Likewise.
2416         * modules/imaxdiv (Makefile.am): Likewise.
2417         * modules/inet_ntop (Makefile.am): Likewise.
2418         * modules/inet_pton (Makefile.am): Likewise.
2419         * modules/intprops (Makefile.am): Likewise.
2420         * modules/inttostr (Makefile.am): Likewise.
2421         * modules/inttypes (Makefile.am): Likewise.
2422         * modules/isapipe (Makefile.am): Likewise.
2423         * modules/javaversion (Makefile.am): Likewise.
2424         * modules/lchmod (Makefile.am): Likewise.
2425         * modules/lchown (Makefile.am): Likewise.
2426         * modules/localcharset (Makefile.am): Likewise.
2427         * modules/long-options (Makefile.am): Likewise.
2428         * modules/lstat (Makefile.am): Likewise.
2429         * modules/malloc (Makefile.am): Likewise.
2430         * modules/mathl (Makefile.am): Likewise.
2431         * modules/mbchar (Makefile.am): Likewise.
2432         * modules/md2 (Makefile.am): Likewise.
2433         * modules/md4 (Makefile.am): Likewise.
2434         * modules/md5 (Makefile.am): Likewise.
2435         * modules/memcasecmp (Makefile.am): Likewise.
2436         * modules/memchr (Makefile.am): Likewise.
2437         * modules/memcmp (Makefile.am): Likewise.
2438         * modules/memcoll (Makefile.am): Likewise.
2439         * modules/memcpy (Makefile.am): Likewise.
2440         * modules/memmem (Makefile.am): Likewise.
2441         * modules/memmove (Makefile.am): Likewise.
2442         * modules/mempcpy (Makefile.am): Likewise.
2443         * modules/memrchr (Makefile.am): Likewise.
2444         * modules/memset (Makefile.am): Likewise.
2445         * modules/memxor (Makefile.am): Likewise.
2446         * modules/mkancesdirs (Makefile.am): Likewise.
2447         * modules/mkdir-p (Makefile.am): Likewise.
2448         * modules/mkdir (Makefile.am): Likewise.
2449         * modules/mkdtemp (Makefile.am): Likewise.
2450         * modules/mkstemp (Makefile.am): Likewise.
2451         * modules/mktime (Makefile.am): Likewise.
2452         * modules/modechange (Makefile.am): Likewise.
2453         * modules/mountlist (Makefile.am): Likewise.
2454         * modules/nanosleep (Makefile.am): Likewise.
2455         * modules/obstack (Makefile.am): Likewise.
2456         * modules/openat (Makefile.am): Likewise.
2457         * modules/pagealign_alloc (Makefile.am): Likewise.
2458         * modules/pathmax (Makefile.am): Likewise.
2459         * modules/physmem (Makefile.am): Likewise.
2460         * modules/poll (Makefile.am): Likewise.
2461         * modules/posixtm (Makefile.am): Likewise.
2462         * modules/posixver (Makefile.am): Likewise.
2463         * modules/putenv (Makefile.am): Likewise.
2464         * modules/quote (Makefile.am): Likewise.
2465         * modules/quotearg (Makefile.am): Likewise.
2466         * modules/raise (Makefile.am): Likewise.
2467         * modules/read-file (Makefile.am): Likewise.
2468         * modules/readline (Makefile.am): Likewise.
2469         * modules/readlink (Makefile.am): Likewise.
2470         * modules/readtokens (Makefile.am): Likewise.
2471         * modules/readutmp (Makefile.am): Likewise.
2472         * modules/realloc (Makefile.am): Likewise.
2473         * modules/regex (Makefile.am): Likewise.
2474         * modules/rename-dest-slash (Makefile.am): Likewise.
2475         * modules/rename (Makefile.am): Likewise.
2476         * modules/rijndael (Makefile.am): Likewise.
2477         * modules/rmdir (Makefile.am): Likewise.
2478         * modules/rpmatch (Makefile.am): Likewise.
2479         * modules/safe-read (Makefile.am): Likewise.
2480         * modules/safe-write (Makefile.am): Likewise.
2481         * modules/same-inode (Makefile.am): Likewise.
2482         * modules/same (Makefile.am): Likewise.
2483         * modules/save-cwd (Makefile.am): Likewise.
2484         * modules/savedir (Makefile.am): Likewise.
2485         * modules/setenv (Makefile.am): Likewise.
2486         * modules/settime (Makefile.am): Likewise.
2487         * modules/sha1 (Makefile.am): Likewise.
2488         * modules/sig2str (Makefile.am): Likewise.
2489         * modules/snprintf (Makefile.am): Likewise.
2490         * modules/stat-macros (Makefile.am): Likewise.
2491         * modules/stat-time (Makefile.am): Likewise.
2492         * modules/stdbool (Makefile.am): Likewise.
2493         * modules/stdint (Makefile.am): Likewise.
2494         * modules/stdlib-safer (Makefile.am): Likewise.
2495         * modules/stpcpy (Makefile.am): Likewise.
2496         * modules/stpncpy (Makefile.am): Likewise.
2497         * modules/strcase (Makefile.am): Likewise.
2498         * modules/strcasestr (Makefile.am): Likewise.
2499         * modules/strchrnul (Makefile.am): Likewise.
2500         * modules/strcspn (Makefile.am): Likewise.
2501         * modules/strdup (Makefile.am): Likewise.
2502         * modules/strerror (Makefile.am): Likewise.
2503         * modules/strftime (Makefile.am): Likewise.
2504         * modules/strndup (Makefile.am): Likewise.
2505         * modules/strnlen (Makefile.am): Likewise.
2506         * modules/strpbrk (Makefile.am): Likewise.
2507         * modules/strsep (Makefile.am): Likewise.
2508         * modules/strstr (Makefile.am): Likewise.
2509         * modules/strtod (Makefile.am): Likewise.
2510         * modules/strtoimax (Makefile.am): Likewise.
2511         * modules/strtok_r (Makefile.am): Likewise.
2512         * modules/strtol (Makefile.am): Likewise.
2513         * modules/strtoll (Makefile.am): Likewise.
2514         * modules/strtoul (Makefile.am): Likewise.
2515         * modules/strtoull (Makefile.am): Likewise.
2516         * modules/strtoumax (Makefile.am): Likewise.
2517         * modules/strverscmp (Makefile.am): Likewise.
2518         * modules/sys_socket (Makefile.am): Likewise.
2519         * modules/sys_stat (Makefile.am): Likewise.
2520         * modules/sysexits (Makefile.am): Likewise.
2521         * modules/time_r (Makefile.am): Likewise.
2522         * modules/timegm (Makefile.am): Likewise.
2523         * modules/timespec (Makefile.am): Likewise.
2524         * modules/tmpfile-safer (Makefile.am): Likewise.
2525         * modules/trim (Makefile.am): Likewise.
2526         * modules/unistd-safer (Makefile.am): Likewise.
2527         * modules/unlinkdir (Makefile.am): Likewise.
2528         * modules/unlocked-io (Makefile.am): Likewise.
2529         * modules/userspec (Makefile.am): Likewise.
2530         * modules/utime (Makefile.am): Likewise.
2531         * modules/utimecmp (Makefile.am): Likewise.
2532         * modules/utimens (Makefile.am): Likewise.
2533         * modules/vasnprintf (Makefile.am): Likewise.
2534         * modules/vasprintf (Makefile.am): Likewise.
2535         * modules/vsnprintf (Makefile.am): Likewise.
2536         * modules/xalloc (Makefile.am): Likewise.
2537         * modules/xgetcwd (Makefile.am): Likewise.
2538         * modules/xnanosleep (Makefile.am): Likewise.
2539         * modules/xreadlink (Makefile.am): Likewise.
2540         * modules/xstrtod (Makefile.am): Likewise.
2541         * modules/xstrtol (Makefile.am): Likewise.
2542         * modules/xstrtold (Makefile.am): Likewise.
2543         * modules/yesno (Makefile.am): Likewise.
2544         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
2545
2546 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
2547
2548         * modules/error (Makefile.am): Distribute files through
2549         EXTRA_DIST, not lib_SOURCES.
2550
2551 2006-10-12  Eric Blake  <ebb9@byu.net>
2552
2553         * modules/error (Makefile.am): Distribute files in /lib.
2554         * modules/obstack (Makefile.am): Likewise.
2555
2556 2006-10-12  Bruno Haible  <bruno@clisp.org>
2557
2558         * modules/acl (Makefile.am): Distribute all files in lib/ through
2559         EXTRA_DIST.
2560         * modules/arcfour (Makefile.am): Likewise.
2561         * modules/arctwo (Makefile.am): Likewise.
2562         * modules/argmatch (Makefile.am): Likewise.
2563         * modules/argz (Makefile.am): Likewise.
2564         * modules/atexit (Makefile.am): Likewise.
2565         * modules/backupfile (Makefile.am): Likewise.
2566         * modules/c-strtod (Makefile.am): Likewise.
2567         * modules/c-strtold (Makefile.am): Likewise.
2568         * modules/calloc (Makefile.am): Likewise.
2569         * modules/canon-host (Makefile.am): Likewise.
2570         * modules/canonicalize (Makefile.am): Likewise.
2571         * modules/chdir-long (Makefile.am): Likewise.
2572         * modules/chdir-safer (Makefile.am): Likewise.
2573         * modules/check-version (Makefile.am): Likewise.
2574         * modules/chown (Makefile.am): Likewise.
2575         * modules/cloexec (Makefile.am): Likewise.
2576         * modules/close-stream (Makefile.am): Likewise.
2577         * modules/closeout (Makefile.am): Likewise.
2578         * modules/crc (Makefile.am): Likewise.
2579         * modules/cycle-check (Makefile.am): Likewise.
2580         * modules/des (Makefile.am): Likewise.
2581         * modules/dirfd (Makefile.am): Likewise.
2582         * modules/dirname (Makefile.am): Likewise.
2583         * modules/dup2 (Makefile.am): Likewise.
2584         * modules/euidaccess (Makefile.am): Likewise.
2585         * modules/exclude (Makefile.am): Likewise.
2586         * modules/exitfail (Makefile.am): Likewise.
2587         * modules/fcntl-safer (Makefile.am): Likewise.
2588         * modules/file-type (Makefile.am): Likewise.
2589         * modules/fileblocks (Makefile.am): Likewise.
2590         * modules/filemode (Makefile.am): Likewise.
2591         * modules/filenamecat (Makefile.am): Likewise.
2592         * modules/fnmatch (Makefile.am): Likewise.
2593         * modules/fopen-safer (Makefile.am): Likewise.
2594         * modules/fpending (Makefile.am): Likewise.
2595         * modules/fprintftime (Makefile.am): Likewise.
2596         * modules/free (Makefile.am): Likewise.
2597         * modules/fsusage (Makefile.am): Likewise.
2598         * modules/ftruncate (Makefile.am): Likewise.
2599         * modules/fts (Makefile.am): Likewise.
2600         * modules/gc (Makefile.am): Likewise.
2601         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2602         * modules/getaddrinfo (Makefile.am): Likewise.
2603         * modules/getcwd (Makefile.am): Likewise.
2604         * modules/getdelim (Makefile.am): Likewise.
2605         * modules/getdomainname (Makefile.am): Likewise.
2606         * modules/getgroups (Makefile.am): Likewise.
2607         * modules/gethostname (Makefile.am): Likewise.
2608         * modules/gethrxtime (Makefile.am): Likewise.
2609         * modules/getline (Makefile.am): Likewise.
2610         * modules/getloadavg (Makefile.am): Likewise.
2611         * modules/getlogin_r (Makefile.am): Likewise.
2612         * modules/getopt (Makefile.am): Likewise.
2613         * modules/getpass (Makefile.am): Likewise.
2614         * modules/getpass-gnu (Makefile.am): Likewise.
2615         * modules/getsubopt (Makefile.am): Likewise.
2616         * modules/gettime (Makefile.am): Likewise.
2617         * modules/gettimeofday (Makefile.am): Likewise.
2618         * modules/getugroups (Makefile.am): Likewise.
2619         * modules/getusershell (Makefile.am): Likewise.
2620         * modules/glob (Makefile.am): Likewise.
2621         * modules/group-member (Makefile.am): Likewise.
2622         * modules/hard-locale (Makefile.am): Likewise.
2623         * modules/hash (Makefile.am): Likewise.
2624         * modules/hmac-md5 (Makefile.am): Likewise.
2625         * modules/hmac-sha1 (Makefile.am): Likewise.
2626         * modules/human (Makefile.am): Likewise.
2627         * modules/idcache (Makefile.am): Likewise.
2628         * modules/imaxabs (Makefile.am): Likewise.
2629         * modules/imaxdiv (Makefile.am): Likewise.
2630         * modules/inet_ntop (Makefile.am): Likewise.
2631         * modules/inet_pton (Makefile.am): Likewise.
2632         * modules/inttostr (Makefile.am): Likewise.
2633         * modules/isapipe (Makefile.am): Likewise.
2634         * modules/lchown (Makefile.am): Likewise.
2635         * modules/long-options (Makefile.am): Likewise.
2636         * modules/lstat (Makefile.am): Likewise.
2637         * modules/malloc (Makefile.am): Likewise.
2638         * modules/mathl (Makefile.am): Likewise.
2639         * modules/mbchar (Makefile.am): Likewise.
2640         * modules/md2 (Makefile.am): Likewise.
2641         * modules/md4 (Makefile.am): Likewise.
2642         * modules/md5 (Makefile.am): Likewise.
2643         * modules/memcasecmp (Makefile.am): Likewise.
2644         * modules/memchr (Makefile.am): Likewise.
2645         * modules/memcmp (Makefile.am): Likewise.
2646         * modules/memcoll (Makefile.am): Likewise.
2647         * modules/memcpy (Makefile.am): Likewise.
2648         * modules/memmem (Makefile.am): Likewise.
2649         * modules/memmove (Makefile.am): Likewise.
2650         * modules/mempcpy (Makefile.am): Likewise.
2651         * modules/memrchr (Makefile.am): Likewise.
2652         * modules/memset (Makefile.am): Likewise.
2653         * modules/memxor (Makefile.am): Likewise.
2654         * modules/mkancesdirs (Makefile.am): Likewise.
2655         * modules/mkdir (Makefile.am): Likewise.
2656         * modules/mkdir-p (Makefile.am): Likewise.
2657         * modules/mkdtemp (Makefile.am): Likewise.
2658         * modules/mkstemp (Makefile.am): Likewise.
2659         * modules/mktime (Makefile.am): Likewise.
2660         * modules/modechange (Makefile.am): Likewise.
2661         * modules/mountlist (Makefile.am): Likewise.
2662         * modules/nanosleep (Makefile.am): Likewise.
2663         * modules/openat (Makefile.am): Likewise.
2664         * modules/pagealign_alloc (Makefile.am): Likewise.
2665         * modules/physmem (Makefile.am): Likewise.
2666         * modules/poll (Makefile.am): Likewise.
2667         * modules/posixtm (Makefile.am): Likewise.
2668         * modules/posixver (Makefile.am): Likewise.
2669         * modules/putenv (Makefile.am): Likewise.
2670         * modules/quote (Makefile.am): Likewise.
2671         * modules/quotearg (Makefile.am): Likewise.
2672         * modules/raise (Makefile.am): Likewise.
2673         * modules/read-file (Makefile.am): Likewise.
2674         * modules/readline (Makefile.am): Likewise.
2675         * modules/readlink (Makefile.am): Likewise.
2676         * modules/readtokens (Makefile.am): Likewise.
2677         * modules/readutmp (Makefile.am): Likewise.
2678         * modules/realloc (Makefile.am): Likewise.
2679         * modules/regex (Makefile.am): Likewise.
2680         * modules/rename (Makefile.am): Likewise.
2681         * modules/rename-dest-slash (Makefile.am): Likewise.
2682         * modules/rijndael (Makefile.am): Likewise.
2683         * modules/rmdir (Makefile.am): Likewise.
2684         * modules/rpmatch (Makefile.am): Likewise.
2685         * modules/safe-read (Makefile.am): Likewise.
2686         * modules/safe-write (Makefile.am): Likewise.
2687         * modules/same (Makefile.am): Likewise.
2688         * modules/save-cwd (Makefile.am): Likewise.
2689         * modules/savedir (Makefile.am): Likewise.
2690         * modules/setenv (Makefile.am): Likewise.
2691         * modules/settime (Makefile.am): Likewise.
2692         * modules/sha1 (Makefile.am): Likewise.
2693         * modules/sig2str (Makefile.am): Likewise.
2694         * modules/snprintf (Makefile.am): Likewise.
2695         * modules/stdlib-safer (Makefile.am): Likewise.
2696         * modules/stpcpy (Makefile.am): Likewise.
2697         * modules/stpncpy (Makefile.am): Likewise.
2698         * modules/strcase (Makefile.am): Likewise.
2699         * modules/strcasestr (Makefile.am): Likewise.
2700         * modules/strchrnul (Makefile.am): Likewise.
2701         * modules/strcspn (Makefile.am): Likewise.
2702         * modules/strdup (Makefile.am): Likewise.
2703         * modules/strerror (Makefile.am): Likewise.
2704         * modules/strftime (Makefile.am): Likewise.
2705         * modules/strndup (Makefile.am): Likewise.
2706         * modules/strnlen (Makefile.am): Likewise.
2707         * modules/strpbrk (Makefile.am): Likewise.
2708         * modules/strsep (Makefile.am): Likewise.
2709         * modules/strstr (Makefile.am): Likewise.
2710         * modules/strtod (Makefile.am): Likewise.
2711         * modules/strtoimax (Makefile.am): Likewise.
2712         * modules/strtok_r (Makefile.am): Likewise.
2713         * modules/strtol (Makefile.am): Likewise.
2714         * modules/strtoll (Makefile.am): Likewise.
2715         * modules/strtoul (Makefile.am): Likewise.
2716         * modules/strtoull (Makefile.am): Likewise.
2717         * modules/strtoumax (Makefile.am): Likewise.
2718         * modules/strverscmp (Makefile.am): Likewise.
2719         * modules/time_r (Makefile.am): Likewise.
2720         * modules/timegm (Makefile.am): Likewise.
2721         * modules/tmpfile-safer (Makefile.am): Likewise.
2722         * modules/unistd-safer (Makefile.am): Likewise.
2723         * modules/unlinkdir (Makefile.am): Likewise.
2724         * modules/userspec (Makefile.am): Likewise.
2725         * modules/utime (Makefile.am): Likewise.
2726         * modules/utimecmp (Makefile.am): Likewise.
2727         * modules/utimens (Makefile.am): Likewise.
2728         * modules/vasnprintf (Makefile.am): Likewise.
2729         * modules/vasprintf (Makefile.am): Likewise.
2730         * modules/vsnprintf (Makefile.am): Likewise.
2731         * modules/xalloc (Makefile.am): Likewise.
2732         * modules/xgetcwd (Makefile.am): Likewise.
2733         * modules/xnanosleep (Makefile.am): Likewise.
2734         * modules/xreadlink (Makefile.am): Likewise.
2735         * modules/xstrtod (Makefile.am): Likewise.
2736         * modules/xstrtol (Makefile.am): Likewise.
2737         * modules/xstrtold (Makefile.am): Likewise.
2738         * modules/yesno (Makefile.am): Likewise.
2739
2740 2006-10-12  Jim Meyering  <jim@meyering.net>
2741
2742         * m4/getloadavg.m4: Revert the change below.
2743
2744         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
2745         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
2746         fail with a symlink, which is what coreutils' ./bootstrap now
2747         creates by default.
2748
2749 2006-10-12  Bruno Haible  <bruno@clisp.org>
2750
2751         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
2752         mingw.
2753         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
2754         MSVC and mingw explicitly.
2755
2756 2006-10-11  Simon Josefsson  <jas@extundo.com>
2757             Bruno Haible  <bruno@clisp.org>
2758
2759         Add support for multiple gnulib-tool invocations in the scope of a
2760         single configure.ac file.
2761         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
2762         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
2763         with the same contents as the _LIBADD variable.
2764         (func_emit_initmacro_start, func_emit_initmacro_end,
2765         func_emit_initmacro_done): New functions.
2766         (func_import, func_create_testdir): Invoke them. Allow the identifiers
2767         gl_LIBOBJS and gl_LTLIBOBJS.
2768
2769 2006-10-11  Bruno Haible  <bruno@clisp.org>
2770
2771         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
2772         (func_create_testdir): Don't create po/Makefile.am, don't invoke
2773         autoreconf. Instead, invoke autopoint explicitly but move back the
2774         *.m4 files from gnulib.
2775
2776 2006-10-11  Bruno Haible  <bruno@clisp.org>
2777
2778         * gnulib-tool (func_usage): Make module names after --create-testdir
2779         optional.
2780         (func_create_testdir): If no module was specified, use nearly all
2781         modules.
2782
2783 2006-10-12  Jim Meyering  <jim@meyering.net>
2784
2785         Big performance improvement for fts-based tools that use FTS_NOSTAT.
2786         Avoid spurious inode-mismatch problems on non-POSIX file systems.
2787         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
2788         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
2789         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
2790         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
2791         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
2792         (fts_set_stat_required): New function.
2793         (fts_open): Defer the calls to fts_stat, if possible or requested.
2794         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
2795         into fts_stat itself.
2796         (fts_read): Perform any required (deferred) fts_stat call.
2797         (fts_build): Likewise, for the directory we're about to open and read.
2798         In the readdir loop, carefully decide whether each entry will require
2799         an eventual call to fts_stat, using dirent.d_type info if available.
2800         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
2801         a command line argument into this function.  Update all callers.
2802         Map a return value of FTS_DOT to FTS_D for a command line argument.
2803         * modules/fts (Depends-on): Add d-type.  Alphabetize.
2804         Thanks to Miklos Szeredi for his tenacity and for the initial
2805         bug report about "find" failing on a FUSE-based file system.
2806
2807         * lib/fts.c (fts_open): Use consistent indentation.
2808
2809 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
2810
2811         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
2812         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
2813         reported by Jim Meyering.  All uses of cache variables renamed
2814         to match Autoconf's.
2815         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
2816         the other one.
2817
2818         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
2819         Fix misspelling in diagnostic.
2820
2821 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2822
2823         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
2824         defined.  Problem reported by Matthew Woehlke.
2825
2826         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
2827         Add support for Tandem NonStop R series.
2828         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
2829         Use new macro.
2830
2831         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
2832         (has_trailing_slash): Omit size arg; all callers changed.
2833         Omit 'inline', since it doesn't help performance and we'd
2834         need to configure it.
2835         Don't count //, ///, etc. as having a trailing slash.
2836         As a side effect, this removes a C99ism reported by Matthew Woehlke.
2837         (rpl_rename_dest_slash): On failure, use rename's errno rather
2838         than (in some cases) an incorrect or junk errno.
2839         Simplify code by removing need to compute length; this does
2840         cause it to make two passes instead of one over the file name,
2841         but it's worth it.
2842
2843         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
2844         change, since Autoconf's version may no longer be appropriate now
2845         that we are using CVS Autoconf's version.  Add support for Tandem.
2846
2847 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2848             Bruno Haible  <bruno@clisp.org>
2849
2850         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
2851         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
2852         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
2853         gl_AC_TYPE_LONG_LONG.
2854
2855         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
2856         instead of HAVE_LONG_LONG.
2857         * lib/printf-args.c (printf_fetchargs): Likewise.
2858         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
2859         * lib/vasnprintf.c (VASNPRINTF): Likewise.
2860         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
2861         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
2862         gl_AC_TYPE_LONG_LONG.
2863
2864 2006-10-11  Bruno Haible  <bruno@clisp.org>
2865
2866         * m4/longlong.m4: Add comments.
2867         * m4/ulonglong.m4: Likewise.
2868
2869 2006-10-10  Bruno Haible  <bruno@clisp.org>
2870
2871         Make it possible to #define stpcpy, strdup to aliases.
2872         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
2873         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
2874
2875 2006-10-10  Bruno Haible  <bruno@clisp.org>
2876
2877         Make it possible to #define gcd to an alias.
2878         * lib/gcd.c: Include config.h.
2879
2880 2006-10-10  Bruno Haible  <bruno@clisp.org>
2881
2882         Make it possible to #define c_isascii to an alias.
2883         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
2884         defined. Undefine the macros before defining them, to avoid gcc
2885         warnings.
2886         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
2887         define NO_C_CTYPE_MACROS early.
2888
2889 2006-10-10  Bruno Haible  <bruno@clisp.org>
2890
2891         Make it possible to #define set_program_name to an alias.
2892         * lib/progname.c: Don't undefine set_program_name; instead, undefine
2893         ENABLE_RELOCATABLE early.
2894
2895 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
2896
2897         Port to Tandem NSK OSS, which has 64-bit signed int but at most
2898         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
2899         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
2900         More generally, don't assume that 64-bit signed int is available
2901         if unsigned int is, and vice versa.
2902         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
2903         unsigned symbols, not on their signed counterparts.
2904         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
2905         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
2906         (UINT64_C, UINTMAX_C):
2907         Likewise.
2908         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
2909         unsigned counterparts.
2910         (Have_long_long, Unsigned): New macros.
2911         (Int): Renamed from INT.
2912         (strtoimax): Use the new macros.
2913         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
2914         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
2915         * modules/inttypes (inttypes.h): Substitute
2916         HAVE_UNSIGNED_LONG_LONG_INT.
2917         * modules/stdint (stdint.h): Likewise.
2918         (Files): Add m4/ulonglong.m4.
2919
2920 2006-10-10  Bruno Haible  <bruno@clisp.org>
2921
2922         Fix a gcc -Wshadow warning.
2923         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
2924         to 'bucket'.
2925         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
2926         gl_linked_indexof_from_to): Likewise.
2927         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
2928         Likewise.
2929         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
2930         Likewise.
2931         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
2932         Reported by Eric Blake.
2933
2934 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
2935
2936         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
2937         for NetBSD.  Problem reported by Bruno Haible.
2938
2939 2006-10-09  Jim Meyering  <jim@meyering.net>
2940
2941         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
2942         Patch from Bruno Haible.
2943
2944 2006-10-09  Jim Meyering  <jim@meyering.net>
2945
2946         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
2947         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
2948         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
2949
2950 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
2951
2952         Don't include <config.h> twice; this doesn't work in some cases,
2953         e.g., when config.h has "#define intmax_t long long int" and
2954         we include <config.h>, <inttypes.h>, <config.h> in that order.
2955         Problem reported by Matthew Woehlke in:
2956         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
2957         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
2958         * lib/fts-cycle.c: Don't include config.h.
2959         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
2960         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
2961         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
2962         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
2963         inttypes.h.
2964         * lib/xstrtoumax.c: Likewise.
2965         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
2966         __strtol and the like, so that this module is more like its siblings.
2967         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
2968         Remove; no longer needed now that we assume gnulib inttypes.h.
2969
2970 2006-10-08  Bruno Haible  <bruno@clisp.org>
2971
2972         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
2973         option.
2974
2975 2006-10-07  Jim Meyering  <jim@meyering.net>
2976
2977         * modules/inttypes (inttypes.h): Revert what seems to have been
2978         an inadvertent part of today's change: use "|", not "/" in the
2979         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
2980
2981 2006-10-07  Bruno Haible  <bruno@clisp.org>
2982
2983         * modules/sublist: New file.
2984
2985 2006-10-07  Bruno Haible  <bruno@clisp.org>
2986
2987         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
2988         * modules/argz (argz.h): Likewise.
2989         * modules/arpa_inet (arpa/inet.h): Likewise.
2990         * modules/byteswap (byteswap.h): Likewise.
2991         * modules/configmake (configmake.h): Likewise.
2992         * modules/fcntl (fcntl.h): Likewise.
2993         * modules/fnmatch (fnmatch.h): Likewise.
2994         * modules/getopt (getopt.h): Likewise.
2995         * modules/glob (glob.h): Likewise.
2996         * modules/inttypes (inttypes.h): Likewise.
2997         * modules/netinet_in (netinet/in.h): Likewise.
2998         * modules/poll (poll.h): Likewise.
2999         * modules/stdbool (stdbool.h): Likewise.
3000         * modules/stdint (stdint.h): Likewise.
3001         * modules/sys_select (sys/select.h): Likewise.
3002         * modules/sys_socket (sys/socket.h): Likewise.
3003         * modules/sys_stat (sys/stat.h): Likewise.
3004         * modules/sysexits (sysexits.h): Likewise.
3005         * modules/unistd (unistd.h): Likewise.
3006         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3007         Add a "DO NOT EDIT" comment to the generated file.
3008         (func_import): Likewise for gnulib-comp.m4.
3009
3010 2006-10-07  Bruno Haible  <bruno@clisp.org>
3011
3012         * lib/gl_sublist.h: New file.
3013         * lib/gl_sublist.c: New file.
3014
3015 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3016
3017         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
3018         name (relative to the original working directory) and the file
3019         name component (relative to the temporary working directory).  All
3020         callers changed.
3021         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
3022         * lib/mkdir-p.c (make_dir_parents): Likewise.
3023         * lib/mkdir-p.h (make_dir_parents): Likewise.
3024
3025 2006-10-06  Eric Blake  <ebb9@byu.net>
3026
3027         Define several macros for use by the clean-temp module.
3028         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
3029         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
3030         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
3031
3032         * lib/clean-temp.h (close_stream_temp): New declaration.
3033         * lib/clean-temp.c (includes): Pull in headers according to what
3034         other modules are in use.
3035         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
3036
3037 2006-10-06  Bruno Haible  <bruno@clisp.org>
3038
3039         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
3040         instead of fopen, fwriteerror.
3041
3042 2006-10-06  Bruno Haible  <bruno@clisp.org>
3043
3044         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
3045         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
3046         int.
3047         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
3048         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
3049         Return an error indicator.
3050         Suggested by Eric Blake.
3051
3052 2006-10-06  Bruno Haible  <bruno@clisp.org>
3053
3054         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
3055         Reported by Eric Blake.
3056
3057 2006-10-06  Bruno Haible  <bruno@clisp.org>
3058
3059         * modules/closeout (Description): Mention stderr too.
3060
3061 2006-10-06  Bruno Haible  <bruno@clisp.org>
3062         and Paul Eggert  <eggert@cs.ucla.edu>
3063
3064         * lib/closeout.c (close_stdout): Also close stderr.
3065         * lib/closeout.h: Update comment.
3066
3067 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3068
3069         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
3070         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
3071         * lib/dirchownmod.c: Include lchown.h.
3072         * lib/lchown.c: Don't include files that lchown.h now includes.
3073         Don't declare chown, since lchown.h now does that.
3074         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
3075         (lchown): Define to rpl_chown if lchown is declared but
3076         does not exist.  Declare using a prototype if lchown is not
3077         declared.  Add a copyright notice.
3078         * lib/mkstemp.h: Include <unistd.h>.
3079         * lib/openat.c: Include lchown.h.
3080
3081         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
3082         we now test for that separately.
3083         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
3084         rather than O_NOFOLLOW, when testing whether it's possible to
3085         avoid a race condition reliably.
3086         * lib/savewd.c (savewd_chdir): Likewise.
3087
3088         Remove macros that are no longer needed now that stdint.h is
3089         reliable.
3090         * lib/fsusage.c (UINTMAX_MAX): Remove.
3091         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
3092         * lib/utimecmp.c (SIZE_MAX): Remove.
3093
3094         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
3095
3096         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
3097         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
3098         O_NOATIME works.
3099
3100 2006-10-05  Bruno Haible  <bruno@clisp.org>
3101
3102         * lib/gl_list.h (gl_sortedlist_search_from_to,
3103         gl_sortedlist_indexof_from_to): New declarations.
3104         (gl_list_implementation): New fields sortedlist_search_from_to,
3105         sortedlist_indexof_from_to.
3106         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
3107         inline functions.
3108         * lib/gl_list.c (gl_sortedlist_search_from_to,
3109         gl_sortedlist_indexof_from_to): New functions.
3110         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
3111         function.
3112         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
3113         (gl_array_sortedlist_search_from_to): New function.
3114         (gl_array_list_implementation): Update.
3115         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
3116         function.
3117         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
3118         (gl_carray_sortedlist_search_from_to): New function.
3119         (gl_carray_list_implementation): Update.
3120         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
3121         gl_linked_sortedlist_indexof_from_to): New functions.
3122         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3123         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3124         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
3125         gl_tree_sortedlist_indexof_from_to): New functions.
3126         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3127         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3128         Update.
3129         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3130         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
3131         Update.
3132
3133 2006-10-05  Bruno Haible  <bruno@clisp.org>
3134
3135         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
3136         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
3137         (struct gl_list_implementation): Add fields search_from_to,
3138         indexof_from_to. Remove fields search, indexof.
3139         (gl_list_search): Use the search_from_to method.
3140         (gl_list_search_from, gl_list_search_from_to): New functions.
3141         (gl_list_indexof): Use the indexof_from_to method.
3142         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3143         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
3144         (gl_list_search_from, gl_list_search_from_to): New functions.
3145         (gl_list_indexof): Use the indexof_from_to method.
3146         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3147         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
3148         gl_array_indexof. Add start_index, end_index arguments.
3149         (gl_array_search_from_to): Renamed from gl_array_search. Add
3150         start_index, end_index arguments.
3151         (gl_array_remove, gl_array_list_implementation): Update.
3152         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
3153         gl_carray_indexof. Add start_index, end_index arguments.
3154         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
3155         start_index, end_index arguments.
3156         (gl_carray_remove, gl_carray_list_implementation): Update.
3157         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
3158         gl_linked_search. Add start_index, end_index arguments.
3159         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
3160         start_index, end_index arguments.
3161         (gl_linked_remove): Update.
3162         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3163         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3164         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
3165         field to 'size_t'.
3166         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
3167         gl_tree_search. Add start_index, end_index arguments.
3168         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3169         start_index, end_index arguments.
3170         (gl_tree_remove): Update.
3171         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3172         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3173         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
3174         function.
3175         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
3176         gl_tree_search. Add start_index, end_index arguments.
3177         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3178         start_index, end_index arguments.
3179         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3180         Update.
3181         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
3182
3183 2006-10-05  Bruno Haible  <bruno@clisp.org>
3184
3185         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
3186
3187         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
3188         fwriteerror_temp): New declarations.
3189         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
3190         (descriptors): New variable.
3191         (cleanup): First, close the descriptors.
3192         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
3193         fclose_temp, fwriteerror_temp): New functions.
3194
3195 2006-10-04  Jim Meyering  <jim@meyering.net>
3196
3197         * lib/fts.c (fts_open): Tiny comment change.
3198
3199 2006-10-04  Bruno Haible  <bruno@clisp.org>
3200
3201         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
3202         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
3203         gl_LOCK_BODY.
3204         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
3205         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
3206         gl_LOCK_EARLY_BODY.
3207         (gl_LOCK): Require gl_LOCK_BODY.
3208
3209 2006-10-04  Bruno Haible  <bruno@clisp.org>
3210
3211         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
3212         (gl_oset_search_atleast): New declaration.
3213         (struct gl_oset_implementation): Add field 'search_atleast'.
3214         (gl_oset_search_atleast): New inline function.
3215         * lib/gl_oset.c (gl_oset_search_atleast): New function.
3216         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
3217         (gl_array_oset_implementation): Update.
3218         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
3219         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
3220         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
3221
3222 2006-10-04  Bruno Haible  <bruno@clisp.org>
3223
3224         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
3225
3226 2006-10-03  Bruno Haible  <bruno@clisp.org>
3227
3228         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
3229         from gl_avltreehash_list_implementation.
3230
3231 2006-10-03  Bruno Haible  <bruno@clisp.org>
3232
3233         * lib/gl_oset.c (gl_oset_add): Fix return type.
3234
3235 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
3236
3237         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
3238
3239 2006-10-02  Eric Blake  <ebb9@byu.net>
3240
3241         * modules/strnlen (Depends-on): Add extensions.
3242
3243 2006-10-02  Eric Blake  <ebb9@byu.net>
3244
3245         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
3246         definition in 2.60+.
3247
3248 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
3249
3250         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
3251         checks.
3252
3253 2006-10-02  Bruno Haible  <bruno@clisp.org>
3254
3255         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
3256         to the AUTOMAKE_OPTIONS.
3257         Reported by Jim Meyering.
3258
3259 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
3260
3261         Work around bug in Solaris 10 /proc file system:
3262         /proc/self/fd/NNN/.. isn't the parent directory of
3263         the directory whose file descriptor is NNN.  This needs to
3264         be worked around at run time, not compile time, since a
3265         program might be built on Solaris 8, where things work, and
3266         run on Solaris 10.
3267         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
3268         to use the following interface instead:
3269         (OPENAT_BUFFER_SIZE): New macro.
3270         (openat_proc_name): New function.
3271         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
3272         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
3273         Likewise.
3274         * lib/openat-proc.c: New file.
3275         * modules/openat (Files): Add lib/openat-proc.c.
3276         (Depends-on): Add same-inode, stdbool.
3277         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
3278
3279 2006-09-29  Bruno Haible  <bruno@clisp.org>
3280
3281         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
3282         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
3283         argument. Set stdout_closed before testing for ferror, not after.
3284         (fwriteerror, fwriteerror_no_ebadf): New functions.
3285
3286 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3287
3288         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
3289
3290 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
3291
3292         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
3293         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
3294
3295 2006-09-28  Jim Meyering  <jim@meyering.net>
3296
3297         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
3298         Include <unistd.h>.
3299
3300 2006-09-28  Bruno Haible  <bruno@clisp.org>
3301
3302         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
3303         * modules/linkedhash-list (Depends-on): Likewise.
3304         * modules/rbtreehash-list (Depends-on): Likewise.
3305
3306 2006-09-28  Bruno Haible  <bruno@clisp.org>
3307
3308         * lib/strndup.h: Simplify the redefinition of strndup.
3309         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
3310         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
3311
3312 2006-09-28  Bruno Haible  <bruno@clisp.org>
3313
3314         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
3315         * lib/gl_linkedhash_list.c: Likewise.
3316         * lib/gl_rbtreehash_list.c: Likewise.
3317
3318 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
3319
3320         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
3321         getaddrinfo.
3322
3323         * lib/__fpending.h: Don't include <stdio_ext.h> unless
3324         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
3325         it causes <stdio_ext.h> to cause a compile-time error.
3326         Problem reported by Nelson H. F. Beebe.
3327         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
3328         of HAVE_DECL___PENDING.
3329
3330         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
3331         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
3332         declaration.
3333
3334 2006-09-27  Jim Meyering  <jim@meyering.net>
3335
3336         This file could end up with a definition for a function
3337         named __strndup, rather than rpl_strndup on a system with
3338         incomplete weak_alias support.
3339         * lib/strndup.c (strndup): Rename from __strndup.
3340         Remove #defines that used to map __strndup to strndup.
3341         Don't use K&R prototypes.
3342         Remove LIBC-related code, since this file is not sync'd with glibc.
3343         * lib/strndup.h: Revamp, accordingly.
3344         * m4/strndup.m4: Modernize.
3345
3346 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
3347
3348         * modules/savewd (Depends-on): Add 'raise'.
3349         * lib/savewd.c: Include <signal.h>, for 'raise'.
3350
3351 2006-09-26  Jim Meyering  <jim@meyering.net>
3352
3353         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
3354         when we detect Darwin 8.7.0's acl_get_file bug.
3355         Rearrange to perform the new (below) run-test while $LIBS
3356         contains any acl-related library.  Set USE_ACL at the end.
3357         (gl_ACL_GET_FILE): New function.
3358
3359 2006-09-26  Eric Blake  <ebb9@byu.net>
3360
3361         * lib/verror.c: Include <config.h> unconditionally.
3362
3363 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
3364
3365         * modules/clock-time (Maintainer): Add self.
3366         * modules/getlogin_r (Depends-on): Add extensions.
3367
3368 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3369
3370         * modules/clock-time: New module.
3371         * modules/nanosleep (Depends-on): Add clock-time.
3372         * modules/gethrxtime (Depends-on): Likewise.
3373         * modules/gettime (Depends-on): Likewise.
3374         * modules/settime (Depends-on): Likewise.
3375
3376         * modules/fts-lgpl: Depend on openat.
3377         * modules/mkancesdirs: Depend on savewd.
3378         * modules/mkdir-p: Likewise.
3379
3380 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3381
3382         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
3383
3384         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
3385         `gl_have_arbitrary_file_name_length_limit' to
3386         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
3387         actually works between configure runs.
3388
3389 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3390             Bruno Haible  <bruno@clisp.org>
3391
3392         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
3393
3394 2006-09-25  Jim Meyering  <jim@meyering.net>
3395
3396         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
3397         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
3398
3399 2006-09-25  Eric Blake  <ebb9@byu.net>
3400
3401         * gnulib-tool (func_import, func_create_testdir): Fix typos in
3402         exec's in 2006-09-18 patch when shuffling fds.
3403
3404 2006-09-25  Bruno Haible  <bruno@clisp.org>
3405
3406         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
3407         Reported by Jim Meyering.
3408
3409 2006-09-24  Jim Meyering  <jim@meyering.net>
3410
3411         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
3412         compare a pointer against a literal "0".  That caused failures with
3413         at least HP-UX's hpcc.
3414
3415 2006-09-22  Simon Josefsson  <jas@extundo.com>
3416
3417         * modules/gc-sha1:
3418         * modules/gc-md4:
3419         * modules/gc-hmac-sha1:
3420         * modules/gc-hmac-md5:
3421         * modules/gc-des:
3422         * modules/gc-arcfour: Distribute more files.
3423
3424 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3425
3426         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
3427         (gl_linked_iterator_from_to): Initialize struct completely.
3428         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
3429         (gl_tree_iterator_from_to): Likewise
3430         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
3431         * lib/gl_array_list.c [lint] (gl_array_iterator)
3432         (gl_array_iterator_from_to): Likewise.
3433         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
3434         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
3435         (gl_carray_iterator_from_to): Likewise.
3436
3437         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
3438         * lib/md4.c (md4_process_block): Remove unused variable.
3439         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
3440         parentheses for clarity.
3441
3442 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3443
3444         * modules/bison-i18n (Depends-on): Add gettext.
3445
3446 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3447
3448         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
3449         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
3450         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
3451         also add missing comma that caused broken test.
3452         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
3453         stdlib.h, for `abort'.
3454         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
3455         variables.
3456         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
3457         include unistd.h if present, for `rmdir'.
3458         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
3459         variables.
3460         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
3461         in the process include standard headers for prototypes.
3462         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
3463         gets declared on GNU/Linux.
3464         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
3465         unistd.h, for `rmdir'.
3466         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
3467
3468         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
3469         always true.
3470         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
3471
3472         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
3473
3474 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3475
3476         * gnulib-tool (func_version): Create output all at once.  This
3477         may help avoid triggering unnecessary SIGPIPEs, and at any
3478         rate it doesn't hurt.
3479
3480 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3481             Bruno Haible  <bruno@clisp.org>
3482
3483         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
3484         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3485         * m4/signed.m4 (bh_C_SIGNED): Likewise.
3486
3487         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
3488         (gl_FUNC_VASPRINTF): Invoke it.
3489
3490 2006-09-22  Bruno Haible  <bruno@clisp.org>
3491
3492         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
3493         getloadavg.c as first argument.
3494
3495 2006-09-22  Bruno Haible  <bruno@clisp.org>
3496
3497         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
3498         at the beginning of the gl_INIT macro.
3499         * modules/getloadavg (configure.ac): Pass $gl_source_base to
3500         gl_GETLOADAVG.
3501
3502 2006-09-22  Bruno Haible  <bruno@clisp.org>
3503
3504         * gnulib-tool (func_create_megatestdir): Don't include the config-h
3505         module.
3506         Suggested by Ralf Wildenhues.
3507
3508 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
3509
3510         Import this patch from libc:
3511
3512         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
3513
3514         * lib/regex_internal.c (re_string_reconstruct): Handle
3515         offset < pstr->valid_raw_len && pstr->offsets_needed case.
3516         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
3517         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
3518         re_string_context_at.
3519
3520         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
3521         now requires it.
3522         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
3523         gl_REGEX now does it for us.
3524         (gl_REGEX): Add test taken from
3525         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
3526
3527         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
3528         Check that large offsets work.  Modernize Autoconf usages.
3529         Prefer "yes" to mean a good thing rather than a bad.
3530         Don't put "#define mkstemp" in config.h, as this might interfere
3531         with standard system headers that "#define mkstemp mkstemp64".
3532
3533         * modules/mkstemp (Depends-on): Add extensions, so that
3534         mkstemp is visible on some platforms.
3535         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
3536         (Include): Change to "mkstemp.h" from <stdlib.h>.
3537         (Files): Add mkstemp.h.
3538
3539         * lib/mkstemp.h: New file, since some standard headers
3540         #define mkstemp.
3541         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
3542         Include "mkstemp.h".
3543         Make the _LIBC code resemble glibc original more,
3544         e.g., use K&R style.
3545         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
3546         (mkstemp): Remove, since mkstemp.h does this for us.
3547         * lib/stdlib--.h: Include mkstemp.h.
3548
3549         Import this patch from libc:
3550
3551         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3552
3553         * lib/tempname.c (__gen_tempname): Change attempts_min
3554         into a macro.  Use preprocessor to decide how to initialize
3555         attempts [Coverity CID 67].
3556
3557 2006-09-20  Bruno Haible  <bruno@clisp.org>
3558
3559         * lib/mkdtemp.c: Import from libc.
3560         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3561                 * sysdeps/posix/tempname.c (__gen_tempname): Change
3562                 attempts_min into a macro.  Use preprocessor to decide how to
3563                 initialize attempts [Coverity CID 67].
3564         2001-11-27  Paul Eggert  <eggert@twinsun.com>
3565                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
3566                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
3567
3568 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3569
3570         * gnulib-tool (func_exit): New function, to allow to pass the
3571         exit status portably through the trap.  Use everywhere.
3572         (--help, --version): Signal a write error.
3573         (trap): catch SIGPIPE, for write errors.
3574         Exit at the end of the trap, with the correct exit status.
3575
3576 2006-09-19  Karl Berry  <karl@gnu.org>
3577
3578         * doc/gnulib.texi: note about the license texinfo files.
3579
3580 2006-09-19  Eric Blake  <ebb9@byu.net>
3581
3582         * gnulib-tool: Avoid space-tab.
3583
3584 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3585
3586         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
3587         that prevented coreutils 6.1 from building.  Problem reported
3588         by Petter Reinholdtsen.
3589
3590 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3591
3592         * gnulib-tool (avoidlist): Fix typo that broke options like
3593         --avoid=lock that are used by coreutils bootstrap.
3594
3595 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
3596
3597         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
3598         more systematically.
3599
3600 2006-09-18  Jim Meyering  <jim@meyering.net>
3601
3602         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
3603
3604 2006-09-18  Bruno Haible  <bruno@clisp.org>
3605
3606         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
3607
3608 2006-09-18  Bruno Haible  <bruno@clisp.org>
3609
3610         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
3611         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
3612         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
3613         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
3614         * m4/gettext.m4: Require autoconf >= 2.52.
3615         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
3616         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
3617         of gl_cv_header_inttypes_h.
3618
3619 2006-09-18  Bruno Haible  <bruno@clisp.org>
3620
3621         * lib/javaversion.c: Include configmake.h.
3622
3623 2006-09-18  Bruno Haible  <bruno@clisp.org>
3624
3625         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
3626         avoid that the while loops be executed in a subshell.
3627
3628 2006-09-18  Bruno Haible  <bruno@clisp.org>
3629
3630         * MODULES.html.sh (func_module): Break long lines.
3631         Suggested by Bruce Korb <bkorb@gnu.org>.
3632
3633 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3634
3635         Speed up by a factor of 1.12.
3636         * gnulib-tool (nl): New variable.
3637         (func_import): Rewrite include directive extraction to only read each
3638         directive once.
3639
3640 2006-09-17  Bruno Haible  <bruno@clisp.org>
3641
3642         * modules/javaversion (Makefile.am): Remove DEFS setting.
3643         (Depends-on): Add configmake, for PKGDATADIR definition.
3644
3645 2006-09-17  Bruno Haible  <bruno@clisp.org>
3646
3647         * gnulib-tool (func_create_testdir): Rewrite all files at once.
3648
3649 2006-09-17  Bruno Haible  <bruno@clisp.org>
3650
3651         * gnulib-tool (func_append): New function, stolen from libtool.m4.
3652         (func_modules_transitive_closure, func_modules_add_dummy,
3653         func_modules_to_filelist, func_import, func_create_testdir,
3654         func_create_megatestdir, ...): Use it wherever possible.
3655         Suggested by Ralf Wildenhues.
3656
3657 2006-09-16  Karl Berry  <karl@gnu.org>
3658
3659         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
3660         to avoid sectioning errors.
3661         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
3662         [ifinfo]: blank line after @center-ed titles.
3663         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
3664         Spell FSF address consistently with others.
3665         (These changes approved by rms.)
3666
3667 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3668
3669         Speed up by a factor of 1.61.
3670         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
3671         already checked module names again.
3672
3673 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3674
3675         Speed up by a factor of 1.13.
3676         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
3677         for new_files, and the input to func_add_or_update.
3678
3679 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3680
3681         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
3682         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
3683
3684 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3685
3686         * modules/mkancesdirs (Depends-on): Add fcntl.
3687         * modules/savewd: New file.
3688         * MODULES.html.sh (File system functions): Add savewd.
3689
3690         * modules/configmake (Makefile.am): Add support for the
3691         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
3692
3693 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3694
3695         * m4/savewd.m4: New file.
3696
3697 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3698
3699         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
3700         (dirchownmod): New arg FD.  All callers changed.
3701         Use FD rather than opening the directory ourself, as opening is
3702         now the caller's responsibility.
3703         * lib/dirchownmod.h: Likewise.
3704         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
3705         hosts that require <sys/types.h> before <sys/stat.h>.  Include
3706         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
3707         (test_dir): Remove.
3708         (mkancesdirs): Return length of prefix of FILE that has already
3709         been made, or -2 if there is a child doing the work.  Redo
3710         algorithm so that it is O(N) rather than O(N**2).  Optimize away
3711         ".", and treat ".." specially since it might stray back into
3712         already-created areas.  Use a subprocess if necessary.  New arg
3713         WD; all users changed.  MAKE_DIR function should now return 1
3714         if it creates a directory that is not readable.  Return -2 if
3715         a child process is spun off.
3716         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
3717         Adjust signature to match code.
3718         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
3719         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
3720         all users changed.
3721         * lib/savewd.c, lib/savewd.h: New files.
3722
3723 2006-09-15  Jim Meyering  <jim@meyering.net>
3724
3725         * modules/rename-dest-slash: New module.
3726         * MODULES.html.sh (posix_compat): Add it here.
3727
3728         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
3729
3730 2006-09-15  Jim Meyering  <jim@meyering.net>
3731
3732         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
3733         file.
3734
3735         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
3736
3737 2006-09-15  Jim Meyering  <jim@meyering.net>
3738
3739         * lib/rename-dest-slash.c (has_trailing_slash): Use
3740         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
3741         (rpl_rename_dest_slash): Perform the cheaper trailing slash
3742         test before testing whether SRC is a directory.
3743         Suggestions from Bruno Haible.
3744
3745         Avoid a warning about an unused variable.
3746         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
3747         into the #ifdef block where it's used.
3748
3749         * lib/rename-dest-slash.c: New file.
3750
3751 2006-09-14  Bruno Haible  <bruno@clisp.org>
3752
3753         * lib/allocsa.c: Include <config.h> unconditionally.
3754         * lib/asnprintf.c: Likewise.
3755         * lib/asprintf.c: Likewise.
3756         * lib/c-strcasecmp.c: Likewise.
3757         * lib/c-strcasestr.c: Likewise.
3758         * lib/c-strncasecmp.c: Likewise.
3759         * lib/c-strstr.c: Likewise.
3760         * lib/classpath.c: Likewise.
3761         * lib/clean-temp.c: Likewise.
3762         * lib/concatpath.c: Likewise.
3763         * lib/copy-file.c: Likewise.
3764         * lib/csharpcomp.c: Likewise.
3765         * lib/csharpexec.c: Likewise.
3766         * lib/execute.c: Likewise.
3767         * lib/fatal-signal.c: Likewise.
3768         * lib/findprog.c: Likewise.
3769         * lib/fwriteerror.c: Likewise.
3770         * lib/gl_array_list.c: Likewise.
3771         * lib/gl_array_oset.c: Likewise.
3772         * lib/gl_avltree_list.c: Likewise.
3773         * lib/gl_avltree_oset.c: Likewise.
3774         * lib/gl_avltreehash_list.c: Likewise.
3775         * lib/gl_carray_list.c: Likewise.
3776         * lib/gl_linked_list.c: Likewise.
3777         * lib/gl_linkedhash_list.c: Likewise.
3778         * lib/gl_list.c: Likewise.
3779         * lib/gl_oset.c: Likewise.
3780         * lib/gl_rbtree_list.c: Likewise.
3781         * lib/gl_rbtree_oset.c: Likewise.
3782         * lib/gl_rbtreehash_list.c: Likewise.
3783         * lib/imaxabs.c: Likewise.
3784         * lib/imaxdiv.c: Likewise.
3785         * lib/javacomp.c: Likewise.
3786         * lib/javaexec.c: Likewise.
3787         * lib/javaversion.c: Likewise.
3788         * lib/linebreak.c: Likewise.
3789         * lib/localcharset.c: Likewise.
3790         * lib/lock.c: Likewise.
3791         * lib/mbchar.c: Likewise.
3792         * lib/mbswidth.c: Likewise.
3793         * lib/mkdtemp.c: Likewise.
3794         * lib/pipe.c: Likewise.
3795         * lib/printf-args.c: Likewise.
3796         * lib/printf-parse.c: Likewise.
3797         * lib/progname.c: Likewise.
3798         * lib/progreloc.c: Likewise.
3799         * lib/readlink.c: Likewise.
3800         * lib/sh-quote.c: Likewise.
3801         * lib/stpcpy.c: Likewise.
3802         * lib/stpncpy.c: Likewise.
3803         * lib/strcasecmp.c: Likewise.
3804         * lib/strcasestr.c: Likewise.
3805         * lib/strcspn.c: Likewise.
3806         * lib/striconv.c: Likewise.
3807         * lib/strncasecmp.c: Likewise.
3808         * lib/strnlen1.c: Likewise.
3809         * lib/strstr.c: Likewise.
3810         * lib/strtok_r.c: Likewise.
3811         * lib/tls.c: Likewise.
3812         * lib/tmpdir.c: Likewise.
3813         * lib/unicodeio.c: Likewise.
3814         * lib/unsetenv.c: Likewise.
3815         * lib/vasnprintf.c: Likewise.
3816         * lib/vasprintf.c: Likewise.
3817         * lib/wait-process.c: Likewise.
3818         * lib/xallocsa.c: Likewise.
3819         * lib/xsetenv.c: Likewise.
3820         * lib/xstriconv.c: Likewise.
3821
3822 2006-09-13  Simon Josefsson  <jas@extundo.com>
3823
3824         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
3825         that internally, suggested by Ralf Wildenhues
3826         <Ralf.Wildenhues@gmx.de>.
3827
3828 2006-09-13  Simon Josefsson  <jas@extundo.com>
3829
3830         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
3831         @LIBOBJS@.
3832         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3833
3834 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
3835
3836         * lib/_fpending.c: Include <config.h> unconditionally, since we no
3837         longer worry about uses that don't define HAVE_CONFIG_H.
3838         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
3839         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
3840         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
3841         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
3842         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
3843         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
3844         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
3845         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
3846         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
3847         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
3848         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
3849         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
3850         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
3851         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
3852         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
3853         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
3854         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
3855         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
3856         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
3857         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
3858         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
3859         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
3860         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
3861         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
3862         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
3863         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
3864         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
3865         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
3866         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
3867         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
3868         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
3869         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
3870         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
3871         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
3872         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
3873         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
3874         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
3875         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
3876         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
3877         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
3878         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
3879         Likewise.
3880
3881 2006-09-13  Eric Blake  <ebb9@byu.net>
3882
3883         * lib/getopt.c: Fix typo in last commit.
3884
3885 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
3886
3887         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
3888         dgettext.
3889
3890 2006-09-12  Jim Meyering  <jim@meyering.net>
3891
3892         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
3893         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
3894         Reported by Nelson H. F. Beebe.
3895
3896 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
3897
3898         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
3899         program_invocation_name and program_invocation_short_name are
3900         initialized.
3901         * lib/argp-namefrob.h: Move declarations of program_invocation_name
3902         and program_invocation_short_name to argp.h, so they are visible
3903         to user programs.
3904         * lib/argp.h: Likewise
3905
3906 2006-09-10  Bruno Haible  <bruno@clisp.org>
3907
3908         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
3909         m4/inttypes_h.m4, m4/uintmax_t.m4.
3910
3911 2006-09-10  Bruno Haible  <bruno@clisp.org>
3912
3913         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
3914         gl_AC_TYPE_UINTMAX_T.
3915
3916 2006-09-10  Bruno Haible  <bruno@clisp.org>
3917
3918         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
3919
3920 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
3921
3922         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
3923         convention.  Text proposed by Bruno Haible.
3924         (struct argp_option): Document the use of N_() wrappers.
3925
3926         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
3927         '\v', and translate the two parts separately, instead of feeding
3928         the whole string to gettext.  This allows to exclude
3929         '\v' from the strings visible to the translator by writing doc
3930         strings as N_("..") "\v" N_("..").
3931
3932 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
3933
3934         * config/srclist.txt: Undo latest change; the bug was fixed.
3935
3936 2006-09-09  Bruno Haible  <bruno@clisp.org>
3937
3938         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
3939         assignments if building a library without libtool.
3940         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
3941         in func_emit_lib_Makefile_am.
3942         (func_import): When building a static library libfoo.a, arrange to
3943         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
3944         (func_create_testdir): Likewise.
3945         * modules/gc (configure.ac, Makefile.am): If building statically,
3946         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
3947         * modules/iconvme (configure.ac, Makefile.am): Likewise.
3948         * modules/striconv (configure.ac, Makefile.am): Likewise.
3949         Based on a suggestion by Ralf Wildenhues.
3950
3951 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3952
3953         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
3954         Check for unistd.h too, since Autoconf doesn't assume POSIX.
3955         Also:
3956
3957         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3958         Add year_2050_test to catch glibc bug 2821
3959         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3960
3961         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3962         Prefer #ifdef to #if.
3963
3964         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
3965         Return from 'main' instead of calling 'exit'.
3966
3967 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3968
3969         * lib/mktime.c (guess_time_tm): Fix bug where mktime
3970         returned the maximum time_t value rather than (time_t) -1.
3971         Problem originally reported by William Bardwell
3972         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3973
3974         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3975         Moved to here ...
3976         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3977         ... from here.
3978
3979 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3980
3981         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
3982         2821 is fixed.
3983
3984 2006-09-08  Jim Meyering  <jim@meyering.net>
3985
3986         Don't make generated files read-only.  That would bother too many
3987         people.  However, do retain the ability to work when targets are
3988         read-only: remove the destination and temporary files before writing
3989         them (when generated via sed or echo), or by using the -f option for
3990         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
3991         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3992         * modules/byteswap, modules/configmake, modules/fcntl:
3993         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3994         * modules/localcharset, modules/netinet_in, modules/poll:
3995         * modules/stdbool, modules/stdint, modules/sys_select:
3996         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3997
3998 2006-09-08  Jim Meyering  <jim@meyering.net>
3999
4000         Avoid new build failure on FreeBSD 6.0.
4001         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
4002         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
4003         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
4004
4005 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4006
4007         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
4008
4009 2006-09-07  Jim Meyering  <jim@meyering.net>
4010
4011         Fix global typo in last change: use chmod u-w, not chmod u-x.
4012         Spotted by Paul Eggert and Bruce Korb.
4013         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4014         * modules/byteswap, modules/configmake, modules/fcntl:
4015         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4016         * modules/localcharset, modules/netinet_in, modules/poll:
4017         * modules/stdbool, modules/stdint, modules/sys_select:
4018         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4019
4020 2006-09-06  Jim Meyering  <jim@meyering.net>
4021
4022         Make generated files be read-only.
4023         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
4024         Ensure that each generated file is now read-only.
4025         * modules/argz: Likewise.
4026         * modules/arpa_inet: Likewise.
4027         * modules/byteswap: Likewise.
4028         * modules/configmake: Likewise.
4029         * modules/fcntl: Likewise.
4030         * modules/fnmatch: Likewise.
4031         * modules/getopt: Likewise.
4032         * modules/glob: Likewise.
4033         * modules/inttypes: Likewise.
4034         * modules/netinet_in: Likewise.
4035         * modules/poll: Likewise.
4036         * modules/stdbool: Likewise.
4037         * modules/stdint: Likewise.
4038         * modules/sys_select: Likewise.
4039         * modules/sys_socket: Likewise.
4040         * modules/sys_stat: Likewise.
4041         * modules/sysexits: Likewise.
4042         * modules/localcharset: Same as above, but continue using temporary
4043         file named "t-$@" (why different?) rather than the "$@-t" used
4044         everywhere else.
4045
4046         * modules/sysexits (Makefile.am): Replace literal occurrences
4047         of "sysexit.h" more readable, and more consistent, "$@".
4048
4049 2006-09-06  Bruno Haible  <bruno@clisp.org>
4050
4051         * modules/striconv: New file.
4052         * modules/xstriconv: New file.
4053         * MODULES.html.sh (Internationalization functions): Add striconv,
4054         xstriconv.
4055
4056 2006-09-06  Bruno Haible  <bruno@clisp.org>
4057
4058         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
4059         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
4060         not using libtool correctly.
4061
4062 2006-09-06  Bruno Haible  <bruno@clisp.org>
4063
4064         * lib/striconv.h: New file.
4065         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
4066         iconvstring.c.
4067         * lib/xstriconv.h: New file.
4068         * lib/xstriconv.c: New file.
4069
4070 2006-09-06  Bruno Haible  <bruno@clisp.org>
4071
4072         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4073         lib_..._LDFLAGS.
4074
4075 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4076
4077         * lib/argz_.h: Sync from Libtool.
4078
4079         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
4080                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4081
4082         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
4083
4084 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4085
4086         * modules/trim: New file.
4087
4088 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4089
4090         * lib/trim.h: New file.
4091         * lib/trim.c: New file.
4092
4093 2006-09-05  Bruno Haible  <bruno@clisp.org>
4094
4095         * MODULES.html.sh (String handling): Add trim.
4096
4097 2006-09-04  Karl Berry  <karl@gnu.org>
4098
4099         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
4100         until next release.
4101
4102 2006-09-03  Bruno Haible  <bruno@clisp.org>
4103
4104         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
4105         correctly.
4106
4107 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4108
4109         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
4110         not gl_GETLOADAVG.  Omit unneeded semicolons.
4111         Problems reported by Ralf Wildenhues in
4112         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4113         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
4114         at the end, which is the usual gnulib style.
4115
4116         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
4117         of doing all the work ourselves.
4118         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
4119         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
4120
4121 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4122
4123         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
4124         Problem reported by Ralf Wildenhues in
4125         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4126
4127         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
4128         HAVE_STRUCT_STATFS_F_FSTYPENAME.
4129
4130 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4131
4132         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
4133         yesterday's patch by changing test -n to test -z.
4134
4135 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4136
4137         * modules/getloadavg (Files): Add m4/getloadavg.m4.
4138         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
4139         the former is now obsolescent.
4140
4141         * modules/chdir-long (Depends-on): Add fcntl.
4142
4143 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4144
4145         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
4146         obsolescent, and programs should use gnulib instead.
4147         * m4/getloadavg.m4: New file, with contents taken from Autoconf
4148         but with prefixes changed.
4149
4150 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4151
4152         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
4153         or stdbool.h, because they might not exist while configuring.
4154
4155         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
4156         Don't include unistd.h or limits.h; not needed, since chdir-long.h
4157         does that for us.
4158         (O_DIRECTORY): Remove.
4159
4160 2006-08-31  Eric Blake  <ebb9@byu.net>
4161
4162         * gnulib-tool: Don't let emacs change spaces to TAB.
4163
4164 2006-08-31  Bruno Haible  <bruno@clisp.org>
4165
4166         * gnulib-tool: When calling func_import more than once, do it in a
4167         subshell.
4168         Reported by Eric Blake <ebb9@byu.net>.
4169
4170 2006-08-31  Bruno Haible  <bruno@clisp.org>
4171
4172         * gnulib-tool (nl): Remove variable.
4173         (sed_transform_lib_file): Use more robust test for config-h module.
4174         (func_import): Fix typo in 2006-08-25 patch.
4175
4176 2006-08-31  Bruno Haible  <bruno@clisp.org>
4177
4178         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
4179         specified, augment Makefile.am variables instead of assigning them.
4180
4181 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4182
4183         Work around a bug in both the Linux and SunOS 64-bit kernels:
4184         nanosleep mishandles sleeps for longer than 2**31 seconds.
4185         Problem reported by Frank v Waveren in
4186         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4187         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
4188         Check for nanosleep bug.
4189         (LIB_NANOSLEEP): Append clock_gettime library if needed.
4190
4191 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4192
4193         Work around a bug in both the Linux and SunOS 64-bit kernels:
4194         nanosleep mishandles sleeps for longer than 2**31 seconds.
4195         Problem reported by Frank v Waveren in
4196         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4197         * lib/nanosleep.c (BILLION): New constant.
4198         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
4199         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
4200         implementation.
4201
4202 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4203
4204         * modules/nanosleep (Depends-on): Add gettime.
4205
4206 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4207         and Simon Josefsson  <jas@extundo.com>
4208         and Oskar Liljeblad  <oskar@osk.mine.nu>
4209
4210         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
4211         * gnulib-tool (func_import): New license type 'unmodifiable license
4212         text'.
4213         * modules/fdl: Use it.  Longer description.
4214         * module/gpl, module/lgpl: New files.
4215
4216 2006-08-30  Jim Meyering  <jim@meyering.net>
4217
4218         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
4219         shadowing the parameter.
4220
4221 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4222
4223         Sync from Libtool:
4224
4225         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4226
4227         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
4228         sharing with gnulib.  Report by Eric Blake.
4229
4230 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4231
4232         * modules/isapipe: New file.
4233         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
4234
4235 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4236
4237         * modules/configmake (Makefile.am): Add a comment, and omit
4238         the CONFIGMAKE_ prefix from generated macro names.  Suggested
4239         by Bruno Haible.
4240
4241 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4242
4243         * m4/isapipe.m4: New file.
4244
4245 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4246
4247         * lib/isapipe.c, lib/isapipe.h: New files.
4248
4249 2006-08-29  Jim Meyering  <jim@meyering.net>
4250
4251         * modules/configmake (Makefile.am): Make configmake.h depend on
4252         Makefile.  Otherwise, a stale configmake.h could hang around.
4253
4254 2006-08-29  Eric Blake  <ebb9@byu.net>
4255
4256         * lib/error.c (error_at_line, print_errno_message): Match libc, after
4257         resolution of upstream bug 3044.
4258
4259 2006-08-29  Bruno Haible  <bruno@clisp.org>
4260
4261         * modules/localcharset (Depends-on): Add configmake.
4262         (Makefile.am): Remove setting of LIBDIR through DEFS.
4263
4264 2006-08-29  Bruno Haible  <bruno@clisp.org>
4265
4266         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
4267         defined.
4268
4269 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4270
4271         * modules/fcntl: New file.
4272         * modules/chdir-safer (Depends-on): Add fcntl.
4273         * modules/fts: Likewise.
4274         * modules/mkdir-p: Likewise.
4275
4276         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
4277         This undoes the most recent change, since we're now addressing the
4278         problem in a different way.
4279
4280         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
4281         into output, since the output might be called Makefile.am even
4282         if $makefile_name is something different.
4283         (func_import): Use $makefile_am rather than
4284         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
4285         empty.
4286
4287         * modules/inttypes (Files): Add m4/inttypes-h.m4.
4288
4289 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4290
4291         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
4292         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
4293         recent change to stdint.m4, since we're now addressing the problem in a
4294         different way.
4295
4296 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4297
4298         * m4/fcntl_h.m4: New file.
4299
4300 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4301
4302         * lib/fcntl_.h: New file.
4303         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
4304         the fcntl module.
4305         * lib/dirchownmod.c: Likewise.
4306         * lib/fts.c: Likewise.
4307
4308         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
4309         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
4310         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
4311         just before including <inttypes.h>, to avoid circular inclusion.
4312
4313 2006-08-28  Jim Meyering  <jim@meyering.net>
4314
4315         * doc/visibility.texi: Actually read and correct the grammar of the
4316         sentence affected by yesterday's change.
4317
4318 2006-08-28  Eric Blake  <ebb9@byu.net>
4319
4320         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
4321         needs wrapper.
4322
4323 2006-08-28  Eric Blake  <ebb9@byu.net>
4324
4325         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
4326
4327 2006-08-28  Eric Blake  <ebb9@byu.net>
4328
4329         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
4330
4331 2006-08-28  Bruno Haible  <bruno@clisp.org>
4332
4333         * modules/c-strstr: New file, from GNU gettext.
4334         * MODULES.html.sh (String handling): Add c-strstr.
4335
4336 2006-08-28  Bruno Haible  <bruno@clisp.org>
4337
4338         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
4339         macros.
4340         Reported by Eric Blake.
4341
4342 2006-08-28  Bruno Haible  <bruno@clisp.org>
4343
4344         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
4345         (VASNPRINTF): Return a string of length > INT_MAX without failing.
4346         * lib/vasprintf.c: Include errno.h, limits.h.
4347         (EOVERFLOW): New fallback definition.
4348         (vasprintf): Test here whether the string length is > INT_MAX.
4349         * lib/vsnprintf.c: Include errno.h, limits.h.
4350         (EOVERFLOW): New fallback definition.
4351         (vsnprintf): Fix bug when generated string was too long for the buffer.
4352         Test here whether the string length is > INT_MAX.
4353
4354 2006-08-28  Bruno Haible  <bruno@clisp.org>
4355
4356         * lib/inttypes_.h (SCNX*): Remove definitions.
4357         Reported by Eric Blake.
4358
4359 2006-08-28  Bruno Haible  <bruno@clisp.org>
4360
4361         * lib/c-strstr.h: New file, from GNU gettext.
4362         * lib/c-strstr.c: New file, from GNU gettext.
4363
4364 2006-08-28  Bruno Haible  <bruno@clisp.org>
4365
4366         * gnulib-tool: Reorder some statements.
4367
4368 2006-08-28  Bruno Haible  <bruno@clisp.org>
4369
4370         * gnulib-tool: New option --makefile-name.
4371         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
4372         $makefile_name.
4373         (func_import): Write $makefile_name to the cache file, and read it from
4374         there unless explicitly specified. Use $makefile_name as file name
4375         instead of Makefile.am. Adjust the recommendations accordingly.
4376
4377 2006-08-28  Bruno Haible  <bruno@clisp.org>
4378
4379         * gnulib-tool (func_verify_module): Check against misapplying patch.
4380
4381 2006-08-28  Bruno Haible  <bruno@clisp.org>
4382
4383         * gnulib-tool (func_relativize, func_relconcat): New functions.
4384         Give an error if --local-dir is given with --update.
4385         Remove trailing slashes from $local_gnulib_dir.
4386         (func_import): Store the relativized $local_gnulib_dir in
4387         gnulib-cache.m4, and read it from there if not specified explicitly.
4388
4389 2006-08-28  Bruno Haible  <bruno@clisp.org>
4390
4391         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
4392         is the current directory. Respect also $local_gnulib_dir.
4393
4394 2006-08-28  Bruno Haible  <bruno@clisp.org>
4395             Simon Josefsson  <jas@extundo.com>
4396
4397         BeOS portability.
4398         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
4399
4400 2006-08-27  Jim Meyering  <jim@meyering.net>
4401
4402         * doc/visibility.texi: Remove duplicate word: "pointer".
4403
4404 2006-08-26  Bruno Haible  <bruno@clisp.org>
4405
4406         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
4407         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
4408         (Makefile.am): Create inttypes.h from inttypes_.h.
4409         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
4410
4411         * modules/imaxabs: New file.
4412
4413         * modules/imaxdiv: New file.
4414
4415 2006-08-26  Bruno Haible  <bruno@clisp.org>
4416
4417         * m4/inttypes.m4: New file.
4418         * m4/_inttypes_h.m4: Remove file.
4419         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
4420         PRI_MACROS_BROKEN.
4421         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
4422
4423         * m4/imaxabs.m4: New file.
4424
4425         * m4/imaxdiv.m4: New file.
4426
4427 2006-08-26  Bruno Haible  <bruno@clisp.org>
4428
4429         * lib/inttypes_.h: New file.
4430         * lib/inttypes.h: Remove file.
4431         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
4432
4433         * lib/imaxabs.c: New file.
4434
4435         * lib/imaxdiv.c: New file.
4436
4437 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4438
4439         New config-h module, so that "make" output needn't be cluttered
4440         by -DHAVE_CONFIG_H.
4441         * MODULES.html.sh (Support for building libraries and executables):
4442         Add config-h.
4443         * modules/config-h: New file.
4444         * gnulib-tool (nl, sed_transform_lib_file): New vars.
4445         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
4446         the config-h module is used.
4447
4448         New configmake module, so that "make" output needn't be cluttered
4449         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
4450         * MODULES.html.sh (Support for building libraries and executables):
4451         Add configmake.
4452         * modules/configmake: New file.
4453
4454 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4455
4456         * m4/config-h.m4: New file.
4457
4458 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4459
4460         * config/srclist.txt: Add elisp-comp.
4461
4462 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4463
4464         * MODULES.html.sh (Support for building libraries and executables):
4465         Add elisp-comp.
4466         * build-aux/elisp-comp: New file.
4467         * modules/elisp-comp: New file.
4468
4469 2006-08-24  Bruno Haible  <bruno@clisp.org>
4470
4471         * gnulib-tool (func_create_testdir): Use non-default values of
4472         sourcebase and m4base.
4473
4474 2006-08-24  Bruno Haible  <bruno@clisp.org>
4475
4476         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
4477         HTML structure.
4478
4479 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
4480
4481         * modules/openat (Depends-on): Add lchown.
4482
4483 2006-08-23  Bruno Haible  <bruno@clisp.org>
4484
4485         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
4486         of gl_LOCK_EARLY instead of gl_LOCK.
4487
4488 2006-08-23  Bruno Haible  <bruno@clisp.org>
4489
4490         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
4491         on OSF/1 to no.
4492         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
4493
4494 2006-08-23  Bruno Haible  <bruno@clisp.org>
4495
4496         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
4497         as unusable.
4498
4499         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
4500         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
4501         (gl_LOCK): New macro.
4502
4503 2006-08-22  Simon Josefsson  <jas@extundo.com>
4504
4505         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
4506         to md5 module.
4507
4508 2006-08-22  Simon Josefsson  <jas@extundo.com>
4509
4510         * MODULES.html.sh: Add "Support for maintaining and release
4511         projects".
4512
4513         * build-aux/gnupload: New file, from coreutils.
4514
4515 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4516
4517         Avoid the need for AC_LIBSOURCES in m4 macros.
4518         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
4519         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
4520         * modules/check-version (EXTRA_DIST): Add check-version.h.
4521         * modules/crc (EXTRA_DIST): Add crc.h.
4522         * modules/des (EXTRA_DIST): Add des.h.
4523         * modules/gc (EXTRA_DIST): Add gc.h.
4524         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
4525         * modules/getline (EXTRA_DIST): Add getline.h.
4526         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
4527         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
4528         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
4529         * modules/md2 (EXTRA_DIST): Add md2.h.
4530         * modules/md4 (EXTRA_DIST): Add md4.h.
4531         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
4532         * modules/read-file (EXTRA_DIST): Add read-file.h.
4533         * modules/readline (EXTRA_DIST): Add readline.h.
4534         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
4535         rijndael-api-fst.h.
4536
4537 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4538
4539         * m4/rijndael.m4 (gl_ARCFOUR):
4540         * m4/arctwo.m4 (gl_ARCTWO):
4541         * m4/check-version.m4 (gl_CHECK_VERSION):
4542         * m4/crc.m4 (gl_CRC):
4543         * m4/des.m4 (gl_DES):
4544         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
4545         * m4/gc.m4 (gl_GC):
4546         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
4547         * m4/getline.m4 (gl_FUNC_GETLINE):
4548         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
4549         * m4/hmac-md5.m4 (gl_HMAC_MD5):
4550         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
4551         * m4/md2.m4 (gl_MD2):
4552         * m4/md4.m4 (gl_MD4):
4553         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
4554         * m4/read-file.m4 (gl_FUNC_READ_FILE):
4555         * m4/readline.m4 (gl_FUNC_READLINE):
4556         * m4/rijndael.m4 (gl_RIJNDAEL):
4557         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
4558         to get the necessary .h files and whatnot.
4559
4560 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4561
4562         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
4563         gnulib rather than the other way around.
4564         * config/srclistvars.sh (COREUTILS): Remove.
4565
4566 2006-08-22  Jim Meyering  <jim@meyering.net>
4567
4568         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
4569
4570         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
4571
4572 2006-08-22  Eric Blake  <ebb9@byu.net>
4573
4574         * modules/regexprops-generic: New file.
4575         * MODULES.html.sh (Support for building documentation): List it.
4576
4577 2006-08-22  Eric Blake  <ebb9@byu.net>
4578
4579         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
4580         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
4581         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
4582         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
4583
4584 2006-08-22  Bruno Haible  <bruno@clisp.org>
4585
4586         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
4587         and lib_LTLIBRARIES like the other lib_* variables.
4588
4589 2006-08-22  Bruno Haible  <bruno@clisp.org>
4590
4591         * build-aux/x-to-1.in: New file, from GNU gettext.
4592
4593 2006-08-22  Bruno Haible  <bruno@clisp.org>
4594
4595         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
4596         <utmpx.h> exists.
4597
4598 2006-08-22  Bruno Haible  <bruno@clisp.org>
4599
4600         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
4601         <utmpx.h> exists.
4602
4603 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4604
4605         BeOS portability.
4606         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
4607         exist.
4608         Problem reported by Bruno Haible.
4609
4610 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4611
4612         Avoid the need for AC_LIBSOURCES in m4 macros.
4613         * modules/acl (EXTRA_DIST): Add acl.h.
4614         * modules/argmatch (Files): Add m4/argmatch.m4.
4615         (configure.ac): Add gl_ARGMATCH.
4616         (EXTRA_DIST): Renamed from lib_SOURCES, for
4617         consistency with the other modules.  Remove argmatch.c.
4618         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
4619         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
4620         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
4621         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
4622         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
4623         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
4624         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
4625         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
4626         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
4627         * modules/closeout (EXTRA_DIST): Add closeout.h.
4628         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
4629         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
4630         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
4631         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
4632         dirname.h; remove basename.c and stripslash.c.
4633         * modules/exclude (EXTRA_DIST): Add exclude.h.
4634         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
4635         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
4636         * modules/file-type (EXTRA_DIST): Add file-type.h.
4637         * modules/filemode (EXTRA_DIST): Add filemode.h.
4638         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
4639         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4640         * modules/fpending (EXTRA_DIST): Add __fpending.h.
4641         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
4642         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
4643         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
4644         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
4645         * modules/getdate (EXTRA_DIST): Add getdate.c.
4646         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
4647         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
4648         * modules/getpass (EXTRA_DIST): Add getpass.h.
4649         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
4650         * modules/group-member (EXTRA_DIST): Add group-member.h.
4651         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
4652         * modules/hash (EXTRA_DIST): Add hash.h.
4653         * modules/human (EXTRA_DIST): Add human.h.
4654         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
4655         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
4656         * modules/lchown (EXTRA_DIST): Add lchown.h.
4657         * modules/long-options (EXTRA_DIST): Add long-options.h.
4658         * modules/lstat (EXTRA_DIST): Add lstat.h.
4659         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
4660         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
4661         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
4662         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
4663         * modules/memxor (EXTRA_DIST): Add memxor.h.
4664         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
4665         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
4666         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
4667         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
4668         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
4669         * modules/physmem (EXTRA_DIST): Add physmem.h.
4670         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
4671         * modules/posixver (EXTRA_DIST): Add posixver.h.
4672         * modules/quote (EXTRA_DIST): Add quote.h.
4673         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
4674         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
4675         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
4676         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
4677         regex_internal.h regexec.c.
4678         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
4679         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
4680         * modules/same (EXTRA_DIST): Add same.h.
4681         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
4682         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
4683         * modules/savedir (EXTRA_DIST): Add savedir.h.
4684         * modules/sha1 (EXTRA_DIST): Add sha1.h.
4685         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
4686         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
4687         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
4688         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
4689         * modules/strdup (EXTRA_DIST): Add strdup.h.
4690         * modules/strftime (EXTRA_DIST): Add strftime.h.
4691         * modules/strndup (EXTRA_DIST): Add strndup.h.
4692         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
4693         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
4694         * modules/time_r (EXTRA_DIST): Add time_r.h.
4695         * modules/timespec (EXTRA_DIST): Add timespec.h.
4696         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4697         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
4698         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
4699         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
4700         * modules/userspec (EXTRA_DIST): Add userspec.h.
4701         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
4702         * modules/utimens (EXTRA_DIST): Add utimens.h.
4703         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
4704         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
4705         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
4706         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
4707         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
4708         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
4709         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
4710         * modules/yesno (EXTRA_DIST): Add yesno.h.
4711
4712 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4713
4714         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
4715
4716         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
4717         * m4/dev-ino.m4, same-inode.m4: Remove.
4718
4719         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
4720         * m4/acl.m4 (AC_FUNC_ACL):
4721         * m4/backupfile.m4 (gl_BACKUPFILE):
4722         * m4/c-strtod.m4 (gl_C99_STRTOLD):
4723         * m4/canon-host.m4 (gl_CANON_HOST):
4724         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
4725         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
4726         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
4727         * m4/cloexec.m4 (gl_CLOEXEC):
4728         * m4/close-stream.m4 (gl_CLOSE_STREAM):
4729         * m4/closeout.m4 (gl_CLOSEOUT):
4730         * m4/dirfd.m4 (gl_FUNC_DIRFD):
4731         * m4/dirname.m4 (gl_DIRNAME):
4732         * m4/exclude.m4 (gl_EXCLUDE):
4733         * m4/exitfail.m4 (gl_EXITFAIL):
4734         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
4735         * m4/file-type.m4 (gl_FILE_TYPE):
4736         * m4/filemode.m4 (gl_FILEMODE):
4737         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
4738         * m4/fpending.m4 (gl_FUNC_FPENDING):
4739         * m4/fprintftime.m4 (gl_FPRINTFTIME):
4740         * m4/fts.m4 (gl_FUNC_FTS):
4741         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
4742         * m4/getdate.m4 (gl_GETDATE):
4743         * m4/gethrxtime.m4 (gl_GETHRXTIME):
4744         * m4/getpagesize.m4 (gl_GETPAGESIZE):
4745         * m4/getpass.m4 (gl_FUNC_GETPASS):
4746         * m4/gettime.m4 (gl_GETTIME):
4747         * m4/getugroups.m4 (gl_GETUGROUPS):
4748         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
4749         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
4750         * m4/hard-locale.m4 (gl_HARD_LOCALE):
4751         * m4/hash.m4 (gl_HASH):
4752         * m4/idcache.m4 (gl_IDCACHE):
4753         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
4754         * m4/lchown.m4 (gl_FUNC_LCHOWN):
4755         * m4/long-options.m4 (gl_LONG_OPTIONS):
4756         * m4/lstat.m4 (gl_FUNC_LSTAT):
4757         * m4/md5.m4 (gl_MD5):
4758         * m4/memcasecmp.m4 (gl_MEMCASECMP):
4759         * m4/memcoll.m4 (gl_MEMCOLL):
4760         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
4761         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
4762         * m4/memxor.m4 (gl_MEMXOR):
4763         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
4764         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
4765         * m4/modechange.m4 (gl_MODECHANGE):
4766         * m4/mountlist.m4 (gl_MOUNTLIST):
4767         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4768         * m4/openat.m4 (gl_FUNC_OPENAT):
4769         * m4/pathmax.m4 (gl_PATHMAX):
4770         * m4/physmem.m4 (gl_PHYSMEM):
4771         * m4/posixtm.m4 (gl_POSIXTM):
4772         * m4/posixver.m4 (gl_POSIXVER):
4773         * m4/quote.m4 (gl_QUOTE):
4774         * m4/quotearg.m4 (gl_QUOTEARG):
4775         * m4/readtokens.m4 (gl_READTOKENS):
4776         * m4/readutmp.m4 (gl_READUTMP):
4777         * m4/regex.m4 (gl_REGEX):
4778         * m4/safe-read.m4 (gl_SAFE_READ):
4779         * m4/safe-write.m4 (gl_SAFE_WRITE):
4780         * m4/same.m4 (gl_SAME):
4781         * m4/save-cwd.m4 (gl_SAVE_CWD):
4782         * m4/savedir.m4 (gl_SAVEDIR):
4783         * m4/settime.m4 (gl_SETTIME):
4784         * m4/sha1.m4 (gl_SHA1):
4785         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
4786         * m4/stat-macros.m4 (gl_STAT_MACROS):
4787         * m4/stat-time.m4 (gl_STAT_TIME):
4788         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
4789         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
4790         * m4/strdup.m4 (gl_FUNC_STRDUP):
4791         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
4792         * m4/strndup.m4 (gl_FUNC_STRNDUP):
4793         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
4794         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
4795         * m4/time_r.m4 (gl_TIME_R):
4796         * m4/timespec.m4 (gl_TIMESPEC):
4797         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
4798         * m4/unlinkdir.m4 (gl_UNLINKDIR):
4799         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
4800         * m4/userspec.m4 (gl_USERSPEC):
4801         * m4/utimecmp.m4 (gl_UTIMECMP):
4802         * m4/utimens.m4 (gl_UTIMENS):
4803         * m4/xalloc.m4 (gl_XALLOC):
4804         * m4/xgetcwd.m4 (gl_XGETCWD):
4805         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
4806         * m4/xreadlink.m4 (gl_XREADLINK):
4807         * m4/xstrtod.m4 (gl_XSTRTOD):
4808         * m4/yesno.m4 (gl_YESNO):
4809         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
4810         to get the necessary .h files and whatnot.
4811
4812 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
4813             Bruno Haible  <bruno@clisp.org>
4814
4815         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
4816         /bin/sh understanding of '!' conditional negation.
4817
4818 2006-08-21  Jim Meyering  <jim@meyering.net>
4819
4820         * modules/openat (Depends-on): Really alphabetize.
4821
4822         * modules/acl (Depends-on): Add error and quote.
4823
4824         * check-module (find_included_lib_files): Add at-func.c to the
4825         ok-to-include-more-than-once white list.
4826
4827         * modules/openat (Depends-on): Add lstat.  Alphabetize.
4828
4829 2006-08-21  Bruno Haible  <bruno@clisp.org>
4830
4831         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4832         Emit a pkgdata_DATA variable only if some snippets add contents to it.
4833         Reported by Martin Lambers <marlam@marlam.de>.
4834
4835 2006-08-21  Bruno Haible  <bruno@clisp.org>
4836
4837         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
4838         specify an installation location, don't emit a noinst_LIBRARIES or
4839         noinst_LTLIBRARIES assignment.
4840
4841 2006-08-21  Bruno Haible  <bruno@clisp.org>
4842
4843         BeOS portability.
4844         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
4845         BeOS has mbrtowc() but no <wctype.h>.
4846
4847 2006-08-21  Bruno Haible  <bruno@clisp.org>
4848
4849         BeOS portability.
4850         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
4851         exist.
4852
4853 2006-08-21  Bruno Haible  <bruno@clisp.org>
4854
4855         BeOS portability.
4856         * lib/mbchar.h: Include <wctype.h> only if it exists.
4857
4858 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4859
4860         Remove files that are no longer needed by their respective modules.
4861         * m4/obstack.m4: Remove.
4862         * m4/strerror_r.m4: Remove.
4863         * m4/uint32_t.m4: Remove.
4864         * m4/uintptr_t.m4: Remove.
4865         * m4/ullong_max.m4: Remove.
4866         * m4/xstrtoimax.m4: Remove.
4867         * m4/xstrtoumax.m4: Remove.
4868
4869         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
4870         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
4871         dependencies now capture this.
4872
4873         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
4874         Do not use AC_LIBSOURCES, since gnulib modules now do this.
4875         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
4876         * m4/human.m4 (gl_HUMAN): Likewise.
4877         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
4878         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
4879
4880         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
4881
4882         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
4883         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
4884         stdint.
4885         * m4/human.m4 (gl_HUMAN): Likewise.
4886         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
4887         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
4888         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
4889         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
4890         * m4/xstrtol (gl_XSTRTOL): Likewise.
4891
4892         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
4893         AC_TYPE_LONG_LONG_INT.
4894         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
4895         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
4896         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
4897         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
4898
4899         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
4900         on stdbool.
4901
4902         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
4903         (gl_PREREQ_XSTRTOUL): Remove.
4904
4905         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
4906
4907         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
4908         mode.
4909
4910 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4911
4912         Add and change modules to make it easier for coreutils to use
4913         gnulib-tool.
4914         * modules/backupfile (Files): Remove m4/d-ino.m4.
4915         (Depends-on): Add d-ino.
4916         * modules/cycle-check (Depends-on): Add stdint.
4917         (lib_SOURCES): Add cycle-check.h.
4918         * modules/d-ino: New module.
4919         * modules/d-type: New module.
4920         * modules/error (Files): Remove m4/strerror_r.m4.
4921         * modules/filemode (Files): Add m4/st_dm_mode.m4.
4922         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4923         m4/inttypes_h.m4, m4/uintmax_t.m4.
4924         (Depends-on): Add stdint.
4925         (lib_SOURCES): Add fsusage.h.
4926         * modules/getcwd (Files): Remove d-ino.m4.
4927         (Depends-on): Add d-ino.
4928         * modules/getndelim2 (Depends-on): Add stdint.
4929         * modules/glob (Files): Remove m4/d-type.m4.
4930         (Depends-on): Add d-type.
4931         * modules/host-os: New module.
4932         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
4933         m4/inttypes_h.m4, m4/uintmax_t.m4.
4934         * Depends-on: Add stdint.
4935         (lib_SOURCES): Add human.h.
4936         * modules/inttostr (Files): Remove m4/intmax_t.m4,
4937         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
4938         m4/uintmax_t.m4, m4/ulonglong.m4.
4939         (Depends-on): Add stdint.
4940         (EXTRA_DIST): Add inttostr.h.
4941         * modules/lchmod: New module.
4942         * modules/link-follow: New module.
4943         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
4944         (Depends-on): Add lchmod.
4945         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
4946         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
4947         (Depends-on): Add stdint.
4948         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
4949         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
4950         (Depends-on): Add stdint.
4951         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
4952         * modules/perl: New module.
4953         * modules/regex (Depends-on): Add stdint.
4954         * modules/rmdir-errno: New module.
4955         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4956         m4/intmax_t.m4.
4957         (Depends-on): Add stdint.
4958         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4959         m4/uintmax_t.m4.
4960         (Depends-on): Add stdint.
4961         * modules/unlink-busy: New module.
4962         * modules/utimecmp (Depends-on): Add stdint.
4963         * modules/uptime: New module.
4964         * modules/winsz-ioctl: New module.
4965         * modules/winsz-termios: New module.
4966         * modules/xnanosleep (Depends-on): Add nanosleep.
4967         * modules/ullong_max: Remove.
4968         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
4969         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
4970         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
4971         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
4972         (Depends-on): Add inttypes.
4973         (lib_SOURCES): Add xstrtol.h.
4974         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
4975         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
4976         * MODULES.html.sh: Move 'assert' into the assert section.
4977         Move 'dummy' into the linking section.
4978         Remove ullong_max.
4979         Add section for compatibility checks for POSIX:2001 functions,
4980         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
4981         winsz-ioctl, and winsz-termios into it.
4982         Add lchmod.
4983         Add top-level Misc section and put host-os, perl, and uptime
4984         into it.
4985
4986 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4987
4988         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
4989         now assume the stdint module.  Do not include inttypes.h.
4990         * lib/fsusage.h: Likewise.
4991         * lib/getndelim2.c: Likewise.
4992         * lib/human.h: Likewise.
4993         * lib/inttostr.h: Likewise.
4994         * lib/obstack.c: Likewise.
4995         * lib/regex_internal.h: Likewise.
4996         * lib/tempname.c: Likewise.
4997         * lib/utimecmp.c: Likewise.
4998         * lib/xstrtol.h: Likewise.
4999
5000         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
5001
5002         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
5003         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
5004         * lib/xtime.h: Likewise.
5005
5006 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5007
5008         * modules/openat (Files): Add lib/fchmodat.c.
5009         Fixes problem reported by Jay Youngman.
5010
5011 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5012
5013         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
5014         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
5015
5016 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
5017             Bruno Haible  <bruno@clisp.org>
5018
5019         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5020         and is a script that invokes bison. Tighten the code. Add comments.
5021
5022 2006-08-18  Jim Meyering  <jim@meyering.net>
5023
5024         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
5025         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
5026         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
5027         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
5028
5029 2006-08-18  Bruno Haible  <bruno@clisp.org>
5030
5031         * modules/bison-i18n: New file.
5032         * MODULES.html.sh (Internationalization functions): Add it.
5033
5034 2006-08-18  Bruno Haible  <bruno@clisp.org>
5035
5036         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
5037         sys/statvfs.h. When getmntinfo was found, check its declaration and
5038         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
5039
5040 2006-08-18  Bruno Haible  <bruno@clisp.org>
5041
5042         * m4/bison-i18n.m4: New file, from bison.
5043
5044 2006-08-18  Bruno Haible  <bruno@clisp.org>
5045
5046         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
5047         (ME_DUMMY): Treat "kernfs" as a dummy.
5048         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
5049
5050 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5051
5052         Update from coreutils.
5053
5054         2006-08-15  Jim Meyering  <jim@meyering.net>
5055
5056         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
5057
5058         2006-01-17  Jim Meyering  <jim@meyering.net>
5059
5060         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
5061
5062         2006-01-11  Jim Meyering  <jim@meyering.net>
5063
5064         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
5065         Check for the lchmod function.
5066
5067 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5068
5069         Update from coreutils.
5070
5071         * lib/__fpending.h: Add copyright notice.
5072         * lib/fprintftime.h: Likewise.
5073         * lib/savedir.c: Use (C) in copyright notice.
5074         * lib/savedir.h: Likewise.
5075
5076         2006-08-15  Jim Meyering  <jim@meyering.net>
5077
5078         * lib/at-func.c: New file, with the logic of all emulated at-functions.
5079         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
5080         in support of the EXPECTED_ERRNO macro.
5081         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
5082         definitions.  Instead, define the appropriate symbols and include
5083         "at-func.c".
5084         * lib/mkdirat.c (mkdirat): Likewise.
5085         * lib/fchmodat.c (fchmodat): Likewise.
5086         (ENOSYS): Remove definition.
5087         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
5088         it.  Don't include "unistd--.h" -- it wasn't ever used.
5089
5090         2006-01-17  Jim Meyering  <jim@meyering.net>
5091
5092         Rewrite fts.c not to change the current working directory,
5093         by using openat, fstatat, fdopendir, etc..
5094
5095         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
5096         (HAVE_OPENAT_SUPPORT): Define.
5097         [_LIBC] (fchdir): Don't undef or define; no longer used.
5098         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
5099         Now, this `function' always succeeds, and consumes its file descriptor
5100         parameter -- so callers must not close such FDs.  Update callers.
5101         (diropen_fd, opendirat, cwd_advance_fd): New functions.
5102         (diropen): Add parameter, SP.  Adjust all callers.
5103         Implement using diropen_fd, rather than open.
5104         (fts_open): Initialize new member, fts_cwd_fd.
5105         Remove fts_rft-setting code.
5106         (fts_close): Close fts_cwd_fd, if necessary.
5107         (__opendir2): Define in terms of opendir or opendirat,
5108         depending on whether the FST_NOCHDIR flag is set.
5109         (fts_build): Since fts_safe_changedir consumes its FD, and since
5110         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
5111         and close the dup'd file descriptor upon failure.
5112         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
5113         (fts_safe_changedir): Tweak semantics to reflect that this function
5114         now calls cwd_advance_fd and hence consumes its FD argument.
5115         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
5116         [struct FTS] (fts_rft): Remove now-unused member.
5117         [struct FTS] (fts_cycle.state): Improve comment.
5118
5119         * lib/openat.c (openat_needs_fchdir): New function.
5120         * lib/openat.h (openat_needs_fchdir): Declare it.
5121
5122 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5123
5124         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
5125         Problem and fix reported by Pádraig Brady in
5126         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
5127
5128 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5129
5130         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
5131
5132 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5133
5134         * lib/memcoll.c (memcoll): Optimize for the common case where the
5135         arguments are bytewise equal.
5136
5137 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5138
5139         * doc/regexprops-generic.texi: Add a copyright notice.
5140
5141 2006-08-15  Bruno Haible  <bruno@clisp.org>
5142
5143         * modules/tmpdir (License): Change to LGPL.
5144
5145 2006-08-15  Bruno Haible  <bruno@clisp.org>
5146
5147         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
5148         module.
5149
5150 2006-08-14  Simon Josefsson  <jas@extundo.com>
5151
5152         * config/srclist.txt: Add gnupload.
5153
5154 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5155
5156         Change copyright notice from LGPL 2 to GPL 2, since that's the
5157         standard form used in the gnulib repository.
5158         * tests/test-lock.c: Likewise.
5159         * tests/test-stdint.c: Likewise.
5160         * tests/test-tls.c: Likewise.
5161
5162         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
5163         prelude-manager.  User shorter URLs for GNU projects, without '?'.
5164         Add copyright notice.
5165
5166         * check-module: Add copyright notice.  Output a copyright
5167         notice if "--version" is specified.
5168         * modules/COPYING: New file.
5169         * tests/test-getaddrinfo.c: Add copyright notice.
5170         * tests/test-verify.c: Likewise.
5171
5172 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5173
5174         Change copyright notice from LGPL 2 to GPL 2, since that's the
5175         standard form used in the gnulib repository.
5176         * lib/lock.c: LGPL -> GPL.
5177         * lib/lock.h: Likewise.
5178         * lib/strnlen1.c: Likewise.
5179         * lib/strnlen1.h: Likewise.
5180         * lib/tls.c: Likewise.
5181         * lib/tls.h: Likewise.
5182         * lib/tmpdir.c: Likewise.
5183
5184         * lib/TODO: Remove; this belongs only in coreutils.
5185
5186 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5187
5188         Add copyright notices to long-enough files that lack them, since
5189         otherwise the files aren't clearly free.  Use the same notice that
5190         getdate.texi already uses.
5191         * doc/alloca-opt.texi: Add copyright notice.
5192         * doc/alloca.texi: Likewise.
5193         * doc/ctime.texi: Likewise.
5194         * doc/functions.texi: Likewise.
5195         * doc/gcd.texi: Likewise.
5196         * doc/gnulib-tool.texi: Likewise.
5197         * doc/inet_ntoa.texi: Likewise.
5198         * doc/visibility.texi: Likewise.
5199
5200         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
5201         * doc/quote.texi: Add copyright notice.
5202
5203         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
5204         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
5205         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
5206         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
5207         is now obsolete, and give a pointer to the Sun list.
5208         Add copyright notice.
5209
5210 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5211
5212         * config/srclistvars.sh: Add copyright notice.
5213
5214 2006-08-14  Eric Blake  <ebb9@byu.net>
5215
5216         Import the following change from libc:
5217
5218         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
5219
5220         Upstream bug 2997.
5221         * lib/misc/error.c: Add space between program name and message if file
5222         name is missing.
5223
5224 2006-08-12  Karl Berry  <karl@gnu.org>
5225
5226         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
5227         remove, these originate in gnulib now.
5228
5229 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5230
5231         * doc/Makefile (standards.info standards.html standards.dvi):
5232         Also depend on make-stds.texi.
5233
5234 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
5235
5236         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
5237         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
5238
5239         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
5240         in wchar_t.  Problem reported by Eric Blake.
5241
5242         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
5243         LEN is smaller than SIZE.  Suggested by Bruno Haible.
5244         Also, help the compiler to keep LEN in a register.
5245
5246 2006-08-11  Eric Blake  <ebb9@byu.net>
5247
5248         * users.txt: Sort.  Add tar.
5249
5250 2006-08-11  Bruno Haible  <bruno@clisp.org>
5251
5252         * users.txt: New file.
5253
5254 2006-08-11  Bruno Haible  <bruno@clisp.org>
5255
5256         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
5257         before <wchar.h>. Needed for OSF/1 and BSD/OS.
5258
5259 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5260
5261         * modules/snprintf (Depends-on): Remove minmax.
5262         (Maintainer): Add self and Bruno.
5263
5264 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5265
5266         * lib/.cppi-disable: Add snprintf.h, socket_.h.
5267         * lib/snprintf.c: Include <errno.h> and <limits.h>.
5268         (EOVERFLOW): Define if the system does not.
5269         Do not include "minmax.h"; it wasn't used.
5270         (snprintf): Don't assume size_t promotes to an unsigned type.
5271         Fix bug when generated string was too long for the buffer: the
5272         buffer's contents are supposed to be the initial prefix of the
5273         output.  Don't assume vasnprintf returns EOVERFLOW if the size
5274         exceeds INT_MAX; do the check ourselves.
5275
5276         Import the following changes from libc:
5277
5278         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
5279
5280         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
5281         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
5282         set wc to the byte which couldn't be converted.
5283         (re_string_reconstruct): Don't clear valid_raw_len before calling
5284         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
5285         tip_context using re_string_context_at.
5286
5287         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
5288
5289         * lib/posix/regex.h: g++ still cannot handled [restrict].
5290
5291         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
5292
5293         * lib/posix/regex.h: Remove special handling for VMS.
5294
5295 2006-08-10  Jim Meyering  <jim@meyering.net>
5296
5297         * modules/same-inode: New module.
5298         * modules/dev-ino: New module.
5299         * modules/cycle-check: Depend on these modules, rather than simply
5300         including their .h files.
5301         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
5302         required via m4/cycle-check.m4.
5303         * modules/same: Depend on new same-inode module, rather than
5304         including same-inode.h.
5305         * modules/chdir-safer: New file.
5306
5307         * modules/chown (Depends-on): Add stat-macros.
5308
5309 2006-08-10  Jim Meyering  <jim@meyering.net>
5310
5311         * m4/cycle-check.m4: New file.
5312         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
5313         * m4/dev-ino.m4, m4/same-inode.m4: New files.
5314
5315 2006-08-10  Eric Blake  <ebb9@byu.net>
5316
5317         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
5318         in from original proposal.
5319
5320 2006-08-10  Eric Blake  <ebb9@byu.net>
5321         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5322
5323         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
5324         namespace.
5325
5326 2006-08-10  Bruno Haible  <bruno@clisp.org>
5327
5328         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
5329         as well.
5330
5331 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5332
5333         Sync from coreutils.
5334
5335         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
5336
5337         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
5338         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
5339
5340 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5341
5342         * modules/restrict: Remove; no longer needed now that we assume
5343         Autoconf 2.59 or later.
5344         * MODULES.html.sh: Remove 'restrict'.
5345         * modules/argp (Depends-on): Remove 'restrict'.
5346         * modules/base64 (Depends-on): Likewise.
5347         * modules/gc (Depends-on): Likewise.
5348         * modules/getaddrinfo (Depends-on): Likewise.
5349         * modules/glob (Depends-on): Likewise.
5350         * modules/inet_ntop (Depends-on): Likewise.
5351         * modules/inet_pton (Depends-on): Likewise.
5352         * modules/memxor (Depends-on): Likewise.
5353         * modules/regex (Depends-on): Likewise.
5354         * modules/strtok_r (Depends-on): Likewise.
5355         * modules/time_r (Depends-on): Likewise.
5356
5357 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5358
5359         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
5360         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
5361         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5362         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
5363         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
5364         * m4/memxor.m4 (gl_MEMXOR): Likewise.
5365         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
5366         gl_C_RESTRICT replaced by AC_C_RESTRICT.
5367
5368         Merge from coreutils.
5369         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
5370         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
5371         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
5372         * m4/time_r.m4 (gl_TIME_R): Likewise.
5373
5374 2006-08-09  Karl Berry  <karl@gnu.org>
5375
5376         * config/srclist.txt: no more gettext-tools, per Bruno.
5377
5378 2006-08-08  Eric Blake  <ebb9@byu.net>
5379
5380         * modules/verror: New module.
5381         * MODULES.html.sh: Document it.
5382
5383 2006-08-08  Eric Blake  <ebb9@byu.net>
5384
5385         * lib/verror.h, lib/verror.c: New files.
5386
5387 2006-08-08  Eric Blake  <ebb9@byu.net>
5388
5389         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
5390         verror_at_line output complies with GNU Coding Standards even when
5391         file is NULL.
5392
5393 2006-08-07  Bruno Haible  <bruno@clisp.org>
5394
5395         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
5396         versions of AIX.
5397         Reported by Ralf Wildenhues.
5398
5399 2006-08-07  Bruno Haible  <bruno@clisp.org>
5400
5401         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
5402         in an AC_DEFUN. Needed so that the autoconf snippets can use
5403         AC_REQUIRE.
5404
5405 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5406
5407         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5408         Initialize pkgdata_DATA.
5409         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
5410         overriding it.
5411
5412 2006-08-06  Eric Blake  <ebb9@byu.net>
5413
5414         * lib/error.h: Fold in some upstream changes from glibc.
5415         * lib/error.c: Likewise.
5416
5417 2006-08-04  Bruno Haible  <bruno@clisp.org>
5418
5419         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5420         Make the mostlyclean-local rule depend on mostlyclean-generic.
5421         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
5422
5423 2006-07-31  Bruno Haible  <bruno@clisp.org>
5424
5425         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
5426         <stdlib.h>, <string.h>.
5427
5428 2006-07-30  Bruno Haible  <bruno@clisp.org>
5429
5430         * modules/readlink (License): Change to LGPL.
5431
5432 2006-07-30  Bruno Haible  <bruno@clisp.org>
5433
5434         * modules/javaversion (Makefile.am): Distribute javaversion.java and
5435         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
5436         set PKGDATADIR to point to it.
5437
5438 2006-07-30  Bruno Haible  <bruno@clisp.org>
5439
5440         * modules/csharpexec (configure.ac): Comment out macro invocation.
5441         * modules/javaexec (configure.ac): Likewise.
5442         * modules/javacomp-script (configure.ac): Likewise.
5443
5444         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
5445
5446 2006-07-30  Bruno Haible  <bruno@clisp.org>
5447
5448         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
5449         linked-list.
5450
5451 2006-07-30  Bruno Haible  <bruno@clisp.org>
5452
5453         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
5454
5455 2006-07-30  Bruno Haible  <bruno@clisp.org>
5456
5457         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5458         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
5459         get removed.
5460
5461 2006-07-29  Bruno Haible  <bruno@clisp.org>
5462
5463         Make it possible for gnulib-tool to work with locally modified or
5464         augmented gnulib repositories.
5465         * gnulib-tool (func_usage): Document --local-dir option.
5466         (local_gnulib_dir): New variable.
5467         Handle --local-dir option.
5468         (func_lookup_file): New function.
5469         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
5470         (func_get_description, func_get_filelist, func_get_description,
5471         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
5472         func_get_automake_snippet, func_get_include_directive,
5473         func_get_license, func_get_maintainer): Use func_lookup_file.
5474         (func_import, func_create_testdir): Use func_lookup_file.
5475
5476 2006-07-29  Bruno Haible  <bruno@clisp.org>
5477
5478         * modules/setenv (Depends-on): Add unistd.
5479
5480 2006-07-29  Bruno Haible  <bruno@clisp.org>
5481
5482         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
5483
5484 2006-07-29  Bruno Haible  <bruno@clisp.org>
5485
5486         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
5487
5488 2006-07-29  Bruno Haible  <bruno@clisp.org>
5489
5490         * gnulib-tool (import, update): If there is no Makefile.am, look at
5491         aclocal.m4, instead of bailing out.
5492
5493 2006-07-29  Bruno Haible  <bruno@clisp.org>
5494
5495         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
5496         Categorize the options by when they are useful.
5497
5498 2006-07-29  Bruno Haible  <bruno@clisp.org>
5499
5500         * gnulib-tool (func_usage): Document option --no-libtool.
5501         Handle option --no-libtool.
5502         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
5503         for changed semantics of $libtool variable.
5504         (func_import): Likewise. If libtool is not used, show this through
5505         an option --no-libtool.
5506         (func_create_testdir): Update.
5507
5508 2006-07-29  Bruno Haible  <bruno@clisp.org>
5509
5510         * gnulib-tool (func_import): Extend error message about missing
5511         --doc-base.
5512
5513 2006-07-29  Bruno Haible  <bruno@clisp.org>
5514
5515         * gnulib-tool (func_import): Don't create the $docbase directory if
5516         there is no file to store there.
5517
5518 2006-07-29  Bruno Haible  <bruno@clisp.org>
5519
5520         * gnulib-tool (autoconf_minversion): If a --dir option is given and
5521         relevant, look for configure.ac there, not in the current directory.
5522         Also use a simple search for AC_PREREQ, not "autoconf --trace".
5523
5524 2006-07-29  Bruno Haible  <bruno@clisp.org>
5525
5526         * gnulib-tool (SORT): New variable.
5527         (func_usage): Undocument --assume-autoconf option.
5528         Remove --assume-autoconf option handling.
5529         (autoconf_minversion): Determine from the contents of configure.ac.
5530         (func_import): Remove autoconf_minversion handling.
5531         Suggested by Eric Blake.
5532
5533 2006-07-29  Bruno Haible  <bruno@clisp.org>
5534
5535         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
5536
5537 2006-07-29  Bruno Haible  <bruno@clisp.org>
5538
5539         * config/srclist.txt (*setenv.[ch]): Remove rules.
5540
5541 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5542
5543         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
5544
5545 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5546
5547         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
5548         arpa/inet.h.
5549
5550 2006-07-28  Simon Josefsson  <jas@extundo.com>
5551
5552         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
5553         * modules/inet_pton (Depends-on): Likewise.
5554
5555 2006-07-28  Simon Josefsson  <jas@extundo.com>
5556
5557         * m4/netinet_in_h.m4: New file.
5558
5559 2006-07-28  Simon Josefsson  <jas@extundo.com>
5560
5561         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
5562         #include's.
5563
5564 2006-07-28  Simon Josefsson  <jas@extundo.com>
5565
5566         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
5567         #include's.
5568
5569 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
5570
5571         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
5572         setgid on directories only if they set these bits.
5573         * lib/modechange.h: Remove obsolete comment about masks.
5574
5575 2006-07-28  Eric Blake  <ebb9@byu.net>
5576
5577         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
5578         macro expansion.
5579
5580 2006-07-28  Bruno Haible  <bruno@clisp.org>
5581
5582         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
5583
5584 2006-07-28  Bruno Haible  <bruno@clisp.org>
5585
5586         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
5587
5588 2006-07-28  Bruno Haible  <bruno@clisp.org>
5589
5590         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
5591         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
5592         Define fallbacks.
5593         Avoids link error on FreeBSD 4.x.
5594         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
5595
5596         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
5597         encoding.
5598         * lib/mbswidth.c (iswcntrl): Likewise.
5599
5600 2006-07-27  Bruno Haible  <bruno@clisp.org>
5601
5602         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
5603         test.
5604
5605 2006-07-27  Bruno Haible  <bruno@clisp.org>
5606
5607         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
5608         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
5609         defined.
5610
5611 2006-07-26  Eric Blake  <ebb9@byu.net>
5612
5613         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
5614
5615 2006-07-26  Eric Blake  <ebb9@byu.net>
5616
5617         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
5618         like mingw that lack mkstemp.
5619         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
5620         avoid compilation warning on mingw.
5621
5622 2006-07-26  Bruno Haible  <bruno@clisp.org>
5623
5624         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
5625         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
5626         INT_FAST*_MIN, INTPTR_MIN.
5627
5628 2006-07-25  Bruno Haible  <bruno@clisp.org>
5629
5630         * modules/version-etc (Depends-on): Add stdarg.
5631
5632 2006-07-25  Bruno Haible  <bruno@clisp.org>
5633
5634         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
5635         complex commands.
5636
5637 2006-07-25  Bruno Haible  <bruno@clisp.org>
5638
5639         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
5640         defined in <stdarg.h> or config.h.
5641
5642 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5643
5644         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
5645         (gl_STDIO_SAFER): Remove.
5646
5647 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5648
5649         * MODULES.html.sh (File stream based Input/Output):
5650         Add fopen-safer, tmpfile-safer; remove stdio-safer.
5651         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
5652         * modules/fopen-safer, modules/tmpfile-safer: New files.
5653         * modules/stdio-safer: Remove.
5654
5655 2006-07-24  Bruno Haible  <bruno@clisp.org>
5656
5657         * modules/tmpdir: New file.
5658         * MODULES.html.sh (File system functions): Add it.
5659
5660 2006-07-24  Bruno Haible  <bruno@clisp.org>
5661
5662         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
5663         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
5664
5665 2006-07-24  Bruno Haible  <bruno@clisp.org>
5666
5667         * modules/clean-temp: New file.
5668
5669 2006-07-24  Bruno Haible  <bruno@clisp.org>
5670
5671         * m4/tmpdir.m4: New file, from GNU gettext.
5672
5673 2006-07-24  Bruno Haible  <bruno@clisp.org>
5674
5675         * lib/tmpdir.h: New file, from GNU gettext.
5676         * lib/tmpdir.c: New file, from GNU gettext.
5677
5678 2006-07-24  Bruno Haible  <bruno@clisp.org>
5679
5680         * lib/clean-temp.h: New file, from GNU gettext.
5681         * lib/clean-temp.c: New file, from GNU gettext.
5682
5683 2006-07-23  Eric Blake  <ebb9@byu.net>
5684
5685         * modules/stdio-safer (Files): Add tmpfile-safer.c.
5686         (Depends-on): Add binary-io.
5687
5688 2006-07-23  Eric Blake  <ebb9@byu.net>
5689
5690         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
5691
5692 2006-07-23  Eric Blake  <ebb9@byu.net>
5693
5694         * lib/tmpfile-safer.c: New file.
5695         * lib/stdio-safer.h (fopen_safer): Add prototype.
5696         * lib/stdio--.h (tmpfile): Make safer.
5697
5698 2006-07-23  Bruno Haible  <bruno@clisp.org>
5699
5700         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
5701         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
5702         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
5703         gl_linked_remove_at): Use it.
5704
5705 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5706         and Simon Josefsson <jas@extundo.com>
5707
5708         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
5709
5710         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
5711
5712 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5713
5714         * modules/close-stream: New file.
5715         * modules/closeout (Description): Make it clear that it exits
5716         with a diagnostic on error.
5717         (Depends-on): Add close-stream.  Remove fpending, stdbool.
5718         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
5719
5720 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5721
5722         * m4/close-stream.m4: New file.
5723
5724 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5725
5726         * lib/close-stream.c, lib/close-stream.h: New files.
5727
5728 2006-07-22  Bruno Haible  <bruno@clisp.org>
5729
5730         Merge from GNU gettext 0.15.
5731
5732         2006-05-01  Bruno Haible  <bruno@clisp.org>
5733
5734                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
5735
5736         2006-07-22  Bruno Haible  <bruno@clisp.org>
5737
5738                 * modules/javaversion: New file.
5739                 * MODULES.html.sh (Java): Add javaversion.
5740
5741         2006-03-12  Bruno Haible  <bruno@clisp.org>
5742
5743                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
5744
5745         2005-12-04  Bruno Haible  <bruno@clisp.org>
5746
5747                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
5748                 (untested).
5749
5750         2006-06-21  Bruno Haible  <bruno@clisp.org>
5751
5752                 Avoid warnings from recent versions of mcs.
5753                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
5754                 -o, -L, -r any more. Use options documented since mcs-1.0
5755                 instead. Similarly for -g.
5756
5757         2005-12-04  Bruno Haible  <bruno@clisp.org>
5758
5759                 * build-aux/csharpcomp.sh.in: Suffix for resources is
5760                 .resources, not .resource.
5761
5762         2005-07-09  Bruno Haible  <bruno@clisp.org>
5763
5764                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
5765                 add a .dll suffix.
5766                 Reported by Mark Junker <mjscod@gmx.de>.
5767
5768         2006-07-22  Bruno Haible  <bruno@clisp.org>
5769
5770                 * modules/gettext: Upgrade to gettext-0.15.
5771                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
5772                 m4/visibility.m4.
5773                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
5774
5775 2006-07-22  Bruno Haible  <bruno@clisp.org>
5776
5777         Merge from GNU gettext 0.15.
5778
5779         2006-03-25  Bruno Haible  <bruno@clisp.org>
5780
5781                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
5782
5783         2006-07-21  Bruno Haible  <bruno@clisp.org>
5784
5785                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
5786                 "1.1".
5787
5788         2006-05-09  Bruno Haible  <bruno@clisp.org>
5789
5790                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
5791                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
5792                 for the conftestver execution.
5793
5794         2006-05-01  Bruno Haible  <bruno@clisp.org>
5795
5796                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
5797                 optional target-version argument. Verify that the compiler
5798                 groks source of the specified source-version, or add -source
5799                 option as necessary. Verify that the compiler produces
5800                 bytecode in the specified target-version, or add -target and
5801                 -source options as necessary. Make the result of the test
5802                 available as variable CONF_JAVAC. Also log error output in
5803                 config.log.
5804
5805         2006-03-11  Bruno Haible  <bruno@clisp.org>
5806
5807                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
5808
5809         2006-05-09  Bruno Haible  <bruno@clisp.org>
5810
5811                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
5812                 CLASSPATH_SEPARATOR to a semicolon.
5813
5814         2006-03-12  Bruno Haible  <bruno@clisp.org>
5815
5816                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
5817                 available as variable CONF_JAVA, for subsequent autoconf
5818                 tests. Also log error output in config.log.
5819
5820         2006-07-19  Bruno Haible  <bruno@clisp.org>
5821
5822                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
5823                 that getline works on glibc2 systems. Needed to avoid trouble
5824                 in relocatable.c.
5825                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
5826
5827         2005-12-04  Bruno Haible  <bruno@clisp.org>
5828
5829                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
5830                 launcher (untested).
5831
5832         2005-12-04  Bruno Haible  <bruno@clisp.org>
5833
5834                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
5835
5836         2006-07-22  Bruno Haible  <bruno@clisp.org>
5837
5838                 * gettext.m4: Update from GNU gettext-0.15.
5839                 * nls.m4: Likewise.
5840                 * po.m4: Likewise.
5841                 * inttypes-pri.m4: Likewise.
5842                 * inttypes-h.m4: Renamed from inttypes.m4.
5843                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
5844
5845 2006-07-22  Bruno Haible  <bruno@clisp.org>
5846
5847         Merge from GNU gettext 0.15.
5848
5849         2005-07-05  Bruno Haible  <bruno@clisp.org>
5850
5851                 * printf-args.c (printf_fetchargs): Work around broken
5852                 definition of wint_t on mingw.
5853
5854         2005-02-12  Bruno Haible  <bruno@clisp.org>
5855
5856                 * xallocsa.h: Add extern "C" for C++.
5857
5858         2006-05-17  Bruno Haible  <bruno@clisp.org>
5859
5860                 Cygwin portability.
5861                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
5862
5863         2006-04-30  Bruno Haible  <bruno@clisp.org>
5864
5865                 * progreloc.c: Include <mach-o/dyld.h> if available.
5866                 (find_executable): Use _NSGetExecutablePath when possible.
5867
5868         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5869
5870                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
5871                 function.
5872
5873         2005-12-29  Bruno Haible  <bruno@clisp.org>
5874
5875                 * progreloc.c (set_program_name_and_installdir): Fix
5876                 compilation error.
5877
5878         2005-12-04  Bruno Haible  <bruno@clisp.org>
5879
5880                 Cygwin portability.
5881                 * progreloc.c: Include <windows.h> also on Cygwin.
5882                 (find_executable): Add support for Cygwin.
5883                 (set_program_name_and_installdir): Handle also platforms with
5884                 nonempty EXEEXT.
5885
5886         2006-07-11  Bruno Haible  <bruno@clisp.org>
5887
5888                 * javacomp.c: Fix a comment.
5889                 Reported by Jim Meyering.
5890
5891         2006-04-30  Bruno Haible  <bruno@clisp.org>
5892
5893                 * javacomp.h (compile_java_class): Add source_version,
5894                 target_version arguments.
5895                 * javacomp.c: Rewritten to choose only a compiler that
5896                 respects the specified source_version and target_version.
5897
5898         2006-06-27  Bruno Haible  <bruno@clisp.org>
5899
5900                 Assume correct S_ISDIR macro.
5901                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
5902
5903         2006-07-22  Bruno Haible  <bruno@clisp.org>
5904
5905                 * javaversion.h: New file, from GNU gettext.
5906                 * javaversion.c: New file, from GNU gettext.
5907                 * javaversion.java: New file, from GNU gettext.
5908                 * javaversion.class: New file, from GNU gettext.
5909
5910         2006-05-17  Bruno Haible  <bruno@clisp.org>
5911
5912                 Cygwin portability.
5913                 * javaexec.c (execute_java_class): Test for jview program
5914                 also on Cygwin.
5915
5916         2006-04-09  Bruno Haible  <bruno@clisp.org>
5917
5918                 * fatal-signal.c: Don't include string.h.
5919                 (at_fatal_signal): Use a copying loop instead of memcpy.
5920
5921         2005-12-04  Bruno Haible  <bruno@clisp.org>
5922
5923                 * csharpexec.c: Add support for 'clix' launcher (untested).
5924                 (execute_csharp_using_sscli): New function.
5925                 (execute_csharp_program): Call it.
5926
5927         2006-06-21  Bruno Haible  <bruno@clisp.org>
5928
5929                 Avoid warnings from recent versions of mcs.
5930                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
5931                 -o, -L, -r any more. Use options documented since mcs-1.0
5932                 instead. Similarly for -g.
5933
5934         2005-07-09  Bruno Haible  <bruno@clisp.org>
5935
5936                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
5937                 add a .dll suffix.
5938                 Reported by Mark Junker <mjscod@gmx.de>.
5939
5940         2006-06-17  Bruno Haible  <bruno@clisp.org>
5941
5942                 * config.charset: Update for NetBSD 3.0.
5943
5944         2006-05-17  Bruno Haible  <bruno@clisp.org>
5945
5946                 Cygwin portability.
5947                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
5948
5949         2006-05-16  Bruno Haible  <bruno@clisp.org>
5950
5951                 * localcharset.c [CYGWIN]: Include <windows.h>.
5952                 (get_charset_aliases): For Cygwin, return the same CPxxx
5953                 aliases list as under WIN32.
5954                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
5955                 the environment variables. Fall back to GetACP().
5956
5957         2006-04-05  Bruno Haible  <bruno@clisp.org>
5958
5959                 * config.charset: Update Juan Manuel Guerrero's address.
5960
5961         2005-02-12  Bruno Haible  <bruno@clisp.org>
5962
5963                 * allocsa.h: Add extern "C" for C++.
5964
5965         2005-02-10  Bruno Haible  <bruno@clisp.org>
5966
5967                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
5968                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
5969
5970         2006-07-22  Bruno Haible  <bruno@clisp.org>
5971
5972                 * gettext.h: Update to GNU gettext-0.15.
5973
5974 2006-07-22  Bruno Haible  <bruno@clisp.org>
5975
5976         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
5977         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
5978         lib-prefix.m4, longdouble.m4, ssize_t.m4.
5979
5980 2006-07-21  Eric Blake  <ebb9@byu.net>
5981
5982         * modules/stdlib-safer: New file.
5983         * MODULES.html.sh (File stream based Input/Output): Add
5984         stdlib-safer.
5985
5986 2006-07-21  Eric Blake  <ebb9@byu.net>
5987
5988         * lib/stdlib-safer.h: New file from coreutils, required by
5989         stdlib--.h.
5990
5991 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
5992
5993         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
5994
5995 2006-07-20  Bruno Haible  <bruno@clisp.org>
5996
5997         * gnulib-tool: Recognize new option --assume-autoconf.
5998         (autoconf_minversion): New variable.
5999         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
6000
6001 2006-07-20  Bruno Haible  <bruno@clisp.org>
6002
6003         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
6004
6005 2006-07-19  Derek R. Price  <derek@ximbiot.com>
6006
6007         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
6008         Reindent and repaginate.
6009
6010 2006-07-19  Derek Price  <derek@ximbiot.com>
6011
6012         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
6013         Correct grammar.
6014
6015 2006-07-17  Bruno Haible  <bruno@clisp.org>
6016
6017         * modules/list: New file.
6018         * modules/array-list: New file.
6019         * modules/carray-list, modules/carray-list-tests: New files.
6020         * modules/linked-list, modules/linked-list-tests: New files.
6021         * modules/avltree-list, modules/avltree-list-tests: New files.
6022         * modules/rbtree-list, modules/rbtree-list-tests: New files.
6023         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
6024         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
6025         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
6026         * modules/oset: New file.
6027         * modules/array-oset: New file.
6028         * modules/avltree-oset, modules/avltree-oset-tests: New files.
6029         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
6030         * tests/test-carray_list.c: New file.
6031         * tests/test-linked_list.c: New file.
6032         * tests/test-avltree_list.c: New file.
6033         * tests/test-rbtree_list.c: New file.
6034         * tests/test-linkedhash_list.c: New file.
6035         * tests/test-avltreehash_list.c: New file.
6036         * tests/test-rbtreehash_list.c: New file.
6037         * tests/test-avltree_oset.c: New file.
6038         * tests/test-rbtree_oset.c: New file.
6039         * MODULES.html.sh (Container data structures): New section.
6040
6041 2006-07-17  Bruno Haible  <bruno@clisp.org>
6042
6043         * m4/gl_list.m4: New file.
6044
6045 2006-07-17  Bruno Haible  <bruno@clisp.org>
6046
6047         * lib/gl_list.h: New file.
6048         * lib/gl_list.c: New file.
6049         * lib/gl_array_list.h: New file.
6050         * lib/gl_array_list.c: New file.
6051         * lib/gl_carray_list.h: New file.
6052         * lib/gl_carray_list.c: New file.
6053         * lib/gl_linked_list.h: New file.
6054         * lib/gl_linked_list.c: New file.
6055         * lib/gl_anylinked_list1.h: New file.
6056         * lib/gl_anylinked_list2.h: New file.
6057         * lib/gl_avltree_list.h: New file.
6058         * lib/gl_avltree_list.c: New file.
6059         * lib/gl_anyavltree_list1.h: New file.
6060         * lib/gl_anyavltree_list2.h: New file.
6061         * lib/gl_rbtree_list.h: New file.
6062         * lib/gl_rbtree_list.c: New file.
6063         * lib/gl_anyrbtree_list1.h: New file.
6064         * lib/gl_anyrbtree_list2.h: New file.
6065         * lib/gl_anytree_list1.h: New file.
6066         * lib/gl_anytree_list2.h: New file.
6067         * lib/gl_linkedhash_list.h: New file.
6068         * lib/gl_linkedhash_list.c: New file.
6069         * lib/gl_anyhash_list1.h: New file.
6070         * lib/gl_anyhash_list2.h: New file.
6071         * lib/gl_avltreehash_list.h: New file.
6072         * lib/gl_avltreehash_list.c: New file.
6073         * lib/gl_rbtreehash_list.h: New file.
6074         * lib/gl_rbtreehash_list.c: New file.
6075         * lib/gl_anytreehash_list1.h: New file.
6076         * lib/gl_anytreehash_list2.h: New file.
6077
6078         * lib/gl_oset.h: New file.
6079         * lib/gl_oset.c: New file.
6080         * lib/gl_array_oset.h: New file.
6081         * lib/gl_array_oset.c: New file.
6082         * lib/gl_avltree_oset.h: New file.
6083         * lib/gl_avltree_oset.c: New file.
6084         * lib/gl_rbtree_oset.h: New file.
6085         * lib/gl_rbtree_oset.c: New file.
6086         * lib/gl_anytree_oset.h: New file.
6087
6088 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6089
6090         * m4/mkancesdirs.m4: New file.
6091         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
6092         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
6093         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
6094         it.
6095
6096 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6097
6098         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
6099         * lib/mkancesdirs.h: New files.
6100         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
6101         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
6102         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
6103         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
6104         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
6105         callers changed.  Revamp internals significantly, by not
6106         attempting to create directories that are temporarily more
6107         permissive than the final results.  Do not attempt to use
6108         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
6109         This removes some race conditions, fixes some bugs, and simplifies
6110         things.  Use new dirchownmod function to do owner and mode changes.
6111         * lib/mkdir-p.h: Likewise.
6112         * lib/modechange.c (octal_to_mode): New function.
6113         (struct mode_change): New member mentioned.
6114         (make_node_op_equals): New arg mentioned.  All callers changed.
6115         (mode_compile): Keep track of which mode bits the user has explicitly
6116         mentioned.
6117         (mode_adjust): New arg DIR, so that we implement the X op correctly.
6118         New arg PMODE_BITS, to keep track of which mode bits the user
6119         mentioned; it treats S_ISUID and S_ISGID speciall.
6120         All callers changed.
6121         * lib/modechange.h: Likewise.
6122
6123 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6124
6125         * MODULES.html.sh: Add mkancestors.
6126         * modules/mkancesdirs: New module.
6127         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
6128         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
6129         The chdir-safer and afs files are now orphans; I'll remove them
6130         unless someone speaks up.
6131         Add lib/dirchownmod.c, lib/dirchownmod.h.
6132         (Depends-on): Remove alloca, chown, save-cwd, dirname.
6133         Add lchown, mkancesdirs.
6134         (Maintainer): Add self.
6135
6136 2006-07-15  Karl Berry  <karl@gnu.org>
6137
6138         * gnulib-tool: help message wording/arrangement.
6139
6140 2006-07-14  Simon Josefsson  <jas@extundo.com>
6141
6142         * doc/gnulib.texi (Libtool and Windows): New section.
6143
6144 2006-07-12  Simon Josefsson  <jas@extundo.com>
6145
6146         * modules/gendocs (License): Fix license, approved by Karl.
6147
6148 2006-07-12  Eric Blake  <ebb9@byu.net>
6149
6150         * MODULES.html.sh: Add gendocs.
6151
6152 2006-07-11  Eric Blake  <ebb9@byu.net>
6153
6154         * modules/fdl: New module, to install doc/fdl.texi.
6155         * MODULES.html.sh: Add new section for documentation modules.
6156         * gnulib-tool: Avoid space-tab.
6157         (--doc-base): New option, to manage files from doc.
6158
6159 2006-07-11  Eric Blake  <ebb9@byu.net>
6160
6161         * m4/absolute-header.m4: Fix comments to match recent change.
6162
6163 2006-07-11  Eric Blake  <ebb9@byu.net>
6164
6165         * gnulib-tool: List --doc-base before --tests-base.
6166
6167 2006-07-11  Derek R. Price  <derek@ximbiot.com>
6168
6169         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
6170
6171 2006-07-11  Bruno Haible  <bruno@clisp.org>
6172
6173         * README: Mention where to put documentation.
6174
6175 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6176
6177         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
6178
6179 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6180
6181         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
6182         to stdint.m4.
6183
6184 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6185
6186         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
6187         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
6188         "no/such/file/stdint.h" when there is no such file, so that
6189         the resulting C code can be parsed by dodgy compilers.
6190         Problems reported by Bob Proulx.
6191
6192 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6193
6194         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
6195         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6196         macros into the GNU _D_EXACT_NAMLEN.
6197         * lib/savedir.c:  Likewise.
6198         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
6199
6200 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6201         and Paul Eggert  <eggert@cs.ucla.edu>
6202
6203         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
6204         * m4/savedir.m4:
6205         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6206         macros into the GNU _D_EXACT_NAMLEN.
6207
6208 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6209
6210         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
6211         around the absolute name, to work around a problem with the HP-UX
6212         11.23 native C compiler, reported by Bob Proulx.
6213
6214 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6215
6216         * doc/maintain.texi, make-stds.texi: Sync from
6217         <http://savannah.gnu.org/projects/gnustandards>.
6218
6219 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6220
6221         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
6222
6223 2006-07-09  Jim Meyering  <jim@meyering.net>
6224
6225         * m4/glob.m4: Remove a doubled word in a comment.
6226
6227 2006-07-09  Jim Meyering  <jim@meyering.net>
6228
6229         * lib/argp-pv.c: Remove a doubled word in a comment.
6230         * lib/check-version.c (check_version): Likewise.
6231         * lib/javacomp.c (compile_java_class): Likewise.
6232
6233 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
6234
6235         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
6236         for the benefit of people using Autoconf 2.60.  If you want to
6237         support older Autoconf versions you can copy m4/onceonly_2_57.m4
6238         (or m4/onceonly.m4, if pre-2.57) manually.
6239
6240 2006-07-08  Jim Meyering  <jim@meyering.net>
6241
6242         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
6243         comment.
6244         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
6245         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
6246         comment.
6247
6248 2006-07-08  Jim Meyering  <jim@meyering.net>
6249
6250         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
6251
6252 2006-07-07  Simon Josefsson  <jas@extundo.com>
6253
6254         * tests/test-crc.c: Change expected crc value, the test vector
6255         were probably computed using the old broken crc.c?
6256
6257 2006-07-06  Simon Josefsson  <jas@extundo.com>
6258
6259         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
6260         now the canonical place for the M4 file).
6261
6262         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
6263         from the sys_socket dependency now.
6264
6265         * modules/inet_pton (Files): Ditto.
6266
6267         * modules/inet_ntop (Files): Ditto.
6268
6269 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6270
6271         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
6272         not gl_PREREQ_GETUSERSHELL.
6273
6274 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6275
6276         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
6277         with only one argument, for Autoconf 2.60.
6278         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
6279         expand to nothing, so add a shell command to avoid syntax error.
6280         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6281
6282 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6283
6284         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
6285
6286 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6287
6288         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
6289         no longer needed.  Check for isblank decl.
6290         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
6291         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
6292         of existence.
6293
6294 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6295
6296         * lib/getloadavg.c: Use __VMS, not VMS.
6297         * lib/getopt.c: Likewise.
6298         * lib/getpagesize.h: Likewise.
6299         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
6300         and probably does not work.
6301
6302 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6303
6304         * lib/.cppi-disable: Add wcwidth.
6305         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
6306         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
6307         (ISGRAPH): Remove.  All uses changed to isgraph.
6308         (FOLD) [!defined _LIBC]: Remove special case.
6309         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
6310         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
6311         HAVE_ISBLANK.
6312         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
6313         case.
6314
6315 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6316
6317         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
6318         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
6319         brackets.  Other minor changes to suppress some compiler
6320         warnings.
6321
6322 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6323         and Paul Eggert  <eggert@cs.ucla.edu>
6324
6325         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
6326         of invoking obsolescent AC_HEADER_DIRENT macro.
6327         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
6328         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
6329         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
6330         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
6331         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
6332         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6333         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
6334         * m4/readdir.m4: Remove; no longer needed.
6335
6336 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6337         and Paul Eggert  <eggert@cs.ucla.edu>
6338
6339         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
6340         Don't worry about this obsolete case any more.
6341         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
6342         directories.
6343         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
6344         worry about this obsolete case any more.
6345         * lib/fts.c: Likewise.
6346         * lib/getcwd.c: Likewise.
6347         * lib/glob.h: Likewise.
6348         * lib/savedir.c: Likewise.
6349
6350 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6351
6352         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
6353         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
6354         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
6355         needed.
6356         All uses removed.
6357         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6358         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6359         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
6360         needed.
6361         * m4/getdate.m4 (gl_GETDATE): Likewise.
6362         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6363         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6364         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6365         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6366         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6367         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6368         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
6369         needed.
6370
6371 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6372
6373         * lib/memcasecmp.c: Include <limits.h>.
6374         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
6375         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
6376         Don't assume isdigit succeeds only on '0' through '9'.
6377
6378 2006-07-05  Eric Blake  <ebb9@byu.net>
6379
6380         * modules/getaddrinfo (Depends-on): Add snprintf.
6381
6382 2006-07-05  Eric Blake  <ebb9@byu.net>
6383
6384         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
6385         to avoid 'header present but could not be compiled' on cygwin.
6386
6387 2006-07-05  Eric Blake  <ebb9@byu.net>
6388
6389         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
6390         missing from netdb.h.
6391         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
6392
6393 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6394
6395         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
6396         no longer needed.
6397         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
6398         * m4/getdate.m4 (gl_GETDATE): Likewise.
6399         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6400         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6401         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6402         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6403         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6404
6405 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6406
6407         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
6408         All uses of is_space replaced by isspace.
6409         * lib/exit.h: Don't talk about STDC_HEADERS.
6410         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
6411         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
6412         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
6413         replaced by isprint etc.
6414         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
6415         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6416         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
6417         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
6418         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
6419         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6420
6421 2006-07-05  Bruno Haible  <bruno@clisp.org>
6422
6423         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
6424         the function exists, before testing against AIX.
6425         Reported by Martin Lambers <marlam@marlam.de>.
6426
6427 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6428
6429         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
6430         From Mark D. Baushke.
6431
6432 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6433
6434         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
6435         to the absolute name, not just one, to bypass Sun C 5.8's
6436         "warning: #include of /usr/include/... may be non-portable".
6437
6438 2006-07-04  Eric Blake  <ebb9@byu.net>
6439
6440         * modules/dirname-tests: New test module.
6441         * tests/test-dirname.c: New file, replacing dirname.c
6442         TEST_DIRNAME section that was recently deleted.
6443
6444 2006-07-04  Bruno Haible  <bruno@clisp.org>
6445
6446         Assume ANSI C header files and <ctype.h> functions.
6447         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
6448         (mbsnwidth): Use isprint, iscntrl instead.
6449
6450 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6451
6452         Merge from coreutils.
6453         * MODULES.html.sh: Add xstrtold.
6454         * modules/xstrtold: New file.
6455         * modules/cycle-check (Files): Add lib/same-inode.h.
6456         * modules/dirname (Files): Add m4/double-slash-root.m4.
6457         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
6458         * modules/mkdir-p (Files): Add lib/same-inode.h.
6459         * modules/same (Files): Add lib/same-inode.h.
6460
6461 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6462
6463         * m4/absolute-header.m4: Renamed from full-header-path.m4.
6464         This is to keep the terminology clean; POSIX talks about
6465         "absolute pathnames", not "full pathnames", but the GNU
6466         Coding Standards say to use "path" for something else;
6467         so use "absolute" to keep both sides happy.
6468         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
6469         Set gl_absolute_header, not gl_full_header_path.
6470         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
6471         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
6472         All uses changed.
6473
6474         Merge from coreutils.
6475
6476         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6477
6478         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
6479         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
6480         want to require the building of c-strtod.o.
6481         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
6482         needs -lm directly.
6483         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
6484
6485         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6486
6487         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
6488         --as-needed option if available.  Problem reported by Albert Chin in
6489         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
6490         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
6491         cc merely issues a bunch of annoying warnings for --as-needed
6492         (this problem was reported by Bob Proulx).  Also, try linking with
6493         -lm to detect a bug in binutils 2.16 (this problem was reported
6494         by Ralf Wildenhues).
6495
6496         2006-06-18  Jim Meyering  <jim@meyering.net>
6497
6498         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
6499         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
6500         macro.
6501         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
6502         also check for glibc-2.4's abort-inducing bug.
6503
6504         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
6505         Low-probability clean-up should be to use rmdir to get rid of
6506         the just-created directory, not unlink.
6507
6508         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
6509         configure fail, and request a bug report to inform us about it.
6510         Add a comment that, barring reports to the contrary, in 2007 we'll
6511         assume ftruncate is universally available.
6512
6513         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6514
6515         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
6516
6517         2006-03-12  Jim Meyering  <jim@meyering.net>
6518
6519         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
6520         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
6521         * m4/same.m4 (gl_SAME): Likewise.
6522         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
6523
6524         2006-03-11  Eric Blake  <ebb9@byu.net>
6525
6526         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
6527         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
6528         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
6529         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
6530
6531 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6532
6533         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
6534         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
6535         reported by Mark D. Baushke, one in
6536         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
6537
6538         Merge from coreutils.
6539
6540         * lib/.cppi-disable: Add stdint_.h.
6541         * lib/.cvsignore: Add stdint.h.
6542
6543         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6544
6545         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
6546         both double and long double versions.
6547         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
6548         * lib/xstrtold.c: New file.
6549         * lib/xstrtod.h (xstrtold): New decl.
6550
6551         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
6552
6553         * lib/filemode.c (setst): Remove.
6554         (strmode): Rewrite to avoid setst.  This makes the code shorter,
6555         (arguably) clearer, and the generated code is a bit smaller on my
6556         Debian GNU/Linux stable x86 host.
6557
6558         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6559
6560         * lib/filemode.c: Include "filemode.h" first, to test the interface.
6561         Assume that filemode.h includes sys/types.h and sys/stat.h.
6562         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
6563         (ftypelet): Reorder to put common cases first, for efficiency.
6564         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
6565         to do 'M'.
6566         (strmode): Renamed from mode_string, and now stores 12 bytes instead
6567         of 10, for compatibility with FreeBSD.  All callers changed.
6568         (filemodestring): Now stores 12 bytes instead of 10, and sets file
6569         types that can't be deduced solely from st_mode.  First arg is now a
6570         const pointer.
6571         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
6572         (strmode): Renamed from mode_string.
6573         (filemodestring): New decl.
6574         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
6575         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
6576         needed.
6577         (S_ISPORT, S_ISWHT): New macros, if not already defined.
6578
6579         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
6580
6581         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
6582         fsusage.h now does that.  Include fsusage.h first, to test interface.
6583         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
6584         at most one method (the old code could have generated decls that
6585         didn't conform to C89, not that this was ever exercised).
6586         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
6587
6588         2006-03-19  Jim Meyering  <jim@meyering.net>
6589
6590         Work even in a chroot where d_ino values for entries in "/"
6591         don't match the stat.st_ino values for the same names.
6592         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
6593         number, iterate through all entries again, using lstat instead.
6594         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
6595         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
6596
6597         * lib/getcwd.c (__getcwd): Clarify a comment.
6598         Use memcpy in place of a call to strcpy.
6599
6600         2006-03-12  Jim Meyering  <jim@meyering.net>
6601
6602         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
6603         matches that of the current directory (which we're about to chdir ".."
6604         out of), then save the dev-ino of the parent, instead.
6605
6606         * lib/same-inode.h (SAME_INODE): New file/macro.
6607         * lib/chdir-safer.c (SAME_INODE): Remove definition.
6608         Include "same-inode.h", instead.
6609         * lib/same.c: Likewise.
6610         * lib/cycle-check.h: Include "same-inode.h".
6611         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
6612         * lib/cycle-check.c (SAME_INODE): Remove definition.
6613         * lib/root-dev-ino.h: Include "same-inode.h".
6614
6615         2006-03-11  Eric Blake  <ebb9@byu.net>
6616
6617         * lib/same.c (same_name): s/base_name/last_component/
6618         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
6619         * lib/filenamecat.c (file_name_concat): Likewise.
6620
6621         2006-03-11  Eric Blake  <ebb9@byu.net>,
6622                     Paul Eggert  <eggert@cs.ucla.edu>
6623
6624         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
6625         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
6626         drive prefix.
6627         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
6628         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
6629         (last_component): New method.
6630         * lib/dirname.c (dir_len): Determine when drive letters need a
6631         subsequent slash.  Preserve // when it is special.
6632         (dir_name): Don't append dot when drive letter is absolute.
6633         [TEST_DIRNAME]: Move into a full-blown gnulib test.
6634         * lib/basename.c (base_name): New semantics - malloc the result.
6635         Preserve // when it is special.  Preserve relative files that look
6636         like drive letters.
6637         (base_len): Preserve // when it is special.
6638         (last_component): New method, similar to old base_name semantics.
6639         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
6640         base_name.  Strip redundant slashes from ///.
6641
6642 2006-07-03  Jim Meyering  <jim@meyering.net>
6643
6644         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
6645         macro is used before the first cycle_check call.
6646
6647 2006-07-03  Eric Blake  <ebb9@byu.net>
6648
6649         * modules/dirname (Depends-on): Add xstrndup.
6650
6651 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6652
6653         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
6654         test cases, so that config.log is a bit easier to follow.
6655
6656 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6657
6658         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
6659         both are 64 bits, since this seems to be the tradition, and this
6660         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
6661         we ever run into a host that prefers long long to long in this
6662         case, we'll need another configure-time test.  Problem reported by
6663         Jim Meyering.
6664
6665 2006-07-02  Eric Blake  <ebb9@byu.net>
6666
6667         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
6668
6669 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6670
6671         * modules/inttypes (Depends-on): No longer depends on stdint.
6672         * modules/stdint (Description): Say more about assumptions.
6673         Say that the fast types might differ.  Say macros are used.
6674         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
6675         (Makefile.am): Revise list of substituted symbols to match
6676         new stdint.m4.
6677         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
6678         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
6679         * tests/test-stdint.c (verify_same_types)
6680         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
6681         the code conforms to C99/C89.
6682         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
6683         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
6684
6685 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6686
6687         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
6688         but fix a bug, by requiring at least 64 bits.
6689         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
6690         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
6691         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
6692         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
6693
6694         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
6695         changes.  Make 2.59 a prerequisite.  Check and substitute for
6696         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
6697         inttypes.h.  Do not use special include files; just use the
6698         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
6699         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
6700         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
6701         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
6702         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
6703         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
6704         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
6705         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
6706         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
6707         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
6708         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
6709         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
6710         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
6711         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
6712         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
6713         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
6714         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
6715         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
6716         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
6717         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
6718         WINT_MAX.  Check for C99 conformance more strictly, by detecting
6719         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
6720         not check for things that C99 does not require, e.g., int8_t.  If
6721         a test isn't needed unless <stdint.h> isn't working, and is
6722         unlikely to be needed for any other reason, then don't do it
6723         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
6724         size_t, since we assume C89 freestanding at least.  Do not check
6725         for sig_atomic_t, wchar_t, or wint_t, since the code now does
6726         the right thing even if the types are not defined.  Instead use:
6727         (gl_STDINT_TYPE_PROPERTIES): New macro.
6728         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
6729         testing whether <sys/types.h> clashes, as Autoconf does this for
6730         us now.  All uses removed.
6731         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
6732         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
6733         (gl_CHECK_TYPE_SAME):
6734         Remove; no longer needed.
6735         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
6736         exists, since we'll return 0 anyway in that case.
6737         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
6738
6739 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6740
6741         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
6742         possible collision with system files.
6743         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
6744         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
6745         WCHAR_MIN and WCHAR_MAX in this case.
6746         (<stddef.h>): Do not include; no longer needed.
6747         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
6748         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
6749         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
6750         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
6751         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
6752         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
6753         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
6754         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
6755         !defined(__c99))]: Include in this case too, since it's harmless
6756         now.
6757         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
6758         dangerous to do so.
6759         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
6760         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
6761         (_STDINT_MIN, _STDINT_MAX): New macros.
6762         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
6763         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
6764         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
6765         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
6766         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
6767         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
6768         macros, not typedefs; this simplifies things quite a bit.
6769         Use long int for all types narrower than int64_t.
6770         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
6771         Define in terms of long long int or int64_t or long int,
6772         not int64_t or int32_t.  This saves some compile-time testing.
6773         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
6774         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
6775         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
6776         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
6777         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
6778         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
6779         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
6780         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
6781         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
6782         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
6783         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
6784         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
6785         undef any previous version and define our own version, for
6786         simplicity and consistency with the new macros for types.
6787         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
6788         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
6789         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
6790         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
6791         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
6792         @WINT_T_SUFFIX@ to keep things simple here.
6793         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
6794         Simplify by assuming typical 8/16/32/64 host, since we're
6795         already doing that elsewhere anyway.
6796         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
6797         and assume long long int is 64 bits if available.  This
6798         speeds up 'configure'.
6799
6800 2006-07-01  Eric Blake  <ebb9@byu.net>
6801
6802         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
6803         Reported by Andreas Buening.
6804
6805 2006-07-01  Eric Blake  <ebb9@byu.net>
6806
6807         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
6808
6809 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6810
6811         * lib/getaddrinfo.c: fixed typo
6812
6813 2006-06-29  Jim Meyering  <jim@meyering.net>
6814
6815         * modules/strftime (Maintainer): Add my name, since with the
6816         FPRINTFTIME changes strftime.c has forked from glibc.
6817
6818 2006-06-29  Eric Blake  <ebb9@byu.net>
6819
6820         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
6821
6822 2006-06-29  Eric Blake  <ebb9@byu.net>
6823
6824         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
6825
6826 2006-06-29  Eric Blake  <ebb9@byu.net>
6827
6828         * lib/stat_.h: New file.
6829
6830 2006-06-29  Eric Blake  <ebb9@byu.net>
6831
6832         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
6833         unused static function.
6834
6835 2006-06-29  Eric Blake  <ebb9@byu.net>
6836
6837         * doc/functions.texi (Function Portability): Document missing lstat
6838         on mingw.
6839
6840 2006-06-29  Eric Blake  <ebb9@byu.net>
6841
6842         * MODULES.html.sh: Add sys_stat.
6843         * modules/sys_stat: New module.
6844         * modules/mkstemp (Depends-on): Add sys_stat.
6845
6846 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6847
6848         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
6849
6850 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6851
6852         * m4/c-bs-a.m4: Removed.
6853
6854 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6855
6856         * lib/strftime.c: Assume strftime() exists.
6857
6858 2006-06-29  Derek Price  <derek@ximbiot.com>
6859
6860         * modules/c-bs-a: Removed - \a is C89.
6861         * MODULES.html.sh: Remove c-bs-a.
6862
6863 2006-06-29  Bruno Haible  <bruno@clisp.org>
6864
6865         * modules/wcwidth (License): Change to LGPL.
6866
6867 2006-06-28  Simon Josefsson  <jas@extundo.com>
6868
6869         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
6870         on _WIN32.
6871
6872         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
6873         getnameinfo.
6874
6875 2006-06-28  Simon Josefsson  <jas@extundo.com>
6876
6877         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
6878
6879 2006-06-28  Simon Josefsson  <jas@extundo.com>
6880
6881         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
6882         functions there.  It will succeed on Windows XP, but on Windows
6883         2000 and (presumably) earlier, it will fail, and use the internal
6884         re-implementation.
6885         (use_win32_p): New function.
6886         (getaddrinfo): Use strtoul on servname, to support numeric ports.
6887         Support AI_NUMERICSERV to disable getservbyname.
6888         (getnameinfo): New function, only supports
6889         NI_NUMERICHOST|NI_NUMERICSERV for now.
6890
6891         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
6892         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
6893         getnameinfo.
6894
6895 2006-06-28  Eric Blake  <ebb9@byu.net>
6896
6897         * modules/wcwidth: New file.
6898         * modules/mbchar (Depends-on): Add wcwidth.
6899         * modules/mbswidth (Depends-on): Add wcwidth.
6900         * MODULES.html.sh: Add wcwidth.
6901
6902 2006-06-28  Eric Blake  <ebb9@byu.net>
6903
6904         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
6905         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
6906
6907 2006-06-28  Eric Blake  <ebb9@byu.net>
6908
6909         * lib/xvasprintf.h: Fix comments.
6910
6911 2006-06-28  Eric Blake  <ebb9@byu.net>
6912
6913         * lib/mbchar.h (wcwidth): Include wcwidth.h.
6914         * lib/mbswidth.c (wcwidth): Move from here...
6915         * lib/wcwidth.h: ...to this new file.
6916
6917 2006-06-28  Derek R. Price  <derek@ximbiot.com>
6918
6919         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
6920
6921         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
6922         it's obsolete.
6923         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
6924
6925 2006-06-28  Derek R. Price  <derek@ximbiot.com>
6926
6927         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
6928         Autoconf 2.60 says this stuff was obsolete.
6929
6930 2006-06-28  Bruno Haible  <bruno@clisp.org>
6931
6932         * modules/wcwidth (Files): Add m4/wchar_t.m4.
6933
6934 2006-06-28  Bruno Haible  <bruno@clisp.org>
6935
6936         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
6937         gt_TYPE_WCHAR_T.
6938
6939 2006-06-28  Bruno Haible  <bruno@clisp.org>
6940
6941         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
6942         declaration for wcwidth.
6943         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
6944
6945 2006-06-28  Bruno Haible  <bruno@clisp.org>
6946
6947         * lib/mkdtemp.c [MINGW]: Include <io.h>.
6948         (mkdir): Define using _mkdir.
6949
6950 2006-06-28  Bruno Haible  <bruno@clisp.org>
6951
6952         * lib/getaddrinfo.h: Fix POSIX URL.
6953         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
6954         _WIN32.
6955         (use_win32_p): Make static.
6956         (getaddrinfo): Reject service name if it is empty or does not consist
6957         solely of decimal digits, or if its value is > 65535.
6958         (getnameinfo): Remove useless casts.
6959
6960 2006-06-27  Simon Josefsson  <jas@extundo.com>
6961
6962         * modules/sys_select: New file, suggested by Bruno Haible, Paul
6963         Eggert and Martin Lambers.
6964
6965 2006-06-27  Simon Josefsson  <jas@extundo.com>
6966
6967         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
6968         Eggert and Martin Lambers.
6969
6970 2006-06-27  Bruno Haible  <bruno@clisp.org>
6971
6972         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
6973         result to 0, not to empty.
6974         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
6975
6976 2006-06-27  Bruno Haible  <bruno@clisp.org>
6977
6978         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
6979
6980 2006-06-26  Simon Josefsson  <jas@extundo.com>
6981
6982         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
6983         present.
6984
6985 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
6986
6987         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
6988         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
6989         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
6990
6991 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
6992
6993         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
6994
6995 2006-06-26  Bruno Haible  <bruno@clisp.org>
6996
6997         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
6998
6999 2006-06-26  Bruno Haible  <bruno@clisp.org>
7000
7001         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
7002
7003 2006-06-26  Bruno Haible  <bruno@clisp.org>
7004
7005         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
7006         SGI C compiler in pre-C99 mode.
7007         Suggested by Mark D. Baushke and Larry Jones.
7008
7009 2006-06-26  Bruno Haible  <bruno@clisp.org>
7010
7011         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
7012         WCHAR_MAX.
7013         Reported by Mark D. Baushke and Larry Jones.
7014
7015 2006-06-26  Bruno Haible  <bruno@clisp.org>
7016
7017         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
7018         in pre-C99 mode.
7019         Suggested by Mark D. Baushke and Larry Jones.
7020
7021 2006-06-23  Simon Josefsson  <jas@extundo.com>
7022             Bruno Haible  <bruno@clisp.org>
7023
7024         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
7025         Emit mostlyclean-local rule.
7026         (func_emit_tests_Makefile_am): Likewise.
7027         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
7028
7029 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
7030
7031         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
7032
7033 2006-06-23  Bruno Haible  <bruno@clisp.org>
7034
7035         * tests/test-stdint.c: Update to match ISO C 99 Technical
7036         Corrigendum 1.
7037
7038 2006-06-23  Bruno Haible  <bruno@clisp.org>
7039
7040         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
7041
7042 2006-06-23  Bruno Haible  <bruno@clisp.org>
7043
7044         * lib/stdint_.h: Treat IRIX like OpenBSD.
7045
7046 2006-06-23  Bruno Haible  <bruno@clisp.org>
7047
7048         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
7049         ISO C 99 Technical Corrigendum 1.
7050
7051 2006-06-22  Simon Josefsson  <jas@extundo.com>
7052
7053         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
7054         MinGW.
7055
7056 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
7057
7058         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
7059         needed.  Some compiler complained about some of them.  Problem reported
7060         by Larry Jones in
7061         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
7062
7063 2006-06-21  Simon Josefsson  <jas@extundo.com>
7064
7065         * tests/test-getaddrinfo.c: New file.
7066
7067         * modules/getaddrinfo-tests: New file.
7068
7069         * MODULES.html.sh: Add inet_pton.
7070
7071         * modules/inet_pton: New file.
7072
7073 2006-06-21  Simon Josefsson  <jas@extundo.com>
7074
7075         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
7076         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
7077         of using the (limited) gnulib implementation on Windows XP.
7078
7079         * m4/inet_pton.m4: New file.
7080
7081 2006-06-21  Simon Josefsson  <jas@extundo.com>
7082
7083         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
7084         variable.
7085
7086         * lib/socket_.h: Don't define WINVER.
7087
7088         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
7089         slightly modified to work in gnulib.
7090
7091 2006-06-21  Simon Josefsson  <jas@extundo.com>
7092
7093         * doc/gnulib.texi (Windows sockets): Add.
7094
7095 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
7096
7097         * lib/read-file.c (fread_file): Start with buffer allocation of
7098         0 bytes rather than 1 byte; this simplifies the code.
7099         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
7100         code to free buffer and save/restore errno.
7101         (internal_read_file): Remove unused local.
7102
7103 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
7104
7105         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
7106         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
7107         Problem reported by Denis Excoffier in
7108         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
7109
7110 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7111
7112         * modules/sys_socket, modules/socklen: Include sys/types since
7113         FreeBSD 4.x's sys/socket.h needs it.
7114
7115 2006-06-19  Simon Josefsson  <jas@extundo.com>
7116
7117         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
7118
7119 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7120
7121         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
7122
7123 2006-06-19  Bruno Haible  <bruno@clisp.org>
7124
7125         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
7126         and FULL_PATH_INTTYPES_H in angle brackets.
7127         Reported by Mark D. Baushke <mdb@gnu.org>.
7128
7129 2006-06-17  Eric Blake  <ebb9@byu.net>
7130
7131         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
7132         errno.
7133
7134 2006-06-17  Bruno Haible  <bruno@clisp.org>
7135
7136         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
7137         <sys/inttypes.h>.
7138
7139 2006-06-17  Bruno Haible  <bruno@clisp.org>
7140
7141         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
7142         whether errno is declared. Assume <errno.h> declares errno.
7143
7144 2006-06-17  Bruno Haible  <bruno@clisp.org>
7145
7146         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
7147
7148 2006-06-17  Bruno Haible  <bruno@clisp.org>
7149
7150         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
7151         problem on Solaris 2.5.1.
7152
7153 2006-06-16  Eric Blake  <ebb9@byu.net>
7154
7155         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
7156         * lib/unicodeio.c [!defined errno]: Likewise.
7157         * lib/strtol.c [!defined errno]: Likewise.
7158         * lib/strtod.c [!defined errno]: Likewise.
7159
7160 2006-06-15  Eric Blake  <ebb9@byu.net>
7161
7162         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
7163
7164 2006-06-15  Eric Blake  <ebb9@byu.net>
7165
7166         * config/srclist.txt (ssize_t.m4): Lose sync.
7167
7168 2006-06-15  Bruno Haible  <bruno@clisp.org>
7169
7170         * modules/stdint (Files): Include m4/full-header-path.m4,
7171         m4/size_max.m4, m4/wchar_t.m4.
7172         (Makefile.am): Many more substitutions.
7173         * modules/stdint-tests: New file.
7174         * tests/test-stdint.c: New file.
7175
7176 2006-06-15  Bruno Haible  <bruno@clisp.org>
7177
7178         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
7179         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
7180         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
7181         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
7182         gl_CHECK_TYPE_SAME): New macros.
7183
7184 2006-06-15  Bruno Haible  <bruno@clisp.org>
7185
7186         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
7187
7188 2006-06-15  Bruno Haible  <bruno@clisp.org>
7189
7190         * lib/stdint_.h: Rewritten to be fully auto-configured.
7191         Fixes bug on HP-UX/IA64.
7192
7193 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
7194
7195         * lib/getdate.y (__attribute__): Don't define if already defined.
7196         Problem reported by Larry Jones.
7197         * lib/utimens.c (__attribute__): Likewise.
7198
7199 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
7200
7201         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
7202         reported by Andreas Schwab.
7203
7204 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7205             Bruno Haible  <bruno@clisp.org>
7206
7207         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
7208         check for the declaration of strnlen and a run test that exposes the
7209         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
7210         rpl_strndup.
7211
7212 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7213             Bruno Haible  <bruno@clisp.org>
7214
7215         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
7216
7217 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7218
7219         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
7220         compile test, for Tru64 4.0D.
7221
7222 2006-05-28  Karl Berry  <karl@gnu.org>
7223
7224         * config/srclist.txt (printf-args.c): lose sync.
7225
7226 2006-05-26  Martin Lambers  <marlam@marlam.de>
7227
7228         * lib/getpass.c: Updates the test for the native W32 API, and adds
7229         missing includes, thus fixing compilation warnings.
7230
7231 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7232
7233         * lib/exclude.c (exclude_fnmatch): New function.
7234         (excluded_file_name): Call exclude_fnmatch.
7235         * lib/exclude.h (excluded_file_name): New prototype
7236
7237 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
7238
7239         * lib/tempname.c (small_open, large_open): New macros.
7240         (__open, __open64) [!_LIBC]: Remove.
7241         (__gen_tempname): Use small_open and large_open instead of __open
7242         and __open64.  This fixes a portability bug on HP-UX 11.11i
7243         reported by Simon Wing-Tang in
7244         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
7245
7246 2006-05-24  Bruno Haible  <bruno@clisp.org>
7247
7248         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
7249         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
7250         Reported by Thorsten Maerz <torte@netztorte.de> via
7251         Aaron Stone <aaron@serendipity.cx>.
7252
7253 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7254
7255         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
7256         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
7257         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
7258         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
7259         not really conditional on the cache.
7260         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
7261
7262 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7263
7264         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
7265         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
7266         (my_usleep): Don't mishandle maximum value.
7267
7268 2006-05-19  Jim Meyering  <jim@meyering.net>
7269
7270         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
7271
7272 2006-05-17  Bruno Haible  <bruno@clisp.org>
7273
7274         Cygwin portability.
7275         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
7276
7277 2006-05-17  Bruno Haible  <bruno@clisp.org>
7278
7279         * lib/stdint_.h: Fix recognition of Cygwin.
7280
7281 2006-05-15  Bruno Haible  <bruno@clisp.org>
7282
7283         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
7284         on libtool patch by Ralf Wildenhues.
7285
7286 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
7287
7288         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
7289         test for C99 conformance; (bool) 0.5 is an integer constant
7290         expression, but (bool) -0.5 is not.  Problem reported by Fedor
7291         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
7292
7293 2006-05-11  Simon Josefsson  <jas@extundo.com>
7294
7295         * m4/xvasprintf.m4: Fix obvious typo.
7296
7297 2006-05-11  Jim Meyering  <jim@meyering.net>
7298
7299         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
7300         James Lemley.
7301
7302 2006-05-10  Simon Josefsson  <jas@extundo.com>
7303
7304         * lib/md4.c: Typo fix, update copyright years.
7305         (K1, K2): Don't use L because it turn computations into 64-bit on
7306         64-bit platforms.
7307
7308 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
7309
7310         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
7311         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
7312         unwanted sign propagation, e.g., on hosts with 64-bit int.
7313         There still are some problems with reeelly weird theoretical hosts
7314         (e.g., 33-bit int) but it's not worth worrying about now.
7315         * lib/sha1.c (rol): Likewise.
7316         (K1, K2, K3, K4): Remove unnecessary L suffix.
7317
7318 2006-05-10  Bruno Haible  <bruno@clisp.org>
7319
7320         * lib/des.c: Cast to avoid warnings.
7321
7322 2006-05-09  Bruno Haible  <bruno@clisp.org>
7323
7324         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
7325         (Depends-on): Depend also on xsize, stdarg.
7326         (configure.ac): Add gl_XVASPRINTF.
7327
7328 2006-05-09  Bruno Haible  <bruno@clisp.org>
7329
7330         * m4/xvasprintf.m4: New file.
7331
7332 2006-05-09  Bruno Haible  <bruno@clisp.org>
7333
7334         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
7335         (EOVERFLOW): Define fallback value.
7336         (xstrcat): New function.
7337         (xvasprintf): Recognize the special case of a string concatenation.
7338
7339 2006-05-08  Eric Blake  <ebb9@byu.net>
7340
7341         * gnulib-tool (func_version): Base copyright year on CVS date.
7342         (func_emit_copyright_notice): New function.
7343         (func_emit_lib_Makefile_am): Use it.
7344         (func_emit_tests_Makefile_am): Likewise.
7345         (func_import): Likewise.
7346
7347 2006-05-08  Bruno Haible  <bruno@clisp.org>
7348
7349         * modules/stdarg: New file.
7350         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
7351
7352 2006-05-08  Bruno Haible  <bruno@clisp.org>
7353
7354         * m4/stdarg.m4: New file, from GNU gettext.
7355
7356 2006-05-08  Bruno Haible  <bruno@clisp.org>
7357
7358         * config/srclist.txt (build-aux/config.rpath): different from latest
7359         release.
7360
7361 2006-05-08  Bruno Haible  <bruno@clisp.org>
7362
7363         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
7364
7365 2006-05-05  Jim Meyering  <jim@meyering.net>
7366
7367         * m4/warning.m4: New file, derived from bison's file by the same name.
7368
7369 2006-05-03  Bruno Haible  <bruno@clisp.org>
7370
7371         * lib/stdint_.h: Shorter URL.
7372         * lib/inttypes.h: Likewise.
7373
7374 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7375
7376         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
7377
7378 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7379
7380         * lib/verify.h: Document the internals better.  Most of this change
7381         was written by Bruno Haible.
7382
7383 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7384
7385         * doc/verify.texi: New file, partly based on a proposal by
7386         Bruno Haible.
7387
7388 2006-05-02  Bruno Haible  <bruno@clisp.org>
7389
7390         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
7391         test from here...
7392         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
7393
7394 2006-04-29  Bruno Haible  <bruno@clisp.org>
7395
7396         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
7397         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
7398
7399 2006-04-29  Bruno Haible  <bruno@clisp.org>
7400
7401         * gnulib-tool: Make --update option actually work.
7402
7403 2006-04-29  Bruno Haible  <bruno@clisp.org>
7404
7405         * doc/gcd.texi: New file.
7406         * doc/gnulib.texi: Include it.
7407
7408 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
7409
7410         * lib/getdate.y (get_date): When adding relative date, start with the
7411         initial time, not with the result of the first mktime call.
7412
7413 2006-04-25  Bruno Haible  <bruno@clisp.org>
7414
7415         * gnulib-tool (func_import): Output the include directives in three
7416         blocks, sorted separately.
7417         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7418
7419 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7420
7421         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
7422         to define main with arguments, for C++.  Reported by Eric Blake.
7423         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
7424         Prefer 'int main ()' to 'int main (void)', for C++.
7425         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
7426         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
7427         for 'main', for C99 and C++.
7428
7429 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7430
7431         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
7432         Don't assume that exit status -1 is valid.
7433         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7434         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
7435         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
7436         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
7437         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
7438         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
7439         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
7440         functions can be used without declaring them, or that you can
7441         exit with status -1.
7442         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
7443
7444 2006-04-24  Karl Berry  <karl@gnu.org>
7445
7446         * config/srclist.txt (longdouble.m4): sync lost.
7447
7448 2006-04-24  Eric Blake  <ebb9@byu.net>
7449
7450         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
7451
7452 2006-04-24  Bruno Haible  <bruno@clisp.org>
7453
7454         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
7455         poll() implementation in AIX.
7456         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7457
7458 2006-04-24  Bruno Haible  <bruno@clisp.org>
7459
7460         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
7461         assigned exactly once.
7462
7463 2006-04-23  Claudio Fontana  <claudio@gnu.org>
7464             Bruno Haible  <bruno@clisp.org>
7465
7466         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
7467         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
7468         for AM_CPPFLAGS.
7469
7470 2006-04-23  Bruno Haible  <bruno@clisp.org>
7471
7472         * modules/copy-file: Depend on unistd.
7473         * modules/execute: Likewise.
7474         * modules/fatal-signal: Likewise.
7475         * modules/findprog: Likewise.
7476         * modules/mkdtemp : Likewise.
7477         * modules/pipe: Likewise.
7478         * modules/wait-process: Likewise.
7479
7480 2006-04-23  Bruno Haible  <bruno@clisp.org>
7481
7482         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
7483         condition was already detected.
7484         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7485
7486 2006-04-23  Bruno Haible  <bruno@clisp.org>
7487
7488         * lib/copy-file.c: Include <unistd.h> unconditionally.
7489         * lib/execute.c: Likewise.
7490         * lib/fatal-signal.c: Likewise.
7491         * lib/findprog.c: Likewise.
7492         * lib/mkdtemp.c: Likewise.
7493         * lib/pipe.h: Likewise.
7494         * lib/pipe.c: Likewise.
7495         * lib/wait-process.h: Likewise.
7496
7497 2006-04-23  Bruno Haible  <bruno@clisp.org>
7498
7499         * gnulib-tool (func_usage): Fix --import description. Document
7500         --update.
7501         (func_import): Create temporary file in a temporary directory, if
7502         --dry-run is specified. Silence errors from 'grep' when there are no
7503         m4 files in $m4dir.
7504         (func_create_testdir): Silence errors from 'grep' when there are no
7505         m4 files in $m4dir.
7506         Reported by Karl Berry <karl@freefriends.org>.
7507
7508 2006-04-20  Bruno Haible  <bruno@clisp.org>
7509
7510         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
7511         one argument, so that the code will be portable to Autoconf 2.60.
7512         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
7513         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7514         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
7515
7516 2006-04-19  Derek Price  <derek@ximbiot.com>
7517             Eric Blake  <ebb9@byu.net>
7518
7519         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
7520         rather than "/full/path.h".  Update comment to match.  Shorten &
7521         generalize m4_translit call via AS_TR_CPP.
7522
7523 2006-04-19  Derek Price  <derek@ximbiot.com>
7524             Eric Blake  <ebb9@byu.net>
7525
7526         * lib/inttypes.h: Correct grammar in comment.
7527
7528 2006-04-18  Derek Price  <derek@ximbiot.com>
7529             Paul Eggert  <eggert@cs.ucla.edu>
7530
7531         * modules/inttypes: New file.
7532         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
7533
7534 2006-04-18  Derek Price  <derek@ximbiot.com>
7535             Paul Eggert  <eggert@cs.ucla.edu>
7536
7537         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
7538         New files.
7539
7540 2006-04-18  Derek Price  <derek@ximbiot.com>
7541             Paul Eggert  <eggert@cs.ucla.edu>
7542
7543         * lib/inttypes.h: New file.
7544         * lib/strtoimax.c: Assume <inttypes.h>.
7545
7546 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
7547
7548         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
7549         isn't mounted.  Problem reported by Kir Kolyshkin.
7550
7551 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
7552
7553         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
7554         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
7555         Derek R. Price.
7556         * lib/regex.h (RE_DUP_MAX): Update comment to match current
7557         implementation.
7558
7559 2006-04-12  Eric Blake  <ebb9@byu.net>
7560
7561         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
7562         is now done automatically by the corresponding Autoconf macro.
7563
7564 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
7565
7566         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
7567         time_r.h.
7568
7569 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7570
7571         Merge regex changes from libc, removing some of our
7572         POSIX-conformance changes that were rejected and redoing them in a
7573         less-intrusive way.
7574
7575         * lib/regcomp.c (re_compile_internal, init_dfa):
7576         Length arg is now size_t, not Idx.  All uses changed.
7577         (peek_token): Forward decl now says internal_function.
7578         (__re_error_msgid, __re_error_msgid_idx):
7579         Now static rather than extern with attribute_hidden.
7580         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
7581         For some reason libc prefers K&R style defns for external functions.
7582         (regerror) [!defined _LIBC]: Likewise.
7583         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
7584         (seek_collating_symbol_entry, lookup_collation_sequence_value):
7585         (build_range_exp, build_collating_symbol):
7586         Use K&R-style defn.
7587         (re_compile_fastmap): Use '\0' to memset, not 0.
7588         (utf8_sb_map): Make the calculations more obvious.
7589         (init_dfa, parse_bracket_exp, build_charclass_op):
7590         Call calloc and cast result, as glibc does.
7591         (init_word_char, fetch_token, peek_token, peek_token_bracket):
7592         (build_range_exp, build_collating_symbol):
7593         Now internal functions.
7594
7595         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
7596
7597         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
7598         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
7599         Don't depend on VMS; depend on __VMS instead, for POSIX
7600         namespace cleanness.
7601         (regoff_t): Define to ssize_t, not long int.
7602
7603         Remove the REG_ macros named below.  Instead, make the old names
7604         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
7605         __USE_GNU_REGEX.
7606         (REG_BACKSLASH_ESCAPE_IN_LISTS):
7607         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
7608         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
7609         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
7610         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
7611         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
7612         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
7613         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
7614         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
7615         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
7616         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
7617         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
7618         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
7619         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
7620         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
7621         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
7622         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
7623         (REG_NREGS):
7624         Remove.  All uses replaced by the old RE_* names.
7625         (RE_BACKSLASH_ESCAPE_IN_LISTS):
7626         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
7627         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
7628         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
7629         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
7630         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
7631         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
7632         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
7633         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
7634         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
7635         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
7636         Don't bother having these macros be independent of each others'
7637         values, since they no longer exist in the POSIX name space.
7638
7639         Rename the following member names back to their old names,
7640         unless !__USE_GNU_REGEX.  All uses changed back.
7641         (buffer): Renamed from re_buffer.
7642         (allocated): Renamed from re_allocated.
7643         (used): Renamed from re_used.
7644         (syntax): Renamed from re_syntax.
7645         (fastmap): Renamed from re_fastmap.
7646         (translate): Renamed from re_translate.
7647         (can_be_null): Renamed from re_can_be_null.
7648         (regs_allocated): Renamed from re_regs_allocated.
7649         (fastmap_accurate): Renamed from re_fastmap_accurate.
7650         (no_sub): Renamed from re_no_sub.
7651         (not_bol): Renamed from re_not_bol.
7652         (not_eol): Renamed from re_not_eol.
7653         (newline_anchor): Renamed from re_newline_anchor.
7654         (num_regs): Renamed from rm_num_regs.
7655         (start): Renamed from rm_start.
7656         (end): Renamed from rm_end.
7657
7658         (free_state): Move up a bit.
7659
7660         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
7661         #define to be empty.
7662         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
7663         when that is what is intended.
7664         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
7665         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
7666         (MAX): New macro.
7667         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
7668         All uses changed back to re_malloc, etc.  It's now the caller's
7669         responsibility to check for overflow; all callers changed.
7670         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
7671         (re_x2nrealloc): Remove.
7672         (free_state): Remove decl.
7673
7674         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
7675         (re_set_registers, re_exec):
7676         Use K&R-style defn.
7677
7678         2006-01-31  Roland McGrath  <roland@redhat.com>
7679
7680         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
7681         Reported by Mike Frysinger <vapier@gentoo.org>.
7682
7683         2006-01-15  Andreas Jaeger  <aj@suse.de>
7684
7685         [BZ #1950]
7686         * lib/regex_internal.c (re_string_reconstruct): Adjust for
7687         build_wcs_upper_buffer change.
7688         (build_wcs_upper_buffer): Change return type.
7689
7690         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
7691
7692         * lib/regex_internal.h: Include <stdint.h> if available.
7693
7694         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
7695
7696         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
7697
7698         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7699
7700         * lib/regcomp.c: Adjust for changed secondary hash function.
7701
7702         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
7703
7704         * lib/regex.h: Pretty printing.
7705         Clean up namespace a bit.
7706
7707         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
7708
7709         * lib/regexec.c (update_cur_sifted_state, check_arrival,
7710         check_arrival_add_next_nodes): Avoid using uninitialized variable.
7711
7712         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
7713                     Ulrich Drepper  <drepper@redhat.com>
7714
7715         [BZ #1302]
7716         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
7717         changed.
7718         (bitset_word_t): Renamed from bitset_word.  All uses changed.
7719
7720         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
7721
7722         [BZ #281]
7723         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
7724         * lib/regcomp.c: Remove unnecessary uses of
7725         unsigned RE_TRANSLATE_TYPE.
7726         * lib/regex_internal.h: Likewise.
7727         * lib/regex_internal.c: Likewise.
7728         * lib/regexec.c: Likewise.
7729         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
7730
7731         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
7732
7733         * lib/regexec.c (find_recover_state): Remove unnecessary
7734         initialization.
7735         (transit_state_bkref): Make DFA a const pointer.
7736         (get_subexp): Likewise.
7737         (check_arrival): Likewise.
7738         (update_cur_sifted_state): Likewise.
7739         (re_search_internal): Likewise.
7740         (prune_impossible_nodes): Likewise.
7741         (acquire_init_state_context): Likewise.
7742         (proceed_next_node): Likewise.
7743         (set_regs): Likewise.
7744         (free_fail_stack_return): Likewise.
7745         (check_arrival_expand_ecl): Mark DFA parameter as const.
7746         (check_arrival_expand_ecl_sub): Likewise.
7747         (check_subexp_limits): Likewise.
7748         (sub_epsilon_src_nodes):  Likewise.
7749         (add_epsilon_src_nodes):  Likewise.
7750         (merge_state_array): Likewise.
7751         (update_regs): Likewise.
7752         (build_trtable): Likewise.
7753         (sift_states_backward): Mark MCTX parameter as const.
7754         (build_sifted_states): Likewise.
7755         (update_cur_sifted_state): Likewise.
7756         (sift_states_mkref): Likewise.
7757         (check_arrival_expand_ecl): Mark eclosure as const.
7758         (check_dst_limits_calc_pos_1): Likewise.
7759         * lib/regex_internal.h (re_match_context_t): Make dfa a const
7760         pointer.
7761
7762         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
7763
7764         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
7765         (transit_state_sb): Likewise.
7766         (transit_state_mb): Likewise.
7767         (sift_states_iter_mb): Likewise.
7768         (check_arrival_add_next_nodes): Likewise.
7769         (check_node_accept_bytes): Change first parameter to pointer-to-const.
7770         [_LIBC] (re_search_2_stub): Use mempcpy.
7771
7772         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
7773         mbrtowc for very simple UTF-8 case.
7774
7775         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
7776         a pointer-to-const.
7777         (re_acquire_state_context): Likewise.
7778         * lib/regex_internal.h: Adjust prototypes.
7779
7780         * lib/regex.c: Prevent using C++ compilers.
7781
7782         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
7783         (re_acquire_state_context): Likewise.
7784
7785 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7786
7787         * modules/regex (Depends-on): Add ssize_t.
7788
7789 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7790
7791         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
7792         translation table.
7793
7794 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7795
7796         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
7797
7798 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
7799             Bruno Haible  <bruno@clisp.org>
7800
7801         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
7802         <sys/types.h> and <inttypes.h>.
7803
7804 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7805
7806         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
7807         `__error_t_defined', so argp.h will not typedef the former.
7808
7809 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
7810
7811         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
7812         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
7813         glibc names.  Even if glibc is changed to conform to POSIX, the
7814         traditional names will be available anyway, since regex depends on
7815         the extensions module.  Also, fix a longstanding typo in the
7816         implementation of Spencer ERE test #75 from grep 2.3.  Problems
7817         reported by Emanuele Giaquinta.  Also, change sense of cached
7818         variable, so that the message makes sense.
7819
7820 2006-03-24  Simon Josefsson  <jas@extundo.com>
7821
7822         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
7823         including some doc fixes.
7824         (base64_encode_alloc): Fix +1 bug on allocation failures.
7825
7826 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7827
7828         * lib/base64.c (base64_encode): Do not read past end of array with
7829         unsanitized input on systems with CHAR_BIT > 8.
7830
7831 2006-03-24  Eric Blake  <ebb9@byu.net>
7832
7833         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
7834
7835 2006-03-22  Karl Berry  <karl@gnu.org>
7836
7837         * config/srclist.txt (*setenv.[ch]): get from coreutils.
7838         * config/srclistvars.sh (COREUTILS): new var.
7839
7840 2006-03-17  Jim Meyering  <jim@meyering.net>
7841
7842         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
7843         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
7844
7845 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
7846
7847         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
7848         no longer needs it.  Instead, check that regoff_t is as least
7849         as wide as ptrdiff_t.
7850
7851         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
7852         so that our regex.h stays compatible with the installed regex.
7853         This is helpful for installers who configure --without-included-regex.
7854         Problem reported by Emanuele Giaquinta.
7855
7856 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
7857
7858         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
7859         Typedef to long int, not to off_, as POSIX will likely change
7860         in that direction.
7861
7862 2006-03-15  Eric Blake  <ebb9@byu.net>
7863
7864         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
7865
7866 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7867
7868         * lib/argp-help.c (validate_uparams): Fix typo
7869         * lib/argp-parse.c (argp_default_options): Consistently begin help
7870         messages with a lowercase letter.
7871
7872 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
7873
7874         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
7875         overrun buffers and shouldn't be used (much as gets shouldn't be
7876         used).
7877         * lib/time_r.c (asctime_r, ctime_r): Likewise.
7878
7879 2006-03-08  Simon Josefsson  <jas@extundo.com>
7880
7881         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
7882         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7883
7884 2006-03-08  Simon Josefsson  <jas@extundo.com>
7885
7886         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
7887         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7888
7889 2006-03-08  Simon Josefsson  <jas@extundo.com>
7890
7891         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
7892         signal that configure disabled the device.
7893
7894 2006-03-08  Simon Josefsson  <jas@extundo.com>
7895
7896         * build-aux/maint.mk: Fix refresh-po, to handle no translated
7897         languages.
7898
7899 2006-03-07  Simon Josefsson  <jas@extundo.com>
7900
7901         * modules/getopt (Depends-on): Add unistd.
7902
7903         * modules/unistd: New file.
7904
7905 2006-03-07  Simon Josefsson  <jas@extundo.com>
7906
7907         * modules/gc-random: New file.
7908
7909 2006-03-07  Simon Josefsson  <jas@extundo.com>
7910
7911         * m4/unistd_h.m4: New file.
7912
7913 2006-03-07  Simon Josefsson  <jas@extundo.com>
7914
7915         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
7916         test to be side-effect free by storing the result in the cache
7917         variable gl_cv_lib_readline, and moving the assignment of
7918         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
7919         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7920
7921 2006-03-07  Simon Josefsson  <jas@extundo.com>
7922
7923         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
7924         error on missing devices (the functions will return an error).
7925
7926         * m4/gc.m4: Move random stuff to gc-random.m4
7927
7928 2006-03-07  Simon Josefsson  <jas@extundo.com>
7929
7930         * lib/unistd_.h: New file.
7931
7932 2006-03-07  Simon Josefsson  <jas@extundo.com>
7933
7934         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
7935
7936 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7937
7938         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
7939         Problem reported by Juan Manuel Guerrero.
7940
7941 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7942
7943         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
7944         the unistd module.
7945         * lib/getlogin_r.c: Likewise.
7946         * lib/getlogin_r.h: Likewise.
7947         * lib/glob.c: Likewise.
7948         * lib/pagealign_alloc.c: Likewise.
7949         * lib/unistd_.h: Remove; no longer needed.
7950
7951 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7952
7953         * MODULES.html.sh (Support for systems lacking POSIX:2001):
7954         Add unistd.
7955         * modules/c-stack (Depends-on): Add unistd.
7956         * modules/getlogin_r: Likewise.
7957         * modules/glob: Likewise.
7958         * modules/pagealign_alloc: Likewise.
7959         * modules/unistd (Files): Remove lib/unistd_.h.
7960         (EXTRA_DIST): Remove.
7961         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
7962         need unistd_.h.
7963         (MOSTLYCLEANFILES): Remove unistd.h-t.
7964
7965 2006-03-03  Simon Josefsson  <jas@extundo.com>
7966
7967         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
7968
7969 2006-03-03  Simon Josefsson  <jas@extundo.com>
7970
7971         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
7972         libidn and bison.
7973
7974 2006-03-03  Simon Josefsson  <jas@extundo.com>
7975
7976         * build-aux/maint.mk: Add indent target.
7977
7978 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
7979
7980         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
7981         our replacement poll.h in any case, to avoid a differing
7982         declaration from a system header.  Seen on AIX.
7983
7984 2006-03-01  Simon Josefsson  <jas@extundo.com>
7985
7986         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
7987         <kasal@ucw.cz>.
7988
7989 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7990
7991         * modules/gettime (Depends-on): Add extensions module.
7992         * modules/nanosleep (Depends-on): Likewise.
7993         * modules/settime (Depends-on): Likewise.
7994
7995 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7996
7997         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
7998         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
7999         pedantically.
8000         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8001         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
8002
8003         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
8004         not "==".  Reported by Ralf Wildenhues.
8005
8006 2006-03-01  Karl Berry  <karl@gnu.org>
8007
8008         * doc/Copyright/request-*: new files, synced from gnuorg.
8009
8010 2006-03-01  Karl Berry  <karl@gnu.org>
8011
8012         * config/srclist.txt (Copyright/*): new entries.
8013
8014 2006-02-28  Simon Josefsson  <jas@extundo.com>
8015
8016         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
8017
8018 2006-02-27  Simon Josefsson  <jas@extundo.com>
8019
8020         * lib/base64.h: Indent #define's.  From Jim Meyering
8021         <jim@meyering.net>.
8022
8023 2006-02-27  Jim Meyering  <jim@meyering.net>
8024
8025         Revert the change of 2006-02-24, so these files can continue
8026         to be sync'd from gettext.
8027         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
8028         of `config.h'.
8029
8030 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
8031
8032         * modules/intprops: New file.
8033         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8034         Add intprops.
8035         * modules/getloadavg (Files): Remove lib/intprops.h.
8036         (Depends-on): Add intprops.
8037         * modules/human: Likewise.
8038         * modules/inttostr: Likewise.
8039         * modules/openat: Likewise.
8040         * modules/sig2str: Likewise.
8041         * modules/userspec: Likewise.
8042         * modules/utimecmp: Likewise.
8043         * modules/xnanosleep: Likewise.
8044         * modules/xstrtol: Likewise.
8045
8046 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
8047
8048         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
8049         * modules/lock-tests (TESTS): Use $(EXEEXT).
8050         * modules/tls-tests: Likewise.
8051         * modules/argp-tests: Likewise.
8052         (check_PROGRAMS): New var, replacing...
8053         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
8054
8055 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8056
8057         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
8058         `config.h'.
8059
8060 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
8061
8062         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
8063
8064 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8065
8066         Sync from coreutils.
8067         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
8068         gl_CHDIR_SAFER.
8069
8070 2006-02-22  Jim Meyering  <jim@meyering.net>
8071
8072         Sync from coreutils.
8073         * m4/chdir-safer.m4: New file.
8074
8075 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
8076
8077         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
8078         AT_FDCWD exceeds INT_MAX.
8079         * lib/openat.h (AT_FDCWD): Likewise.
8080
8081 2006-02-17  Eric Blake  <address@hidden>
8082
8083         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
8084
8085 2006-02-16  Simon Josefsson  <jas@extundo.com>
8086
8087         * modules/getaddrinfo (Depends-on): Add sys_socket.
8088
8089 2006-02-15  Simon Josefsson  <jas@extundo.com>
8090
8091         * build-aux/maint.mk: Add dsyntax-check rule.
8092
8093 2006-02-15  Eric Blake  <ebb9@byu.net>
8094
8095         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
8096         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
8097         'present but cannot compile' warnings on cygwin.
8098         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
8099         use ws2tcpip.h if sys/socket.h works.
8100         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
8101         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
8102
8103 2006-02-14  Simon Josefsson  <jas@extundo.com>
8104
8105         * modules/maintainer-makefile (Files): Rename.
8106
8107         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
8108         and (the local) Makefile.cfg to maint-cfg.mk.
8109
8110         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
8111         to the latter.
8112
8113         * modules/maintainer-makefile: New module.
8114
8115         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
8116         severaly stripped to make it possible to build it up from scratch
8117         with reliable tests.
8118
8119         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
8120         fixes to permit overriding the default actions when configure and
8121         makefile are not available.
8122
8123 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
8124
8125         Sync from coreutils.
8126         * modules/lstat (Depends-on): Don't depend on xalloc.
8127         (License): Change from GPL to LGPL, since this is now simply a
8128         replacement for a libc function.
8129
8130 2006-02-14  Jim Meyering  <jim@meyering.net>
8131
8132         Sync from coreutils.
8133
8134         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
8135         failure on deficient systems, and simplify gnulib lgpl dependencies.
8136         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
8137         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
8138
8139         * lib/xalloc-die.c: Remove unused definition of N_.
8140
8141 2006-02-14  Jim Meyering  <jim@meyering.net>
8142
8143         Sync from coreutils.
8144         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
8145         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
8146         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
8147         double-quote uses of that variable, to accommodate the rare case in
8148         which getmntent is available in none of the libraries checked.  This
8149         happens at least on FreeBSD 5.0.
8150
8151 2006-02-13  Simon Josefsson  <jas@extundo.com>
8152
8153         * gnulib-tool (Usage): Fix --import, from
8154         karl@freefriends.org (Karl Berry).
8155
8156 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8157
8158         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
8159
8160 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8161
8162         * lib/argp-namefrob.h: Restore changes accidentally lost during the
8163         "autoupdate" on 2005-12-12.
8164
8165 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8166
8167         * modules/closeout (Depends-on): Remove atexit.
8168
8169 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8170
8171         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
8172         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
8173
8174 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
8175
8176         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
8177         __EXTENSIONS__ if this causes compilation to fail.  Problem
8178         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
8179         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
8180
8181 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
8182
8183         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
8184         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
8185         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
8186         All uses changed.
8187
8188 2006-01-26  Simon Josefsson  <jas@extundo.com>
8189
8190         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
8191         prototype is visible on mingw32.
8192
8193         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
8194         for mingw32.
8195
8196         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
8197         mingw32).
8198
8199 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
8200
8201         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
8202         attempt to open for write; this always fails, at least on POSIX
8203         hosts.  This reinstates the 2006-01-09 change, which was
8204         inadvertently removed.
8205
8206 2006-01-26  Bruno Haible  <bruno@clisp.org>
8207
8208         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
8209         Reported by Paul Eggert.
8210
8211 2006-01-26  Bruno Haible  <bruno@clisp.org>
8212             Paul Eggert  <eggert@cs.ucla.edu>
8213
8214         * lib/stdbool_.h (_Bool)
8215         [(! (defined __cplusplus || defined __BEOS__)
8216           && !defined __GNUC__
8217           && !(defined __HP_cc || defined __xlc__
8218                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
8219                || defined __sgi))]:
8220         #define to signed char in these cases too; this simplifies
8221         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
8222         etc., separately) and makes it more conservative.
8223
8224 2006-01-25  Simon Josefsson  <jas@extundo.com>
8225
8226         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
8227         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
8228         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
8229
8230 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8231
8232         * lib/argp-namefrob.h: Bugfix. Remove stray #
8233
8234 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
8235
8236         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
8237         so that we test the test.
8238         Check for yet another HP-UX cc bug involving *bool |= bool.
8239
8240 2006-01-25  Karl Berry  <karl@gnu.org>
8241
8242         * config/srclist.txt (vasnprintf.c): sync lost.
8243
8244 2006-01-25  Jim Meyering  <jim@meyering.net>
8245
8246         Sync from the stable (b5) branch of coreutils:
8247
8248         * lib/fts.c (fts_children): Don't let close() clobber errno from
8249         failed fchdir().
8250
8251         * lib/fts.c (fts_stat): When following a symlink-to-directory,
8252         don't necessarily interpret stat-fails+lstat-succeeds as indicating
8253         a dangling symlink.  That can also happen at least for ELOOP.
8254         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
8255         FYI, this bug predates the inclusion of fts.c in coreutils.
8256
8257         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
8258         in their own block, so pre-c99 compilers don't object.
8259
8260         Avoid the double-free (first in fts_read, second in fts_close) that
8261         would occur when an `active' directory is made inaccessible (e.g.,
8262         via chmod a-x) during a traversal.
8263         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8264         before returning.  Reproduce this failure by
8265         mkdir -p a/b; cd a; chmod a-x . b
8266         Reported by Stavros Passas.
8267
8268 2006-01-25  Jim Meyering  <jim@meyering.net>
8269
8270         * lib/fileblocks.c: Remove more useless parentheses.
8271         * lib/readutmp.h: Likewise.
8272
8273 2006-01-25  Bruno Haible  <bruno@clisp.org>
8274
8275         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
8276         warnings.
8277         Reported by Paul Eggert.
8278
8279 2006-01-25  Bruno Haible  <bruno@clisp.org>
8280
8281         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
8282         rid of a trap command. For Solaris sh.
8283         Reported by Mark D. Baushke <mdb@gnu.org>.
8284
8285 2006-01-24  Simon Josefsson  <jas@extundo.com>
8286
8287         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
8288         Bruno.
8289
8290 2006-01-24  Karl Berry  <karl@gnu.org>
8291
8292         * config/srclist.txt (argp-namefrob.h): sync lost.
8293
8294 2006-01-24  Jim Meyering  <jim@meyering.net>
8295
8296         * modules/openat (Files): Add lib/intprops.h.
8297         From Mark D. Baushke.
8298
8299 2006-01-24  Jim Meyering  <jim@meyering.net>
8300
8301         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
8302         Reported by Mark D. Baushke.
8303
8304 2006-01-24  Jim Meyering  <jim@meyering.net>
8305
8306         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
8307
8308 2006-01-24  Bruno Haible  <bruno@clisp.org>
8309
8310         * modules/strnlen (Maintainer): Change from glibc to all.
8311
8312 2006-01-24  Bruno Haible  <bruno@clisp.org>
8313
8314         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
8315         Patch by Paul Eggert.
8316
8317 2006-01-24  Bruno Haible  <bruno@clisp.org>
8318
8319         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
8320         already has it.
8321         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
8322         2005-11-26.
8323
8324         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
8325         'signed char' to avoid problems with the built-in _Bool type.
8326         Reported by Paul Eggert on 2005-11-26.
8327
8328 2006-01-24  Bruno Haible  <bruno@clisp.org>
8329
8330         * gnulib-tool (func_import): Avoid constructing complicated sed
8331         expressions inside backquote.
8332         Report and solution by Mark D. Baushke <mdb@gnu.org>.
8333
8334 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
8335
8336         These changes imported from libc.
8337         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
8338         test and two separate function calls.
8339         * lib/strndup.c (__strndup): Add libc_hidden_def.
8340
8341 2006-01-23  Simon Josefsson  <jas@extundo.com>
8342
8343         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
8344         Remove the test_*_SOURCES variable: automake infers it by default.
8345         * modules/tls-tests: Likewise.
8346
8347 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8348
8349         Work around porting bugs reported by Dieter in
8350         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
8351         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
8352         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
8353         Include "getopt.h" first, to check interface.
8354         (getenv): Declare only if defined HAVE_DECL_GETENV &&
8355         !HAVE_DECL_GETENV.
8356         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
8357         (__strndup): Revert to K&R-style function dfns, the glibc style.
8358         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
8359         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
8360         Include strnlen.h first, to get prototype properly.
8361         (strnlen): Renamed from __strnlen.
8362         Remove weak alias.
8363
8364 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8365
8366         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
8367
8368 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8369
8370         * config/srclist.txt: Adjust to reflect glibc reorganization.
8371         This affects only comments.
8372
8373 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8374
8375          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
8376          Reported by Bruce Korb <bkorb@gnu.org>.
8377
8378 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
8379
8380         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
8381         to pacify gcc -Wswitch-default.
8382
8383 2006-01-22  Bruno Haible  <bruno@clisp.org>
8384
8385         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
8386         temporary buffer for sprintf, take into account the precision also
8387         for 'd', 'i', 'u', 'o', 'x', 'X'.
8388
8389 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8390
8391         * modules/argp-tests: New module
8392         * tests/test-argp.c: New file
8393         * tests/test-argp-2.sh: New file
8394
8395 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8396
8397         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
8398         (__argp_base_name): Removed
8399         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
8400         typo.
8401         (__argp_base_name): Provide macro definition or extern declaration
8402         depending on the configuration
8403
8404 2006-01-20  Simon Josefsson  <jas@extundo.com>
8405
8406         * modules/inet_ntop (Depends-on): Depend on sys_socket.
8407
8408 2006-01-20  Simon Josefsson  <jas@extundo.com>
8409
8410         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
8411
8412 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
8413
8414         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
8415         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
8416         Suggested by Bruno Haible.
8417
8418 2006-01-20  Karl Berry  <karl@gnu.org>
8419
8420         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
8421         until changes propagate, I guess.
8422
8423 2006-01-19  Simon Josefsson  <jas@extundo.com>
8424
8425         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
8426
8427 2006-01-19  Simon Josefsson  <jas@extundo.com>
8428
8429         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
8430
8431 2006-01-19  Simon Josefsson  <jas@extundo.com>
8432
8433         * gnulib-tool: Set check_PROGRAMS.
8434
8435         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8436         modules/des-tests, modules/gc-arcfour-tests,
8437         modules/gc-arctwo-tests, modules/gc-des-tests,
8438         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8439         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8440         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8441         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8442         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8443         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
8444         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
8445         test_*_SOURCES.
8446
8447 2006-01-18  Simon Josefsson  <jas@extundo.com>
8448
8449         * modules/socklen (Depends-on): Depend on sys_socket.
8450
8451 2006-01-18  Simon Josefsson  <jas@extundo.com>
8452
8453         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8454         modules/des-tests, modules/gc-arcfour-tests,
8455         modules/gc-arctwo-tests, modules/gc-des-tests,
8456         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8457         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8458         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8459         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8460         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8461         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
8462         $(EXEEXT) to automake TESTS variable, for mingw32.
8463
8464 2006-01-17  Simon Josefsson  <jas@extundo.com>
8465
8466         * modules/socklen (Include): Need sys/socket.h.
8467
8468 2006-01-17  Bruno Haible  <bruno@clisp.org>
8469
8470         * modules/ssize_t (Include): Add <sys/types.h>.
8471
8472 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
8473
8474         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
8475         it's not portable and it doesn't work with cross-compiles.
8476         Problem reported by Bruno Haible.  Fix missing-$ typo in
8477         'test "gl_cv_ignore_unused_libraries" ...' that prevented
8478         -zignore from being used with Sun's C compiler.
8479
8480 2006-01-12  Simon Josefsson  <jas@extundo.com>
8481
8482         * lib/base64.c: Fix warning, reported by Bruno Haible
8483         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
8484
8485 2006-01-12  Bruno Haible  <bruno@clisp.org>
8486
8487         * modules/ldd: New file.
8488         * build-aux/ldd.sh.in: New file.
8489         * MODULES.html.sh (Support for building libraries and executables): Add
8490         ldd.
8491
8492 2006-01-12  Bruno Haible  <bruno@clisp.org>
8493
8494         * m4/ldd.m4: New file.
8495
8496 2006-01-12  Bruno Haible  <bruno@clisp.org>
8497
8498         * gnulib-tool (func_import, func_create_testdir): Don't go into an
8499         endless loop while replacing $auxdir with build-aux.
8500
8501 2006-01-11  Simon Josefsson  <jas@extundo.com>
8502
8503         * lib/stdint_.h (SIZE_MAX): Add missing (.
8504
8505 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
8506
8507         Sync from coreutils.
8508         * lib/md5.c: Fix commentary typos.
8509         (alignof, UNALIGNED_P): No need for a GCC-specific version.
8510         * lib/md5.h (__attribute__): Remove; unused.
8511         * lib/sha1.c: Fix commentary to match md5 better.
8512         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
8513         so that we don't need to worry about alignment.  All uses changed.
8514         This merges the 2005-10-28 md5 change into sha1.
8515
8516 2006-01-11  Jim Meyering  <jim@meyering.net>
8517
8518         Sync from coreutils.
8519         * lib/md5.c (OP): Fix spacing.
8520
8521 2006-01-11  Bruno Haible  <bruno@clisp.org>
8522
8523         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8524         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
8525         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
8526
8527 2006-01-11  Bruno Haible  <bruno@clisp.org>
8528
8529         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8530         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
8531         the "early" section as well.
8532
8533 2006-01-11  Bruno Haible  <bruno@clisp.org>
8534
8535         Avoid "ar: no archive members specified" error on MacOS X.
8536         * gnulib-tool (func_modules_add_dummy): New function.
8537         (func_import, func_create_testdir): Invoke it.
8538
8539 2006-01-11  Bruno Haible  <bruno@clisp.org>
8540
8541         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
8542         with $auxdir in AC_CONFIG_FILES statements.
8543
8544 2006-01-11  Bruno Haible  <bruno@clisp.org>
8545
8546         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8547         Initialize also noinst_HEADERS to empty.
8548
8549 2006-01-11  Bruno Haible  <bruno@clisp.org>
8550
8551         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
8552         variables.
8553         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
8554         autoreconf.
8555
8556 2006-01-11  Bruno Haible  <bruno@clisp.org>
8557
8558         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
8559         overridable by the user.
8560         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8561
8562 2006-01-10  Simon Josefsson  <jas@extundo.com>
8563
8564         * modules/sys_socket: New file.
8565
8566 2006-01-10  Simon Josefsson  <jas@extundo.com>
8567
8568         * m4/sys_socket_h.m4: New file.
8569
8570 2006-01-10  Simon Josefsson  <jas@extundo.com>
8571
8572         * lib/socket_.h: New file.
8573
8574 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8575
8576         * modules/readutmp (Maintainer): Add myself.
8577
8578 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8579
8580         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
8581         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
8582         People who are still concerned with buggy memcmp implementations
8583         can invoke gl_FUNC_MEMCMP themselves.
8584
8585 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8586
8587         * lib/regex_internal.h (BITSET_WORD_BITS):
8588         Work around a bug in 64-bit PGC (before version 6.1-2), where the
8589         preprocessor mishandles large unsigned values as if they were signed.
8590         Problem reported by Claudio Fontana in
8591         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
8592
8593 2006-01-10  Jim Meyering  <jim@meyering.net>
8594
8595         Avoid the double-free (first in fts_read, second in fts_close) that
8596         would occur when an `active' directory is made inaccessible (e.g.,
8597         via chmod a-x) during a traversal.
8598         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8599         before returning.  Reproduce this failure by
8600         mkdir -p a/b; cd a; chmod a-x . b
8601         Reported by Stavros Passas.
8602
8603         Sync from coreutils.
8604         * lib/sha1.c: Tweak grammar in a comment.
8605
8606 2006-01-10  Jim Meyering  <jim@meyering.net>
8607
8608         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
8609         Patch by Joerg Sonnenberger.
8610
8611 2006-01-10  Bruno Haible  <bruno@clisp.org>
8612
8613         * modules/readutmp: Depend on module free.
8614         * modules/strtok_r: Depend on module restrict.
8615
8616 2006-01-10  Bruno Haible  <bruno@clisp.org>
8617
8618         * modules/gettext (configure.ac): Add an invocation of
8619         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
8620
8621 2006-01-10  Bruno Haible  <bruno@clisp.org>
8622
8623         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
8624         Reported by Werner Lemberg <wl@gnu.org>.
8625
8626 2006-01-10  Bruno Haible  <bruno@clisp.org>
8627
8628         * lib/localcharset.c: Update from GNU gettext.
8629
8630 2006-01-10  Bruno Haible  <bruno@clisp.org>
8631
8632         * lib/argp.h (__const): Remove macro. Use const instead.
8633         * lib/argp-fmtstream.h (__const): Likewise.
8634         * lib/glob_.h (__const): Remove macro.
8635         * lib/glob-libc.h: Use const instead of __const.
8636
8637 2006-01-10  Bruno Haible  <bruno@clisp.org>
8638
8639         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
8640         variable.
8641         Needed to avoid an automake error regarding the 'gettext' module.
8642
8643 2006-01-09  Simon Josefsson  <jas@extundo.com>
8644
8645         * modules/inet_ntop (Depends-on): Add restrict.
8646
8647 2006-01-09  Simon Josefsson  <jas@extundo.com>
8648
8649         * modules/gc-rijndael-tests (License): Put under LGPL.
8650
8651         * modules/gc-des-tests (License): Likewise.
8652
8653         * modules/gc-arcfour-tests (License): Likewise.
8654
8655         * modules/gc-arctwo-tests (License): Likewise.
8656
8657         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
8658
8659         * modules/gc-hmac-sha1-tests (Files): Likewise.
8660
8661         * modules/gc-hmac-md5-tests (License): Likewise.
8662
8663         * modules/gc-sha1-tests (License): Likewise.
8664
8665         * modules/gc-md5-tests (License): Likewise.
8666
8667         * modules/gc-md4-tests (License): Likewise.
8668
8669         * modules/gc-md2-tests (License): Likewise.
8670
8671         * modules/gc-tests (License): Likewise.
8672
8673         * modules/des-tests (License): Likewise.
8674
8675         * modules/md4-tests (License): Likewise.
8676
8677         * modules/md2-tests (License): Likewise.
8678
8679 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8680
8681         Sync from coreutils:
8682
8683         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
8684         * modules/lib-ignore: New file.
8685         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
8686         chdir-safer.m4, lchmod.m4.
8687         * modules/openat: Add mkdirat.c, openat-priv.h.
8688
8689 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8690
8691         Sync from coreutils.
8692         * m4/lib-ignore.m4: New file.
8693         * m4/lchmod.m4: New file.
8694
8695 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8696
8697         Sync from coreutils.
8698         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
8699         for write access: POSIX says that must fail.
8700         * lib/fts.c (diropen): Likewise.
8701         * lib/save-cwd.c (save_cwd): Likewise.
8702         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
8703         well, for minor improvements on hosts that lack O_DIRECTORY.
8704         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
8705         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
8706         Fall back on chown if open failed with EACCES.
8707
8708         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
8709         Report an error at compile-time if only a 1-second nominal clock
8710         resolution is found.
8711
8712         * lib/lchmod.h: New file.
8713         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
8714         (make_dir_parents): Use lchown rather than chown, and
8715         lchmod rather than chmod.
8716
8717         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
8718         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
8719         "proc" reported by n0dalus.
8720
8721         * lib/mountlist.c: Include <limits.h>.
8722         (dev_from_mount_options)
8723         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
8724         New function.  It no longer assumes "dev=" has the System V meaning
8725         on Linux (since it doesn't).  It also parses "dev=" more carefully.
8726         (read_file_system_list)
8727         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
8728         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
8729         dev= in that case.
8730
8731         * lib/posixtm.h (PDS_PRE_2000): New macro.
8732         * lib/posixtm.c (year): Arg is now syntax_bits rather than
8733         allow_century.  All usages changed.  Reject dates outside the range
8734         1969-1999 if PDS_PRE_2000 is used.
8735
8736 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8737
8738         Sync from coreutils.
8739         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
8740         (Time of day items): Mention the possibility of leap seconds.
8741         Problem reported by Dr. David Alan Gilbert.
8742
8743 2006-01-09  Jim Meyering  <jim@meyering.net>
8744
8745         Sync from coreutils.
8746
8747         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
8748
8749         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
8750
8751         * lib/modechange.c (mode_compile): Reject an invalid mode string
8752         that starts with an octal digit.  From Andreas Gruenbacher.
8753
8754         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
8755         and dup to open_safer and dup_safer, respectively.
8756         (openat_permissive): Fix typo in comment.
8757
8758         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
8759         "gettext.h"; either no longer needed or are guaranteed by openat.h.
8760         (_): Remove; no longer needed.
8761         (openat): Renamed from rpl_openat; no need for rpl_openat
8762         since openat.h renames openat for us.
8763         Replace most of the body with a call to openat_permissive,
8764         to avoid duplicate code.
8765         Port to (probably hypothetical) environments were mode_t is
8766         wider than int.
8767         (openat_permissive): Require mode arg, so that we can check
8768         types better.  Put it just after flags.  Change cwd failure
8769         indicator from pointer-to-bool to pointer-to-errno-value.
8770         All callers changed.
8771         Invoke openat_save_fail and/or openat_restore_fail if
8772         cwd_errno is null, so that openat can call us.
8773         (openat_permissive, fdopendir, fstatat, unlinkat):
8774         Simplify errno handling to avoid some duplicate code,
8775         as it's OK to set errno on success.
8776         * lib/openat.h: Revamp code so that function macros depend on
8777         __OPENAT_PREFIX only, not also on AT_FDCWD.
8778         (openat_ro): Remove.  Caller changed to use openat_permissive.
8779         (openat_permissive): Now a macro, if not a function.
8780         (openat_restore_fail, openat_save_fail): Now always functions,
8781         since mkdirat needs them even if __OPENAT_PREFIX is defined.
8782
8783         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
8784         and openat.c.
8785         * lib/mkdirat.c: Include openat-priv.h.
8786         Remove definitions of macros defined therein.
8787         * lib/openat.c: Likewise.
8788
8789         * lib/mkdirat.c (mkdirat): New file and function.
8790         * lib/openat.h (mkdirat): Declare.
8791
8792         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
8793
8794         * lib/openat.h (openat_permissive): Declare.
8795         (openat_ro): Define.
8796
8797         * lib/openat.c (EXPECTED_ERRNO): New macro.
8798         (openat_permissive): New function -- used in remove.c rewrite.
8799         (all functions): Set errno just before returning, only if there
8800         was an actual failure.
8801         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
8802
8803         Emulate openat-family functions using Linux's procfs, if possible.
8804         Idea and some code based on Ulrich Drepper's glibc changes.
8805
8806         * lib/openat.c: (BUILD_PROC_NAME): New macro.
8807         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
8808         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
8809         before falling back on save_cwd and restore_cwd.
8810         (fdopendir, fstatat, unlinkat): Likewise.
8811
8812         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
8813         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
8814
8815         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
8816         as second argument to va_arg.  Otherwise, some versions of gcc
8817         warn that `if this code is reached, the program will abort'.
8818
8819 2006-01-09  Jim Meyering  <jim@meyering.net>
8820
8821         Sync from coreutils.
8822         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
8823         Require openat-priv.h.
8824
8825 2006-01-09  Bruno Haible  <bruno@clisp.org>
8826
8827         * modules/strnlen (Include): Use strnlen.h.
8828
8829 2006-01-09  Bruno Haible  <bruno@clisp.org>
8830
8831         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
8832
8833 2006-01-09  Bruno Haible  <bruno@clisp.org>
8834
8835         * lib/sysexit_.h (EX_OK): New macro.
8836         Suggested by Martin Lambers <marlam@marlam.de>.
8837
8838 2006-01-09  Bruno Haible  <bruno@clisp.org>
8839
8840         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
8841         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
8842
8843 2006-01-09  Bruno Haible  <bruno@clisp.org>
8844
8845         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
8846         numbers.
8847
8848 2006-01-09  Bruno Haible  <bruno@clisp.org>
8849
8850         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
8851         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
8852         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
8853         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
8854
8855 2006-01-09  Bruno Haible  <bruno@clisp.org>
8856
8857         * build-aux/javacomp.sh.in: New file, moved from lib/.
8858         * modules/javacomp-script (Files): Update.
8859         (configure.ac): Add AC_CONFIG_FILES invocation.
8860         (EXTRA_DIST): Remove variable.
8861
8862         * build-aux/javaexec.sh.in: New file, moved from lib/.
8863         * modules/javaexec (Files): Update.
8864         (configure.ac): Add AC_CONFIG_FILES invocation.
8865         (EXTRA_DIST): Remove javaexec.sh.in.
8866
8867         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
8868         * modules/csharpcomp-script (Files): Update.
8869         (configure.ac): Add AC_CONFIG_FILES invocation.
8870         (EXTRA_DIST): Remove variable.
8871
8872         * build-aux/csharpexec.sh.in: New file, moved from lib/.
8873         * modules/csharpexec (Files): Update.
8874         (configure.ac): Add AC_CONFIG_FILES invocation.
8875         (EXTRA_DIST): Remove csharpexec.sh.in.
8876
8877 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
8878
8879         Sync from coreutils.
8880
8881         Add POSIX ACL support
8882         * lib/acl.h (copy_acl, set_acl): Add declarations.
8883         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
8884         systems other than Linux.
8885         (chmod_or_fchmod): New function: use fchmod when possible,
8886         and chmod otherwise.
8887         (file_has_acl): Add a POSIX ACL implementation, with a
8888         Linux-specific subcase.
8889         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
8890         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
8891         acls are unsupported.
8892         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
8893         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
8894         are unsupported.
8895
8896 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
8897
8898         Sync from coreutils.
8899         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
8900
8901 2006-01-07  Bruno Haible  <bruno@clisp.org>
8902
8903         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
8904         gl_EARLY.
8905
8906 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8907
8908         * lib/strftime.c (tzname): Don't declare if it is already #defined.
8909         Problem reported for Mingw by Mark Junker.
8910
8911 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8912
8913         * README: Gnulib normally doesn't generate a tarball.
8914
8915 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
8916
8917         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
8918         long int, not int, for nanosecond counts, so that people who are
8919         used to POSIX struct timespec won't be surprised.  Reported by Jim
8920         Meyering.
8921
8922 2005-12-28  Bruno Haible  <bruno@clisp.org>
8923
8924         * build-aux/config.rpath: Update from GNU gettext.
8925
8926 2005-12-16  Jim Meyering  <jim@meyering.net>
8927
8928         * modules/fprintftime: New module.
8929         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
8930
8931 2005-12-16  Jim Meyering  <jim@meyering.net>
8932
8933         * m4/fprintftime.m4: New file.
8934
8935 2005-12-16  Jim Meyering  <jim@meyering.net>
8936
8937         * lib/fprintftime.c, lib/fprintftime.h: New files.
8938
8939 2005-12-15  Simon Josefsson  <jas@extundo.com>
8940
8941         * modules/socklen (configure.ac): Fix M4 macro name, to align with
8942         new m4/socklen.m4.
8943
8944 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8945
8946         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
8947         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
8948
8949 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8950
8951         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
8952         * lib/argp-help.c (fill_in_uparams): Check if the constructed
8953         struct uparams is valid. Fall back to the default values if it is
8954         not.
8955
8956 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8957
8958         * modules/argp (Files): Add argp-pin.c
8959         (Depends-on): dirname
8960         (lib_SOURCES): Add argp-pin.c
8961
8962 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8963
8964         * m4/argp.m4:  Check if program_invocation_name and
8965         program_invocation_short_name are declared and define appropriate
8966         macros if they are not.
8967
8968 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8969
8970         * lib/argp-help.c (__argp_base_name): New function
8971         (__argp_short_program_name): Rewrite using __argp_base_name
8972         * lib/argp-namefrob.h: Define program_invocation_name and
8973         program_invocation_short_name if requested
8974         (__argp_base_name): Add prototype
8975         * lib/argp-parse.c (argp_def): Use gettext wrappers
8976         (argp_default_parser): Use __argp_base_name
8977         * lib/argp-pin.c: New file. Defines program_invocation_name and
8978         program_invocation_short_name on systems that lack them.
8979
8980 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8981
8982         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
8983         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8984         porting problem reported by Georg Schwarz in
8985         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8986
8987 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8988
8989         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
8990         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8991         porting problem reported by Georg Schwarz in
8992         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8993
8994 2005-12-05  Bruno Haible  <bruno@clisp.org>
8995
8996         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
8997         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
8998         Reported by Mark Junker <mjscod@gmx.de>.
8999
9000 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
9001
9002         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
9003         Use implementation from Albert Chin, with some
9004         comments/corrections by Stepan Kasal and myself.
9005
9006 2005-12-02  Bruno Haible  <bruno@clisp.org>
9007
9008         * gnulib-tool (func_import): Accept GPLed build tool modules when
9009         --lgpl is given.
9010         * modules/csharpcomp-script: New file.
9011         * modules/csharpcomp: Depend on it.
9012         * modules/javacomp-script: New file.
9013         * modules/javacomp: Depend on it.
9014         Suggested by Simon Josefsson.
9015
9016 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
9017
9018         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
9019         statement, to work around an HP-UX 10.20 compiler bug reported by
9020         Peter O'Gorman.
9021
9022 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9023
9024         * modules/savedir (Depends-on): Add openat.
9025
9026 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9027
9028         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
9029         (uintmax_t) [defined uintmax_t]: Do not declare.
9030         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
9031         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
9032         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
9033         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
9034         sake of portability to weird hosts that C allows (though we don't
9035         know of any practical examples).
9036
9037         * lib/savedir.h (fdsavedir): New decl.
9038         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
9039         contains most of the former guts of savedir.
9040         (savedir): Use savedirstream.
9041         Include "openat.h".
9042
9043 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
9044
9045         * modules/obstack (Files): Add m4/ulonglong.m4.
9046         Problem reported by Davide Angelocola.
9047
9048 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
9049
9050         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
9051         coreutils no longer futzes with rounding modes.
9052
9053 2005-11-14  Jim Meyering  <jim@meyering.net>
9054
9055         * lib/mkstemp-safer.c: Include <config.h>, required for possible
9056         replacement of mkstemp.
9057
9058 2005-11-10  Simon Josefsson  <jas@extundo.com>
9059
9060         * lib/readline.c: Remove EOL.
9061
9062 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9063
9064         * modules/gethrxtime (Depends-on): Add gettime.
9065
9066 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9067
9068         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
9069         or gettimeofday; no longer needed.
9070
9071 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9072
9073         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
9074         time business.
9075         (gethrxtime) [! (HAVE_NANOUPTIME
9076         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
9077         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
9078         our own approximation.
9079
9080 2005-11-08  Eric Blake  <ebb9@byu.net>
9081
9082         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9083
9084 2005-11-08  Eric Blake  <ebb9@byu.net>
9085
9086         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9087
9088 2005-11-04  Bruno Haible  <bruno@clisp.org>
9089
9090         * gnulib-tool: Implement --update mode.
9091
9092 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9093
9094         Fix porting problem reported by Theodoros V. Kalamatianos.
9095         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
9096         Don't assume that futimes failing means we must fail.
9097
9098 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9099
9100         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
9101         variables to suggest the intended function of the PATH_MAX check.
9102
9103 2005-10-30  Kean Johnston  <jkj@sco.com>
9104
9105         Trivial changes to support SCO systems.
9106         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
9107         as PATH_MAX.
9108         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
9109         where __ptr is null when no I/O is pending.
9110
9111 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
9112
9113         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
9114         leave errno alone.  Problem reported by Dmitry V. Levin.
9115
9116 2005-10-28  Simon Josefsson  <jas@extundo.com>
9117
9118         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
9119         Test more.
9120
9121         * tests/test-gc-md2.c, tests/test-md2.c: New files.
9122
9123         * modules/md2, modules/md2-tests: New files.
9124
9125 2005-10-28  Simon Josefsson  <jas@extundo.com>
9126
9127         * m4/inet_ntop.m4: More tests.
9128
9129         * m4/gc-md2.m4, md2.m4: New file.
9130
9131 2005-10-28  Simon Josefsson  <jas@extundo.com>
9132
9133         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
9134         "restrict" keywords, as per POSIX.  Protect the function
9135         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
9136         Don't use K&R prototypes.  Check the sprintf return values.
9137         Re-define EAFNOSUPPORT if not present.  Indent.
9138
9139         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
9140         suggested by Bruno Haible <bruno@clisp.org>.
9141
9142         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
9143
9144         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
9145
9146         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
9147         libgcrypt).
9148
9149         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
9150
9151         * lib/md2.h, lib/md2.c: New files.
9152
9153 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
9154
9155         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
9156         errno alone.  Problem reported by Frederic Jolliton.
9157
9158 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9159
9160         * modules/verify (License): Change from GPL to LGPL.  This is a
9161         tiny module and there are apparently near-equivalents that are
9162         under the BSD license.
9163
9164 2005-10-24  Simon Josefsson  <jas@extundo.com>
9165
9166         * modules/sha1: Relicense to LGPL.
9167
9168 2005-10-24  Simon Josefsson  <jas@extundo.com>
9169
9170         * lib/md4.h: Shrink buffer size, now that we changed the type.
9171
9172 2005-10-23  Simon Josefsson  <jas@extundo.com>
9173
9174         * gnulib-tool (func_import): Fix --tests-base.
9175
9176 2005-10-22  Simon Josefsson  <jas@extundo.com>
9177
9178         * modules/arcfour (Depends-on): Need stdint.
9179
9180 2005-10-22  Simon Josefsson  <jas@extundo.com>
9181
9182         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
9183         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
9184
9185 2005-10-22  Simon Josefsson  <jas@extundo.com>
9186
9187         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
9188         suggested by Bruno Haible <bruno@clisp.org>.
9189
9190 2005-10-22  Simon Josefsson  <jas@extundo.com>
9191
9192         * lib/crc.h: Include stddef.h, for size_t.
9193
9194 2005-10-22  Simon Josefsson  <jas@extundo.com>
9195
9196         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
9197         arcfour_context struct (simplify test vector testing in GNU
9198         Shishi).
9199
9200 2005-10-21  Simon Josefsson  <jas@extundo.com>
9201
9202         * modules/des, modules/des-tests: New files.
9203
9204         * modules/gc-des, modules/gc-des-tests: New files.
9205
9206         * tests/test-des.c, tests/test-gc-des.c: New file.
9207
9208 2005-10-21  Simon Josefsson  <jas@extundo.com>
9209
9210         * modules/arctwo, modules/arctwo-tests: New files.
9211
9212         * tests/test-arctwo.c: New file.
9213
9214         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
9215
9216         * tests/test-gc-arctwo.c: New file.
9217
9218 2005-10-21  Simon Josefsson  <jas@extundo.com>
9219
9220         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
9221         Bruno Haible <bruno@clisp.org>.
9222
9223         * m4/gc-des.m4: New file.
9224
9225 2005-10-21  Simon Josefsson  <jas@extundo.com>
9226
9227         * m4/arctwo.m4: New file.
9228
9229         * m4/gc-arctwo.m4: New file.
9230
9231 2005-10-21  Simon Josefsson  <jas@extundo.com>
9232
9233         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
9234         block.
9235
9236 2005-10-21  Simon Josefsson  <jas@extundo.com>
9237
9238         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
9239         <bruno@clisp.org>.
9240
9241         * lib/hmac-sha1.c (hmac_sha1): Likewise.
9242
9243         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
9244         Bruno Haible <bruno@clisp.org>.
9245
9246         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
9247         <bruno@clisp.org>.
9248
9249 2005-10-21  Simon Josefsson  <jas@extundo.com>
9250
9251         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
9252
9253 2005-10-21  Simon Josefsson  <jas@extundo.com>
9254
9255         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
9256
9257 2005-10-21  Simon Josefsson  <jas@extundo.com>
9258
9259         * lib/des.h, lib/des.c: New files.
9260
9261         * lib/gc-gnulib.c: Support DES.c
9262
9263 2005-10-21  Simon Josefsson  <jas@extundo.com>
9264
9265         * lib/arctwo.h, lib/arctwo.c: New files.
9266
9267         * lib/gc-gnulib.c: Support ARCTWO.
9268
9269 2005-10-21  Simon Josefsson  <jas@extundo.com>
9270
9271         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
9272         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9273
9274 2005-10-21  Simon Josefsson  <jas@extundo.com>
9275
9276         * gnulib-tool (func_import, func_create_testdir): Define automake
9277         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
9278         Makefile.am snippet),
9279         suggested by Bruno Haible <bruno@clisp.org>.
9280
9281         * modules/gc (Makefile.am): Use it.
9282
9283 2005-10-21  Bruno Haible  <bruno@clisp.org>
9284
9285         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
9286         patch.
9287
9288 2005-10-19  Simon Josefsson  <jas@extundo.com>
9289
9290         * tests/test-gc-rijndael.c: New file.
9291
9292         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
9293
9294 2005-10-19  Simon Josefsson  <jas@extundo.com>
9295
9296         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
9297         interface too.
9298
9299 2005-10-19  Simon Josefsson  <jas@extundo.com>
9300
9301         * tests/test-gc-arcfour.c: New file.
9302
9303         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
9304
9305 2005-10-19  Simon Josefsson  <jas@extundo.com>
9306
9307         * modules/gc-md4, modules/gc-md4-tests: New file.
9308
9309         * tests/test-gc-md4.c: New file.
9310
9311 2005-10-19  Simon Josefsson  <jas@extundo.com>
9312
9313         * m4/gc-md4.m4: New file.
9314
9315 2005-10-19  Simon Josefsson  <jas@extundo.com>
9316
9317         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
9318         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
9319         <kasal@ucw.cz>.
9320
9321 2005-10-19  Simon Josefsson  <jas@extundo.com>
9322
9323         * m4/gc-arcfour.m4: New file.
9324
9325         * m4/gc-rijndael.m4: New file.
9326
9327 2005-10-19  Simon Josefsson  <jas@extundo.com>
9328
9329         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
9330
9331 2005-10-19  Simon Josefsson  <jas@extundo.com>
9332
9333         * lib/gc-gnulib.c: Support ARCFOUR.
9334
9335 2005-10-19  Simon Josefsson  <jas@extundo.com>
9336
9337         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
9338         support.
9339
9340         * lib/gc.h: Add ECB enum type.
9341
9342         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
9343
9344 2005-10-18  Simon Josefsson  <jas@extundo.com>
9345
9346         * tests/test-md5.c: New file.
9347
9348         * modules/md5-tests: New file.
9349
9350 2005-10-18  Simon Josefsson  <jas@extundo.com>
9351
9352         * tests/test-md4.c: New file.
9353
9354         * modules/md4, modules/md4-tests: New files.
9355
9356 2005-10-18  Simon Josefsson  <jas@extundo.com>
9357
9358         * m4/md4.m4: New file.
9359
9360 2005-10-18  Simon Josefsson  <jas@extundo.com>
9361
9362         * lib/md4.h, lib/md4.c: New files, based on md5.?.
9363
9364 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
9365
9366         * gnulib-tool (func_create_testdir): Omit the second check whether
9367         BUILT_SOURCES in nonempty.
9368
9369 2005-10-17  Simon Josefsson  <jas@extundo.com>
9370
9371         * tests/test-rijndael.c: New file.
9372
9373 2005-10-17  Simon Josefsson  <jas@extundo.com>
9374
9375         * modules/sha1: Depend on stdint instead of md5.
9376
9377         * modules/md5: Depend on stdint, remove uint32_t.
9378
9379 2005-10-17  Simon Josefsson  <jas@extundo.com>
9380
9381         * modules/gc-sha1-tests: New file.
9382
9383         * tests/test-gc-sha1.c: New file.
9384
9385 2005-10-17  Simon Josefsson  <jas@extundo.com>
9386
9387         * m4/md5.m4: Remove call to uint32_t.m4.
9388
9389 2005-10-17  Simon Josefsson  <jas@extundo.com>
9390
9391         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
9392
9393         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
9394         md5.h.
9395
9396         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
9397
9398         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
9399
9400 2005-10-17  Simon Josefsson  <jas@extundo.com>
9401
9402         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
9403
9404 2005-10-17  Simon Josefsson  <jas@extundo.com>
9405
9406         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
9407
9408 2005-10-17  Simon Josefsson  <jas@extundo.com>
9409
9410         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
9411
9412         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
9413
9414 2005-10-17  Bruno Haible  <bruno@clisp.org>
9415
9416         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
9417         that it can also be used in a test.
9418
9419 2005-10-16  Bruno Haible  <bruno@clisp.org>
9420
9421         * gnulib-tool (func_emit_tests_Makefile_am): Also define
9422         TESTS_ENVIRONMENT, so that individual tests can augment it.
9423
9424         * gnulib-tool (func_create_testdir): Use an intermediate target for
9425         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
9426         macros, like $(ALLOCA_H), which cannot be passed through the command
9427         line.
9428
9429 2005-10-15  Simon Josefsson  <jas@extundo.com>
9430
9431         * modules/rijndael-tests: New file.
9432
9433         * modules/rijndael: New file.
9434
9435 2005-10-15  Simon Josefsson  <jas@extundo.com>
9436
9437         * m4/rijndael.m4: New file.
9438
9439 2005-10-15  Simon Josefsson  <jas@extundo.com>
9440
9441         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
9442
9443         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
9444
9445 2005-10-14  Simon Josefsson  <jas@extundo.com>
9446
9447         * tests/test-arcfour.c: New file.
9448
9449         * modules/arcfour, modules/arcfour-tests: New files.
9450
9451 2005-10-14  Simon Josefsson  <jas@extundo.com>
9452
9453         * m4/arcfour.m4: New file.
9454
9455 2005-10-14  Simon Josefsson  <jas@extundo.com>
9456
9457         * lib/arcfour.h, lib/arcfour.c: New files.
9458
9459 2005-10-14  Roland McGrath  <roland@redhat.com>
9460
9461         Import from libc.  [BZ #1331]
9462         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
9463         macro argument.
9464         Reported by Matej Vela <vela@debian.org>.
9465
9466 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9467
9468         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
9469         include <wchar.h>; no longer needed.
9470
9471 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9472
9473         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
9474
9475 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
9476         and  Ulrich Drepper  <drepper@redhat.com>
9477
9478         Import from libc.
9479         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
9480         instead of inline stream orientation test and two separate
9481         function calls.  Pay no attention to USE_IN_LIBIO.
9482
9483 2005-10-13  Simon Josefsson  <jas@extundo.com>
9484
9485         * modules/gc-hmac-md5-tests: New file.
9486
9487         * tests/test-gc-hmac-sha1.c: New file.
9488
9489         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
9490
9491         * modules/gc-hmac-md5-tests: New file.
9492
9493         * tests/test-gc-md5.c: New file.
9494
9495         * modules/gc-md5-tests: New file.
9496
9497 2005-10-13  Simon Josefsson  <jas@extundo.com>
9498
9499         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
9500         Move memory allocation outside of loop.
9501
9502 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
9503
9504         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
9505         intermediate directory is in a read-only file system.  Problem
9506         reported by Eric Blake.
9507
9508 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
9509
9510         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
9511
9512 2005-10-12  Simon Josefsson  <jas@extundo.com>
9513
9514         * tests/test-hmac-sha1.c: New file.
9515
9516         * modules/hmac-sha1-tests: New file.
9517
9518         * modules/hmac-sha1: New file.
9519
9520 2005-10-12  Simon Josefsson  <jas@extundo.com>
9521
9522         * modules/gc-sha1: New file.
9523
9524 2005-10-12  Simon Josefsson  <jas@extundo.com>
9525
9526         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
9527
9528         * tests/test-gc-pbkdf2-sha1.c: New file.
9529
9530 2005-10-12  Simon Josefsson  <jas@extundo.com>
9531
9532         * modules/gc-md5, modules/gc-hmac-md5: New files.
9533
9534         * modules/gc (Files): Remove md5, memxor and hmac files.
9535
9536 2005-10-12  Simon Josefsson  <jas@extundo.com>
9537
9538         * m4/gc-pbkdf2-sha1.m4: New file.
9539
9540         * m4/gc-hmac-sha1.m4: New file.
9541
9542         * m4/gc-sha1: New file.
9543
9544         * m4/hmac-sha1.m4: New file.
9545
9546 2005-10-12  Simon Josefsson  <jas@extundo.com>
9547
9548         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
9549
9550         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
9551
9552 2005-10-12  Simon Josefsson  <jas@extundo.com>
9553
9554         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
9555         suggested by Bruno Haible <bruno@clisp.org>.
9556
9557 2005-10-12  Simon Josefsson  <jas@extundo.com>
9558
9559         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
9560
9561 2005-10-12  Simon Josefsson  <jas@extundo.com>
9562
9563         * lib/gc-pbkdf2-sha1.c: New file.
9564
9565         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
9566
9567 2005-10-12  Simon Josefsson  <jas@extundo.com>
9568
9569         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
9570
9571         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
9572
9573 2005-10-12  Simon Josefsson  <jas@extundo.com>
9574
9575         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
9576         GC_USE_HMAC_MD5, respectively.
9577
9578         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
9579         (gc_md5): Fix typo.
9580
9581         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
9582
9583         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
9584
9585         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
9586
9587 2005-10-12  Bruno Haible  <bruno@clisp.org>
9588
9589         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
9590         Reported by Stepan Kasal <kasal@ucw.cz>.
9591
9592 2005-10-11  Simon Josefsson  <jas@extundo.com>
9593
9594         * tests/test-crc.c: New file.
9595
9596         * modules/crc, modules/crc-tests: New files.
9597
9598 2005-10-11  Simon Josefsson  <jas@extundo.com>
9599
9600         * m4/crc.m4: New file.
9601
9602 2005-10-11  Simon Josefsson  <jas@extundo.com>
9603
9604         * lib/gc.h: Add gc_hash and gc_hash_buffer.
9605
9606         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
9607
9608         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
9609
9610 2005-10-11  Simon Josefsson  <jas@extundo.com>
9611
9612         * lib/crc.h, lib/crc.c: New files.
9613
9614         * lib/gc.h (gc_hash_buffer): Add doc.
9615
9616 2005-10-11  Bruno Haible  <bruno@clisp.org>
9617
9618         * modules/c-strcasestr: New file.
9619         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
9620
9621 2005-10-11  Bruno Haible  <bruno@clisp.org>
9622
9623         * modules/c-strcase: New file.
9624         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
9625
9626 2005-10-11  Bruno Haible  <bruno@clisp.org>
9627
9628         * lib/strcasecmp.c: Include limits.h.
9629         (strcasecmp): Avoid integer overflow on exotic platforms.
9630         * lib/strncasecmp.c: Include limits.h.
9631         (strncasecmp): Avoid integer overflow on exotic platforms.
9632         Reported by Paul Eggert.
9633
9634 2005-10-11  Bruno Haible  <bruno@clisp.org>
9635
9636         * lib/c-strcasestr.h: New file, from GNU gettext.
9637         * lib/c-strcasestr.c: New file, from GNU gettext.
9638
9639 2005-10-11  Bruno Haible  <bruno@clisp.org>
9640
9641         * lib/c-strcase.h: New file, from GNU gettext.
9642         * lib/c-strcasecmp.c: New file, from GNU gettext.
9643         * lib/c-strncasecmp.c: New file, from GNU gettext.
9644
9645 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9646
9647         * modules/mempcpy (License): GPL -> LGPL.
9648         * modules/strchrnul (License): Likewise.
9649         * modules/sysexits (License): Likewise.
9650
9651 2005-10-08  Simon Josefsson  <jas@extundo.com>
9652
9653         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
9654
9655 2005-10-07  Simon Josefsson  <jas@extundo.com>
9656
9657         * m4/memxor.m4: Remove gl_C_RESTRICT call.
9658
9659 2005-10-06  Simon Josefsson  <jas@extundo.com>
9660
9661         * tests/test-hmac-md5.c: New file.
9662
9663         * modules/hmac-md5-tests: New file.
9664
9665         * modules/hmac-md5: New file.
9666
9667 2005-10-06  Simon Josefsson  <jas@extundo.com>
9668
9669         * m4/hmac-md5.m4: New file.
9670
9671         * m4/memxor.m4: Require gl_C_RESTRICT.
9672
9673 2005-10-06  Simon Josefsson  <jas@extundo.com>
9674
9675         * lib/memxor.c (memxor): Avoid casts and warnings.
9676
9677 2005-10-06  Simon Josefsson  <jas@extundo.com>
9678
9679         * lib/hmac-md5.c: New file.
9680
9681         * lib/hmac.h: New file.
9682
9683 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9684
9685         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
9686         promotes to int, not unsigned int, to catch the AIX 5.3
9687         compiler bug.
9688
9689 2005-10-05  Simon Josefsson  <jas@extundo.com>
9690
9691         * modules/memxor: New file.
9692
9693         * modules/iconv (Files): Move config.rpath to havelib, it is used
9694         there.
9695
9696         * modules/havelib (Files): Add config.rpath.
9697
9698 2005-10-05  Simon Josefsson  <jas@extundo.com>
9699
9700         * m4/memxor.m4: New file.
9701
9702 2005-10-05  Simon Josefsson  <jas@extundo.com>
9703
9704         * lib/memxor.c (memxor): Fix compiler error.
9705
9706         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
9707         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
9708
9709         * lib/memxor.h, lib/memxor.c: New files.
9710
9711         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
9712         we assume all systems have it, suggested by Jim Meyering
9713         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
9714         any systems lack sys/socket.h; mingw32 is known to lack it, but we
9715         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
9716         same reasons.
9717
9718 2005-10-05  Simon Josefsson  <jas@extundo.com>
9719
9720         * config/srclist.txt: Add glibc bug 1423 for md5.h.
9721
9722 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9723
9724         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
9725         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
9726         needed, since the source code now assumes these .h files.
9727
9728 2005-10-05  Derek Price  <derek@ximbiot.com>
9729
9730         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
9731
9732 2005-10-05  Bruno Haible  <bruno@clisp.org>
9733
9734         * modules/stdint (License): Change to LGPL.
9735
9736 2005-10-04  Simon Josefsson  <jas@extundo.com>
9737
9738         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
9739         D. Baushke" <mdb@gnu.org>.
9740
9741 2005-10-04  Bruno Haible  <bruno@clisp.org>
9742
9743         * lib/verify.h (verify_true): Provide alternative definition for C++.
9744
9745 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
9746
9747         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
9748         (SSIZE_MAX): New macro, if not already defined.
9749         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
9750         than 2 GiB.
9751
9752 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9753
9754         Sync from coreutils.
9755         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
9756         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
9757         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
9758         ULLONG_MAX doesn't work with 2.7.2.1.
9759
9760 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9761
9762         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
9763         From Ben Pfaff.
9764
9765         * modules/exclude (Depends-on): Depend on verify.
9766         * modules/strtoimax (Depends-on): Likewise.
9767         * modules/utimecmp (Depends-on): Likewise.
9768
9769 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9770
9771         * lib/exclude.c: Include verify.h.
9772         (verify): Remove.  All callers changed to use verify.h's version.
9773         * lib/strtoimax.c: Likewise.
9774         * lib/utimecmp.c: Likewis.e
9775
9776         Sync from coreutils.
9777         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
9778         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
9779         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
9780         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
9781         bother returning ENOSYS if settimeofday or stime fails; just let
9782         them return whatever errno they want to return.
9783         * lib/utimens.c: Include unistd.h, for dup2.
9784         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
9785         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
9786
9787 2005-10-02  Jim Meyering  <jim@meyering.net>
9788
9789         Sync from coreutils.
9790         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
9791         from glibc-2.2.5 that fails for read-only files.
9792
9793 2005-10-02  Jim Meyering  <jim@meyering.net>
9794
9795         Sync from coreutils.
9796         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
9797         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
9798         `#if HAVE_CONFIG_H'.
9799         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
9800         Remove AT_FDCWD test.
9801         Do not consume the fd unless successful.
9802         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
9803         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
9804         block, so that we don't even try to compile it if settimeofday is
9805         available.  This works around a compilation failure on OSF1 V5.1,
9806         due to stime requiring a `long int*' while tv_sec is `int'.
9807
9808 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
9809
9810         Sync from coreutils.
9811         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
9812         against `yes', rather than just testing for nonempty.
9813
9814 2005-10-01  Simon Josefsson  <jas@extundo.com>
9815
9816         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
9817         and Darwin.
9818
9819         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
9820         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
9821         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
9822         freeaddrinfo and gai_strerror are declared by the POSIX headers.
9823         Check if struct addrinfo is declared.
9824
9825 2005-10-01  Simon Josefsson  <jas@extundo.com>
9826
9827         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
9828         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
9829         AI_* and EAI_* definitions.  Protect function declarations.
9830
9831 2005-10-01  Jim Meyering  <jim@meyering.net>
9832
9833         Sync from coreutils.
9834
9835         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
9836         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
9837         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
9838         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
9839         in the inet and nsl libraries.  Required on Solaris 5.7.
9840
9841 2005-10-01  Jim Meyering  <jim@meyering.net>
9842
9843         Sync from coreutils.
9844         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
9845         in the inet and nsl libraries.  Required on Solaris 5.7.
9846
9847 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
9848
9849         * lib/getdelim.c (getdelim): Remove unused variables.
9850
9851 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
9852
9853         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
9854         so that the code works even with ancient cpp.  Portability problem
9855         with GCC 2.7.2.1 reported by Thomas M.Ott.
9856
9857 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
9858
9859         * modules/regex (Depends-on): Add strcase.
9860
9861         * modules/gethostname (Licence): Change from GPL to LGPL, since
9862         gethostname.c is a trivial implementation of a standard library
9863         function.
9864         * modules/poll (License): Change from GPL to LGPL, since it's
9865         derived from LGPL code.
9866
9867 2005-09-27  Jim Meyering  <jim@meyering.net>
9868
9869         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
9870         HAVE_CONFIG_H.
9871
9872         * lib/intprops.h (signed_type_or_expr__): Define.
9873         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
9874         for unsigned types.
9875
9876 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
9877
9878         * lib/verify.h (verify_expr): Remove, replacing with:
9879         (verify_true): New macro that returns true instead of void.
9880         (verify_type__): Remove.
9881         (verify): Use verify_true rather than verify_type__.
9882
9883 2005-09-26  Bruno Haible  <bruno@clisp.org>
9884
9885         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
9886         is necessary.
9887         (lib_SOURCES): Remove mbchar.c.
9888         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
9889         (Files): Add m4/mbrtowc.m4.
9890         * modules/mbiter: Likewise.
9891         * modules/mbuiter: Likewise.
9892
9893 2005-09-26  Bruno Haible  <bruno@clisp.org>
9894
9895         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
9896         compile mbchar.c if they are not both present.
9897         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
9898         * m4/mbiter.m4 (gl_MBITER): Likewise.
9899         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
9900         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
9901         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
9902
9903 2005-09-25  Jim Meyering  <jim@meyering.net>
9904
9905         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
9906         also uses socklen_t.
9907
9908 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
9909
9910         * lib/utimens.c (ENOSYS): Define if not already defined.
9911         (futimens): Support having a null PATH if the file descriptor
9912         is nonnegative.
9913
9914         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
9915         Remove.
9916         (__attribute): Define to empty unless GCC 3.1 or later.
9917         This works around a core dump on OpenBSD 3.4, which has GCC
9918         2.95.3, which dumps core when given __attribute__(()).  It also
9919         simplifies other tests, since we really don't want to bother with
9920         worrying about which ancient version of GCC supported what.
9921         Original problem reported by Yoann Vandoorselaere, with part of
9922         the fix suggested by Derek Price.
9923
9924 2005-09-24  Jim Meyering  <jim@meyering.net>
9925
9926         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
9927         so we can once again use a positive bitfield width of 1 -- now we
9928         don't have to explain why we were using a bitfield width of 2.
9929
9930 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
9931
9932         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
9933         and similarly for the other external symbols.  Problem reported
9934         by James Gallager.
9935
9936         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
9937         bug reported by Jim Meyering.
9938
9939         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
9940         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
9941         not needed, since socklen is a prerequisite module.
9942
9943 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
9944
9945         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
9946         Problem reported by Eric Blake.
9947         (getaddrinfo): Initialize se so that it's not garbage.
9948         Redo internal storage allocation so that it doesn't make unportable
9949         assumptions about alignment.
9950         Fix a memory leak.
9951
9952         * lib/utimens.c (futimens): Use futimesat if available.
9953         Prefer it to futimes since it doesn't have the futimes bug.
9954
9955         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
9956         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
9957         Instead, declare a function that returns a pointer to an array,
9958         and use verify_type__ to declare the size of the array.
9959         Problem and germ of a solution reported by Bruno Haible.
9960         (verify_type__): Use 2, not 1, for bitfield size, to avoid
9961         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
9962
9963 2005-09-23  Jim Meyering  <jim@meyering.net>
9964
9965         Sync from coreutils.
9966         Correct build failure (socklen_t not defined) on at least
9967         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
9968         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
9969
9970 2005-09-23  Jim Meyering  <jim@meyering.net>
9971
9972         * modules/getaddrinfo (Depends-on): Add socklen.
9973
9974 2005-09-23  Bruno Haible  <bruno@clisp.org>
9975
9976         * tests/test-verify.c: New file.
9977
9978 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9979
9980         Sync from coreutils.
9981
9982         * modules/argmatch (Depends-on): Add verify.
9983         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
9984         unistd-safer.
9985         * modules/save-cwd (Depends-on): Likewise.
9986
9987         * modules/openat (Files): Add lib/openat-die.c.
9988         (Depends-on): Remove error, exitfail.
9989         Add dirname.
9990
9991         * modules/verify: New file.
9992         * MODULES.html.sh (Diagnostics <assert.h>): New section,
9993         with "verify" module.
9994
9995 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9996
9997         Sync from coreutils.
9998
9999         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
10000         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
10001         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
10002         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
10003         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
10004         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
10005         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
10006         Don't bother checking for string.h, stdlib.h, unistd.h.
10007         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
10008         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
10009         module's job.
10010         * m4/jm-macros.m4 (gl_MACROS): Likewise.
10011         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
10012
10013         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
10014         (gl_GETDATE): Use it.
10015
10016         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
10017
10018 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10019
10020         Sync from coreutils.
10021
10022         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
10023         stat-time.h.
10024         * lib/argmatch.h: Include verify.h
10025         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
10026         (ARGMATCH_ASSERT): Remove; unused.
10027         * lib/canonicalize.c: Assume STDC_HEADERS.
10028         * lib/exclude.c: Include "strcase.h".
10029         * lib/regex_internal.h [!defined _LIBC]: Likewise.
10030         * lib/getusershell.c: Include stdio--.h rather than stdio.h
10031         and stdio-safer.h.
10032         (getusershell): Call fopen, not fopen_safer.
10033         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
10034         Do not include unistd-safer.h.
10035         (save_cwd): Don't call fd_safer; no longer needed
10036         now that we include fcntl--.h.
10037
10038         * lib/getdate.y (relative_time): New type.
10039         (RELATIVE_TIME_0): New constant.
10040         (parser_control): Use relative_time instead of doing it ourselves.
10041         (%union): Add new relative_time rel member.
10042         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
10043         Now typeless.
10044         (relunit, relunit_snumber): Now of type rel.
10045         (zone, rel, relunit, get_date): Adjust to above changes.
10046
10047         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
10048         Do not include unistd-safer.h.
10049         (getloadavg): Don't call fd_safer; no longer needed
10050         now that we include fcntl--.h.
10051
10052         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
10053         (make_dir_parents): Treat ENOSYS like EEXIST.
10054
10055         Improve quality of diagnostics on restore_cwd failure.
10056         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
10057         (make_dir_parents): Last arg is now int * (for errno), not bool *.
10058         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
10059         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
10060         each time through the loop.  Do not diagnose restore_cwd failure;
10061         that is the caller's job (and perhaps the caller does not care).
10062
10063         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
10064         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
10065         If the file already exists but is not a directory, don't bother
10066         to try to make its parents.
10067         Close potential file descriptor leak if we can't chdir("/") (!).
10068         Don't always return true if chdir($PWD) fails; return true only
10069         if the requested action was done successfully (except for the
10070         chdir($PWD)).
10071         Don't log final directory unless we actually made it.
10072         Refactor to avoid duplicate code to fix up permissions.
10073         Don't attempt to fix up parent permissions if chdir($PWD) fails.
10074
10075         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
10076         to make it a bit faster and (I hope) clearer.
10077         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
10078         Fix bug in formats like %2N.
10079
10080         * lib/verify.h: New file.
10081
10082 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10083
10084         Sync from coreutils.
10085         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
10086
10087 2005-09-22  Jim Meyering  <jim@meyering.net>
10088
10089         Sync from coreutils.
10090
10091         * m4/lstat.m4 (gl_FUNC_LSTAT):
10092         Use AC_LIBSOURCES to require lstat.c and lstat.h.
10093         Remove obsolete comment.
10094         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
10095         * m4/xstrtod.m4: Likewise.
10096
10097         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
10098
10099 2005-09-22  Jim Meyering  <jim@meyering.net>
10100
10101         Sync from coreutils.
10102
10103         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
10104
10105         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
10106         the .tm_year member, since otherwise gcc-4.0 would now warn about
10107         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
10108
10109         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
10110         order to avoid an unsuppressible warning from gcc on 64-bit systems.
10111
10112         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
10113         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
10114         when run in a time zone for which daylight savings time is in effect
10115         for the starting date.
10116
10117         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
10118         stop us from restricting permissions of just-created absolute-named
10119         directories.
10120         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
10121         to restore initial working directory.
10122         * lib/mkdir-p.c (make_dir_parents): New parameter:
10123         different_working_dir, to tell caller if/when we change the working
10124         directory and are unable to return to the initial one.
10125         * lib/mkdir-p.h (make_dir_parents): Update prototype.
10126         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
10127         `return false'.  This fixes a bug introduced on 2004-07-30.
10128
10129         * lib/openat.c (fdopendir): Be sure to close the supplied
10130         file descriptor before returning.  This makes our replacement
10131         implementation a little closer to Solaris's, where fdopendir
10132         ties the file descriptor to the returned DIR* pointer.
10133         * lib/openat.c (unlinkat): New function.
10134         * lib/openat.h (unlinkat): Add prototype.
10135         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
10136         (openat_restore_fail): Rename from openat_restore_die.
10137         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
10138
10139         Provide an alternative to exiting immediately upon save_cwd or
10140         restore_cwd failure.  Now, an application can arrange e.g.,
10141         to perform a longjump in that case.
10142         * lib/openat.c: Include dirname.h.
10143         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
10144         (rpl_openat, fdopendir, fstatat): Call openat_save_die
10145         and openat_restore_die rather than calling error directly.
10146         Don't include "error.h" or "exitfail.h"; they're no longer needed.
10147
10148         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
10149         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
10150         define.
10151
10152         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
10153         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
10154                             int utc, int nanoseconds);
10155         Background:
10156         date should not have to allocate a megabyte of virtual memory to
10157         handle a format argument like +%1048575T.  When implemented with
10158         strftime, it must allocate such a buffer, use strftime to fill it
10159         in, print it, then free it.
10160         With fprintftime, it simply prints everything and exits.
10161         With no need for memory allocation, that's one fewer way to fail.
10162         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
10163         optional field width, not before, so we accept %9:z, not %:9z.
10164         (my_strftime): Be sure to use L_('x') for literals.
10165
10166         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
10167         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
10168         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
10169         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
10170         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
10171         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
10172         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
10173         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
10174         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
10175         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
10176         * lib/xgethostname.c, lib/xreadlink.c:
10177         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
10178
10179         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
10180         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
10181         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
10182         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10183         and don't include <sys/file.h>).
10184
10185 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
10186
10187         Sync from coreutils.
10188
10189         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
10190         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
10191         [!LDAV_DONE]: Avoid unused variable warning.
10192
10193 2005-09-21  Bruno Haible  <bruno@clisp.org>
10194
10195         * lib/unicodeio.h (unicode_to_mb): New declaration.
10196
10197 2005-09-20  Derek Price  <derek@ximbiot.com>
10198
10199         * lib/getaddrinfo.c: Don't include <netdb.h> included from
10200         getaddrinfo.h.
10201
10202 2005-09-20  Bruno Haible  <bruno@clisp.org>
10203
10204         * gnulib-tool: Remove trailing slashes from the values specified for
10205         --source-base, --m4-base, --tests-base, --aux-dir.
10206         Suggested by Simon Josefsson <jas@extundo.com>.
10207
10208 2005-09-20  Bruno Haible  <bruno@clisp.org>
10209
10210         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
10211         func_modules_to_filelist, func_import, func_create_testdir): Make all
10212         sorting results locale-independent, so that gnulib-cache.m4 doesn't
10213         change when gnulib-tool is invoked in a different locale.
10214
10215 2005-09-19  Simon Josefsson  <jas@extundo.com>
10216
10217         * m4/socklen.m4: Fix typo.
10218
10219 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10220
10221         Use a consistent style for including <config.h>.
10222         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
10223         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
10224         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
10225         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
10226         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
10227         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
10228         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
10229         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
10230         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
10231         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
10232         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
10233         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
10234         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
10235         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
10236         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
10237         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
10238         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
10239         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
10240         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
10241         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
10242         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
10243         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
10244         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
10245         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
10246         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
10247         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
10248         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
10249         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
10250         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
10251         lib/xstrtoumax.c, lib/yesno.c:
10252         Standardize inclusion of config.h.
10253         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
10254         lib/inttostr.h:  Removed inclusion of config.h from header files.
10255         * lib/inttostr.c:  Adjusted in-tree users.
10256         * lib/timespec.h: Remove superfluous warning to include config.h.
10257         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
10258         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
10259         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
10260         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
10261         config.h with HAVE_CONFIG_H.
10262
10263 2005-09-19  Jim Meyering  <jim@meyering.net>
10264
10265         * modules/pathmax (License): Change to LGPL.
10266
10267 2005-09-19  Derek Price  <derek@ximbiot.com>
10268
10269         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
10270
10271 2005-09-19  Bruno Haible  <bruno@clisp.org>
10272
10273         * gnulib-tool (import): Provide default for --tests-base.
10274
10275 2005-09-19  Bruno Haible  <bruno@clisp.org>
10276
10277         * doc/quote.texi: New file, extracted from gnulib.texi.
10278         * doc/ctime.texi: New file, extracted from gnulib.texi.
10279         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
10280         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
10281         * doc/gnulib.texi: Include them.
10282
10283 2005-09-18  Bruno Haible  <bruno@clisp.org>
10284
10285         Portability fix.
10286         * gnulib-tool (func_readlink): New function.
10287         (func_ln_if_changed): Use it.
10288
10289 2005-09-18  Bruno Haible  <bruno@clisp.org>
10290
10291         * gnulib-tool: Support --with-tests also with --import.
10292         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
10293         (func_import): Use variables $testsbase and $inctests. Emit a
10294         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
10295         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
10296         SUBDIRS += $testsdir.
10297         (func_create_testdir): Update.
10298
10299 2005-09-18  Bruno Haible  <bruno@clisp.org>
10300
10301         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
10302         instead of $dry_run.
10303         (func_cp_if_changed, func_mv_if_changed): Remove functions.
10304         (func_ln_if_changed): Don't handle dry-run here.
10305         (func_import): In dry-run mode, detect more precisely which actions
10306         would be performed, and don't use "...ing" verbs.
10307
10308 2005-09-18  Bruno Haible  <bruno@clisp.org>
10309
10310         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
10311         (func_import): Use join on two temporary files instead of three nested
10312         loops, in order to determine which files are new or old.
10313
10314 2005-09-18  Bruno Haible  <bruno@clisp.org>
10315
10316         * gnulib-tool (func_import): Comment out code that spits out the
10317         new files with --dry-run.
10318
10319 2005-09-18  Bruno Haible  <bruno@clisp.org>
10320
10321         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
10322
10323 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10324
10325         * lib/stat-time.h: New file.
10326         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
10327         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
10328         in a different way.
10329         (timespec_cmp): New function.
10330         * lib/utimecmp.c: Include stat-time.h.
10331         (SYSCALL_RESOLUTION): Depend on whether various struct stat
10332         members exist, not on the obsolescent ST_MTIM_NSEC.
10333         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
10334
10335 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10336
10337         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
10338
10339 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10340
10341         * MODULES.html.sh (File system functions): Add stat-time.
10342         * modules/stat-time: New file.
10343         * modules/timespec (Files): Remove m4/st_mtim.m4; this
10344         is now done in a different way, by the stat-time module.
10345         * modules/utimecmp (Depends-on): Add stat-time.
10346
10347 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10348
10349         * m4/st_mtim.m4: Remove.  Superseded by...
10350         * m4/stat-time.m4: New file.
10351         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
10352         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
10353
10354 2005-09-15  Derek Price  <derek@ximbiot.com>
10355
10356         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
10357
10358 2005-09-15  Derek Price  <derek@ximbiot.com>
10359
10360         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
10361         * lib/regex_internal.c: Ditto, using this...
10362         (__GNUC_PREREQ): ...new macro.
10363         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
10364         using...
10365         (__GNUC_PREREQ): ...this new macro.
10366
10367         * lib/strstr.h: Include string.h. Define strstr as a macro here.
10368
10369 2005-09-15  Derek Price  <derek@ximbiot.com>
10370             Paul Eggert  <eggert@cs.ucla.edu>
10371
10372         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
10373         changes, consolidating in...
10374         * lib/regex_internal.h: ...this file.
10375
10376 2005-09-13  Jim Meyering  <jim@meyering.net>
10377
10378         * lib/canon-host.c: Filter through gnu indent and reword comments
10379         slightly.
10380         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
10381
10382 2005-09-13  Derek Price  <derek@ximbiot.com>
10383
10384         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
10385         failure.
10386         Reported by Jim Meyering  <jim@meyering.net>.
10387
10388 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10389
10390         * lib/base64.c: Typo.
10391         (base64_encode): Put b64str in initialized data section.
10392
10393 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
10394
10395         Merge glibc and coreutils changes into gnulib, plus a few
10396         extra fixes.
10397         * lib/md5.c: Use #error rather than a string.
10398         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
10399         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
10400         (__attribute__): Define to empty for non recent-GCC.
10401         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
10402         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
10403         Renamed from their non-__ counterparts, with new macros replacing
10404         them if not _LIBC.  Add __THROW attribute.
10405         (rol): Remove.
10406         (struct md5_ctx): Align buffer if using GCC.
10407         * lib/sha1.h (struct sha1_ctx): Likewise.
10408         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
10409         The old name was backwards.
10410         (NOTSWAP): Remove; not used.
10411         (rol): New macro, moved here from md5.h.
10412         (sha1_process_block): Remove a FIXME that doesn't make sense.
10413
10414 2005-09-12  Derek Price  <derek@ximbiot.com>
10415
10416         Return usable errors from canon-host.
10417         * lib/canon-host.h: New file.
10418         * lib/canon-host.c (canon_host): Wrap...
10419         (canon_host_r): ...this new function, which now relies exclusively on
10420         getaddrinfo.
10421         (ch_strerror): New function.
10422         (last_cherror): New global.
10423         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
10424         interface.
10425         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
10426         void *.
10427         (freeaddrinfo): Free ai->ai_canonname when set.
10428
10429 2005-09-12  Derek Price  <derek@ximbiot.com>
10430
10431         Make canon-host require getaddrinfo.
10432         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
10433         AC_LIBSOURCE canon-host.h.  Call...
10434         (gl_PREREQ_CANON_HOST): ...this new function, which requires
10435         gl_GETADDRINFO.
10436         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
10437
10438 2005-09-12  Derek Price  <derek@ximbiot.com>
10439
10440         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
10441         LGPL.
10442         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
10443
10444 2005-09-12  Derek Price  <derek@ximbiot.com>
10445
10446         * lib/gai_strerror.c: Include config.h when available.  Include
10447         getaddrinfo.h before other headers to test interface.
10448         Reported by Larry Jones <lawrence.jones@ugs.com>.
10449
10450 2005-09-12  Derek Price  <derek@ximbiot.com>
10451             Paul Eggert  <eggert@cs.ucla.edu>
10452
10453         * modules/glob (Files): Add glob-libc.h.
10454
10455 2005-09-12  Derek Price  <derek@ximbiot.com>
10456             Paul Eggert  <eggert@cs.ucla.edu>
10457
10458         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
10459         glob_.h, glob-libc.h.
10460         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
10461
10462 2005-09-12  Derek Price  <derek@ximbiot.com>
10463             Paul Eggert  <eggert@cs.ucla.edu>
10464
10465         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
10466         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
10467         protecting things that should be done only in gnulib contexts.
10468         * lib/glob_.h: New file, containing only the glob things needed for
10469         gnulib.
10470         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
10471         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
10472         (glob, globfree, glob_pattern_p): Now defined simply in terms of
10473         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
10474         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
10475         and to respect the namespace rules better.
10476
10477 2005-09-08  Simon Josefsson  <jas@extundo.com>
10478
10479         * modules/socklen: New file.
10480
10481 2005-09-08  Simon Josefsson  <jas@extundo.com>
10482
10483         * m4/socklen.m4: New file.
10484
10485 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10486
10487         * modules/utimens (Files): Add m4/utimbuf.m4, since
10488         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
10489         Reported by Sergey Poznyakoff.
10490
10491 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10492
10493         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
10494         definitions, since that's the preferred style in glibc.
10495         Fix a minor spacing issue, and update copyright notice to match
10496         glibc's.
10497
10498 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10499
10500         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
10501
10502 2005-09-06  Simon Josefsson  <jas@extundo.com>
10503
10504         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
10505         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
10506
10507 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10508
10509         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
10510         warning.
10511
10512 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10513
10514         * config/srclist.txt: Add glibc bug 1302.
10515
10516 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
10517
10518         Change bitset word type from unsigned int to unsigned long int,
10519         as this has better performance on typical 64-bit hosts.
10520         Port bitset code to hosts with unusual word sizes.
10521         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
10522         (build_collating_symbol):
10523         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
10524         argument is a bitset.  This is merely a style issue, but it makes
10525         it clearer that an entire array is expected.
10526         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
10527         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
10528         Port to the case where bitset_word is not the same as unsigned int.
10529         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
10530         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
10531         Likewise.
10532         * lib/regexec.c (check_dst_limits_calc_pos_1,
10533         check_subexp_matching_top):
10534         (build_trtable, group_nodes_into_DFAstates):
10535         Likewise.
10536         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
10537         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
10538         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
10539         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
10540         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
10541         * lib/regcomp.c (optimize_subexps, lower_subexp):
10542         Work even if bitset_word has holes in its bitwise representation.
10543         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
10544         * lib/regexec.c (check_dst_limits_calc_pos_1,
10545         check_subexp_matching_top):
10546         Likewise.
10547         * lib/regex_internal.c (re_string_reconstruct):
10548         Don't assume UCHAR_MAX == 255.
10549         * lib/regex_internal.h (bitset_set_all): Likewise.
10550         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
10551         All uses changed.
10552         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
10553         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
10554         All uses changed.
10555         (BITSET_WORD_MAX): New macro.
10556         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
10557         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
10558         (bitset_empty, bitset_copy):
10559         Prefer sizeof (bitset) to multiplying it out ourselves.
10560         (bitset_not_merge): Remove; unused.
10561         (bitset_contain): Return bool, not unsigned int with one bit on.
10562         All callers changed.
10563         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
10564         alignment than re_node_set; do this by defining a new internal
10565         type struct dests_alloc and using it to allocate memory.
10566
10567 2005-09-05  Bruno Haible  <bruno@clisp.org>
10568
10569         * gnulib-tool (func_import): Fix comparison in handling of symbolic
10570         links.
10571
10572 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
10573
10574         * modules/size_max (Makefile.am): Add size_max.h
10575
10576 2005-09-04  Derek Price  <derek@ximbiot.com>
10577
10578         * gnulib-tool (func_import): Fix reversed $symbolic logic.
10579
10580 2005-09-03  Simon Josefsson  <jas@extundo.com>
10581
10582         * gnulib-tool: Fix typo.
10583
10584 2005-09-03  Simon Josefsson  <jas@extundo.com>
10585
10586         * config/srclist.txt: Add glibc bug 1293.
10587
10588 2005-09-03  Derek Price  <derek@ximbiot.com>
10589
10590         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
10591         From Larry Jones <lawrence.jones@ugs.com>.
10592
10593 2005-09-02  Simon Josefsson  <jas@extundo.com>
10594
10595         * modules/socklen: New file.
10596
10597 2005-09-02  Simon Josefsson  <jas@extundo.com>
10598
10599         * modules/havelib: New module.
10600
10601         * modules/gettext, modules/iconv, modules/lock, modules/readline:
10602         Use havelib.
10603
10604 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10605
10606         Check for arithmetic overflow when calculating sizes, to prevent
10607         some buffer-overflow issues.  These patches are conservative, in the
10608         sense that when I couldn't determine whether an overflow was possible,
10609         I inserted a run-time check.
10610         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
10611         macros.
10612         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
10613         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
10614         (re_xnrealloc, re_x2nrealloc): New inline functions.
10615         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
10616         parse_bracket_exp):
10617         (build_equiv_class, build_charclass): Check for arithmetic overflow
10618         in size expression calculations.
10619         * lib/regex_internal.c (re_string_realloc_buffers):
10620         (build_wcs_upper_buffer, re_node_set_add_intersect):
10621         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
10622         (re_dfa_add_node, register_state): Likewise.
10623         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
10624         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
10625         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
10626         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
10627
10628 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10629
10630         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
10631         m4/ulonglong.m4.  Problem reported by Martin Lambers.
10632
10633 2005-09-02  Bruno Haible  <bruno@clisp.org>
10634
10635         Support for lib vs. lib64 distinction on biarch platforms.
10636         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
10637         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
10638         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
10639
10640 2005-09-02  Bruno Haible  <bruno@clisp.org>
10641
10642         * gnulib-tool (import): In the other first-use case, provide defaults
10643         as well.
10644
10645 2005-09-02  Bruno Haible  <bruno@clisp.org>
10646
10647         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
10648         patches not yet found in the latest gettext release.
10649
10650 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10651
10652         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
10653         to avoid a collision with bits/local_lim.h in glibc.
10654         All uses changed.  Problem reported by Dmitry V. Levin in
10655         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
10656
10657         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
10658         bugs in int versus size_t comparisons.
10659         (re_string_context_at): Fix bug where the code assumed that
10660         Idx is signed.
10661
10662         Use bool where appropriate.
10663         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
10664         All callers changed.
10665         (calc_eclosure_iter): Likewise, for ROOT arg.
10666         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
10667         (build_charclass_op): Likewise, for NON_MATCH arg.
10668         * lib/regex_internal.c (re_string_allocate, re_string_construct):
10669         (re_string_construct_common): Likewise, for ICASE arg.
10670         * lib/regexec.c (re_search_2_stub, re_search_stub):
10671         Likewise, for RET_LEN arg.
10672         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
10673         (set_regs): Likewise, for FL_BACKTRACK arg.
10674         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
10675         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
10676         (calc_eclosure_iter, parse_bracket_exp):
10677         Use bool for internal variables that are booleans.
10678         * lib/regexec.c (re_search_internal, check_matching,
10679         proceed_next_node):
10680         (set_regs, build_sifted_states, sift_states_bkref):
10681         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
10682         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
10683         (find_collation_sequence_value):
10684         Likewise.
10685         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
10686         (re_node_set_compare):
10687         Return bool, not int. All callers changed.
10688         * lib/regexec.c (check_halt_node_context, check_dst_limits):
10689         (build_trtable, check_node_accept): Likewise.
10690         * lib/regex_internal.h: Include stdbool.h.
10691
10692         Fix bugs uncovered when converting to bool.
10693         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
10694         failure instead of charging ahead blindly.
10695         * lib/regex_internal.c (register_state): Likewise.
10696         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
10697         for freeing internal storage.
10698         (group_nodes_into_DFA_states): Use unsigned int, not int, for
10699         bitset pieces used as boolean, to avoid undefined behavior
10700         on hosts that do int overflow checking.
10701
10702 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10703
10704         * config/srclist.txt: Add glibc bugs 1285-1287.
10705
10706 2005-09-01  Jim Meyering  <jim@meyering.net>
10707
10708         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
10709         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
10710         Require gl_STAT_MACROS, too.
10711
10712 2005-09-01  Bruno Haible  <bruno@clisp.org>
10713
10714         * gnulib-tool (import): In the first-use case, provide defaults.
10715
10716 2005-09-01  Bruno Haible  <bruno@clisp.org>
10717
10718         * gnulib-tool (func_import): Remove the .tmp files.
10719
10720 2005-09-01  Bruno Haible  <bruno@clisp.org>
10721
10722         * gnulib-tool (func_import): Fix handling of symbolic links.
10723
10724 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10725
10726         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
10727         old glibc regex code mishandles strings longer than 2**31 bytes.
10728         This patch fixes this when the regex code is used in gnulib
10729         (i.e., outside glibc).
10730
10731         This patch should not affect the use of the regex code inside
10732         glibc.  No doubt this problem also needs to be handled for glibc
10733         as well, but the result will be an incompatible change to the
10734         glibc ABI, and the old ABI will have to be supported too.  That
10735         can be the the subject for another patch.
10736
10737         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
10738         governing whether the rest of this patch is active.  By default,
10739         the macro is disabled and the patch has no effect.
10740         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
10741         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
10742         (struct re_pattern_buffer, re_search, re_search_2, re_match):
10743         (re_match_2, re_set_registers): Use the new types.
10744         * lib/regex_internal.h (Idx, re_hashval_t): New types.
10745         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
10746         New macros.
10747         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
10748         (re_string_context_at, bin_tree_t, re_dfastate_t):
10749         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
10750         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
10751         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
10752         (re_string_char_size_at, re_string_wchar_at):
10753         (re_string_elem_size_at):
10754         Use the new types and macros to port to 64-bit hosts.
10755         Use unsigned types for internal values, so that the code
10756         mostly works even for arrays larger than SSIZE_MAX.
10757         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
10758         (search_duplicated_node, calc_eclosure_iter, fetch_number):
10759         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
10760         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
10761         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
10762         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
10763         (calc_inveclosure, parse_dup_op, build_range_exp):
10764         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
10765         (fetch_number, create_token_tree, mark_opt_subexp):
10766         Likewise.
10767         * lib/regex_internal.c (re_string_construct_common,
10768         create_ci_newstate):
10769         (create_cd_newstate, re_string_allocate, re_string_construct):
10770         (re_string_realloc_buffers, build_wcs_upper_buffer):
10771         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
10772         (re_string_reconstruct, re_string_peek_byte_case):
10773         (re_string_fetch_byte_case, re_string_context_at):
10774         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
10775         (re_node_set_init_copy, re_node_set_add_intersect):
10776         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10777         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10778         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
10779         (re_acquire_state, re_acquire_state_context, register_state):
10780         Likewise.
10781         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
10782         search_cur_bkref_entry):
10783         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
10784         (re_search_internal, re_search_2_stub, re_search_stub)
10785         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
10786         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
10787         (update_cur_sifted_state, check_dst_limits):
10788         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
10789         (check_subexp_limits, sift_states_bkref, merge_state_array):
10790         (check_subexp_matching_top, get_subexp, get_subexp_sub):
10791         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
10792         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
10793         (expand_bkref_cache, check_node_accept_bytes):
10794         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
10795         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
10796         (acquire_init_state_context, check_halt_node_context):
10797         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
10798         (sift_states_backward, clean_state_log_if_needed):
10799         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
10800         (find_recover_state, transit_state_sb, transit_state_mb):
10801         (transit_state_bkref, build_trtable, match_ctx_clean):
10802         Likewise.
10803         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
10804         to work around an assumption that REG_MISSING is negative.
10805
10806         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
10807         (seek_collating_symbol_entry) [defined _LIBC]:
10808         (lookup_collation_sequence_value) [defined _LIBC]:
10809         (build_range_exp, build_collating_symbol) [defined _LIBC]:
10810         Use prototypes rather than old-style function definitions.
10811         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
10812         (transit_state_sb) [0]:
10813         (find_collation_sequence_value) [defined _LIBC]: Likewise.
10814
10815         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
10816         rm_eo.
10817
10818         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
10819         (optimize_subexps, lower_subexp):
10820         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
10821         since the signed shift might overflow.  Use 1u<<31 instead.
10822         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
10823         Likewise.
10824         * lib/regexec.c (check_dst_limits_calc_pos_1,
10825         check_subexp_matching_top): Likewise.
10826
10827         * lib/regcomp.c (optimize_subexps, lower_subexp):
10828         Use CHAR_BIT rather than 8, for clarity.
10829         * lib/regexec.c (check_dst_limits_calc_pos_1):
10830         (check_subexp_matching_top): Likewise.
10831         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
10832         have to worry about portability issues when shifting it left.
10833         Remove no-longer-needed test for table_size > 0.
10834         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
10835         in a word, as the resulting behavior is undefined.
10836         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
10837         in one case, a <= should have been an <, and in another case the
10838         whole test was missing.
10839         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
10840         the standard name CHAR_BIT.
10841         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
10842         this is not true on one's complement and signed-magnitude hosts.
10843
10844         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
10845         next_last_offset.
10846         (struct re_dfa_t): Remove unused member states_alloc.
10847         * lib/regcomp.c (init_dfa): Don't initialize unused members.
10848
10849 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10850
10851         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
10852         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
10853         and large-file glibc and in 32-bit large-file Solaris.
10854
10855 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10856
10857         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
10858         lengths fit in regoff_t; this isn't true if regoff_t is the same
10859         width as size_t.
10860         * lib/regex.c (re_search_internal): 5th arg is LAST_START
10861         (= START + RANGE) instead of RANGE.  This avoids overflow
10862         problems when regoff_t is the same width as size_t.
10863         All callers changed.
10864         (re_search_2_stub): Check for overflow when adding the
10865         sizes of the two strings.
10866         (re_search_stub): Check for overflow when adding START
10867         to RANGE; if it occurs, substitute the extreme value.
10868
10869 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10870
10871         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
10872
10873 2005-08-31  Jim Meyering  <jim@meyering.net>
10874
10875         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
10876         a pointer-to-const.
10877         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
10878         (register_state): Likewise.
10879         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
10880         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
10881         (group_nodes_into_DFAstates): Likewise.
10882
10883 2005-08-31  Jim Meyering  <jim@meyering.net>
10884
10885         * check-module: Add a FIXME comment.
10886
10887 2005-08-31  Eric Blake  <ebb9@byu.net>
10888
10889         * modules/unistd-safer (Files): Add unistd--.h.
10890         * modules/stdio-safer (Files): Add stdio--.h.
10891
10892 2005-08-31  Derek Price  <derek@ximbiot.com>
10893
10894         * lib/getdelim.c (getdelim): Return EOF on EOF.
10895         Reported by Larry Jones <lawrence.jones@ugs.com>.
10896
10897 2005-08-31  Bruno Haible  <bruno@clisp.org>
10898
10899         Avoid unnecessary diffs in the generated lib/Makefile.am.
10900         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
10901         the generated files.
10902         (func_import): Don't set cmd.
10903
10904 2005-08-31  Bruno Haible  <bruno@clisp.org>
10905
10906         * lib/strstr.c: Include <stddef.h>, for NULL.
10907         * lib/strcasestr.c: Likewise.
10908         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
10909
10910 2005-08-31  Bruno Haible  <bruno@clisp.org>
10911
10912         * gnulib-tool: New option --macro-prefix.
10913         (func_import): Use macro_prefix.
10914         (import): Handle option --macro-prefix.
10915
10916 2005-08-31  Bruno Haible  <bruno@clisp.org>
10917
10918         * gnulib-tool (import): Rename most ac_* variables to cached_*.
10919         Also use new variables cached_lgpl, cached_libtool.
10920
10921 2005-08-31  Bruno Haible  <bruno@clisp.org>
10922
10923         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
10924         always instantiating them.
10925
10926 2005-08-31  Bruno Haible  <bruno@clisp.org>
10927
10928         * gnulib-tool (func_import): Read the previous cached settings
10929         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
10930         earlier added by gnulib but are now dropped. Warn when a gnulib file
10931         overwrites a non-gnulib file.
10932
10933 2005-08-31  Bruno Haible  <bruno@clisp.org>
10934
10935         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
10936         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
10937         projects that don't keep autogenerated files in CVS. Put into
10938         actioncmd only the specified modules, not the transitive closure.
10939
10940 2005-08-31  Bruno Haible  <bruno@clisp.org>
10941
10942         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
10943         Create directories that shall be filled.
10944         (import): Don't look for gl_* macros in configure.ac. Recurse across
10945         all directories containing a gnulib-cache.m4 files, if meaningful.
10946
10947 2005-08-31  Bruno Haible  <bruno@clisp.org>
10948
10949         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
10950         (import): Set seen_libtool when we see gl_LIBTOOL.
10951
10952 2005-08-31  Bruno Haible  <bruno@clisp.org>
10953
10954         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
10955         declaration macro definitions from generated gnulib.m4.
10956
10957 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
10958
10959         * lib/iconvme.h: Add prototype for iconv_alloc.
10960
10961 2005-08-29  Simon Josefsson  <jas@extundo.com>
10962
10963         * lib/iconvme.c: Fix errno.
10964
10965 2005-08-29  Bruno Haible  <bruno@clisp.org>
10966
10967         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
10968         that it works when the directory contains spaces.
10969
10970 2005-08-29  Bruno Haible  <bruno@clisp.org>
10971
10972         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
10973
10974 2005-08-29  Bruno Haible  <bruno@clisp.org>
10975
10976         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
10977         Emit more advice.
10978
10979 2005-08-29  Bruno Haible  <bruno@clisp.org>
10980         and Stepan Kasal  <kasal@ucw.cz>
10981
10982         * check-module: If more parameters are given, check each of them
10983         separately; add more exceptions, as noted by Jim Meyering.
10984         (check_module): New procedure.
10985         (%exempt_header): Now contains all exceptions.
10986
10987 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
10988
10989         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
10990
10991 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
10992
10993         * lib/iconvme.c: Split iconv_string into iconv_alloc.
10994
10995 2005-08-28  Bruno Haible  <bruno@clisp.org>
10996
10997         * m4/gnulib-tool.m4: New file.
10998
10999 2005-08-27  Jim Meyering  <jim@meyering.net>
11000
11001         * modules/unistd-safer (Files): Add pipe-safer.c.
11002         * modules/fcntl-safer (Files): Add creat-safer.c.
11003
11004 2005-08-27  Jim Meyering  <jim@meyering.net>
11005
11006         * m4/stdlib-safer.m4: New file.  From coreutils.
11007         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
11008         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
11009         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
11010         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
11011         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
11012
11013 2005-08-27  Jim Meyering  <jim@meyering.net>
11014
11015         * lib/fopen-safer.c: Merge minor changes from coreutils.
11016         * lib/dup-safer.c: Likewise.
11017         * lib/fd-safer.c: Likewise.
11018
11019         Merge from coreutils.
11020         * lib/stdio--.h: New file.
11021         * lib/stdlib--.h: New file.
11022         * lib/mkstemp-safer.c: New file.
11023
11024         GNU tar needs these.
11025         * lib/pipe-safer.c: New file.
11026         * lib/creat-safer.c: New file.
11027         * lib/fcntl--.h (creat): Define to creat_safer.
11028         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
11029         * lib/unistd--.h (pipe): Define to pipe_safer.
11030         * lib/unistd-safer.h: Declare pipe_safer.
11031
11032 2005-08-26  Simon Josefsson  <jas@extundo.com>
11033
11034         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
11035         Haible <bruno@clisp.org>.
11036
11037 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
11038
11039         * lib/regex_internal.h: Remove all references to
11040         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
11041         or better.
11042         (bitset_not, bitset_merge, bitset_not_merge):
11043         (bitset_mask, re_string_allocate, re_string_construct):
11044         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
11045         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
11046         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
11047         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
11048         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11049         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11050         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
11051         (re_acquire_state_context):
11052         Remove unnecessary forward decls.
11053         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
11054         Put __attribute at function definition,
11055         now that the function decl has been removed.
11056         * lib/regex_internal.c (re_string_peek_byte_case):
11057         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
11058         Likewise.
11059
11060 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
11061
11062         * m4/regex.m4: Add AC_PREREQ(2.50).
11063         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
11064
11065 2005-08-25  Simon Josefsson  <jas@extundo.com>
11066
11067         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
11068         __fsetlocking.
11069
11070 2005-08-25  Simon Josefsson  <jas@extundo.com>
11071
11072         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
11073         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
11074         GLIBC specific code.
11075
11076 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11077
11078         Make regex safe for g++.  This fixes one real bug (an "err"
11079         that should have been "*err").  g++ problem reported by
11080         Sam Steingold.
11081         * lib/regex_internal.h (re_calloc): New macro, consistent with
11082         re_malloc etc.  All callers of calloc changed to use re_calloc.
11083         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
11084         not int.  All callers changed.
11085         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
11086         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
11087         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
11088         (find_recover_state): Change "err" to "*err"; this fixes what
11089         appears to be a real bug.
11090         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
11091         versus int.
11092
11093 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11094
11095         * modules/regex (Depends-on): Add malloc, since the code
11096         assumes that !malloc(0) means failure.
11097
11098 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11099
11100         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
11101
11102         alloca modernization/simplification for regex.
11103         * lib/regex.c: Remove portability cruft for alloca.  This no longer
11104         needs to be at the start of the file, and can be moved into
11105         regex_internal.h and simplified.
11106         * lib/regex_internal.h: Include <alloca.h>.
11107         (__libc_use_alloca) [!defined _LIBC]: New macro.
11108         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
11109         now works outside glibc.
11110
11111 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11112
11113         * config/srclist.txt: Add glibc bugs 1241, 1245.
11114
11115 2005-08-25  Jim Meyering  <jim@meyering.net>
11116
11117         * lib/open-safer.c: Include <config.h>.
11118         Otherwise, we'd lose LARGEFILE support in any file using
11119         e.g. "fcntl--.h"
11120
11121 2005-08-25  Bruno Haible  <bruno@clisp.org>
11122
11123         * m4/minmax.m4: Require autoconf 2.52.
11124         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
11125         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
11126         alternatives of translit over the alphabet.
11127         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
11128
11129 2005-08-24  Simon Josefsson  <jas@extundo.com>
11130
11131         * tests/test-getpass.c: New file.
11132
11133 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11134
11135         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
11136         for GNU regex features.
11137
11138 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11139
11140         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
11141         * lib/regex.h (regerror): Likewise.
11142
11143         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
11144         requires this.  (The code never needed it.)
11145
11146         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
11147         All uses of recently-renamed identifiers changed to use the new,
11148         POSIX-compliant names.  The code will build and run just fine
11149         without these changes, but it's better to eat our own dog food
11150         and use the standard-conforming names.
11151
11152         * lib/regex.h: Fix a multitude of POSIX name space violations.
11153         These changes have an effect only for programs that define
11154         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
11155         do not change anything for programs compiled in the normal way.
11156         Also, there is no effect on the ABI.
11157
11158         (_REGEX_SOURCE): New macro.
11159         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
11160         defined and _GNU_SOURCE is not; this fixes a name space violation.
11161
11162         Rename the following macros to obey POSIX requirements.
11163         The old names are still visible as macros if _REGEX_SOURCE is defined.
11164         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
11165         RE_BACKSLASH_ESCAPE_IN_LISTS.
11166         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
11167         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
11168         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
11169         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
11170         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
11171         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
11172         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
11173         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
11174         (REG_INTERVALS): renamed from RE_INTERVALS.
11175         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
11176         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
11177         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
11178         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
11179         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
11180         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
11181         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
11182         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
11183         RE_UNMATCHED_RIGHT_PAREN_ORD.
11184         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
11185         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
11186         (REG_DEBUG): renamed from RE_DEBUG.
11187         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
11188         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
11189         unusual, since we can't clash with the POSIX REG_ICASE.
11190         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
11191         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
11192         (REG_NO_SUB): renamed from RE_NO_SUB.
11193         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
11194         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
11195         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
11196         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
11197         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
11198         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
11199         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
11200         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
11201         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
11202         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
11203         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
11204         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
11205         RE_SYNTAX_POSIX_MINIMAL_BASIC.
11206         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
11207         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
11208         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
11209         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
11210         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
11211         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
11212         (REG_FIXED): Renamed from REGS_FIXED.
11213         (REG_NREGS): Renamed from RE_NREGS.
11214
11215         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
11216         of other REG_* macros, since POSIX says the user is allowed to
11217         #undef these macros selectively.
11218
11219         (reg_errcode_t): Update comment stating what other tables need
11220         to be consistent.
11221
11222         Rename the following enum values to obey POSIX requirements.
11223         The old names are still visible as macros.
11224         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
11225         is not defined, since GNU is supposed to be a superset of POSIX as
11226         much as possible, and since we want reg_errcode_t to be a signed
11227         type for implementation consistency.
11228         (_REG_NOERROR): Renamed from REG_NOERROR.
11229         (_REG_NOMATCH): Renamed from REG_NOMATCH.
11230         (_REG_BADPAT): Renamed from REG_BADPAT.
11231         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
11232         (_REG_ECTYPE): Renamed from REG_ECTYPE.
11233         (_REG_EESCAPE): Renamed from REG_EESCAPE.
11234         (_REG_ESUBREG): Renamed from REG_ESUBREG.
11235         (_REG_EBRACK): Renamed from REG_EBRACK.
11236         (_REG_EPAREN): Renamed from REG_EPAREN.
11237         (_REG_EBRACE): Renamed from REG_EBRACE.
11238         (_REG_BADBR): Renamed from REG_BADBR.
11239         (_REG_ERANGE): Renamed from REG_ERANGE.
11240         (_REG_ESPACE): Renamed from REG_ESPACE.
11241         (_REG_BADRPT): Renamed from REG_BADRPT.
11242         (_REG_EEND): Renamed from REG_EEND.
11243         (_REG_ESIZE): Renamed from REG_ESIZE.
11244         (_REG_ERPAREN): Renamed from REG_ERPAREN.
11245         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
11246         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
11247         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
11248         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
11249
11250         (_REG_RE_NAME, _REG_RM_NAME): New macros.
11251         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
11252         changed.  But support the old name if the new one is not defined
11253         and if _REGEX_SOURCE.
11254
11255         Change the following member names in struct re_pattern_buffer.
11256         The old names are still supported if !_REGEX_SOURCE.
11257         The new names are always supported, regardless of _REGEX_SOURCE.
11258         (re_buffer): Renamed from buffer.
11259         (re_allocated): Renamed from allocated.
11260         (re_used): Renamed from used.
11261         (re_syntax): Renamed from syntax.
11262         (re_fastmap): Renamed from fastmap.
11263         (re_translate): Renamed from translate.
11264         (re_can_be_null): Renamed from can_be_null.
11265         (re_regs_allocated): Renamed from regs_allocated.
11266         (re_fastmap_accurate): Renamed from fastmap_accurate.
11267         (re_no_sub): Renamed from no_sub.
11268         (re_not_bol): Renamed from not_bol.
11269         (re_not_eol): Renamed from not_eol.
11270         (re_newline_anchor): Renamed from newline_anchor.
11271
11272         Change the following member names in struct re_registers.
11273         The old names are still supported if !_REGEX_SOURCE.
11274         The new names are always supported, regardless of _REGEX_SOURCE.
11275         (rm_num_regs): Renamed from num_regs.
11276         (rm_start): Renamed from start.
11277         (rm_end): Renamed from end.
11278
11279         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
11280         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
11281         Prepend __ to parameter names.
11282
11283         Undo yesterday's changes.
11284
11285 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11286
11287         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
11288         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
11289         lib/regex.c.
11290
11291 2005-08-24  Jim Meyering  <jim@meyering.net>
11292
11293         Sync from coreutils.
11294         * m4/fcntl-safer.m4: New file.
11295
11296         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
11297         and object files for this module.
11298
11299 2005-08-24  Jim Meyering  <jim@meyering.net>
11300
11301         Sync from coreutils.
11302         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
11303
11304 2005-08-24  Jim Meyering  <jim@meyering.net>
11305
11306         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
11307         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
11308
11309 2005-08-24  Jim Meyering  <jim@meyering.net>
11310
11311         * modules/fcntl-safer: New module.
11312         * modules/fts (Depends-on): Add fcntl-safer.
11313         * MODULES.html.sh (File descriptor based Input/Output):
11314         Add fcntl-safer.
11315
11316 2005-08-24  Bruno Haible  <bruno@clisp.org>
11317
11318         Support for unit test modules.
11319         * modules/README: Mention tests modules.
11320         * modules/TEMPLATE-TESTS: New file.
11321         * gnulib-tool: New options --extract-tests-module, --with-tests and
11322         --tests-base (unused for the moment).
11323         (testsbase, inctests): New variables.
11324         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
11325         (func_verify_module): Exclude TEMPLATE-TESTS.
11326         (func_verify_nontests_module, func_verify_tests_module): New functions.
11327         (func_get_dependencies): Add implicit dependency for tests modules.
11328         (func_get_tests_module): New function.
11329         (func_modules_transitive_closure): When --with-tests was specified,
11330         include the unit tests as well, unless explicitly avoided.
11331         (func_emit_lib_Makefile_am): Ignore the tests modules here.
11332         (func_emit_tests_Makefile_am): New function.
11333         (func_create_testdir): When --with-tests was specified, emit a
11334         tests/ directory.
11335         * MODULES.html.sh (Future developments): Update.
11336
11337 2005-08-24  Bruno Haible  <bruno@clisp.org>
11338
11339         * modules/tls-tests: New file.
11340         * tests/test-tls.c: New file, from GNU gettext.
11341
11342 2005-08-24  Bruno Haible  <bruno@clisp.org>
11343
11344         * modules/lock-tests: New file.
11345         * tests/test-lock.c: New file, from GNU gettext.
11346
11347 2005-08-24  Bruno Haible  <bruno@clisp.org>
11348
11349         * lib/lock.h: Add multiple inclusion guard.
11350         * lib/tls.h: Add multiple inclusion guard.
11351
11352 2005-08-24  Bruno Haible  <bruno@clisp.org>
11353
11354         * gnulib-tool: Add support for the --aux-dir option to
11355         --create-testdir, --create-megatestdir, --test, --megatest.
11356         (func_create_testdir, func_create_megatestdir): Optionally emit a
11357         AC_CONFIG_AUX_DIR directive.
11358         (create-testdir, create-megatestdir, test, megatest): Provide a
11359         default value for $auxdir.
11360
11361 2005-08-24  Bruno Haible  <bruno@clisp.org>
11362
11363         * gnulib-tool (import): Use compound statement instead of subshell
11364         where possible.
11365
11366 2005-08-24  Bruno Haible  <bruno@clisp.org>
11367
11368         * gnulib-tool (import): Change --aux-dir default to "build-aux".
11369
11370 2005-08-24  Bruno Haible  <bruno@clisp.org>
11371
11372         * gnulib-tool (func_version): Update.
11373
11374 2005-08-24  Bruno Haible  <bruno@clisp.org>
11375
11376         * gnulib-tool (func_import, func_create_testdir,
11377         func_create_megatestdir): Quote all autoconf macro arguments.
11378
11379 2005-08-24  Bruno Haible  <bruno@clisp.org>
11380
11381         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
11382         option --force, because --force causes the aclocal.m4 of each
11383         subdirectory to be newer than the corresponding config.h.in.
11384
11385 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11386
11387         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
11388         All contents moved to gl_REGEX.
11389         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
11390         assume that it does.
11391
11392 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11393
11394         * lib/regex.h (REG_NOSYS)
11395         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
11396         Define, since POSIX requires it as of 2001.
11397         (_REG_ENOSYS)
11398         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
11399         New private symbol, used to keep the enum signed in all cases.
11400         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
11401         Youngman in
11402         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
11403
11404         * lib/regex_internal.c (re_string_skip_chars, register_state):
11405         (calc_state_hash):
11406         Remove forward decls; no longer needed now that we use prototypes.
11407         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
11408         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
11409         (clean_state_log_if_needed): Likewise.
11410
11411 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11412
11413         * config/srclist.txt: Add glibc bugs 1231-1233.
11414
11415 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11416
11417         Fix problems reported by Sam Steingold in
11418         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
11419         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
11420         assumed that reg_errcode_t is a signed type, which is not
11421         necessarily true if _XOPEN_SOURCE is not defined.
11422         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
11423         since some compilers warn about it otherwise.
11424
11425 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11426
11427         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
11428         (init_word_char, create_initial_state, duplicate_node_closure):
11429         (fetch_token, peek_token_bracket, build_range_exp):
11430         (build_collating_symbol): Remove forward decls; no longer needed
11431         now that we use prototypes.
11432
11433         * lib/regcomp.c:
11434         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
11435         (re_compile_fastmap_iter, regcomp, regerror, regfree):
11436         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
11437         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
11438         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
11439         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
11440         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
11441         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
11442         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
11443         (build_range_exp, build_collating_symbol, parse_bracket_exp):
11444         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
11445         (build_charclass, build_charclass_op, fetch_number, create_tree):
11446         (create_token_tree, mark_opt_subexp, duplicate_tree):
11447         Use prototypes rather than old-style definitions.
11448
11449         * lib/regex_internal.c:
11450         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
11451         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
11452         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11453         (re_string_reconstruct, re_string_peek_byte_case):
11454         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
11455         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11456         (re_node_set_init_copy, re_node_set_add_intersect):
11457         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11458         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11459         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11460         (re_acquire_state, re_acquire_state_context, register_state):
11461         (create_ci_newstate, create_cd_newstate, free_state):
11462         Likewise.
11463         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
11464         re_search_2):
11465         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
11466         (re_search_internal, prune_impossible_nodes):
11467         (acquire_init_state_context, check_matching, static):
11468         (check_halt_node_context, check_halt_state_context, proceed_next_node):
11469         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
11470         (update_regs, sift_states_backward, build_sifted_states):
11471         (clean_state_log_if_needed, merge_state_array):
11472         (update_cur_sifted_state, add_epsilon_src_nodes):
11473         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
11474         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
11475         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
11476         (find_recover_state, check_subexp_matching_top, transit_state_mb):
11477         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
11478         (check_arrival, check_arrival_add_next_nodes):
11479         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11480         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11481         (check_node_accept_bytes, check_node_accept, extend_buffers):
11482         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
11483         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
11484         (sift_ctx_init):
11485         Likewise.
11486
11487         * lib/regex_internal.h:
11488         (re_string_allocate, re_string_construct, re_string_reconstruct):
11489         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
11490         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
11491         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
11492         (re_string_context_at, re_string_peek_byte_case):
11493         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
11494         is defined, since we now use prototypes always.
11495
11496         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
11497         C89 or better.  All uses removed.
11498
11499 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11500
11501         * config/srclist.txt: Add glibc bugs 1220-1227.
11502
11503 2005-08-20  Jim Meyering  <jim@meyering.net>
11504
11505         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
11506         of unused local, dfa.
11507
11508 2005-08-20  Bruno Haible  <bruno@clisp.org>
11509
11510         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
11511
11512 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11513
11514         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
11515         (re_node_set_insert_last, re_dfa_add_node):
11516         Rename local variables to avoid GCC shadowing warnings.
11517
11518 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11519
11520         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
11521         [defined lint]: Suppress bogus uninitialized-variable warnings.
11522
11523         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
11524         and let the caller return REG_ESPACE if out of space.  This
11525         removes an uninitialied-variable warning with GCC 4.0.1, and also
11526         avoids taking the address of a local variable.  All callers
11527         changed.
11528
11529 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11530
11531         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
11532         $LIBCSRC/posix/regexec.c.
11533         Add glibc bug 1217 for regcomp.c.
11534
11535 2005-08-19  Jim Meyering  <jim@meyering.net>
11536
11537         * lib/regexec.c (proceed_next_node): Redo local variables to
11538         avoid GCC shadowing warnings.
11539
11540 2005-08-18  Bruno Haible  <bruno@clisp.org>
11541
11542         * lib/strstr.c (strstr): Fix return value in multibyte case.
11543         * lib/strcasestr.c (strcasestr): Likewise.
11544
11545 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11546
11547         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
11548
11549 2005-08-17  Jim Meyering  <jim@meyering.net>
11550
11551         Make the %s format (seconds since the epoch) work for a negative
11552         number and when used with a zero-padded field width, e.g. %015s.
11553
11554         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
11555         label so that it precedes the code to set `digits'.  Otherwise,
11556         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
11557         print `00-22'.  Now, it prints `-0022', as it should.
11558
11559 2005-08-17  Bruno Haible  <bruno@clisp.org>
11560
11561         * modules/strstr (Files): Add m4/mbrtowc.m4.
11562         (Depends-on): Add mbuiter.
11563
11564 2005-08-17  Bruno Haible  <bruno@clisp.org>
11565
11566         * modules/strcasestr: New file.
11567         * MODULES.html.sh (String handling, based on ANSI C 89): Add
11568         strcasestr.
11569
11570 2005-08-17  Bruno Haible  <bruno@clisp.org>
11571
11572         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
11573
11574 2005-08-17  Bruno Haible  <bruno@clisp.org>
11575
11576         * modules/mbuiter: New file.
11577         * MODULES.html.sh (Extended multibyte and wide character utilities):
11578         Add mbuiter.
11579
11580 2005-08-17  Bruno Haible  <bruno@clisp.org>
11581
11582         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
11583         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
11584
11585 2005-08-17  Bruno Haible  <bruno@clisp.org>
11586
11587         * m4/strcasestr.m4: New file.
11588
11589 2005-08-17  Bruno Haible  <bruno@clisp.org>
11590
11591         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
11592         * lib/strstr.c: Completely rewritten, with multibyte locale support.
11593
11594 2005-08-17  Bruno Haible  <bruno@clisp.org>
11595
11596         * lib/strcasestr.h: New file.
11597         * lib/strcasestr.c: New file.
11598
11599 2005-08-17  Bruno Haible  <bruno@clisp.org>
11600
11601         * lib/strcasecmp.c: Use mbuiter.h.
11602
11603 2005-08-17  Bruno Haible  <bruno@clisp.org>
11604
11605         * lib/mbuiter.h: New file.
11606
11607 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
11608
11609         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
11610         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
11611         and gl_GETOPT are both invoked via different paths (as happens
11612         with GNU tar CVS because it uses both argp and getopt), the former
11613         wins.
11614
11615 2005-08-16  Bruno Haible  <bruno@clisp.org>
11616
11617         * modules/tls: New file.
11618         * MODULES.html.sh (Multithreading): Add tls.
11619
11620 2005-08-16  Bruno Haible  <bruno@clisp.org>
11621
11622         * modules/strnlen1: New file.
11623         * MODULES.html.sh (String handling): Add strnlen1.
11624
11625 2005-08-16  Bruno Haible  <bruno@clisp.org>
11626
11627         * modules/strcase (Files): Add m4/mbrtowc.m4.
11628         (Depends-on): Add strnlen1, mbchar.
11629
11630 2005-08-16  Bruno Haible  <bruno@clisp.org>
11631
11632         * modules/mbiter: New file.
11633         * MODULES.html.sh (Extended multibyte and wide character utilities):
11634         Add mbiter.
11635
11636 2005-08-16  Bruno Haible  <bruno@clisp.org>
11637
11638         * modules/mbfile: New file.
11639         * MODULES.html.sh (Extended multibyte and wide character utilities):
11640         Add mbfile.
11641
11642 2005-08-16  Bruno Haible  <bruno@clisp.org>
11643
11644         * modules/mbchar: New file.
11645         * MODULES.html.sh (Extended multibyte and wide character utilities):
11646         New section.
11647
11648 2005-08-16  Bruno Haible  <bruno@clisp.org>
11649
11650         * m4/tls.m4: New file, from GNU gettext.
11651
11652 2005-08-16  Bruno Haible  <bruno@clisp.org>
11653
11654         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
11655         always.
11656         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
11657
11658 2005-08-16  Bruno Haible  <bruno@clisp.org>
11659
11660         * m4/mbiter.m4: New file.
11661
11662 2005-08-16  Bruno Haible  <bruno@clisp.org>
11663
11664         * m4/mbfile.m4: New file.
11665
11666 2005-08-16  Bruno Haible  <bruno@clisp.org>
11667
11668         * m4/mbchar.m4: New file.
11669
11670 2005-08-16  Bruno Haible  <bruno@clisp.org>
11671
11672         * lib/tls.h: New file, from GNU gettext.
11673         * lib/tls.c: New file, from GNU gettext.
11674
11675 2005-08-16  Bruno Haible  <bruno@clisp.org>
11676
11677         * lib/strnlen1.h: New file.
11678         * lib/strnlen1.c: New file.
11679
11680 2005-08-16  Bruno Haible  <bruno@clisp.org>
11681
11682         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
11683         (mbi_init): Update.
11684         (mbi_avail, mbi_advance): Let the iteration end before the terminating
11685         NUL byte, not after it.
11686
11687 2005-08-16  Bruno Haible  <bruno@clisp.org>
11688
11689         * lib/strcase.h (strcasecmp): Add note in comments.
11690         * lib/strncasecmp.c: Use code from strcasecmp.c.
11691         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
11692         (strcasecmp): Work correctly in multibyte locales.
11693
11694 2005-08-16  Bruno Haible  <bruno@clisp.org>
11695
11696         * lib/mbiter.h: New file.
11697
11698 2005-08-16  Bruno Haible  <bruno@clisp.org>
11699
11700         * lib/mbfile.h: New file.
11701
11702 2005-08-16  Bruno Haible  <bruno@clisp.org>
11703
11704         * lib/mbchar.h: New file.
11705         * lib/mbchar.c: New file.
11706
11707 2005-08-16  Bruno Haible  <bruno@clisp.org>
11708
11709         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
11710         the valid ones. Makes the comparison operations transitive:
11711         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
11712         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
11713
11714 2005-08-15  Simon Josefsson  <jas@extundo.com>
11715
11716         * modules/ssize_t (License): Change to 'unlimited'.
11717
11718         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
11719
11720 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11721
11722         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
11723         Add comments for each pending glibc patch.
11724
11725 2005-08-15  Bruno Haible  <bruno@clisp.org>
11726
11727         * lib/regex.h (__restrict_arr): Don't define to __restrict if
11728         __cplusplus is defined.
11729
11730 2005-08-14  Jim Meyering  <jim@meyering.net>
11731
11732         Sync from coreutils.
11733
11734         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
11735         Use the hash-table-based cycle-detection code not just when
11736         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
11737         Reported by James Youngman in
11738         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
11739         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
11740         FTS_TIGHT_CYCLE_CHECK.
11741         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
11742         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
11743         once again.
11744         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
11745         * lib/fts.c (fd_safer): Remove decl.
11746         Include fcntl--.h rather than unistd-safer.h
11747         (fts_safe_changedir): Don't call fd_safer; no longer needed
11748         now that we include fcntl--.h.
11749
11750 2005-08-12  Simon Josefsson  <jas@extundo.com>
11751
11752         * modules/getndelim2: Use ssize_t module.
11753         * modules/getnline: Likewise.
11754         * modules/safe-read: Likewise.
11755         * modules/xreadlink: Likewise.
11756
11757         * modules/ssize_t: New file.
11758
11759 2005-08-12  Simon Josefsson  <jas@extundo.com>
11760
11761         * m4/readline.m4: Look for termcap, curses or ncurses if required.
11762
11763 2005-08-12  Simon Josefsson  <jas@extundo.com>
11764
11765         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11766         ssize_t.
11767
11768 2005-08-12  Simon Josefsson  <jas@extundo.com>
11769
11770         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
11771         readline, getdelim and check_version.
11772         (Support for systems lacking ISO C 99: Sizes of integer types):
11773         Add size_max.
11774
11775 2005-08-12  Bruno Haible  <bruno@clisp.org>
11776
11777         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
11778
11779 2005-08-11  Simon Josefsson  <jas@extundo.com>
11780
11781         * modules/readline: New file.
11782
11783         * modules/strnlen (Files): Add strnlen.h.
11784
11785 2005-08-11  Simon Josefsson  <jas@extundo.com>
11786
11787         * m4/readline.m4: New file.
11788
11789 2005-08-11  Simon Josefsson  <jas@extundo.com>
11790
11791         * lib/readline.h, readline.c: New file.
11792
11793 2005-08-11  Simon Josefsson  <jas@extundo.com>
11794
11795         * doc/gnulib.texi (Initial import, Finishing touches): Mention
11796         gl_AVOID.
11797
11798 2005-08-11  Bruno Haible  <bruno@clisp.org>
11799
11800         * lib/strnlen.h (strnlen): Change parameter name to match comment.
11801
11802 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
11803
11804         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
11805
11806 2005-08-10  Simon Josefsson  <jas@extundo.com>
11807
11808         * tests/test-iconvme.c: New file.
11809
11810 2005-08-10  Simon Josefsson  <jas@extundo.com>
11811
11812         * m4/strnlen.m4: New file.
11813
11814         * m4/strndup.m4: Don't check for strnlen declaration, done in
11815         strnlen.m4.
11816
11817 2005-08-10  Simon Josefsson  <jas@extundo.com>
11818
11819         * lib/strndup.c: Use strnlen.h.
11820
11821         * lib/strnlen.h: New file.
11822
11823 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11824
11825         * README: Typos.
11826
11827 2005-08-02  Simon Josefsson  <jas@extundo.com>
11828
11829         * modules/readline: New file.
11830
11831 2005-08-02  Simon Josefsson  <jas@extundo.com>
11832
11833         * modules/getdelim: New file.
11834
11835         * modules/getline: Rewrite, don't use getndelim2.
11836
11837 2005-08-02  Simon Josefsson  <jas@extundo.com>
11838
11839         * m4/getline.m4: Separate out getdelim stuff into separate module.
11840
11841         * m4/getdelim.m4: New file.
11842
11843 2005-08-02  Simon Josefsson  <jas@extundo.com>
11844
11845         * lib/getline.h, getline.c: Rewrite.
11846
11847         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
11848
11849 2005-07-31  Bruno Haible  <bruno@clisp.org>
11850
11851         * lib/lock.h (gl_lock_initializer): New macro.
11852         (gl_lock_define_initialized): Use it.
11853         (gl_rwlock_initializer): New macro.
11854         (gl_rwlock_define_initialized): Use it.
11855         (gl_recursive_lock_initializer): New macro.
11856         (gl_recursive_lock_define_initialized): Use it.
11857
11858 2005-07-30  Karl Berry  <karl@gnu.org>
11859
11860         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
11861         Report from Ben Pfaff, regarding getopt.
11862
11863 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
11864
11865         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
11866         normal way.
11867         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
11868         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
11869         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
11870         (gl_GETOPT): Use the new macros.  Most of the implementation
11871         is moved to the new macros.  This is for programs like Emacs
11872         that don't want all the functionality of gl_GETOPT.
11873
11874 2005-07-26  Bruno Haible  <bruno@clisp.org>
11875
11876         * m4/lock.m4: Update from GNU gettext.
11877
11878 2005-07-26  Bruno Haible  <bruno@clisp.org>
11879
11880         * lib/lock.h: Update from GNU gettext.
11881         * lib/lock.c: Update from GNU gettext.
11882
11883 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
11884
11885         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
11886         obsolescent AC_TRY_RUN.  Include the default includes files, for
11887         'exit'.
11888
11889 2005-07-24  Bruno Haible  <bruno@clisp.org>
11890
11891         * modules/visibility: New file.
11892         * MODULES.html.sh (Misc): Add visibility.
11893
11894 2005-07-24  Bruno Haible  <bruno@clisp.org>
11895
11896         * m4/visibility.m4: New file.
11897
11898 2005-07-24  Bruno Haible  <bruno@clisp.org>
11899
11900         * doc/visibility.texi: New file.
11901
11902 2005-07-22  Bruno Haible  <bruno@clisp.org>
11903
11904         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
11905         $(ALLOCA_H), redundant through BUILT_SOURCES.
11906         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
11907         redundant through BUILT_SOURCES.
11908         * modules/byteswap (Makefile.am): Remove explicit dependency on
11909         $(BYTESWAP_H), redundant through BUILT_SOURCES.
11910         * modules/fnmatch (Makefile.am): Remove explicit dependency on
11911         $(FNMATCH_H), redundant through BUILT_SOURCES.
11912         * modules/getopt (Makefile.am): Remove explicit dependency on
11913         $(GETOPT_H), redundant through BUILT_SOURCES.
11914         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
11915         redundant through BUILT_SOURCES.
11916         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
11917         redundant through BUILT_SOURCES.
11918         * modules/stdbool (Makefile.am): Remove explicit dependency on
11919         $(STDBOOL_H), redundant through BUILT_SOURCES.
11920         * modules/stdint (Makefile.am): Remove explicit dependency on
11921         $(STDINT_H), redundant through BUILT_SOURCES.
11922         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
11923         Remove explicit dependency on $(SYSEXITS_H).
11924         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
11925
11926 2005-07-18  Simon Josefsson  <jas@extundo.com>
11927
11928         * lib/check-version.c (check_version): Accept identical versions too.
11929
11930 2005-07-18  Bruno Haible  <bruno@clisp.org>
11931
11932         * modules/lock: New file.
11933         * MODULES.html.sh (Multithreading): New section.
11934
11935 2005-07-18  Bruno Haible  <bruno@clisp.org>
11936
11937         * m4/lock.m4: New file, from GNU gettext.
11938
11939 2005-07-18  Bruno Haible  <bruno@clisp.org>
11940
11941         * lib/lock.h: New file, from GNU gettext.
11942         * lib/lock.c: New file, from GNU gettext.
11943
11944 2005-07-18  Bruno Haible  <bruno@clisp.org>
11945
11946         * lib/lock.h (gl_once_t): New type.
11947         (gl_once_define, gl_once): New macros.
11948         * lib/lock.c (fresh_once): New variable.
11949         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
11950         functions.
11951
11952 2005-07-16  Simon Josefsson  <jas@extundo.com>
11953
11954         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
11955         workaround, suggested by Bruno.
11956
11957 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11958
11959         * modules/xalloc (Depends-on): Add xalloc-die.
11960         * modules/xvasprintf (Depends-on): Add xalloc-die.
11961
11962 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11963
11964         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
11965         with a minor change.
11966
11967 2005-07-15  Bruno Haible  <bruno@clisp.org>
11968
11969         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
11970         When using lib/poll.c, define poll as rpl_poll.
11971
11972 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
11973
11974         * modules/argp (Depends-on): Remove unlocked-io.
11975
11976 2005-07-14  Derek Price  <derek@ximbiot.com>
11977
11978         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
11979         for glob symlink bug.
11980
11981 2005-07-14  Bruno Haible  <bruno@clisp.org>
11982
11983         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
11984         Instead, test for *_unlocked function declarations directly.
11985
11986 2005-07-11  Simon Josefsson  <jas@extundo.com>
11987
11988         * modules/size_max: New file.
11989
11990         * modules/xsize: Depend on size_max module for size_max.m4.
11991
11992 2005-07-11  Simon Josefsson  <jas@extundo.com>
11993
11994         * lib/size_max.h: New file.
11995
11996 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
11997
11998         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
11999         copyright symbol and the year.
12000         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
12001         (version_etc_va): Use parameterized copyright notice.
12002         Reword to conform to the current GNU coding standards.
12003
12004 2005-07-11  Karl Berry  <karl@gnu.org>
12005
12006         * doc/gnulib.texi (Quoting): new node.
12007         (Initial import): more info, from Patrice.
12008
12009 2005-07-11  Bruno Haible  <bruno@clisp.org>
12010
12011         * gnulib-tool (func_usage): Document option --avoid.
12012         (Command line options): Handle --avoid.
12013         (func_acceptable): New function.
12014         (func_modules_transitive_closure): Use it.
12015
12016 2005-07-11  Bruno Haible  <bruno@clisp.org>
12017
12018         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
12019         Reported by Jim Meyering.
12020
12021 2005-07-10  Bruno Haible  <bruno@clisp.org>
12022
12023         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
12024         Needed when size_t is smaller than 'unsigned int'.
12025         Reported by Paul Eggert.
12026
12027 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12028
12029         * modules/argp (Depends-on): Add unlocked-io
12030
12031 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12032
12033         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
12034         block of defines.
12035
12036 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12037
12038         * config/srclist.txt: Comment out regcomp.c, since we have a porting
12039         fix now.
12040
12041 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
12042         and Paul Eggert  <eggert@cs.ucla.edu>
12043
12044         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
12045         in wint_t, not wchar_t.  Remove now-unnecessary cast.
12046
12047 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12048
12049         * modules/regex (Files): Add lib/regex_internal.c,
12050         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
12051         (Depends-on): Add extensions.
12052         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
12053
12054 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12055
12056         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
12057         pathconf.
12058         * m4/same.m4 (gl_SAME): Likewise.
12059         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
12060
12061         * m4/regex.m4: Adjust to new libc regex implementation.
12062         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
12063         all the .c and .h parts of (the new) regex.
12064         Quote the m4 stuff better.
12065         Check for RE_ICASE bug of old gnulib.
12066         Check for REG_STARTEND of recent libc.
12067         Rename local variables from jm_* to gl_*.
12068         Quote operand of "test -f".
12069         Say "recent enough" version of libc, not "version 2".
12070         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
12071         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
12072         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
12073         Remove check for btowc, isascii.
12074         Require AM_LANGINFO_CODESET.
12075
12076 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12077
12078         * lib/regex.c, regex.h: Sync from libc.
12079         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
12080         * lib/regexec.c:
12081         New files, synced from libc, except that regex_internal.h
12082         currently has a small porting fix.
12083
12084 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12085
12086         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
12087         regex_internal.c, regexec.c.
12088         Add regex_internal.h too, but as a comment, since the libc version
12089         is currently broken in gnulib mode.
12090
12091 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12092
12093         Support programs like Emacs that use gnulib but not gettext.
12094         * MODULES.html.sh (Internationalization functions): Add gettext-h.
12095         * modules/gettext-h: New file.
12096         * modules/gettext (Files): Remove lib/gettext.h.
12097         (Depends-on): Add gettext-h.
12098         (Makefile.am): Remove lib_SOURCES.
12099         * modules/argmatch, modules/c-stack, modules/closeout:
12100         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
12101         * modules/execute, modules/file-type, modules/getaddrinfo:
12102         * modules/getopt, modules/human, modules/javacomp:
12103         * modules/javaexec, modules/mkdir-p, modules/obstack:
12104         * modules/openat, modules/pagealign_alloc, modules/pipe:
12105         * modules/quotearg, modules/regex, modules/rpmatch:
12106         * modules/unicodeio, modules/userspec, modules/version-etc:
12107         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
12108         * modules/xsetenv:
12109         Depend on gettext-h, not gettext.
12110
12111 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12112
12113         * gnulib-tool (func_import): Add support for 'public domain' license.
12114         * modules/alloca, modules/atexit, modules/memmove:
12115         Now public domain, not GPL.
12116         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
12117         * modules/realloc, modules/strerror, modules/strtod:
12118         Now LGPL, not GPL.
12119
12120 2005-07-05  Bruno Haible  <bruno@clisp.org>
12121
12122         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
12123         autoconf CVS. Needed for mingw.
12124
12125 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12126
12127         Remove the dependency of the strftime module on the tzset module.
12128         * modules/strftime (Depends-on): Remove dependency on tzset.
12129
12130 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12131
12132         Remove the dependency of the strftime module on the tzset module.
12133         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
12134         gl_FUNC_TZSET_CLOBBER.
12135
12136 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12137
12138         Remove the dependency of the strftime module on the tzset module.
12139         * lib/strftime.c (my_strftime)
12140         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
12141         Copy the input structure, to work around some of the bug with
12142         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
12143         Solaris releases, you should also use the tzset module, but we won't
12144         require it as a dependency any more since we don't want LGPLed code
12145         to depend on GPLed code.
12146
12147 2005-07-02  Jim Meyering  <jim@meyering.net>
12148
12149         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
12150         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
12151         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
12152         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
12153
12154 2005-07-02  Jim Meyering  <jim@meyering.net>
12155
12156         * lib/backupfile.c (backup_args): Change a `0' to NULL.
12157
12158 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12159
12160         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
12161         declares only 'struct timespec;' (!).
12162
12163 2005-07-01  Jim Meyering  <jim@meyering.net>
12164
12165         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
12166         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
12167         * lib/save-cwd.c, tempname.c:
12168         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12169         and don't include <sys/file.h>).
12170
12171 2005-06-29  Jim Meyering  <jim@meyering.net>
12172
12173         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
12174         type name.  Use the variable name instead.
12175         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
12176         Likewise.
12177
12178 2005-06-28  Simon Josefsson  <jas@extundo.com>
12179
12180         * modules/check-version (Files): Add check-version.m4.
12181
12182 2005-06-28  Simon Josefsson  <jas@extundo.com>
12183
12184         * m4/check-version.m4: New file, suggested by Jim Meyering
12185         <jim@meyering.net>.
12186
12187 2005-06-28  Simon Josefsson  <jas@extundo.com>
12188
12189         * lib/check-version.h, lib/check-version.c: New files.
12190
12191 2005-06-28  Simon Josefsson  <jas@extundo.com>
12192
12193         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
12194         collision with global variable.  Better indentation.  Don't
12195         increment buffer pointer beyond buffer end.  Based on comments
12196         from Paul Eggert <eggert@cs.ucla.edu>.
12197
12198         * lib/base64.h: Indent.
12199
12200 2005-06-28  Simon Josefsson  <jas@extundo.com>
12201
12202         * doc/gnulib.texi (Library version handling): New section.
12203
12204 2005-06-28  Jim Meyering  <jim@meyering.net>
12205
12206         * check-module (find_included_lib_files): Hard-code another
12207         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
12208         but modules/fts-lgpl (correctly) does not list those files.
12209
12210         * modules/canonicalize (Files): Add lib/pathmax.h.
12211
12212 2005-06-25  Simon Josefsson  <jas@extundo.com>
12213
12214         * modules/check-version: New file.
12215
12216 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
12217
12218         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
12219         initializer of struct addrinfo, as an indication that we don't
12220         care how many members the structure has.
12221
12222 2005-06-24  Derek Price  <derek@ximbiot.com>
12223         and Bruno Haible  <bruno@clisp.org>
12224
12225         Remove stat module & update lstat.
12226         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
12227         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
12228         * m4/stat.m4: Remove this file.
12229
12230 2005-06-24  Derek Price  <derek@ximbiot.com>
12231         and Bruno Haible  <bruno@clisp.org>
12232
12233         Remove stat module & update lstat.
12234         * lib/stat.c: Remove this file...
12235         (slash_aware_lstat): ...moving this content and its support...
12236         * lib/lstat.c (rpl_lstat): ...into here.
12237         * lib/lstat.h: New file.
12238
12239 2005-06-24  Derek Price  <derek@ximbiot.com>
12240         and Bruno Haible  <bruno@clisp.org>
12241
12242         Remove stat module & update lstat.
12243         * config/srclist.txt (libc sources): Remove stat.
12244
12245 2005-06-24  Derek Price  <derek@ximbiot.com>
12246         and Bruno Haible  <bruno@clisp.org>
12247
12248         Remove stat module & update lstat.
12249         * MODULES.html.sh (stat): Remove.
12250         * MODULES.html: Regenerated.
12251         * modules/lstat (Description): Correct function name.
12252         (Files): Add "lstat.h".
12253         (Depends-on): Remove stat, add xalloc, stat-macros.
12254         * modules/stat: Remove this file.
12255         (Include): Add "lstat.h", remove <sys/stat.h>.
12256
12257 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
12258
12259         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
12260         (ranged_convert): Don't save conversion in a temporary struct.
12261         This causes a warning with GCC 4.0.0, and anyway in the typical
12262         case it's not worth the extra 100 bytes or so of code.
12263         (ranged_convert, __mktime_internal): When calling a function via a
12264         pointer P, use P () rather than (*P) (), as we now assume C89 or
12265         better.
12266
12267 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12268
12269         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
12270         "who -r" failed to give output.  Problem reported by Tim Waugh.
12271
12272         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
12273         (xcalloc): Use it to avoid needless tests.
12274         Problem reported by Jim Meyering.
12275
12276 2005-06-20  Derek Price  <derek@ximbiot.com>
12277
12278         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
12279         unnecessary for Autoconfs > 2.59c.
12280
12281 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12282
12283         * lib/argp.h (__option_is_short): Check upper limit of
12284         __key. Isprint() requires its argument to have the value
12285         of an unsigned char or EOF.
12286
12287 2005-06-16  Jim Meyering  <jim@meyering.net>
12288
12289         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
12290         when either N or S is zero.
12291
12292 2005-06-16  Derek Price  <derek@ximbiot.com>
12293
12294         * m4/bison.m4: Declare YACC & YFLAGS precious.
12295
12296 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
12297
12298         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
12299         multibyte string or pattern, fall back on unibyte matching.
12300         Problem reported by James Youngman.
12301
12302 2005-06-08  Bruno Haible  <bruno@clisp.org>
12303
12304         * modules/csharpcomp: New file.
12305         * MODULES.html.sh (C#): Add csharpcomp.
12306
12307 2005-06-08  Bruno Haible  <bruno@clisp.org>
12308
12309         * m4/csharpcomp.m4: New file, from GNU gettext.
12310
12311 2005-06-08  Bruno Haible  <bruno@clisp.org>
12312
12313         * lib/csharpcomp.h: New file, from GNU gettext.
12314         * lib/csharpcomp.c: New file, from GNU gettext.
12315         * lib/csharpcomp.sh.in: New file, from GNU gettext.
12316
12317 2005-06-08  Bruno Haible  <bruno@clisp.org>
12318
12319         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
12320         warning on mingw.
12321
12322 2005-06-07  Derek Price  <derek@ximbiot.com>
12323
12324         Sync from CVS.
12325         * lib/glob_.h: Indent nested #ifdef.
12326
12327 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12328
12329         Sync from coreutils.
12330         Use "file name" when talking about file names, instead of "filename"
12331         or "path", as per the GNU coding standards.
12332         * lib/mkdir-p.c: Renamed from makepath.c.
12333         (make_dir_parents): Renamed from make_path.  All callers changed.
12334         * lib/mkdir-p.h: Likewise.  All includers changed.
12335         * lib/filenamecat.c: Renamed from path-concat.c.
12336         (file_name_concat): Renamed from path_concat.  All callers changed.
12337         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
12338         * lib/filenamecat.h: Likewise.  All includers changed.
12339         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
12340         in comments or local variable names.
12341         * lib/basename.c: Likewise.
12342         * lib/canonicalize.c, canonicalize.h: Likewise.
12343         * lib/dirname.c, dirname.h: Likewise.
12344         * lib/euidaccess.c: Likewise.
12345         * lib/exclude.c: Likewise
12346         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
12347         * lib/fsusage.c, fsuage.h: Likewise.
12348         * lib/fts.c, fts_.h: Likewise.
12349         * lib/getcwd.c: Likewise.
12350         * lib/getloadavg.c: Likewise.
12351         * lib/mkstemp.c: Likewise.
12352         * lib/mountlist.c, mountlist.h: Likewise.
12353         * lib/openat.c, openat.h: Likewise.
12354         * lib/readlink-stub.c: Likewise.
12355         * lib/readutmp.c, readutmp.h: Likewise.
12356         * lib/rename.c: Likewise.
12357         * lib/rmdir.c: Likewise.
12358         * lib/same.c: Likewise.
12359         * lib/savedir.c: Likewise.
12360         * lib/stripslash.c: Likewise.
12361         * lib/tempname.c: Likewise.
12362         * lib/xreadlink.c: Likewise.
12363         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
12364         All uses changed.
12365         * lib/exclude.h: Likewise.
12366
12367         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
12368         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12369         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
12370         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12371         * lib/pathmax.h: Include <limits.h> unconditionally, since other
12372         files have been getting away with it for years (MORE/BSD 4.3
12373         is extinct now).
12374         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
12375         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12376
12377         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
12378         Define to 256, not 255, as per modern POSIX.
12379
12380 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12381
12382         Sync from coreutils.
12383         Use "file name" when talking about file names, instead of "filename"
12384         or "path", as per the GNU coding standards.
12385         * MODULES.html.sh: mkdir-p renamed from makepath.
12386         filenamecat renamed from path-concat.
12387         * modules/filenamecat: Renamed from modules/path-concat.
12388         (Files): filenamecat.h and filenamecat.c renamed from
12389         path-concat.h and path-concat.c.
12390         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
12391         (Include): filenamecat.h, not path-concat.h.
12392         * modules/mkdir-p: Renamed from modules/makepath.
12393         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
12394         makepath.c.
12395         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
12396         (Include): mkdir-p.h, not makepath.h.
12397
12398 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12399
12400         Sync from coreutils.
12401         * m4/mkdir-p.m4: Renamed from makepath.m4.
12402         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
12403         Rename files from makepath.c to mkdir-p.c, and from
12404         makepath.h to mkdir-p.h.
12405         * m4/filenamecat.m4: Renamed from path-concat.m4.
12406         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
12407         Rename files from path-concat.c to filenamecat.c,
12408         and from path-concat.h to filenamecat.h.
12409         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
12410         "file name" in local variables or comments.
12411         * m4/rename.m4: Likewise.
12412
12413 2005-06-01  Bruno Haible  <bruno@clisp.org>
12414
12415         * modules/csharpexec: New file.
12416         * MODULES.html.sh (C#): New section.
12417
12418 2005-06-01  Bruno Haible  <bruno@clisp.org>
12419
12420         * m4/csharp.m4: New file, from GNU gettext.
12421         * m4/csharpexec.m4: New file, from GNU gettext.
12422
12423 2005-06-01  Bruno Haible  <bruno@clisp.org>
12424
12425         * lib/csharpexec.h: New file, from GNU gettext.
12426         * lib/csharpexec.c: New file, from GNU gettext.
12427         * lib/csharpexec.sh.in: New file, from GNU gettext.
12428
12429 2005-05-31  Derek Price  <derek@ximbiot.com>
12430             Paul Eggert  <eggert@cs.ucla.edu>
12431
12432         Sync from cvs.
12433         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12434
12435 2005-05-31  Derek Price  <derek@ximbiot.com>
12436             Paul Eggert  <eggert@cs.ucla.edu>
12437
12438         Sync from cvs.
12439         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12440
12441 2005-05-29  Derek Price  <derek@ximbiot.com>
12442
12443         * config/srclist.txt (glob_.h, glob.c): Add these files.
12444
12445 2005-05-29  Derek Price  <derek@ximbiot.com>
12446
12447         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
12448         * modules/glob: New file.
12449         * modules/getlogin_r: Add link to POSIX spec in description.
12450
12451 2005-05-29  Derek Price  <derek@ximbiot.com>
12452             Paul Eggert  <eggert@cs.ucla.edu>
12453
12454         * m4/glob.m4: New file.
12455
12456 2005-05-29  Derek Price  <derek@ximbiot.com>
12457             Paul Eggert  <eggert@cs.ucla.edu>
12458
12459         * lib/glob_.h, lib/glob.c: New files.
12460
12461 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12462
12463         * modules/fts (Files): Remove m4/inttypes-pri.m4.
12464         * modules/fts-lgpl (Depends-on): Remove gettext.
12465
12466 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12467
12468         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
12469         and don't require gt_INTTYPES_PRI.
12470
12471 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12472
12473         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
12474
12475         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
12476         the configuration hassle isn't worth it.
12477         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
12478         (LONGEST_MODIFIER, PRIuMAX): Remove.
12479
12480 2005-05-27  Bruno Haible  <bruno@clisp.org>
12481
12482         * lib/getlogin_r.h: Remove second include of <stddef.h>.
12483
12484 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
12485
12486         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
12487         _POSIX_PTHREAD_SEMANTICS for Solaris.
12488
12489 2005-05-25  Derek Price  <derek@ximbiot.com>
12490
12491         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
12492
12493 2005-05-25  Derek Price  <derek@ximbiot.com>
12494             Paul Eggert  <eggert@cs.ucla.edu>
12495
12496         * modules/getlogin_r, m4/getlogin_r.m4: New files.
12497         * lib/getlogin_r.c, getlogin_r.h: New files.
12498
12499 2005-05-25  Bruno Haible  <bruno@clisp.org>
12500             Derek Price  <derek@ximbiot.com>
12501
12502         * lib/getlogin_r.h: Simplify API documentation.
12503
12504 2005-05-23  Derek Price  <derek@ximbiot.com>
12505
12506         * modules/minmax (Files): Add m4/minmax.m4.
12507         (configure.ac): Add gl_MINMAX.
12508
12509 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
12510
12511         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
12512         so that unistd-safer.h (GPL'ed code) need not be included.
12513
12514 2005-05-22  Bruno Haible  <bruno@clisp.org>
12515
12516         * m4/minmax.m4: New file.
12517         Based on a patch by Derek Price <derek@ximbiot.com>.
12518
12519 2005-05-22  Bruno Haible  <bruno@clisp.org>
12520
12521         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
12522         (INT64_MIN): Fix definition.
12523         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
12524
12525         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
12526         NEED_SIGNED_INT_TYPES.
12527
12528         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
12529         HAVE_SYSTEM_INTTYPES.
12530
12531 2005-05-22  Bruno Haible  <bruno@clisp.org>
12532
12533         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
12534         Also include <sys/param.h> if it defines MIN, MAX.
12535         Based on a patch by Derek Price <derek@ximbiot.com>.
12536
12537 2005-05-21  Jim Meyering  <jim@meyering.net>
12538
12539         * modules/fts (Files): Add m4/inttypes-pri.m4.
12540         (Depends-on): Add lstat and remove gettext.  Alphabetize.
12541
12542 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12543
12544         New fts module.
12545         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
12546         (setup_dir, free_dir): New functions.
12547         (enter_dir, leave_dir): Define trivial
12548         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
12549         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
12550         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
12551         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
12552         Move to fts-cycle.c.
12553         (fts_open): Use setup_dir.
12554         (fts_close): Use free_dir.
12555         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
12556         This adds a label and some gotos, but the alternatives were messier.
12557         Check for memory allocation failure when entering a dir.
12558         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
12559         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
12560         (FTS): New member fts_cycle, that is a union that contains the
12561         old active_dir_ht and cycle_state.  All uses changed to mention
12562         fts_cycle.ht and fts_cycle.state.
12563         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
12564         fts.c, with the following changes:
12565         (setup_dir, free_dir): New functions.
12566         (enter_dir): Now returns bool.  Return true if successful, false
12567         if memory exhausted.  All callers changed.
12568         Do not bother partly cleaning up on
12569         memory allocation failure; that is free_dir's job.
12570         However, free ad if hash_insert fails, to avoid memory leak.
12571         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
12572         fts->fts_options to see which union member to use.
12573
12574 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12575
12576         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
12577         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
12578
12579 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12580
12581         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
12582
12583 2005-05-20  Jim Meyering  <jim@meyering.net>
12584
12585         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
12586         Now a macro, to pacify GCC.
12587
12588 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12589
12590         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
12591         of -1.
12592
12593 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12594
12595         * lib/chown.c (rpl_chown): Return -1 on failure.
12596
12597 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12598
12599         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
12600         Don't check for stddef.h.
12601         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
12602         don't use its results.
12603         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
12604         since we include them unconditionally.  Don't require
12605         AM_STDBOOL_H, since stdbool is a prerequisite.
12606         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
12607         since we assume C89 or better.
12608         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
12609         as we don't use their results.
12610         Don't check for fchdir, memmove, memset, strrchr, as we use
12611         them unconditionally.
12612         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
12613         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
12614
12615 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12616
12617         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
12618         Include <stddef.h> unconditionally, since we assume C89 now.
12619         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
12620         * lib/fts.c: Include fts_.h first, to check interface.
12621         Do not include intprops.h; no longer needed.
12622         Include cycle-check.h and hash.h, since fts_.h no longer does.
12623         Remove unnecessary casts of closedir to void.
12624         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
12625         decide whether to decrement nlinks.
12626         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
12627         (FTS): Use struct hash_table * instead of Hash_table, so that
12628         we no longer need to include hash.h here.
12629
12630 2005-05-18  Jim Meyering  <jim@meyering.net>
12631
12632         * modules/dirfd (License): Change to LGPL.  Most of the code
12633         is already in the public domain.
12634
12635 2005-05-18  Jim Meyering  <jim@meyering.net>
12636
12637         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
12638         Reported by Yoann Vandoorselaere.
12639
12640 2005-05-17  Jim Meyering  <jim@meyering.net>
12641
12642         * m4/fts.m4: New file, from coreutils.
12643
12644 2005-05-17  Jim Meyering  <jim@meyering.net>
12645
12646         * lib/fts.c, lib/fts_.h: New files, from coreutils.
12647
12648 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12649
12650         Sync from coreutils.
12651         * m4/unlinkdir.m4: New file.
12652
12653 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12654
12655         Sync from coreutils.
12656         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
12657         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
12658         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
12659         White space changes only.
12660         * lib/makepath.c (make_path): Port to hosts where leading "//" is
12661         special.
12662         * lib/yesno.c: Include getline.h, not ctype.h.
12663         (yesno): Don't remove leading white space; POSIX doesn't allow it.
12664         Use getline to remove arbitrary restriction on response length.
12665
12666 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12667
12668         * config/srclist-update: Spell out "Street" in FSF postal
12669         mail address; this is the style the FSF seems to prefer.
12670
12671         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
12672         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
12673         this updates FSF postal mail address.
12674
12675         Sync from coreutils.
12676         * modules/unlinkdir: New file.
12677         * modules/yesno (Depends-on): Add getline.
12678         * MODULES.html.sh (File system functions): Add unlinkdir.
12679
12680 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
12681
12682         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
12683         lib/strsep.h:
12684         Change the initial comment to refer to GPL, not LGPL.
12685         gnulib-tool will change it to LGPL as needed.
12686
12687         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
12688         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
12689         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
12690         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
12691         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
12692         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
12693         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
12694         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
12695         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
12696         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
12697         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
12698         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
12699         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
12700         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
12701         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
12702         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
12703         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
12704         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
12705         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
12706         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
12707         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
12708         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
12709         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
12710         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
12711         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
12712         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
12713         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
12714         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
12715         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
12716         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
12717         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
12718         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
12719         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
12720         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
12721         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
12722         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
12723         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
12724         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
12725         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
12726         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
12727         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
12728         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
12729         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
12730         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
12731         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
12732         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
12733         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
12734         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
12735         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
12736         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
12737         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
12738         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
12739         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
12740         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
12741         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
12742         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
12743         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
12744         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
12745         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
12746         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
12747         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
12748         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
12749         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
12750         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
12751         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
12752         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
12753         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
12754         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
12755         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
12756         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
12757         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
12758         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
12759         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
12760         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
12761         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
12762         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
12763         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
12764         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
12765         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
12766         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
12767         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
12768         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
12769         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
12770         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
12771         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
12772         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
12773         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
12774         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
12775         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
12776         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
12777         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
12778         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
12779         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
12780         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
12781         lib/yesno.c, lib/yesno.h:
12782         Update FSF postal mail address.
12783
12784 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
12785
12786         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
12787         tests/test-memmem.c, tests/test-stpncpy.c:
12788         Update FSF postal mail address.
12789
12790 2005-05-13  Bruno Haible  <bruno@clisp.org>
12791
12792         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
12793         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
12794         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
12795         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
12796         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
12797         Add support for 64-bit integers in the MSVC compiler.
12798
12799 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12800
12801         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
12802
12803 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
12804
12805         * gnulib-tool (func_import): Sort and uniquify recommended includes.
12806
12807 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
12808
12809         * doc/getdate.texi (General date syntax): Don't say that date
12810         date --iso-8601=ns generates acceptable dates; it doesn't yet.
12811         Problem reported by Nic Ferrier.
12812
12813 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12814
12815         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
12816         specified in ai_socktype. Fix invalid ai_protocol
12817         check. ai_protocol is usually set to 0 or depending on
12818         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
12819         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
12820         ai_socktype / ai_protocol in the returned addrinfo structure.
12821
12822 2005-05-10  Simon Josefsson  <jas@extundo.com>
12823
12824         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
12825         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12826
12827 2005-05-10  Karl Berry  <karl@gnu.org>
12828
12829         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
12830         (from http://www.gnu.org/licenses).
12831         * doc/COPYING.LIB: also rename to COPYING.LESSER.
12832         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
12833         fdl.texi suffices.
12834
12835 2005-05-10  Karl Berry  <karl@gnu.org>
12836
12837         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
12838         (COPYING.DOC): remove.
12839
12840         * config/srclist-update: new FSF address.
12841
12842 2005-05-10  Derek Price  <derek@ximbiot.com>
12843
12844         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
12845         possible.
12846
12847 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12848             Bruno Haible  <bruno@clisp.org>
12849
12850         * modules/inet_ntop: New file.
12851         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12852         inet_ntop.
12853
12854 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12855             Bruno Haible  <bruno@clisp.org>
12856
12857         * m4/inet_ntop.m4: New file.
12858
12859 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12860             Bruno Haible  <bruno@clisp.org>
12861
12862         * lib/inet_ntop.h: New file.
12863         * lib/inet_ntop.c: New file, from glibc with modifications.
12864
12865 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
12866
12867         * modules/time_r (License): Change to LGPL.
12868         * modules/extensions (License): Change to LGPL.  Actually,
12869         the license is more permissive than that, but currently gnulib-tool
12870         doesn't know how to handle more-permissive licenses.
12871
12872         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
12873         Problem reported by Dave Love.
12874
12875 2005-05-08  Jim Meyering  <jim@meyering.net>
12876
12877         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
12878         blank.
12879
12880 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
12881
12882         * modules/argmatch (Depends-on): Add stdbool.
12883         * modules/backupfile (Depends-on): Likewise.
12884         * modules/chdir-long (Depends-on): Likewise.
12885         * modules/closeout (Depends-on): Likewise.
12886         * modules/cycle-check (Depends-on): Likewise.
12887         * modules/dirname (Depends-on): Likewise.
12888         * modules/fnmatch (Depends-on): Likewise.
12889         * modules/fsusage (Depends-on): Likewise.
12890         * modules/fwriteerror (Depends-on): Likewise.
12891         * modules/getcwd (Depends-on): Likewise.
12892         * modules/getloadavg (Depends-on): Likewise.
12893         * modules/hard-locale (Depends-on): Likewise.
12894         * modules/makepath (Depends-on): Likewise.
12895         * modules/mountlist (Depends-on): Likewise.
12896         * modules/nanosleep (Depends-on): Likewise.
12897         * modules/posixtm (Depends-on): Likewise.
12898         * modules/quotearg (Depends-on): Likewise.
12899         * modules/readtokens (Depends-on): Likewise.
12900         * modules/readtokens0 (Depends-on): Likewise.
12901         * modules/readutmp (Depends-on): Likewise.
12902         * modules/save-cwd (Depends-on): Likewise.
12903         * modules/strftime (Depends-on): Likewise.
12904         * modules/userspec (Depends-on): Likewise.
12905         * modules/utimecmp (Depends-on): Likewise.
12906         * modules/xgetcwd (Depends-on): Likewise.
12907         * modules/xnanosleep (Depends-on): Likewise.
12908         * modules/xstrtod (Depends-on): Likewise.
12909         * modules/yesno (Depends-on): Likewise.
12910
12911 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
12912
12913         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
12914         needless checks.
12915
12916 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12917
12918         Merge from coreutils.  Among other things,
12919         add bulletproofing for cases where stdin, stdout, or stderr are closed.
12920         * lib/fd-safer.c: New file.
12921         * lib/fcntl-safer.h, open-safer.c: Remove.
12922         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
12923         * lib/dup-safer.c: Include unistd-safer.h first.
12924         Don't include errno.h.
12925         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
12926         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
12927         * lib/file-type.c: Rely on file-type.h change.
12928         * lib/getloadavg.c: Include unistd-safer.h.
12929         (getloadavg): Use safer open.
12930         * lib/getusershell.c: Include "stdio-safer.h".
12931         (getusershell): Use safer fopen.
12932         * lib/long-options.c (long_options): Use NULL rather than 0.
12933         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
12934         'free'.
12935         * lib/modechange.c: Likewise.
12936         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
12937         (MODE_DONE): New constant.
12938         (struct mode_change): Remove 'next' member.
12939         (make_node_op_equals): New function; like the old one of the
12940         same name, except it allocates an array.
12941         (mode_compile, mode_create_from_ref): Use it.
12942         (mode_compile): Allocate result as an array, not a linked list.
12943         Parse octal string ourself, so that we catch mistakes like "+0".
12944         (mode_adjust): Arg is an array, not a linked list.
12945         * lib/modechange.c: Include stat-macros.h, xalloc.h.
12946         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
12947         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
12948         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
12949         Remove.  This is now stat-macros.h's job.
12950         (talloc): Remove.  All callers replaced by xalloc, so that
12951         our invokers don't have to worry about reporting memory failures.
12952         (make_node_op_equals): Remove.
12953         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12954         New constants.
12955         (struct mode_change): Moved here from modechange.h.
12956         (mode_append_entry): Remove.
12957         (mode_compile): Remove MASKED_OPS arg, since it encouraged
12958         apps to have incorrect behavior.  Use simpler algorithm for head
12959         and tail.  Don't futz with umask; that's now the job of mode_adjust.
12960         Detect more invalid usages rather than having somewhat-random behavior.
12961         Don't insert an "a=" action, as that leads to incorrect behavior.
12962         (mode_compile, mode_create_from_ref): Return NULL on error instead
12963         of an enum, since now there's only one way to have an error.  All
12964         callers changed.
12965         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
12966         at the correct time.  Simplify calculation of "+u" and its ilk.
12967         Don't mishandle "+X".
12968         (mode_free): Remove "register" and localize decls.
12969         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12970         (struct mode_change): Move to modechange.c; callers don't
12971         need to see this stuff.
12972         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
12973         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
12974         (mode_change, mode_adjust): Reflect the new signatures noted above.
12975         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
12976         that might redefine system include files.
12977         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
12978         (my_usleep): Use NULL rather than (void *) 0.
12979         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
12980         Use siginterrupt to specify that system calls should be interrupted.
12981         (rpl_nanosleep): Move initialization of suspended closer to call of
12982         my_usleep.
12983         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
12984         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
12985         (desirable_utmp_entry): New function.
12986         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
12987         using x2nrealloc, to simplify logic.
12988         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
12989         size calculation.  Do not assume utmp file is a regular file.
12990         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
12991         (READ_UTMP_CHECK_PIDS): New constant.
12992         * lib/save-cwd.c: Include unistd-safer.h.
12993         (save_cwd): Use fd_safer.
12994         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
12995         [!_LIBC] Include "stat-macros.h" instead.
12996         * lib/unistd-safer.h (fd_safer): New decl.
12997
12998 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12999
13000         * modules/getloadavg (Depends-on): Add unistd-safer.
13001         * modules/getusershell (Depends-on): Add stdio-safer.
13002         * modules/lstat (Depends-on): Remove xalloc.
13003         * modules/mkstemp (Depends-on): Add stat-macros.
13004         * modules/modechange (Depends-on): Remove xstrtol.
13005         Add stat-macros, xalloc.
13006         * modules/save-cwd (Depends-on): Add unistd-safer.
13007         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
13008         * modules/unistd-safer (Files): Add lib/fd-safer.c
13009         (Makefile.am): Remove lib_SOURCES.
13010
13011         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
13012         Remove fcntl-safer; unistd-safer supersedes it.
13013
13014 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13015
13016         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
13017         AC_HEADER_STAT.
13018         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
13019         (gl_PREREQ_CHOWN): Remove.
13020         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
13021         it.  Don't require AC_HEADER_STAT.
13022         (gl_PREREQ_LSTAT): Remove.
13023         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
13024         Don't require AC_HEADER_STAT.
13025         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
13026         (gl_PREREQ_RMDIR): Remove.
13027         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
13028         mention stat-macros.h or AC_HEADER_STAT, since we'll make
13029         the stat-macros module a prerequisite.
13030         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
13031         * m4/filemode.m4 (gl_FILEMODE): Likewise.
13032         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
13033         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
13034         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
13035         variable names.
13036         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
13037         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
13038         variable prefixes.
13039         * m4/fcntl-safer.m4: Remove.
13040         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
13041         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
13042         Invoke gl_PREREQ_FD_SAFER.
13043         (gl_PREREQ_FD_SAFER): New macro.
13044         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
13045         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
13046         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
13047         Remove duplicate call to AC_LIBOBJ(readutmp).
13048         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
13049
13050         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
13051         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
13052
13053 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13054
13055         * MODULES.html.sh (Misc): Add byteswap.
13056
13057 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13058
13059         * modules/getcwd (Depends-on): Add extensions.
13060         * modules/openat (Depends-on): Likewise.
13061
13062 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13063
13064         * modules/byteswap: New file.
13065
13066 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13067
13068         * m4/byteswap.m4: New file.
13069
13070 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13071
13072         * lib/byteswap_.h: New file.
13073
13074 2005-04-25  Karl Berry  <karl@gnu.org>
13075
13076         * m4/gettext.m4: Update from GNU gettext 0.14.4.
13077
13078 2005-04-25  Albert Chin  <china@thewrittenword.com>
13079
13080         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
13081         Toolkit C bug.
13082
13083 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
13084
13085         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
13086         (func_ln_if_changed) Remove forcibly for no error message
13087         in case file does not exist.
13088
13089 2005-04-19  Simon Josefsson  <jas@extundo.com>
13090
13091         * gnulib-tool (Options): Make --symlink mean --symbolic.
13092
13093 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
13094
13095         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
13096
13097 2005-04-16  Simon Josefsson  <jas@extundo.com>
13098
13099         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
13100
13101 2005-04-15  Simon Josefsson  <jas@extundo.com>
13102
13103         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
13104
13105 2005-04-15  Simon Josefsson  <jas@extundo.com>
13106
13107         * gnulib-tool: Rename --symlink to --symbolic.
13108
13109 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
13110
13111         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
13112         symbolic links to files instead of copying/moving.  Add --aux-dir,
13113         specifying directory relative --dir where auxiliary build tools
13114         are placed.
13115
13116 2005-04-14  Bruno Haible  <bruno@clisp.org>
13117
13118         * modules/allocsa (License): Change to LGPL.
13119         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
13120
13121 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13122
13123         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
13124         that "UTC +1 second" continues to work.  Problem reported
13125         by Dmitry V. Levin.
13126         (relunit_snumber): New rule.
13127         (relunit): Use it.
13128
13129 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13130
13131         * lib/getdate.y (universal_time_zone_table): New constant.
13132         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
13133         universal_time_zone_table.
13134         (lookup_zone): Prefer universal_time_zone_table to
13135         local_time_zone_table, so that "GMT" time stamps are allowed in
13136         London during the summer.  Problem reported by Ian Abbott.
13137
13138 2005-04-12  Jim Meyering  <jim@meyering.net>
13139
13140         * lib/human.c (humblock): Set *options even when returning due to
13141         xstrtoumax conversion failure.  Thanks to a used-uninitialized
13142         warning from gcc-4.
13143
13144 2005-04-09  Jim Meyering  <jim@meyering.net>
13145
13146         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
13147         -Wuninitialized: initialize tm0.tm_year.
13148
13149 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
13150
13151         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
13152         count, since there's no maximum.  All uses changed.
13153         Add member dsts_seen.
13154         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
13155         not being INT_MAX.
13156         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
13157         Use pc_rels_seen to decide whther a date is absolute.
13158
13159         * lib/getdate.y (number): Don't overwrite year.
13160         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
13161         check.
13162
13163 2005-04-02  Simon Josefsson  <jas@extundo.com>
13164
13165         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
13166         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
13167
13168 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
13169
13170         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
13171         where no absolute path name can be longer than PATH_MAX.
13172
13173 2005-03-27  Jim Meyering  <jim@meyering.net>
13174
13175         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
13176
13177 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
13178
13179         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
13180         "one's complement" -> "ones' complement" in comment, as per Knuth.
13181         "value of type" -> "type or expression" in comment.
13182         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
13183
13184 2005-03-26  Jim Meyering  <jim@meyering.net>
13185
13186         Comment nits.
13187         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
13188         Correct typos: s/or/of/.
13189
13190 2005-03-26  Jim Meyering  <jim@meyering.net>
13191
13192         * modules/check-include-files: Move to ../ and rename to...
13193         * check-module: ...this.
13194
13195 2005-03-25  Jim Meyering  <jim@meyering.net>
13196
13197         * modules/xvasprintf (Files): Add xalloc.h.
13198
13199 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
13200
13201         * modules/gettext (Files): config/config.rpath ->
13202         build-aux/config.rpath
13203         * modules/iconv (Files): Likewise.
13204         Problem reported by Oskar Liljeblad.
13205
13206 2005-03-23  Jim Meyering  <jim@meyering.net>
13207
13208         * modules/check-include-files: New script to check for
13209         missing dependencies, multiple includes, etc.
13210
13211         * modules/c-strtold (Depends-on): Add xalloc.
13212         * modules/c-strtod (Depends-on): Add xalloc.
13213         * modules/hash (Depends-on): Add xalloc.
13214         (Files): Remove lib/xalloc.h.
13215
13216         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
13217         * modules/userspec (Files): Add lib/inttostr.h.
13218
13219 2005-03-23  Jim Meyering  <jim@meyering.net>
13220
13221         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
13222
13223 2005-03-22  Jim Meyering  <jim@meyering.net>
13224
13225         * modules/stat-macros: New module.
13226         * modules/canonicalize, modules/euidaccess, modules/file-type,
13227         * modules/filemode, modules/lchown, modules/makepath,
13228         * modules/rmdir, modules/stat: Depend on new stat-macros module
13229         rather than listing lib/stat-macros.h manually.
13230         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
13231
13232 2005-03-22  Jim Meyering  <jim@meyering.net>
13233
13234         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
13235
13236 2005-03-22  Bruno Haible  <bruno@clisp.org>
13237
13238         * config/srclist.txt: Replace target directory 'config' with
13239         'build-aux'.
13240         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
13241         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
13242         ../build-aux/.
13243
13244 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
13245
13246         * modules/chdir-long (Depends-on): Add mempcpy.
13247
13248         * modules/acl, modules/backupfile, modules/c-strtod,
13249         modules/c-strtold, modules/canon-host, modules/canonicalize,
13250         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
13251         modules/exclude, modules/exitfail, modules/file-type,
13252         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
13253         modules/getdate, modules/getline, modules/getpagesize,
13254         modules/getpass, modules/getugroups, modules/group-member,
13255         modules/hard-locale, modules/hash, modules/human, modules/idcache,
13256         modules/inttostr, modules/long-options, modules/makepath,
13257         modules/md5, modules/memcasecmp, modules/memcoll,
13258         modules/modechange, modules/mountlist, modules/path-concat,
13259         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
13260         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
13261         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
13262         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
13263         modules/strftime, modules/strndup, modules/strverscmp,
13264         modules/timespec, modules/unlocked-io, modules/userspec,
13265         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
13266         modules/yesno:
13267         Remove lib_SOURCES line from Makefile.am section, as this is now
13268         done automatically by the corresponding Autoconf macro.
13269
13270 2005-03-21  Jim Meyering  <jim@meyering.net>
13271
13272         Changes imported from coreutils.
13273
13274         * lib/cycle-check.c: Don't include xalloc.h.
13275
13276         * lib/path-concat.c: Don't include assert.h.
13277         (path_concat): Remove assertion that would have triggered
13278         for ABASE starting with more than one slash.
13279         Reported by Andreas Schwab.
13280
13281         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
13282         properly when ABASE is an absolute file name.
13283         Correct the description of this function.
13284         Include <assert.h>.
13285         Add an assertion and a test driver.
13286         This fixes a bug introduced on 2004-07-02.
13287         Andreas Schwab reported the resulting failure of cp --parents:
13288         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
13289
13290 2005-03-21  Jim Meyering  <jim@meyering.net>
13291
13292         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
13293         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
13294
13295 2005-03-21  Jim Meyering  <jim@meyering.net>
13296         and  Paul Eggert  <eggert@cs.ucla.edu>
13297
13298         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
13299         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
13300         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
13301         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
13302         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
13303         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
13304         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
13305         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
13306         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
13307         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
13308         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
13309         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
13310         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
13311         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
13312         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
13313         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
13314         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
13315         for these modules.
13316
13317 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
13318
13319         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
13320         (which shouldn't happen), generate nothing instead of returning 0
13321         immediately, so that nstrftime (NULL, ...) doesn't return 0.
13322
13323 2005-03-16  Bruno Haible  <bruno@clisp.org>
13324
13325         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
13326         HAVE_LONGLONG_64BIT.
13327
13328 2005-03-16  Bruno Haible  <bruno@clisp.org>
13329
13330         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
13331         HAVE_LONGLONG_64BIT.
13332
13333 2005-03-16  Bruno Haible  <bruno@clisp.org>
13334
13335         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
13336         HAVE_LONGLONG_64BIT.
13337
13338 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13339
13340         * lib/strftime.c (my_strftime): Prepend space to format so that we can
13341         reliably distinguish strftime failure from empty output on POSIX
13342         hosts.
13343
13344 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13345
13346         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
13347         (iconv_string): Don't guess a size-zero buffer, as that might cause
13348         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
13349         result would be 'too large', where 'too large' is (heuristically)
13350         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
13351         overflow concerns.  This will prevent some unwanted malloc failures
13352         when the inputs are very large.
13353
13354 2005-03-15  Karl Berry  <karl@gnu.org>
13355
13356         * config/srclist.txt (config.rpath): from gettext.
13357         * config/config.rpath: update.
13358
13359 2005-03-15  Bruno Haible  <bruno@clisp.org>
13360
13361         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
13362         to 'negate'.
13363
13364         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
13365         variable.
13366
13367         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
13368         results.
13369
13370 2005-03-14  Simon Josefsson  <jas@extundo.com>
13371
13372         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
13373         <fx@gnu.org>.
13374
13375 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
13376
13377         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
13378         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
13379         intprops.h.
13380         * lib/strtol.c: Likewise.
13381
13382 2005-03-14  Jim Meyering  <jim@meyering.net>
13383
13384         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
13385         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
13386         to be nonzero so that we (and caller) can detect the difference
13387         between a valid zero-length expansion and an error return, even
13388         when the underlying strftime fails before writing anything into
13389         that location.
13390
13391 2005-03-14  Bruno Haible  <bruno@clisp.org>
13392
13393         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
13394         Update from GNU gettext 0.14.3.
13395
13396 2005-03-10  Jim Meyering  <jim@meyering.net>
13397
13398         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
13399
13400 2005-03-10  Jim Meyering  <jim@meyering.net>
13401
13402         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
13403         so that this module works on systems without fchdir.
13404
13405 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
13406
13407         Factor int-properties macros into a single file, except for
13408         glibc-related files.
13409         * lib/intprops.h: New file.
13410         * lib/getloadavg.c: Include it instead of limits.h.
13411         (INT_STRLEN_BOUND): Remove.
13412         * lib/human.c: Include intprops.h.
13413         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
13414         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
13415         302/1000.
13416         * lib/inttostr.h: Include intprops.h instead of limits.h.
13417         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
13418         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
13419         for consistency with intprops.h.
13420         (time_t_is_integer, twos_complement_arithmetic): Use them.
13421         * lib/sig2str.h: Include <signal.h>, intprops.h.
13422         (INT_STRLEN_BOUND): Remove.
13423         * lib/strftime.c (TYPE_SIGNED): Remove.
13424         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
13425         * lib/strtol.c: Adjust comments to match intprops.h.
13426         * lib/userspec.c: Include intprops.h.
13427         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
13428         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
13429         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
13430         instead of rolling our own expressions.
13431         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
13432
13433         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
13434         instead of int.
13435         (my_strftime): Do not mishandle years close to INT_MAX, by doing
13436         the right thing even if adding 1900 would overflow.  Similarly
13437         for tm_mon + 1 and tm_yday + 1.
13438         Make %Y always equivalent to %C%y, and similarly for %G and %g.
13439         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
13440         (DO_SIGNED_NUMBER): New macro.
13441         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
13442
13443 2005-03-07  Bruno Haible  <bruno@clisp.org>
13444
13445         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
13446
13447 2005-03-07  Bruno Haible  <bruno@clisp.org>
13448
13449         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
13450
13451 2005-03-04  Derek R. Price  <derek@ximbiot.com>
13452
13453         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
13454         (func_import): Only replace files via --import when they have actually
13455         changed.
13456
13457 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13458
13459         * m4/mmap-anon.m4: New file.
13460         * m4/pagealign_alloc.m4: New file.
13461
13462 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13463             Bruno Haible  <bruno@clisp.org>
13464
13465         * modules/pagealign_alloc: New file.
13466         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
13467
13468 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13469             Bruno Haible  <bruno@clisp.org>
13470
13471         * lib/pagealign_alloc.h: New file.
13472         * lib/pagealign_alloc.c: New file.
13473
13474 2005-03-03  Bruno Haible  <bruno@clisp.org>
13475
13476         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
13477         Use an all-permissive copyright notice, recommended by RMS.
13478
13479 2005-03-02  Bruno Haible  <bruno@clisp.org>
13480
13481         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
13482         of AIX, the replacement has to be done only after <string.h> is
13483         included, therefore not in config.h. stpncpy.h does the replacement,
13484         and stpncpy.c uses it.
13485
13486 2005-03-02  Bruno Haible  <bruno@clisp.org>
13487
13488         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
13489         stpncpy.c uses it.
13490
13491 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13492
13493         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
13494         The workaround isn't strictly needed for POSIX conformance, and
13495         it's too much of a pain to configure and maintain.  We'll ask
13496         people to fix their kernels instead.
13497         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
13498         (NANOSLEEP_BUG_WORKAROUND): Remove.
13499         (xnanosleep): Remove the workaround.
13500
13501 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13502
13503         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
13504         Reported by Derek Price.
13505         (Include): Add "timespec.h".
13506
13507         * modules/xnanosleep (Depends-on): Remove gethrxtime.
13508
13509 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13510
13511         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
13512         to detect nanosleep bug.
13513
13514 2005-03-01  Bruno Haible  <bruno@clisp.org>
13515
13516         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
13517
13518 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
13519
13520         * modules/gethrxtime: New file.
13521         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
13522         (Depends-on): Add gethrxtime.
13523         (configure.ac): Add gl_XNANOSLEEP.
13524         (Makefile.am): Remove lib_SOURCES line.
13525
13526 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13527
13528         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
13529         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
13530
13531 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13532
13533         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
13534         * lib/timespec.h (gettime): Return void, since it always
13535         succeeds now.  All uses changed.
13536         * lib/gettime.c (gettime) Likewise.
13537         [HAVE_NANOTIME]: Prefer nanotime.
13538         Assume gettimeofday succeeds, as POSIX requires.
13539         Assime time () succeeds, since other code already does.
13540         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
13541         (timespec_subtract): Remove.
13542         (NANOSLEEP_BUG_WORKAROUND): New constant.
13543         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
13544         things considerably.  Use it only on GNU/Linux hosts, since the
13545         workaround shouldn't be needed elsewhere.
13546
13547 2005-02-24  Bruno Haible  <bruno@clisp.org>
13548
13549         * modules/gettext (Files): Add m4/glibc2.m4.
13550
13551 2005-02-24  Bruno Haible  <bruno@clisp.org>
13552
13553         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
13554         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
13555         * m4/progtest.m4:
13556         Update from GNU gettext 0.14.2.
13557         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
13558
13559 2005-02-24  Bruno Haible  <bruno@clisp.org>
13560
13561         * lib/localcharset.c: Update from GNU gettext 0.14.2.
13562         * lib/config.charset: Update from GNU gettext 0.14.2.
13563
13564 2005-02-24  Bruno Haible  <bruno@clisp.org>
13565
13566         * lib/gettext.h: Update from GNU gettext 0.14.2.
13567
13568 2005-02-23  Simon Josefsson  <jas@extundo.com>
13569
13570         * m4/iconvme.m4: New file.
13571
13572 2005-02-23  Jim Meyering  <jim@meyering.net>
13573
13574         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
13575         change.
13576         Thanks to Bruno Haible for catching it.
13577
13578 2005-02-22  Simon Josefsson  <jas@extundo.com>
13579
13580         * modules/iconvme: New file.
13581
13582         * MODULES.html.sh: Add iconvme.
13583
13584 2005-02-22  Simon Josefsson  <jas@extundo.com>
13585
13586         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
13587
13588 2005-02-22  Simon Josefsson  <jas@extundo.com>
13589
13590         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
13591
13592 2005-02-22  Jim Meyering  <jim@meyering.net>
13593
13594         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
13595         s/ifndef/ifdef/.
13596
13597 2005-02-20  Neil Conway  <neilc@samurai.com>
13598
13599         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
13600         returned by OSX/Darwin if the specified buffer is not large
13601         enough for the hostname.
13602
13603 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13604
13605         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
13606         pass it to _help, otherwise the latter coredumps trying to
13607         dereference state.root_argp.
13608
13609 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13610
13611         * modules/chdir-long (Depends-on): Add memrchr.
13612         * modules/memrchr (Files): Add lib/memrchr.h.
13613         (Include): "memrchr.h".
13614
13615 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13616
13617         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
13618
13619 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13620
13621         * lib/memrchr.h: New file.
13622         * lib/chdir-long.c: Include it.
13623         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
13624         Don't bother including stddef.h.
13625
13626 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
13627
13628         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
13629         inclusion.
13630         Include <sys/types.h>, for dev_t.
13631         (ME_DUMMY, ME_REMOTE): Move from here....
13632         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
13633         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
13634         Dmitry V. Levin.
13635         Include mountlist.h first, to test the interface.
13636
13637 2005-01-29  Bruno Haible  <bruno@clisp.org>
13638
13639         * lib/progname.c (program_name): Initialize.
13640         Needed when linking statically on MacOS X.
13641
13642 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13643
13644         Sync from coreutils.
13645         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
13646         (Depends-on): Add c-strtod.
13647         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
13648
13649 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13650
13651         Sync from coreutils.
13652         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
13653
13654         Remove files that are specific to coreutils.
13655         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
13656
13657 2005-01-28  Bruno Haible  <bruno@clisp.org>
13658
13659         * modules/javacomp: New file.
13660         * MODULES.html.sh (Java): Add javacomp.
13661
13662 2005-01-28  Bruno Haible  <bruno@clisp.org>
13663
13664         * m4/javacomp.m4: New file, from GNU gettext.
13665
13666 2005-01-28  Bruno Haible  <bruno@clisp.org>
13667
13668         * lib/javacomp.sh.in: New file, from GNU gettext.
13669         * lib/javacomp.h: New file, from GNU gettext.
13670         * lib/javacomp.c: New file, from GNU gettext.
13671
13672 2005-01-26  Simon Josefsson  <jas@extundo.com>
13673
13674         * lib/gai_strerror.c: Use GPL in header.
13675
13676 2005-01-26  Bruno Haible  <bruno@clisp.org>
13677
13678         * modules/javaexec: New file.
13679         * MODULES.html.sh (Java): Add javaexec.
13680
13681 2005-01-26  Bruno Haible  <bruno@clisp.org>
13682
13683         * m4/javaexec.m4: New file, from GNU gettext.
13684
13685 2005-01-26  Bruno Haible  <bruno@clisp.org>
13686
13687         * lib/javaexec.sh.in: New file, from GNU gettext.
13688         * lib/javaexec.h: New file, from GNU gettext.
13689         * lib/javaexec.c: New file, from GNU gettext.
13690
13691 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13692
13693         * modules/lchown (Depends-on): Remove lchown.h
13694
13695 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13696
13697         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
13698         must be defined if the header file was not found, in order
13699         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
13700
13701 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13702
13703         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
13704         initializers for struct pentry_state.
13705         (__argp_error): Check return value of __asprintf
13706         (__argp_failure): Translate error message
13707
13708         * lib/argp-parse.c: Removed braces around the expansion of N_()
13709
13710 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
13711
13712         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
13713         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
13714         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
13715         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
13716         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
13717         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
13718         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
13719         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
13720         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
13721         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
13722         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
13723         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
13724         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
13725         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
13726         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
13727         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
13728         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
13729         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
13730         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
13731         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
13732         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
13733         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
13734         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
13735         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
13736         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
13737         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
13738         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
13739         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
13740         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
13741         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
13742         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
13743         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
13744         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
13745         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
13746         xstrtol.m4, xstrtoumax.m4, yesno.m4:
13747         Use an all-permissive copyright notice, recommended by RMS.
13748
13749 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
13750
13751         * modules/chdir-long (Depends-on): Remove mempcpy.
13752
13753 2005-01-21  Jim Meyering  <jim@meyering.net>
13754
13755         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
13756         same value as for Solaris 9.
13757
13758         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
13759         component length.  This included changing the parameter to be
13760         of type `char *' rather than `char const *'.
13761         * lib/chdir-long.h (chdir_long): Update prototype.
13762
13763         * lib/openat.c (fdopendir, fstatat): New functions.
13764         * lib/openat.h: Include headers required for use of DIR and struct
13765         stat.
13766         [AT_SYMLINK_NOFOLLOW]: Define.
13767         (fdopendir, fstatat): Add prototypes.
13768
13769 2005-01-21  Bruno Haible  <bruno@clisp.org>
13770
13771         * modules/classpath: New file.
13772         * MODULES.html.sh (Java): Add classpath.
13773
13774 2005-01-21  Bruno Haible  <bruno@clisp.org>
13775
13776         * lib/classpath.h: New file, from GNU gettext.
13777         * lib/classpath.c: New file, from GNU gettext.
13778
13779 2005-01-20  Simon Josefsson  <jas@extundo.com>
13780
13781         * modules/version-etc-fsf: New file.
13782
13783 2005-01-20  Simon Josefsson  <jas@extundo.com>
13784
13785         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
13786         * lib/version-etc.c: Remove version_etc_copyright.
13787         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
13788         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
13789
13790 2005-01-20  Simon Josefsson  <jas@extundo.com>
13791
13792         * lib/base64.h (isbase64): Add.
13793
13794         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
13795         using a unsigned prototype, don't inline.
13796         (base64_decode): Use it.
13797
13798 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13799
13800         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
13801         it.
13802
13803 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13804
13805         * lib/save-cwd.c (save_cwd): Remove code to support the case
13806         where fchdir is missing or flaky.
13807
13808 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13809
13810         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
13811
13812 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
13813
13814         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
13815         AC_LIBSOURCES now does this.
13816         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
13817         with new ullong_max module.
13818
13819 2005-01-19  Bruno Haible  <bruno@clisp.org>
13820
13821         * modules/sh-quote: New file.
13822         * MODULES.html.sh (Executing programs): Add sh-quote.
13823
13824 2005-01-19  Bruno Haible  <bruno@clisp.org>
13825
13826         * lib/sh-quote.h: New file, from GNU gettext.
13827         * lib/sh-quote.c: New file, from GNU gettext.
13828
13829 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13830
13831         Merge from coreutils.
13832         * m4/ullong_max.m4: New file.
13833         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
13834         (gl_MACROS): Assume localeconv exists.
13835
13836 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13837
13838         Merge changes from coreutils, as described below in several
13839         changelogs dated today.
13840
13841         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
13842         (O_DIRECTORY): Remove; not needed here, since "." must be
13843         a directory.  All uses removed.
13844         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
13845         universal on Suns, and we also need to test for IRIX.
13846         Revamp code to use 'if' rather than '#if'.
13847         Avoid unnecessary comparison of cwd->desc to 0.
13848
13849         * lib/utimens.c (futimens): Robustify the previous patch, by checking
13850         for known valid error numbers rather than observed invalid ones.
13851
13852 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13853
13854         * modules/ullong_max: New file.
13855
13856         * modules/chdir-long, modules/openat: New files.
13857         * modules/save-cwd (Depends-on): Depend on chdir-long.
13858         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
13859
13860 2005-01-18  Jim Meyering  <jim@meyering.net>
13861
13862         Merge from coreutils.
13863         * m4/chdir-long.m4, m4/openat.m4: New files.
13864         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
13865         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
13866         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
13867         is sane and DOES follow symlinks.  Besides, testing 20 different
13868         systems found no broken chown implementations.
13869         Prompted by a change in rsync's copy of this macro.
13870         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
13871
13872         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
13873
13874         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
13875         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
13876         NULL-means-set-to-current-time semantics.
13877         Remove temporary file immediately, rather than waiting
13878         for configure's at-exit trap code to do it.
13879
13880 2005-01-18  Jim Meyering  <jim@meyering.net>
13881
13882         * lib/version-etc.c (version_etc_copyright): Update copyright date.
13883
13884         * lib/utimens.c (futimens): Account for the fact that futimes
13885         can also fail with errno == ENOSYS or errno == ENOENT.
13886         Patch from Dmitry V. Levin.
13887
13888         Change the name of the robust chdir function from chdir to chdir_long.
13889         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
13890         (restore_cwd): Use chdir_long, not chdir.
13891         * lib/chdir-long.c: Renamed from chdir.c.
13892         * lib/chdir-long.h: Renamed from chdir.h.
13893         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
13894         Hurd.
13895
13896 2005-01-18  Bruno Haible  <bruno@clisp.org>
13897
13898         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
13899         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
13900         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
13901         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
13902         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
13903         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
13904         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
13905         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
13906         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
13907         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
13908         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
13909         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
13910         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
13911         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
13912         Use an all-permissive copyright notice, recommended by RMS.
13913
13914 2005-01-18  Bob Proulx  <bob@proulx.com>
13915
13916         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
13917         simplify offsetof() macro construct to avoid compile failure with
13918         native HP-UX 11.0 ANSI C compiler.
13919
13920 2005-01-17  Bruno Haible  <bruno@clisp.org>
13921
13922         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
13923         redundant because stpncpy.m4 takes care of it.
13924
13925 2005-01-17  Bruno Haible  <bruno@clisp.org>
13926
13927         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
13928
13929 2005-01-17  Bruno Haible  <bruno@clisp.org>
13930
13931         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
13932         used.
13933
13934 2005-01-17  Bruno Haible  <bruno@clisp.org>
13935
13936         * lib/fwriteerror.h (fwriteerror): Change specification to include
13937         fclose.
13938         * lib/fwriteerror.c: Include <stdbool.h>.
13939         (fwriteerror): At the end, close the file stream. Record whether
13940         stdout was already closed.
13941
13942 2005-01-17  Bruno Haible  <bruno@clisp.org>
13943
13944         * lib/execute.c (environ): Declare if needed.
13945         * lib/pipe.c (environ): Likewise.
13946         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
13947
13948 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13949
13950         * modules/argp: Depend on vsnprintf
13951
13952 2005-01-10  Jim Meyering  <jim@meyering.net>
13953
13954         * modules/closeout (Depends-on): Add atexit.
13955
13956 2005-01-06  Bruno Haible  <bruno@clisp.org>
13957
13958         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
13959
13960 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13961
13962         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
13963         definitions to be after all include files, to avoid collisions.
13964         Problem reported by Bob Proulx.
13965
13966 2005-01-04  Jim Meyering  <jim@meyering.net>
13967
13968         Changes imported from coreutils.
13969         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
13970         as the mkstemp template, use a temporary directory and an
13971         8.3-friendly template to avoid trouble on systems like DJGPP.
13972         Reported by Juan M. Guerrero via Stepan Kasal.
13973         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
13974         close. Remove the temporary directory right away, rather than waiting
13975         for configure's at-exit trap code to do it.
13976         Suggestion from Stepan Kasal.
13977
13978 2005-01-01  Simon Josefsson  <jas@extundo.com>
13979
13980         * gnulib-tool: Print #include directives when --import'ing.
13981
13982 2004-12-28  Simon Josefsson  <jas@extundo.com>
13983
13984         * tests/test-base64.c: Include required header files.  Remove
13985         unused variables.
13986
13987 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13988
13989         * modules/error (Depends-on): Remove gettext.
13990
13991 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13992
13993         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
13994         not needed.  This removes a dependency on the gettext module.
13995         [defined _LIBC]: Do not include <libintl.h>; not needed.
13996
13997 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13998
13999         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
14000         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
14001
14002 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14003
14004         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
14005         HAVE_DECL_STRTOLD.
14006
14007 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14008
14009         * modules/getdate (Depends-on): Remove alloca-opt.
14010
14011 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14012
14013         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
14014
14015 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14016
14017         * lib/argp-parse.c: Include <stddef.h>.
14018         (alignof, alignto): New macros.
14019         (parser_init): Don't assume that void * is aligned sufficiently
14020         for struct option.
14021
14022         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
14023         need to extend the stack.
14024         (YYINITDEPTH): New macro, so that the initial stack isn't overly
14025         large.
14026
14027 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14028
14029         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
14030
14031 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14032
14033         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
14034         (2004-10-24) change.  Apparently this was a false alarm.
14035
14036         * modules/getdate: Depend on alloca-opt, not alloca.
14037
14038 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14039
14040         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
14041         Remove now-obsolete comment about AIX.
14042         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
14043         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
14044         (YYMAXDEPTH): New macro.
14045
14046 2004-12-18  Simon Josefsson  <jas@extundo.com>
14047
14048         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
14049
14050 2004-12-18  Bruno Haible  <bruno@clisp.org>
14051
14052         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
14053
14054 2004-12-18  Bruno Haible  <bruno@clisp.org>
14055
14056         * lib/fatal-signal.c (fatal_signals): Make non-const.
14057         (init_fatal_signals): New function.
14058         (uninstall_handlers, install_handlers): Ignore signals that were set to
14059         SIG_IGN.
14060         (at_fatal_signal): Call init_fatal_signals.
14061         (init_fatal_signal_set): Likewise. Ignore signals that were set to
14062         SIG_IGN.
14063         Reported by Paul Eggert.
14064
14065 2004-12-18  Bruno Haible  <bruno@clisp.org>
14066
14067         * doc/alloca.texi: New file.
14068         * doc/alloca-opt.texi: New file.
14069
14070 2004-12-17  Jim Meyering  <jim@meyering.net>
14071
14072         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
14073         Otherwise, install-sh could exit with improper exit status when
14074         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
14075
14076 2004-12-16  Simon Josefsson  <jas@extundo.com>
14077
14078         * tests/test-base64.c: Add license.
14079
14080 2004-12-15  Stepan Kasal  <address@hidden>
14081
14082         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
14083
14084 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
14085
14086         * modules/getcwd (Files): Add m4/d-ino.m4.
14087         Suggested by Mark D. Baushke.
14088
14089 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14090
14091         * lib/getdate.y (textint): New member "negative".
14092         (time_zone_hhmm): New function.
14093         Expect 14 shift-reduce conflicts, not 13.
14094         (o_colon_minutes): New rule.
14095         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
14096         (yylex): Set the "negative" member of signed numbers.
14097
14098 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14099
14100         * doc/getdate.texi (Time of day items, Time zone items):
14101         Describe new formats +00:00, UTC+00:00.
14102
14103 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14104
14105         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
14106         spurious "-l"s.  Problem reported by Stepan Kasal.
14107
14108 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
14109
14110         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
14111         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
14112
14113 2004-12-04  Simon Josefsson  <jas@extundo.com>
14114
14115         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
14116         Vandoorselaere <yoann@prelude-ids.org>.
14117
14118 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14119
14120         Changes imported from coreutils.
14121         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
14122         exist.
14123         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
14124
14125 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14126
14127         Changes imported from coreutils.
14128         * lib/hard-locale.c: Assume <locale.h> exists.
14129         Include "strdup.h".
14130         (GLIBC_VERSION): New macro.
14131         (hard_locale): Assume setlocale exists.
14132         Rewrite to avoid #ifdef.
14133         Use strdup rather than malloc + strcpy.
14134         * lib/human.c: Assume <locale.h> exists.
14135         (human_readable): Assume localeconv exists.
14136
14137 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14138
14139         * modules/hard-locale (Depends-on): Add strdup.
14140
14141 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
14142
14143         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
14144         convert T2, not T.  (Imported from libc.)
14145
14146 2004-11-30  Simon Josefsson  <jas@extundo.com>
14147
14148         * modules/restrict (License): Change to LGPL.
14149
14150 2004-11-30  Simon Josefsson  <jas@extundo.com>
14151
14152         * m4/restrict.m4: Add copyright and copying conditions.
14153
14154 2004-11-30  Simon Josefsson  <jas@extundo.com>
14155
14156         * m4/base64.m4: New file.
14157
14158 2004-11-30  Simon Josefsson  <jas@extundo.com>
14159
14160         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
14161         base64.
14162
14163         * tests/test-base64.c: New file.
14164
14165         * modules/base64: New file.
14166
14167 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14168
14169         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
14170         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
14171
14172         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
14173
14174 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14175
14176         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
14177         (__getcwd.c): Don't restore errno; glibc doesn't.
14178         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
14179         first, falling back to our code only if its results look suspicious.
14180         Ensure that the resulting buffer is only as large as necessary.
14181
14182         * lib/readutmp.c: Include readutmp.h first.
14183         Include <errno.h>, since readutmp.h no longer does that.
14184         * lib/readutmp.h: Don't include <errno.h>,
14185         <sys/param.h>, <time.h>; not needed to establish interface.
14186         (errno): Remove decl.
14187         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
14188         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
14189         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
14190
14191 2004-11-28  Simon Josefsson  <jas@extundo.com>
14192
14193         * lib/base64.h, base64.c: New file.
14194
14195 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
14196
14197         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
14198
14199 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
14200
14201         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
14202         (Depends-on): Remove pathmax, same.  Add mempcpy.
14203         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
14204         (Makefile.am): Append getcwd.h to lib_SOURCES.
14205         (Include): Add getcwd.h.
14206         (Maintainer): Change from Jim Meyering to "all, glibc",
14207         since getdate now uses intended-for-glibc code.
14208         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
14209         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
14210
14211 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14212
14213         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
14214         HP's ANSI C compiler.
14215         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
14216         Declaring int functions causes warnings on some modern systems and
14217         shouldn't be needed to compile on ancient ones.
14218         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
14219         defined.
14220
14221         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
14222         with the following changes.
14223         (__set_errno): Parenthesize properly.
14224         Include <stdbool.h>.
14225         (MIN, MAX, MATCHING_INO): New macros.
14226         (__getcwd): Define with prototype, not K&R form.
14227         Use heuristics to allocate default buffer on stack if possible.
14228         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
14229         behavior, and to avoid the PATH_MAX limit when computing
14230         ../../../../...
14231         Use MATCHING_INO to compare inode number to file.
14232         Check for arithmetic overflow in size calculations.
14233         Fix bug in reallocation of dot array that caused getcwd to fail
14234         on directories nested deeper than 75.
14235         Be more careful about saving errno on error.
14236         Do not use realloc; use only free+malloc, as this is a bit
14237         more flexible and avoids a needless copy operation.
14238         Do not inspect st_dev and st_ino for symbolic links; POSIX
14239         doesn't specify the latter.
14240         Check for closedir errors.
14241         Avoid needless casts.
14242         Use "#ifdef weak_alias" around weak_alias, to be like other
14243         glibc code.
14244         The following changes to getcwd.c have effect only when used in
14245         gnulib; they have no effect inside glibc proper.
14246         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
14247         as alloca isn't used.
14248         (alloca, __alloca): Likewise.
14249         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
14250         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
14251         unconditionally, as gnulib assumes C89 or better.
14252         Do not include <sys/param.h>.
14253         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
14254         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
14255         better.
14256         (NULL) [!defined NULL]: Remove; we assume C89 or better.
14257         Include <dirent.h> in a way that is compatible with modern Autoconf.
14258         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
14259         New macros, if not already defined.
14260         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
14261         Use "_LIBC", not "defined _LIBC", for consistency.
14262         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
14263         a mempcpy module.
14264         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
14265         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
14266         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
14267         credit only to Jim Meyering and adjust the copyright dates.
14268         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
14269         <stdlib.h>, <unistd.h>, "pathmax.h".
14270         Instead, include "xgetcwd.h" (first) and "getcwd.h".
14271         (INITIAL_BUFFER_SIZE): Remove.
14272         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
14273
14274 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14275
14276         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
14277         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
14278         Use the _ONCE methods, for efficiency.
14279         Check for fcntl.h.  In test program, include <errno.h>
14280         and <fcntl.h> if available.  Remove old K&R cruft from
14281         test program.  Check for common errors in GNU/Linux,
14282         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
14283         don't do AC_LIBOBJ, as that's getcwd.m4's job.
14284         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
14285         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
14286         name accordingly.
14287         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
14288         accommodate new getcwd.c.
14289         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
14290         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
14291         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
14292         that's all we need now.
14293
14294 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14295
14296         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
14297         argp-parse.c depends on getopt internals, that means we should
14298         always use our getopt, to be on the safe side.
14299         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
14300         order not to spoil the result of an eventual previous invocation
14301         of gl_GETOPT_SUBSTITUTE.
14302
14303 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14304
14305         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
14306         redefinition warnings. To avoid them, include the defines
14307         in `#if !defined __need_getopt ... #endif'. The only place
14308         where __getopt_argv_const is used is in definitions
14309         of getopt_long and getopt_long_only below, which are as well
14310         protected by `#ifndef __need_getopt'.
14311         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
14312         __need_getopt after including <stdio.h> and <unistd.h> These
14313         headers might have defined it.
14314
14315 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14316
14317         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
14318
14319 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14320
14321         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
14322         (futimens): New function, which uses futimes if available.
14323         (futimens, utimens): Support timespec==NULL, with same semantics
14324         as utime and utimens.
14325         * lib/utimens.h (futimens): New decl.
14326
14327 2004-11-23  Jim Meyering  <jim@meyering.net>
14328
14329         * lib/getopt_.h: Remove trailing blanks.
14330
14331 2004-11-23  Jim Meyering  <jim@meyering.net>
14332
14333         * lib/__fpending.c: Add comment.
14334
14335 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
14336
14337         * modules/canonicalize (Depends-on): Add xreadlink.
14338         Problem reported by James Youngman.
14339
14340 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
14341
14342         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
14343         New macros.
14344         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
14345         optopt): Use them instead of invoking ## directly; otherwise, the
14346         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
14347
14348 2004-11-19  Bruno Haible  <bruno@clisp.org>
14349
14350         * lib/strtok_r.c: Move comments from here...
14351         * lib/strtok_r.h: ... to here.
14352
14353 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14354
14355         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
14356         implementations that mishandle size_t overflow.
14357
14358 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14359
14360         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
14361         might fail.  Problem reported by Yoann Vandoorselaere.
14362         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
14363         implementations that mishandle size_t overflow.
14364
14365 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14366
14367         * modules/canon-host (Depends-on): Add strdup.
14368
14369 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14370
14371         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
14372
14373 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14374
14375         * lib/canon-host.c: Include "strdup.h".
14376         (canon_host): Use getaddrinfo if available, so that IPv6 works.
14377         Use strdup instead of malloc/strcpy to duplicate strings.
14378
14379         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
14380         (human_space_before_unit): New constant.
14381         * lib/human.c (human_readable): Support it.
14382
14383         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
14384         (xgetcwd): Set errno correctly when failing.
14385         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
14386         the failure is actually due to a PATH_MAX problem.
14387
14388         Further getopt changes to make it more likely that glibc will
14389         buy the changes back.
14390         * lib/getopt.c (POSIXLY_CORRECT): New constant.
14391         (getopt): Use it, so to preserve glibc semantic
14392         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
14393         when compiling for libc.
14394         * lib/getopt_.h (__getopt_argv_const): Bring it back.
14395         (getopt_long, getopt_long_only): Use it.
14396
14397         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14398         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
14399         (getopt): Argv is now char * const *, as per standard.
14400         (_getopt_internal_r, _getopt_internal): Argv is now char **,
14401         not char *__getopt_argv_const *.
14402         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14403         _getopt_long_only_r): Likewise.
14404         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
14405         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14406         _getopt_long_r, _getopt_long_only_r): Likewise.
14407         * lib/getopt_.h (__getopt_argv_const): Remove.
14408         (getopt): Argv is now char * const *, as per standard.
14409
14410         * lib/getdate.y (tORDINAL): New token.
14411         (day, relunit): Allow it for relative times.
14412         (relative_time_table): Use tORDINAL for ordinals.
14413
14414 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14415
14416         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
14417         Document that "second" isn't allowed as an ordinal number.
14418
14419 2004-11-16  Jim Meyering  <jim@meyering.net>
14420
14421         * modules/closeout (Depends-on): Add fpending.
14422
14423 2004-11-15  Jim Meyering  <jim@meyering.net>
14424
14425         * lib/closeout.c: Include "__fpending.h" once again.
14426         Include <stdbool.h>.
14427         (close_stdout): Don't fail just because stdout was closed initially,
14428         since some programs don't write to stdout in the normal course of
14429         operation (other than --version and --help), and we don't want this
14430         function to make e.g. `touch file >&-' fail.
14431         But do fail if it was closed and someone has tried to write to it.
14432         E.g., `printf foo >&-' must fail.
14433
14434 2004-11-13  Jim Meyering  <jim@meyering.net>
14435
14436         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
14437
14438 2004-11-12  Simon Josefsson  <jas@extundo.com>
14439
14440         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
14441         small doc fix is still pending.
14442
14443 2004-11-11  Simon Josefsson  <jas@extundo.com>
14444
14445         * modules/strtok_r: New file.
14446
14447         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14448         strtok_r.
14449
14450 2004-11-11  Simon Josefsson  <jas@extundo.com>
14451
14452         * m4/strtok_r.m4: New file.
14453
14454         * m4/getopt.m4: Replace opterr.
14455
14456 2004-11-11  Simon Josefsson  <jas@extundo.com>
14457
14458         * lib/strtok_r.h, strtok_r.c: New file.
14459
14460 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14461
14462         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
14463         of replacing opterr, getopt, etc.  This should handle the
14464         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
14465
14466 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14467
14468         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
14469         we can stop lying to compilers about the constness of argv when we
14470         are compiled outside glibc.
14471         (getopt, getopt_long, getopt_long_only): Use it.
14472         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14473         _getopt_internal, getopt): Likewise.
14474         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14475         _getopt_long_only_r): Likewise.
14476         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14477         _getopt_long_r, _getopt_long_only_r): Likewise.
14478
14479         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
14480         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
14481         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
14482         the other external symbols.
14483         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
14484         declaration, since the above renaming now works around collisions.
14485
14486 2004-11-11  Jim Meyering  <jim@meyering.net>
14487
14488         * lib/linebreak.c: Remove trailing blanks.
14489         * lib/alloca_.h: Likewise.
14490         * lib/acosl.c: Likewise.
14491         * lib/euidaccess.c: Likewise.
14492         * lib/allocsa.h: Likewise.
14493
14494 2004-11-10  Simon Josefsson  <jas@extundo.com>
14495
14496         * m4/getaddrinfo.m4: New file.
14497
14498 2004-11-10  Simon Josefsson  <jas@extundo.com>
14499
14500         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
14501
14502 2004-11-10  Simon Josefsson  <jas@extundo.com>
14503
14504         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14505         getaddrinfo.
14506
14507         * modules/getaddrinfo: New file.
14508
14509 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14510
14511         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
14512
14513 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14514
14515         * lib/mktime.c (SHR): New macro, which is a portable
14516         substitute for >> that should work even on Crays.
14517         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
14518         Problem reported by Mark D. Baushke in
14519         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
14520         * lib/getdate.y (SHR): Likewise.
14521         (tm_diff): Use it.
14522         * lib/strftime.c (SHR): Likewise.
14523         (tm_diff): Use it.
14524         * lib/quotearg.c (struct quoting_options): Use unsigned int for
14525         quote_these_too, so that right shifts are well defined.  All uses
14526         changed.
14527
14528 2004-11-10  Jim Meyering  <jim@meyering.net>
14529
14530         Ensure that no close failure goes unreported.
14531         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
14532         return early when it seems there's nothing to flush.
14533         Don't include __fpending.h.
14534
14535 2004-11-10  Jim Meyering  <jim@meyering.net>
14536
14537         * modules/closeout (Depends-on): Remove fpending.
14538
14539 2004-11-10  Jim Meyering  <jim@meyering.net>
14540
14541         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
14542
14543 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14544
14545         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
14546         gl_FUNC_STRFTIME.
14547         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
14548         and AC_REQUIRE when possible, to avoid duplicate checks.
14549         Check for <wchar.h>.
14550
14551 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14552
14553         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
14554
14555 2004-11-09  Bruno Haible  <bruno@clisp.org>
14556
14557         * m4/sockpfaf.m4: New file.
14558
14559 2004-11-05  Bruno Haible  <bruno@clisp.org>
14560
14561         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
14562         Reported by Mark D. Baushke <mdb@cvshome.org>.
14563
14564 2004-11-04  Bruno Haible  <bruno@clisp.org>
14565
14566         2004-09-11  Bruno Haible  <bruno@clisp.org>
14567                 * allocsa.valgrind: New file.
14568         2004-02-06  Bruno Haible  <bruno@clisp.org>
14569                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
14570                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
14571                 Reported by Christopher Seip <chris.seip@hp.com>.
14572
14573 2004-11-04  Bruno Haible  <bruno@clisp.org>
14574
14575         * modules/allocsa (Files): Add lib/allocsa.valgrind.
14576         (Makefile.am): Distribute it.
14577
14578 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
14579
14580         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
14581         with errno == ERANGE if the buffer is too small.
14582         Problem reported by Mark D. Baushke.
14583
14584 2004-11-03  Albert Chin  <china@thewrittenword.com>
14585             Paul Eggert  <eggert@cs.ucla.edu>
14586
14587         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
14588         equivalent, substitute $ac_type for equivalent type rather than
14589         blindly using uint32_t *always* which won't work if uint32_t is not
14590         available.  Define _UINT32_T to work around typedef of uint32_t if
14591         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
14592         2.5.1.
14593
14594 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14595
14596         * m4/jm-macros.m4: Sync from coreutils.
14597         (gl_MACROS): Check for mbrlen, for pathchk.
14598         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
14599
14600 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14601
14602         * lib/xreadlink.c (MAXSIZE): New macro.
14603         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
14604         size does not exceed MAXSIZE.  Avoid cast.
14605         As suggested by Mark D. Baushke in
14606         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
14607         if readlink fails with buffer size just under MAXSIZE, try again
14608         with MAXSIZE.
14609
14610 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14611
14612         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
14613
14614 2004-11-02  Derek R. Price  <derek@ximbiot.com>
14615         and  Paul Eggert  <eggert@cs.ucla.edu>
14616
14617         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
14618         (get_date): Overparenthesize to avoid GCC warning.
14619
14620 2004-11-02  Bruno Haible  <bruno@clisp.org>
14621
14622         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
14623         returns void.
14624
14625 2004-11-02  Bruno Haible  <bruno@clisp.org>
14626
14627         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
14628         function returns void.
14629
14630 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14631
14632         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
14633         fflush_unlocked, flockfile, funlockfile, funlockfile,
14634         fputs_unlocked, putc_unlocked.
14635
14636 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14637
14638         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14639         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
14640         already declared.
14641
14642 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14643
14644         * modules/getdate (Files): Add doc/getdate.texi.
14645         (Depends-on): Add setenv, xalloc.
14646
14647 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14648
14649         * lib/getdate.y: Add support for TZ="foo" within a date string.
14650         Fix some bugs near time_t boundaries.  Reject dates with
14651         out-of-range components, e.g., "Sept 31".
14652         Include <stdlib.h>, "setenv.h", "xalloc.h".
14653         (ISDIGIT_LOCALE): Remove; unused.
14654         Note that the TZ and time functions used here are not reentrant.
14655         (mktime_ok, get_tz): New functions.
14656         (TZBUFSIZE): New constant.
14657         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
14658         This requires that we sometimes generate our own TZ="XXX..." setting.
14659
14660 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14661
14662         * doc/getdate.texi: New file, from coreutils with modifications for
14663         the new TZ parsing.
14664
14665 2004-10-27  Derek R. Price  <derek@ximbiot.com>
14666
14667         * lib/mktime.c (not_equal_tm): Remove redundant check.
14668
14669 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14670
14671         * modules/regex (lib_SOURCES): Add regex.c.
14672         Reported by James Youngman in
14673         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
14674
14675 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14676
14677         * lib/getdate.y: Use Bison 1.875 features, and some minor
14678         code cleanups.  This change does not affect semantics.
14679         Don't include <stdlib.h>; no longer needed.
14680         Don't include unlocked-io.h; only the "#if TEST" code uses
14681         stdio, and performance isn't crucial there.
14682         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
14683         Bison 1.875 features as described below.
14684         All uses of "PC." replaced by "pc->".
14685         (YYSTYPE): Add a forward declaration.
14686         (yylex, yyerror): Use full prototypes in forward decls.
14687         Use "%pure-parser" rather than obsolescent "%pure_parser".
14688         Use %parse-param and %lex-param instead of obsolescent
14689         YYPARSE_PARAM and YYLEX_PARAM.
14690         (meridian_table, month_and_day_table, time_units_table,
14691         relative_time_table, time_zone_table, military_table,
14692         lookup_zone, lookup_word, get_date):
14693         Use NULL instead of 0 where appropriate.
14694         (to_hour): Avoid abort (), to avoid a dependency on
14695         stdlib.h.
14696         (yyerror, yylex): Now accepts parser_control * arg.
14697         (main) [TEST]: Use '\0' rather than 0 for char.
14698
14699 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14700
14701         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
14702
14703 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14704
14705         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
14706         It's now the caller's responsibility to handle the case where
14707         !HAVE_GETPAGESIZE && !defined getpagesize.
14708
14709         * lib/mktime.c (leapyear): Arg is long int, not int.
14710
14711 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
14712
14713         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
14714
14715 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
14716
14717         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
14718         missing.  Problem reported by James Youngman.
14719
14720 2004-10-16  Simon Josefsson  <jas@extundo.com>
14721
14722         * gnulib-tool: Fix comments.  Fix parse problem.
14723         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
14724
14725 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
14726
14727         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
14728         implementation of getopt_long.  Problem reported by Alexander Taler in:
14729         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
14730
14731 2004-10-15  Bruno Haible  <bruno@clisp.org>
14732
14733         * gnulib-tool: Untabify. Initialize supplied_libname.
14734         (func_usage): More homogenous output.
14735         (func_modules_transitive_closure, func_modules_to_filelist,
14736         func_emit_lib_Makefile_am): New functions.
14737         (func_import): New function, extracted from big case statement. Use
14738         func_get_license, func_modules_transitive_closure,
14739         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
14740         opt_lgpl. Don't use test -a, as it's not portable.
14741         (func_create_testdir): Use func_modules_transitive_closure,
14742         func_modules_to_filelist, func_emit_lib_Makefile_am.
14743
14744 2004-10-15  Bruno Haible  <bruno@clisp.org>
14745
14746         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
14747
14748 2004-10-15  Bruno Haible  <bruno@clisp.org>
14749
14750         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
14751         the portions belonging to each module.
14752         Suggested by Derek Robert Price <derek@ximbiot.com>.
14753
14754 2004-10-12  Simon Josefsson  <jas@extundo.com>
14755
14756         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14757         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
14758         to real functions.
14759
14760 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14761
14762         * modules/vsnprintf: New file.
14763
14764 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14765
14766         * m4/vsnprintf.m4: New file.
14767
14768 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14769
14770         * lib/vsnprintf.h: New file.
14771         * lib/vsnprintf.c: New file.
14772
14773 2004-10-11  Bruno Haible  <bruno@clisp.org>
14774
14775         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
14776         vsnprintf.
14777
14778 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
14779
14780         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
14781
14782 2004-10-07  Bruno Haible  <bruno@clisp.org>
14783
14784         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
14785         fits into the provided buffer.
14786
14787 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
14788
14789         * lib/diacrit.c, diacrit.h: Add GPL notice.
14790
14791         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
14792         notice.
14793         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
14794         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
14795         This avoids a potential constant-folding bug.
14796
14797 2004-10-05  Bruno Haible  <bruno@clisp.org>
14798
14799         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
14800         for the declaration of strsep.
14801
14802 2004-10-05  Bruno Haible  <bruno@clisp.org>
14803
14804         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
14805
14806 2004-10-04  Simon Josefsson  <jas@extundo.com>
14807
14808         * modules/memmem: New file.
14809         * tests/test-memmem.c: New file.
14810         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
14811
14812 2004-10-04  Simon Josefsson  <jas@extundo.com>
14813
14814         * m4/memmem.m4: New file.
14815
14816 2004-10-04  Simon Josefsson  <jas@extundo.com>
14817
14818         * lib/memmem.h: New file.
14819         * lib/memmem.c: New file, taken from glibc.
14820
14821 2004-10-04  Simon Josefsson  <jas@extundo.com>
14822
14823         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
14824         '#ifdef USE_UNLOCKED_IO'.
14825
14826 2004-10-04  Simon Josefsson  <jas@extundo.com>
14827
14828         * config/srclist.txt: Add memmem from glibc.
14829
14830 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14831
14832         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
14833
14834         * modules/argmatch, modules/argp, modules/closeout, modules/error,
14835         modules/exclude, modules/getdate, modules/getline,
14836         modules/getndelim2, modules/getpass, modules/getpass-gnu,
14837         modules/getusershell, modules/linebuffer, modules/md5,
14838         modules/mountlist, modules/posixtm, modules/readtokens,
14839         modules/readutmp, modules/regex, modules/sha1,
14840         modules/version-etc, modules/yesno:
14841         Remove dependency on unlocked-io.
14842
14843 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14844
14845         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
14846
14847         * m4/unlocked-io.m4: Add copyright notice.
14848         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
14849
14850 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14851
14852         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
14853         * lib/xmalloc.c (xmemdup): Likewise.
14854         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
14855         XFREE): Remove these long-obsolescent macros.
14856         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
14857         * lib/xstrdup.c: Remove.
14858
14859         * lib/regex.c (re_comp): Cast gettext return value to char *,
14860         Problem reported by Martin Neitzel via Mark D. Baushke.
14861
14862 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14863
14864         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
14865         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
14866         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
14867         regex.c, sha1.c, version-etc.c, yesno.c:
14868         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
14869         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
14870         the includer's responsibility.
14871
14872         Sync from coreutils.
14873
14874         * lib/modechange.c (mode_compile): Don't decrement a pointer that
14875         points to the start of a string, as the C Standard says the
14876         resulting behavior is undefined.
14877
14878         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
14879         simple -> simple_backups, numbered_existing ->
14880         numbered_existing_backups, numbered -> numbered_backups
14881         to avoid shadowing problems.  All uses changed.
14882         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
14883         * lib/backupfile.c (check_extension, numbered_backup):
14884         Rename locals to avoid shadowing 'basename'.
14885         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
14886         once.
14887
14888         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
14889         * lib/.cvsignore: Add getopt.h.
14890
14891 2004-10-04  Bruno Haible  <bruno@clisp.org>
14892
14893         * modules/README: New file.
14894         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
14895         not a module.
14896
14897 2004-10-02  Jim Meyering  <jim@meyering.net>
14898
14899         * lib/dirfd.h, getpagesize.h: Add copyright notice.
14900
14901 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14902
14903         * modules/strsep: New file.
14904
14905 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14906
14907         * m4/strsep.m4: New file.
14908
14909 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14910
14911         * lib/strsep.h: New file.
14912         * lib/strsep.c: New file.
14913
14914 2004-10-01  Simon Josefsson  <jas@extundo.com>
14915
14916         * lib/snprintf.c (snprintf): Handle size==0.
14917
14918 2004-10-01  Simon Josefsson  <jas@extundo.com>
14919             Bruno Haible  <bruno@clisp.org>
14920
14921         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
14922         (snprintf): Declare 'args'.
14923
14924 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
14925
14926         * lib/snprintf.c: Remove comments as to why each header is needed.
14927
14928 2004-10-01  Bruno Haible  <bruno@clisp.org>
14929
14930         * MODULES.html.sh: Add strsep.
14931
14932 2004-09-30  Simon Josefsson  <jas@extundo.com>
14933
14934         * modules/snprintf: New file.
14935
14936 2004-09-30  Simon Josefsson  <jas@extundo.com>
14937
14938         * m4/snprintf.m4: New file.
14939
14940 2004-09-30  Simon Josefsson  <jas@extundo.com>
14941
14942         * lib/snprintf.h, lib/snprintf.c: New files.
14943
14944 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14945
14946         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
14947         (hol_entry_help): Never translate an empty string.
14948         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
14949         * lib/argp.h (OPTION_NO_TRANS): New option.
14950
14951 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14952
14953         * modules/argp (Maintainer): Replace Simon Josefsson
14954         by Sergey Poznyakoff.
14955
14956 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14957
14958         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
14959         changes merged back into glibc.
14960
14961 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14962
14963         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
14964
14965 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
14966
14967         * lib/xvasprintf.c: Include xalloc.h.
14968         (xvasprintf): Use xalloc_die, not xmalloc_die.
14969
14970 2004-09-29  Bruno Haible  <bruno@clisp.org>
14971
14972         * modules/alloca-opt: New file, derived from modules/alloca.
14973         * modules/allocsa: Depend on alloca-opt instead of alloca.
14974         * modules/setenv: Likewise.
14975         * modules/vasnprintf: Likewise.
14976         * MODULES.html.sh: Add alloca-opt.
14977
14978 2004-09-28  Simon Josefsson  <jas@extundo.com>
14979
14980         * gnulib-tool: New parameter --lgpl, to asseert that modules are
14981         LGPL, and to replace license template from GPL to LGPL.
14982
14983 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14984
14985         * modules/dummy: Change license to LGPL.
14986
14987 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14988
14989         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
14990
14991 2004-09-24  Simon Josefsson  <jas@extundo.com>
14992
14993         * modules/minmax (License): Change from GPL to LGPL.
14994
14995 2004-09-23  Simon Josefsson  <jas@extundo.com>
14996
14997         * gnulib-tool (--import): Typo.
14998
14999 2004-09-23  Simon Josefsson  <jas@extundo.com>
15000
15001         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
15002
15003 2004-09-22  Bruno Haible  <bruno@clisp.org>
15004
15005         * modules/*: Add 'License' field.
15006         * gnulib-tool: Accept --extract-license option.
15007         (func_get_license): New function.
15008
15009 2004-09-21  Bruno Haible  <bruno@clisp.org>
15010
15011         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
15012         Reported by Simon Josefsson.
15013
15014 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15015
15016         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
15017         gl_AC_TYPE_LONG_LONG.
15018
15019 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15020
15021         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
15022
15023 2004-09-18  Simon Josefsson  <jas@extundo.com>
15024         and  Paul Eggert  <eggert@cs.ucla.edu>
15025
15026         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
15027         calls with autoreconf.  Define GL_LIB.
15028
15029 2004-09-14  Karl Berry  <karl@gnu.org>
15030
15031         * config/srclist.txt: unsync setenv.c, sigh.
15032
15033 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15034
15035         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
15036         Problem reported by Bruno Haible in:
15037         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
15038
15039 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15040
15041         * config/srclist.txt: Comment out argp-pvh.c.
15042
15043 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
15044
15045         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
15046         in case some system header has #define'd it.  Problem reported by
15047         Soeren D. Schulze in
15048         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
15049
15050 2004-09-09  Karl Berry  <karl@gnu.org>
15051
15052         * regex.[ch]: delete from the root.  These were supposed to be
15053                 synced with emacs cvs, but this has not happened for about
15054                 a year, and anyway nothing else uses emacs regex.[ch].
15055                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
15056                 lib/regex[.ch] is untouched.
15057
15058 2004-09-09  Bruno Haible  <bruno@clisp.org>
15059
15060         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
15061
15062 2004-09-09  Bruno Haible  <bruno@clisp.org>
15063
15064         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
15065         modifications.
15066         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
15067
15068 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15069
15070         * modules/xvasprintf: New file.
15071         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
15072
15073 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15074
15075         * lib/xvasprintf.h: New file.
15076         * lib/xvasprintf.c: New file.
15077         * lib/xasprintf.c: New file.
15078
15079 2004-09-08  Bruno Haible  <bruno@clisp.org>
15080
15081         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
15082
15083 2004-09-08  Bruno Haible  <bruno@clisp.org>
15084
15085         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
15086         length is > INT_MAX.
15087         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
15088         more.
15089
15090 2004-09-08  Bruno Haible  <bruno@clisp.org>
15091
15092         * lib/stdint_.h: New file, taken from GNU clisp.
15093
15094 2004-09-08  Bruno Haible  <bruno@clisp.org>
15095             Oskar Liljeblad  <oskar@osk.mine.nu>
15096
15097         * modules/stdint: New file.
15098         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
15099
15100 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15101
15102         Import from coreutils.
15103         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
15104         strings on unbounded length.  alloca's performance benefits aren't
15105         that important here.
15106         (V_STRDUP): Remove.
15107         (parse_with_separator): New function, with most of the internals
15108         of the old parse_user_spec.  Allow user to omit both user and group,
15109         for compatibility with FreeBSD.
15110         Clone only the user name, not the entire spec.
15111         Do not set *uid, *gid unless entirely successful.
15112         Avoid memory leak in some failing cases.
15113         Fix regression for USER.GROUP reported by Dmitry V. Levin in
15114         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
15115         (parse_user_spec): Rewrite to use parse_with_separator.
15116
15117 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15118
15119         * modules/userspec: Don't depend on alloca.
15120
15121 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15122
15123         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
15124
15125 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15126
15127         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
15128         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
15129         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
15130
15131 2004-08-16  Simon Josefsson  <jas@extundo.com>
15132
15133         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
15134         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
15135         Add --dry-run for --import.
15136         Let user provided command line parameters override configure.ac
15137         settings.
15138
15139 2004-08-12  Simon Josefsson  <jas@extundo.com>
15140
15141         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
15142         as discussed with Paul Eggert in threads rooted at
15143         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
15144         and
15145         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
15146         Before, the test was empty, and relied on ELIDE_CODE in source
15147         code.)
15148         (gl_PREREQ_GETOPT): New macro.
15149         (gl_GETOPT): Use them.
15150
15151 2004-08-12  Simon Josefsson  <jas@extundo.com>
15152
15153         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
15154         * lib/getopt_.h: Renamed from getopt.h.
15155
15156 2004-08-12  Simon Josefsson  <jas@extundo.com>
15157
15158         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
15159         Change default library name from libfoo to libgnu.
15160         Now, if you have a configure.ac that says:
15161                 gl_SOURCE_BASE(gl)
15162                 gl_M4_BASE(gl/m4)
15163                 gl_MODULES(error getopt etcetera)
15164                 gl_INIT
15165         you can import all you need by running:
15166                 ../gnulib/gnulib-tool --import
15167
15168         * modules/getopt (Files): Rename getopt.h to getopt_.h.
15169         (Makefile.am): Rewrite, use logic from argz.
15170         (Include): Use <getopt.h> instead of "getopt.h".
15171
15172 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15173
15174         * modules/argp (Files): Add m4/unlocked-io.m4.
15175         (Depends-on): Add extensions.
15176
15177 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15178
15179         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
15180         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
15181         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
15182         Check for program_invocation_name, program_invocation_short_name,
15183         flockfile, funlockfile, features.h, _getopt_long_only_r.
15184
15185 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15186
15187         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
15188         its complicated substitute.
15189         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
15190         and program_invocation_name.
15191         (__argp_basename) [!_LIBC]: Remove; the only use was
15192         replaced by its body.
15193         (__argp_short_program_name): Change condition from
15194         !defined __argp_short_program_name to
15195         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
15196         to match argp-namefrob.h.
15197         (__argp_failure): Don't assume strerror_r returns char *.
15198         * lib/argp-parse.c (N_): Define unconditionally.
15199         (argp_default_options): Fill out initializers with 0 to avoid
15200         gcc warnings.
15201
15202 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15203
15204         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
15205         getopt1.c.
15206
15207 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15208
15209         Merge from coreutils.
15210
15211         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
15212
15213         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
15214         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
15215
15216 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15217
15218         Merge from coreutils.
15219
15220         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
15221         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
15222         for Reliant Unix 5.43.
15223
15224         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
15225         (union fooround): Use uintmax_t, not long int.
15226         The rest is a merge from libc:
15227         [defined _LIBC]: Include <shlib-compat.h>.
15228         (_obstack) [defined _LIBC]: Remove after 2.3.4.
15229
15230         * lib/settime.c (settime): Recode to avoid warning with
15231         Sun Forte C 6U2.
15232
15233         * lib/strverscmp.c: Convert to UTF-8.
15234
15235 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15236
15237         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15238         m4/uintmax_t.m4.
15239
15240 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15241
15242         * modules/xalloc-die: New file.
15243         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
15244
15245         * modules/md5 (Files): Add m4/uint32_t.m4.
15246         * modules/sha1: Renamed from modules/sha.
15247         (Files):
15248         Rename lib/sha.h to lib/sha1.h.
15249         Rename lib/sha.c to lib/sha1.c.
15250         Rename m4/sha.m4 to m4/sha1.m4.
15251         (lib_SOURCES): Likewise.
15252         (configure.ac): Rename gl_SHA to gl_SHA1.
15253         (Include): sha.h -> sha1.h.
15254
15255 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15256
15257         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
15258         * m4/sha1.m4: Renamed from sha.m4.
15259         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
15260
15261 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15262
15263         * lib/obstack.h (obstack_empty_p):
15264         Don't assume that chunk->contents is suitably aligned.
15265         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
15266         Likewise. Problem reported by Benno in
15267         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
15268
15269         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
15270         readable.  This could be improved further but it'd take some work.
15271
15272 2004-08-08  Simon Josefsson  <jas@extundo.com>
15273
15274         * modules/xgethostname (Depends-on): Remove exit and error (not
15275         used).
15276
15277         * modules/getpass-gnu: Add getpass.h.
15278         (Depends-on): Add stdbool.
15279         * modules/getpass: Add getpass.h.
15280
15281 2004-08-08  Simon Josefsson  <jas@extundo.com>
15282
15283         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
15284         Check getpass declaration.
15285
15286 2004-08-08  Simon Josefsson  <jas@extundo.com>
15287
15288         * lib/xgethostname.c: Don't include error.h (not used).
15289
15290         * lib/getpass.h: Add.
15291         * lib/getpass.c: Include getpass.h first.
15292
15293 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
15294
15295         * lib/xalloc-die.c: New file.
15296         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
15297         All uses removed.
15298         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
15299         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
15300         xalloc-die.c.
15301         (_, N_, xalloc_die): Move to xalloc-die.c.
15302         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
15303         so that we needn't mess with xalloc_msg_memory_exhausted.
15304
15305         * lib/sha1.h: Renamed from sha.h.
15306         (SHA1_H): Renamed from _SHA_H.
15307         (sha1_ctx): Renamed from sha_ctx.
15308         (sha1_init_ctx): Renamed from sha_init_ctx.
15309         (sha1_process_block): Renamed from sha_process_block.
15310         (sha1_process_bytes): Renamed from sha_process_bytes.
15311         (sha1_finish_ctx): Renamed from sha_finish_ctx.
15312         (sha1_read_ctx): Renamed from sha_read_ctx.
15313         (sha1_stream): Renamed from sha_stream.
15314         (sha1_buffer): Renamed from sha_buffer.
15315         * lib/sha1.c: Likewise; renamed from sha.c.
15316         Do not include <sys/types.h>.
15317         Include <stddef.h> rather than <stdlib.h>.
15318
15319 2004-08-08  Bruno Haible  <bruno@clisp.org>
15320
15321         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
15322         FILESYSTEM_PREFIX_LEN.
15323         * lib/progreloc.c: Likewise.
15324         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
15325
15326 2004-08-06  Simon Josefsson  <jas@extundo.com>
15327
15328         * modules/progname (Depends-on): Don't depend on stdbool.
15329
15330 2004-08-06  Simon Josefsson  <jas@extundo.com>
15331
15332         * modules/getsubopt: New file.
15333         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15334         getsubopt.
15335
15336 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15337
15338         More merge from coreutils.
15339
15340         * m4/utimens.m4, m4/utimecmp.m4: New files.
15341         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
15342         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
15343         prereq.m4, sha.m4: Import changes from coreutils.
15344
15345 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15346
15347         More merge from coreutils.
15348         * modules/raise, modules/readtokens0, modules/utimens:
15349         * modules/utimecmp, module/xnanosleep: New files.
15350         * modules/strftime: Add lib/strftime.h.
15351         Change include from <time.h> to "strftime.h".
15352         * modules/yesno: Add lib/yesno.h.
15353         * modules/backupfile: Remove lib/addext.c.
15354         * modules/euidaccess: Add stat-macros.h.
15355         * modules/canonicalize, modules/euidaccess,
15356         modules/filemode, modules/lchown, modules/makepath,
15357         modules/rmdir, modules/stat: Likewise.
15358
15359 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15360
15361         Merge from tar.
15362         * lib/argp-help.c (make_hol, hol_append): Don't assume that
15363         SIZE_MAX is a valid preprocessor constant.
15364         (__argp_basename): Change from "#ifndef _LIBC"
15365         to "#ifndef __argp_short_program_name", so that
15366         we don't compile these functions for tar.
15367
15368         More merges from coreutils.
15369         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
15370         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
15371         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
15372         * lib/addext.c: Remove; no longer needed.
15373         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
15374         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
15375         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
15376         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
15377         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
15378         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
15379         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
15380         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
15381         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
15382         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15383         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
15384         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
15385         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
15386         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
15387         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
15388         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
15389         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
15390         Import changes from coreutils.
15391
15392 2004-08-05  Simon Josefsson  <jas@extundo.com>
15393
15394         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
15395
15396 2004-08-05  Simon Josefsson  <jas@extundo.com>
15397
15398         * m4/getsubopt.m4: New file.
15399
15400 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15401
15402         Merge from coreutils.
15403
15404         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
15405         * m4/getcwd-path-max.m4: New files.
15406
15407         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
15408         FILESYSTEM_PREFIX_LEN ->
15409         FILE_SYSTEM_PREFIX_LEN.
15410         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
15411         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
15412         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
15413         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
15414
15415         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
15416         prerequisite modules now handle the DOS stuff.
15417         Don't check for unistd.h.
15418
15419 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15420
15421         Merge from coreutils.
15422
15423         * lib/.gdb-history: Remove; this doesn't belong here.
15424
15425         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
15426         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
15427         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
15428         * lib/getcwd.c: New files.
15429
15430         * lib/dirname.h: Include <stdbool.h>.
15431         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
15432         for consistency with POSIX terminology.  All uses changed.
15433         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
15434         (strip_trailing_slashes): Use bool for booleans.
15435         * lib/stripslash.c (strip_trailing_slashes): Likewise.
15436
15437         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
15438         sometimes returns a positive errno value even when it succeeds.
15439         (print_errno_message) [!LIBC]: Fall back on strerror if
15440         __strerror_r fails.
15441
15442         * lib/path-concat.c (mempcpy): Don't define if a system header defines
15443         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
15444         (longest_relative_suffix): New function.
15445         (path_concat): Use it.  Assume first argument is not NULL.
15446         Port to DOS.  Omit redundant separators.
15447         Report an error instead of returning NULL.
15448         Use mempcpy instead of memcpy.
15449         (xpath_concat): Remove: not declared or used.
15450
15451         * lib/same.h: Include <stdbool.h>
15452         (same_name): Return bool, not int.
15453         * lib/same.c (same_name): Likewise.
15454         (errno): Don't declare; we assume C89 or better now.
15455
15456         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
15457         if not already defined.
15458
15459         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
15460         * lib/dup-safer.c (errno): Likewise.
15461
15462 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15463
15464         Merge from coreutils.
15465         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
15466         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
15467         * modules/path-concat: Don't depend on strdup.
15468
15469 2004-08-03  Simon Josefsson  <jas@extundo.com>
15470
15471         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
15472         * lib/progname.h: Don't include stdbool.h.
15473
15474 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15475
15476         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
15477         * MODULES.html.sh (func_all_modules): Remove fatal.
15478
15479 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15480
15481         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
15482
15483 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15484
15485         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
15486         working.
15487
15488 2004-08-02  Simon Josefsson  <jas@extundo.com>
15489
15490         * lib/getsubopt.h: New file, with comments from Bruno Haible.
15491         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
15492         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
15493
15494 2004-08-01  Simon Josefsson  <jas@extundo.com>
15495
15496         * lib/xgetdomainname.c: Include stdlib.h, for free().
15497
15498 2004-07-19  Bruno Haible  <bruno@clisp.org>
15499
15500         * MODULES.html.sh (func_all_modules): Add dummy.
15501
15502 2004-07-16  Simon Josefsson  <jas@extundo.com>
15503
15504         * modules/dummy: New file.
15505
15506 2004-07-16  Simon Josefsson  <jas@extundo.com>
15507
15508         * lib/dummy.c: New file.
15509
15510 2004-07-16  Bruno Haible  <bruno@clisp.org>
15511
15512         * lib/backupfile.h: Add extern "C" for C++.
15513         * lib/closeout.h: Likewise.
15514         * lib/copy-file.h: Likewise.
15515         * lib/findprog.h: Likewise.
15516         * lib/full-write.h: Likewise.
15517         * lib/pathname.h: Likewise.
15518         * lib/progname.h: Likewise.
15519         * lib/stpcpy.h: Likewise.
15520         * lib/stpncpy.h: Likewise.
15521         * lib/strcase.h: Likewise.
15522         * lib/strstr.h: Likewise.
15523         * lib/xalloc.h: Likewise.
15524
15525         * lib/mbswidth.h: Add extern "C" for C++.
15526         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
15527
15528 2004-07-13  Robert Millan  <robertmh@gnu.org>
15529
15530         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
15531
15532 2004-07-09  Simon Josefsson  <jas@extundo.com>
15533
15534         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
15535         failed without this.)
15536
15537 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15538
15539         * modules/chown (Files): Add lib/fchown-stub.c, since
15540         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
15541
15542 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15543
15544         * lib/fchown-stub.c: New file.
15545
15546 2004-06-24  Jim Meyering  <jim@meyering.net>
15547
15548         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
15549
15550 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15551
15552         * modules/argz: Omit "#include".
15553
15554         * MODULES.html.sh (func_all_modules): Add calloc, to match
15555         2004-06-01 addition of calloc module.
15556
15557 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15558
15559         * m4/argz.m4: New file, which is autoupdated from libtool.
15560
15561 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15562
15563         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
15564         libtool.
15565
15566 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15567
15568         * config/srclist-update: Don't insist on "USA." before the
15569         close-comment, as libtool omits the period and puts the */ on a
15570         separate line.
15571         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
15572         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
15573
15574 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
15575
15576         * modules/argz: New file.
15577         * MODULES.html.sh (func_all_modules): Add argz.
15578
15579 2004-06-12  Jim Meyering  <jim@meyering.net>
15580         and  Paul Eggert  <eggert@cs.ucla.edu>
15581
15582         * modules/hash (Files): Add lib/xalloc.h.
15583         * modules/pipe (Depends-on): Add wait-process.
15584         * modules/stat (Depends-on): Add xalloc.
15585         * modules/userspec (Files): Add lib/userspec.h.
15586         * modules/xstrto
15587
15588         Upgrade from gettext-0.13.
15589         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
15590         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
15591         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
15592
15593 2004-06-10  Jim Meyering  <jim@meyering.net>
15594
15595         * lib/calloc.c: New file.
15596
15597 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
15598
15599         * lib/getdate.y (yylex): Allow space between sign and number.
15600         Problem reported by Dan Jacobson.
15601
15602 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15603
15604         Merge from coreutils CVS.
15605
15606         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
15607         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
15608         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
15609         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
15610         xstrtol.m4: Fix copyright date and/or serial number.
15611
15612         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
15613         See if we need an fchown replacement.
15614         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
15615         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
15616         and use the replacement function if we detect either defect.
15617
15618         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
15619         gl_UTIMECMP.
15620
15621 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15622         and  Jim Meyering  <jim@meyering.net>
15623
15624         Merge from coreutils CVS.
15625
15626         * lib/stat-macros.h: New file, with contents from file-type.h
15627         and coreutils' system.h.
15628         * lib/file-type.c: Include "stat-macros.h".
15629         * lib/file-type.h (file_type): Move all macro definitions to new file,
15630         stat-macros.h.
15631
15632         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
15633         Wrap old code with this conditional.
15634         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
15635         function that does not dereference symlinks.
15636         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
15637
15638         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
15639         dependency problems.
15640         (xreadlink): Accept new arg SIZE, for efficiency.
15641         All decls and uses changed.
15642         * lib/xreadlink.h: Include <stddef.h>, for size_t.
15643
15644         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
15645         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
15646
15647         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
15648         sysexits.h.
15649
15650 2004-06-01  Jim Meyering  <jim@meyering.net>
15651
15652         * m4/calloc.m4: New file.
15653
15654 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
15655
15656         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
15657         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
15658         Also, fix a typo in a diagnostic.
15659
15660 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15661
15662         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
15663         or AC_FUNC_REALLOC.
15664
15665 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15666
15667         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
15668         macros to be defined.
15669         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
15670         the allocator returns NULL because the requested size is zero.
15671
15672 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15673
15674         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
15675         var.  Add comment explaining why libc still defines it.  This
15676         merges the following patch from glibc:
15677         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
15678
15679 2004-05-20  Andreas Schwab  <schwab@suse.de>
15680
15681         * m4/free.m4: Replace free if it not known to work, not the other
15682         way round.
15683
15684 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15685
15686         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
15687         present in glibc since revision 1.1 of this file.
15688         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
15689         obstack_alignment_mask, obstack_alloc, obstack_base,
15690         obstack_blank, obstack_blank_fast, obstack_chunk_size,
15691         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
15692         obstack_grow0, obstack_init, obstack_int_grow,
15693         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
15694         obstack_next_free, obstack_object_size, obstack_ptr_grow,
15695         obstack_ptr_grow_fast, obstack_room): Remove declarations of
15696         nonexistent functions.
15697
15698 2004-05-18  Karl Berry  <karl@gnu.org>
15699
15700         * config/srclist.txt: break link for vasnprintf.c.
15701
15702 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15703
15704         Port obstack to the AS/400, where pointers are 16 bytes wide and
15705         you cannot cast an integer to a valid pointer.  This patch is
15706         currently waiting to be integrated into glibc; see
15707         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
15708
15709         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
15710         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
15711         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
15712         (struct obstack): temp member is now a union of a pointer and
15713         an integer, instead of an integer.  All integer uses changed.
15714         This does not affect the physical layout of struct obstack,
15715         except on hosts (like the AS/400) where the size or alignment of
15716         void * is greater than that of ptrdiff_t.
15717         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
15718         __STDC__)]: Store temporary in pointer member of union, not
15719         integer member.
15720         * lib/obstack.c: Include <stddef.h>, for offsetof.
15721         (struct fooalign): Remove; it doesn't need a name.
15722         (union fooround): Change double to long double, and add void *.
15723         (DEFAULT_ALIGNMENT): Use offsetof to compute.
15724         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
15725         not a macro.  Hence the values are always int; so remove all
15726         casts-to-int in uses.
15727
15728 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15729
15730         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
15731         we can get this patch merged into glibc.
15732
15733 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15734             Paul Eggert  <eggert@cs.ucla.edu>
15735
15736         * m4/argp: Depend on alloca.
15737
15738 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15739             Paul Eggert  <eggert@cs.ucla.edu>
15740
15741         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
15742         freecoding.
15743
15744 2004-05-17  Bruno Haible  <bruno@clisp.org>
15745
15746         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
15747         precision that consists of a '.' followed by an empty digit string.
15748         Patch by Tor Lillqvist <tml@iki.fi>.
15749
15750 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15751
15752         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
15753         for backward compatibility with older code.  We need our own
15754         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
15755         it under some other name, and our alloca.h will define it.
15756
15757 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15758             Derek Price  <derek@ximbiot.com>
15759
15760         * lib/alloca.c: Include <alloca.h>, to get our interface.
15761         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
15762         include <alloca.h> first.  Use C89 prototype for alloca; this
15763         requires including <stddef.h> for size_t.  Use extern "C" if C++.
15764         Use #elif for simplicity, since we can assume C89 now.
15765         Don't try to source the system alloca.h since it will not be found
15766         and to prevent recursively including its replacement.
15767         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
15768         * lib/regex.c: Likewise.
15769
15770 2004-05-16  Derek Price  <derek@ximbiot.com>
15771             Paul Eggert  <eggert@cs.ucla.edu>
15772
15773         getline cleanup.  This changes the getndelim2 API: both order of
15774         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
15775         no delimiter).
15776
15777         * lib/getline.c: Don't include stddef.h or stdio.h, since our
15778         interface does that.
15779         (getline): Always use getdelim, so that we don't have two
15780         copies of this code.
15781         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
15782         if available.
15783         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
15784         (GETNDELIM2_MAXIMUM): New macro.
15785         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
15786         instead of the old practice of delim2==0.  All callers changed.
15787         Return -1 on overflow, instead of returning junk.
15788         Do not set *linesize unless allocation succeeds.
15789         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
15790         that we include sys/types.h.
15791         * lib/getnline.h: Likewise.
15792         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
15793         (getndelim2): Reorder arguments.
15794         * lib/getnline.c (getnline, getndelim):
15795         Don't discard the NMAX argument.
15796         (getnline): Invoke getndelim, to avoid code duplication.
15797         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
15798         of (size_t) -1 by callers of the getnline family.
15799
15800 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15801
15802         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
15803         Check for gettimeofday.
15804         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
15805         Check for settimeofday, stime.
15806
15807 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15808
15809         * lib/nanosleep.c (suspended): Change its type from int to
15810         sig_atomic_t volatile.
15811         (first_call): Make it private to rpl_nanosleep, and have it
15812         be zero initially as that's a bit faster.
15813         (my_usleep): Round up fractional times instead of truncating them,
15814         as this is the usual meaning for 'sleep'.
15815
15816         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
15817         doesn't work.
15818         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
15819         (ENOSYS): Define if not defined.
15820         (settime): Fall back on stime if it exists and settimeofday fails.
15821         But don't bother with fallbacks if a method fails with errno == EPERM.
15822
15823 2004-05-11  Jim Meyering  <jim@meyering.net>
15824
15825         Prior to this change, the save_cwd caller required read access to the
15826         current directory on most systems (ones with the fchdir function).
15827
15828         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
15829         fails, try write-only, and finally, resort to using xgetcwd.
15830
15831 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
15832
15833         * lib/obstack.c, obstack.h: Import changes from libc.
15834
15835 2004-04-28  Bruno Haible  <bruno@clisp.org>
15836
15837         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
15838         also implicitly appends .exe to executables.
15839         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
15840         accepts Windows pathnames.
15841         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
15842         Treat Cygwin like Windows, since it now accepts Windows pathnames.
15843         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
15844         Treat Cygwin like Windows, since it now accepts Windows pathnames.
15845         Reported by Derek Robert Price <derek@ximbiot.com>.
15846
15847 2004-04-21  Karl Berry  <karl@gnu.org>
15848
15849         * config/srclist.txt (localcharset.c): break sync.
15850
15851 2004-04-20  Paul Eggert  <eggert@twinsun.com>
15852
15853         * m4/host-os.m4: Add a copyright notice.
15854
15855 2004-04-20  Jim Meyering  <jim@meyering.net>
15856
15857         Change UTILS_ to gl_ in AC_DEFINE'd names.
15858         Change utils_- and jm_-prefixed variables, too.
15859         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
15860         UTILS_FUNC_MKDIR_TRAILING_SLASH.
15861         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
15862
15863         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
15864         Don't emit trailing blanks.
15865         Also rename jm_-prefixed variables to have gl_ prefix.
15866
15867         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
15868         Also rename jm_-prefixed variables to have gl_ prefix.
15869
15870         * m4/jm-macros.m4: Reflect the renamings.
15871         * m4/prereq.m4: Likewise.
15872
15873 2004-04-20  Jim Meyering  <jim@meyering.net>
15874
15875         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
15876         memory.
15877
15878 2004-04-20  Jim Meyering  <jim@meyering.net>
15879             Bruno Haible  <bruno@clisp.org>
15880
15881         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
15882         memory when realloc fails.
15883
15884 2004-04-19  Jim Meyering  <jim@meyering.net>
15885
15886         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
15887         now that readutmp.c may call `free (0)'.
15888
15889 2004-04-19  Bruno Haible  <bruno@clisp.org>
15890
15891         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
15892         * m4/inttypes_h.m4: Likewise.
15893         * m4/stdint_h.m4: Likewise.
15894         * m4/intmax_t.m4: Likewise.
15895         * m4/uintmax_t.m4: Likewise.
15896
15897 2004-04-18  Jim Meyering  <jim@meyering.net>
15898
15899         * m4/prereq.m4: Don't forbid jm_ prefix.
15900
15901         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
15902         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
15903         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
15904         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
15905         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
15906         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
15907         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
15908         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
15909         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
15910         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
15911         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
15912         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
15913         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
15914         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
15915         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
15916         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
15917         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
15918         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
15919         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
15920
15921 2004-04-18  Jim Meyering  <jim@meyering.net>
15922
15923         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
15924         failure, don't leak memory and do call END_UTMP_ENT.
15925
15926 2004-04-16  Jim Meyering  <jim@meyering.net>
15927
15928         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
15929         coreutils' stat program.
15930         (gl_PREREQ): Don't require jm_PREREQ_STAT.
15931
15932 2004-04-11  Paul Eggert  <eggert@twinsun.com>
15933
15934         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
15935         C89.
15936         (CHAR_BIT): Remove, since we assume C89.
15937         Include <stdint.h> if available, as per current Autoconf CVS advice.
15938
15939 2004-03-31  Jim Meyering  <jim@meyering.net>
15940
15941         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
15942         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
15943         * m4/xalloc.m4: Likewise.
15944
15945 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15946
15947         Merge from coreutils.
15948
15949         * m4/inttostr.m4: New file.
15950         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
15951         Require AM_STDBOOL_H and gl_TIMESPEC instead.
15952         Require gl_CLOCK_TIME.
15953         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
15954
15955 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15956
15957         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
15958         not bool, to be more consistent with Unix conventions.
15959         Suggested by Bruno Haible.
15960
15961         Merge from coreutils.
15962
15963         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
15964         * lib/umaxtostr.c: New files.
15965
15966         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
15967         the usual <time.h> dance.
15968         (get_date): Change signature to support fractional time stamps.
15969         All callers changed.
15970         * lib/getdate.y: Include "getdate.h" first, as we can now
15971         assume C89 and don't need to worry about 'const'.
15972         Similarly, include "unlocked-io.h" near start, not in middle.
15973         Include <limits.h>.
15974         (textint.value): Use long int rather than int.
15975         (textint.digits): Use size_t rather than int.
15976         (BILLION, LOG10_BILLION): New constants.
15977         (parser_control): New member rel_ns.  Members day_ordinal,
15978         time_zone, month, day, hour, minutes, rel_year, rel_month,
15979         rel_day, rel_hour, rel_minutes, rel_seconds
15980         are now long int, not int.  Member seconds is now struct timespec,
15981         not int.  New member timespec_seen.  Members dates_seen, days_seen,
15982         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
15983         not int.
15984         (%union.intval): Now long int, not int.
15985         New member timespec.
15986         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
15987         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
15988         (spec): Now is a timespec or an item list.
15989         (timespec, items): New nonterminals.
15990         (time, rel, relunit, number, get_date):
15991         Add support for fractional seconds.
15992         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
15993         (gmtime, localtime, mktime): Remove decls; not needed with C89.
15994         (to_hour): First arg is now long int, not int.
15995         (to_year): Returns long int, not int.
15996         Don't treat year -70 like 70.
15997         (tm_diff): Returns long int, not int.
15998         (lookup_word): Use bool instead of int when appropriate.
15999         (yylex): Use size_t for count, not int.
16000         Detect overflow when parsing large integer constants.
16001         Add support for fractions.
16002         (get_date): Make pointers 'const' if possible.
16003         Use more-portable code to detect integer overflow.
16004         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
16005         Don't use ctime; it's not reliable if the year has >4 digits.
16006
16007         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
16008         This is for compatibility with BSD.
16009
16010         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
16011         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
16012         From coreutils' system.h.
16013
16014         * lib/userspec.c: Don't include "posixver.h".
16015         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
16016         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
16017         compatible extension.  Simplify code by removing a boolean int
16018         that was always nonzero if a string was nonnull.
16019
16020 2004-03-30  Jim Meyering  <jim@meyering.net>
16021
16022         Merge from coreutils.
16023
16024         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
16025         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
16026         on some systems one must include <grp.h> before it.
16027         Reported by Christian Krackowizer.
16028
16029 2004-03-30  Jim Meyering  <jim@meyering.net>
16030
16031         Merge from coreutils.
16032
16033         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
16034
16035         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
16036         an empty input stream.
16037
16038         * lib/readtokens.c: Include <stdbool.h>.
16039         (readtoken): Use `size_t' rather than int/long.
16040         All callers adjusted.
16041         Use `bool' rather than `int' where appropriate.
16042         Use memset rather than an explicit loop.
16043         Use x2nrealloc rather than xrealloc.
16044         Allow the use of `\0' as a delimiter.
16045         (readtokens): Likewise.
16046         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
16047
16048 2004-03-30  Jim Meyering  <jim@meyering.net>
16049
16050         * m4/realloc.m4: Remove file, since now it does no more than
16051         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
16052         the `configure.ac' section of module/realloc.
16053         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
16054
16055 2004-03-30  Bruno Haible  <bruno@clisp.org>
16056
16057         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
16058         nonnull.
16059
16060 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16061
16062         Merge changes to getloadavg.c from coreutils and Emacs.
16063
16064         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
16065         Define to an expression, not to the empty string.
16066         Include cloexec.h and xalloc.h.
16067         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
16068         Use set_cloexec_flag rather than rolling our own.
16069         * lib/cloexec.c, lib/cloexec.h: New files.
16070
16071 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16072
16073         * m4/cloexec.m4: New file.
16074
16075 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16076
16077         * lib/getopt.h: Sync with libc CVS.
16078
16079 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16080             Bruno Haible  <bruno@clisp.org>
16081
16082         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
16083         mbswidth.
16084
16085 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16086             Bruno Haible  <bruno@clisp.org>
16087
16088         * lib/mbswidth.h: Include <wchar.h> only if
16089         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
16090         <wchar.h>.
16091         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
16092
16093 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16094
16095         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
16096         Sync with libc CVS.
16097         * lib/getopt_int.h: New file, also synced from libc.
16098
16099 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16100
16101         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
16102         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
16103         Bring back getopt.c, getopt.h, getopt1.c.
16104
16105 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16106
16107         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
16108         All uses changed.  Check for sa_sigaction member; this fixes
16109         a bug first reported by Jason Andrade in
16110         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16111
16112 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16113
16114         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
16115         '#if' expressions.  Unlike the code it replaces, it does not
16116         depend on (defined _SC_PAGESIZE).  However, it does depend on
16117         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
16118         first reported by Jason Andrade in
16119         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16120
16121 2004-02-25  Simon Josefsson  <jas@extundo.com>
16122
16123         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
16124
16125 2004-02-25  Simon Josefsson  <jas@extundo.com>
16126
16127         * lib/strdup.h: New file.
16128         * lib/strdup.c: Include it.
16129         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
16130         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
16131
16132 2004-02-23  Karl Berry  <karl@gnu.org>
16133
16134         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
16135         (from fencepost.gnu.org:/gd/gnuorg).
16136
16137 2004-02-23  Karl Berry  <karl@gnu.org>
16138
16139         * config/srclistvars.sh (GNUORG) [karl]: redefine.
16140         * config/srclist.txt: add maintain/standards documents.
16141
16142 2004-02-18  Bruno Haible  <bruno@clisp.org>
16143
16144         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
16145         Reported by Derek Robert Price <derek@ximbiot.com>.
16146
16147 2004-02-16  Karl Berry  <karl@gnu.org>
16148
16149         * config/mkinstalldirs, install-sh: update from automake.
16150
16151 2004-02-06  Karl Berry  <karl@gnu.org>
16152
16153         * m4/po.m4: update from gettext 0.14.1.
16154
16155 2004-02-06  Karl Berry  <karl@gnu.org>
16156
16157         * lib/config.charset: update from gettext 0.14.1.
16158
16159 2004-02-05  Paul Eggert  <eggert@twinsun.com>
16160
16161         Add comments and code, prompted by suggestions from Bruno Haible
16162         for sh-quote.
16163         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
16164         describing the enum quoting_style values.
16165         * lib/quotearg.c (quotearg_alloc): New function.
16166         (quotearg_buffer_restyled): Treat lone { and } as special.
16167         Treat = as special.  Work around bug with older shells
16168         that "see" a '\' that is really the 2nd byte of a multibyte char.
16169         Quote empty string with shell_quoting_style.
16170
16171 2004-02-03  Bruno Haible  <bruno@clisp.org>
16172
16173         * m4/pipe.m4: New file, from GNU gettext.
16174
16175 2004-02-03  Bruno Haible  <bruno@clisp.org>
16176
16177         * lib/pipe.h: New file, from GNU gettext.
16178         * lib/pipe.c: New file, from GNU gettext.
16179
16180 2004-01-27  Bruno Haible  <bruno@clisp.org>
16181
16182         * m4/execute.m4: New file, from GNU gettext.
16183
16184 2004-01-27  Bruno Haible  <bruno@clisp.org>
16185
16186         * lib/execute.h: New file, from GNU gettext.
16187         * lib/execute.c: New file, from GNU gettext.
16188         * lib/w32spawn.h: New file, from GNU gettext.
16189
16190 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16191
16192         Merge from diffutils.
16193
16194         * lib/file-type.c (file_type): Add typed memory objects.
16195         * lib/file-type.h (S_TYPEISTMO): New macro.
16196
16197         * lib/c-stack.h (c_stack_action): Remove argv argument.
16198         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
16199         (die): Don't calculate message unless segv_action returns.
16200         (get_stack_location, min_address_from_argv, max_address_from_argv,
16201         volatile stack_base, volatile_stack_size): Remove.
16202         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
16203         that every segmentation violation is a stack overflow.  (Ouch!)
16204         See Debian bug 136249 (still outstanding) for more info about why
16205         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
16206
16207 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16208
16209         Exit-status fix from coreutils.
16210
16211         Use exit_failure consistently in place of EXIT_FAILURE,
16212         so that program exit statuses are consistent on failure.
16213
16214         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
16215         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
16216         * lib/argmatch.h: Comment fix to match the above.
16217         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
16218         Now a macro referring to exit_failure, instead of a separate
16219         variable.  Include "exitfail.h" to get it.
16220         * lib/xstrtol.h: Include "exitfail.h".
16221         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
16222
16223         * lib/long-options.c (parse_long_options): Use prototype
16224         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
16225         for clarity.
16226
16227 2004-01-21  Jim Meyering  <jim@meyering.net>
16228
16229         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
16230         so as not to conflict with a different-sized __mktime_internal
16231         function in GNU libc.
16232         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
16233         Problem building statically-linked `ls' reported by Michael Brunnbauer.
16234
16235 2004-01-20  Karl Berry  <karl@gnu.org>
16236
16237         * config/config.guess: update from config.
16238
16239         * config/srclistvars.sh: GNUWWWLICENSES for karl.
16240
16241 2004-01-20  Bruno Haible  <bruno@clisp.org>
16242
16243         Safer stack allocation.
16244         * lib/setenv.c: Include allocsa.h.
16245         (alloca): Remove fallback definition.
16246         (freea): Remove macro.
16247         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
16248         instead of freea.
16249
16250 2004-01-20  Bruno Haible  <bruno@clisp.org>
16251
16252         * m4/eealloc.m4: New file, from GNU gettext.
16253
16254 2004-01-20  Bruno Haible  <bruno@clisp.org>
16255
16256         * m4/allocsa.m4: New file, from GNU gettext.
16257
16258 2004-01-20  Bruno Haible  <bruno@clisp.org>
16259
16260         * lib/xallocsa.h: New file, from GNU gettext.
16261         * lib/xallocsa.c: New file, from GNU gettext.
16262
16263 2004-01-20  Bruno Haible  <bruno@clisp.org>
16264
16265         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
16266
16267 2004-01-20  Bruno Haible  <bruno@clisp.org>
16268
16269         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
16270         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
16271         specially.
16272
16273 2004-01-20  Bruno Haible  <bruno@clisp.org>
16274
16275         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
16276         patch.
16277
16278 2004-01-20  Bruno Haible  <bruno@clisp.org>
16279
16280         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
16281
16282 2004-01-20  Bruno Haible  <bruno@clisp.org>
16283
16284         * lib/eealloc.h: New file.
16285
16286 2004-01-20  Bruno Haible  <bruno@clisp.org>
16287
16288         * lib/binary-io.h: Avoid warnings on Cygwin.
16289
16290 2004-01-20  Bruno Haible  <bruno@clisp.org>
16291
16292         * lib/allocsa.h: New file, from GNU gettext.
16293         * lib/allocsa.c: New file, from GNU gettext.
16294
16295 2004-01-18  Karl Berry  <karl@gnu.org>
16296
16297         * doc/gpl.texi, doc/lgpl.texi: new files.
16298
16299 2004-01-18  Karl Berry  <karl@gnu.org>
16300
16301         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
16302         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
16303
16304 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16305
16306         Merge from coreutils.
16307
16308         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
16309         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
16310         (gl_DEFAULT_POSIX2_VERSION): Move
16311         the documentation from 'configure' into 'config.hin',
16312         so that 'configure --help' isn't burdened by it and
16313         we don't have to worry about its formatting there.
16314         Reword the documentation so that it's more succinct
16315         and can be run together into a single paragraph.
16316         * m4/same.m4 (gl_SAME): Check for pathconf.
16317
16318 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16319
16320         Merge from coreutils.
16321
16322         * lib/posixver.c: Include posixver.h.
16323
16324         * lib/same.c: Include <stdbool.h>, <limits.h>.
16325         (_POSIX_NAME_MAX): Define if not defined.
16326         (MIN): New macro.
16327         (same_name): If file names are silently truncated, report
16328         that the file names are the same if they are the same after
16329         the silent truncation.
16330
16331         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
16332         conversion function.
16333         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
16334         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
16335         longer needed.
16336
16337 2004-01-15  Jim Meyering  <jim@meyering.net>
16338
16339         Merge from coreutils.
16340
16341         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
16342         if no library is required.
16343         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
16344         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
16345         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
16346         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
16347         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
16348         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
16349         value, $ac_cv_search_crypt, if it's "none required".
16350         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
16351         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
16352         not gl_FUNC_GETLOADAVG.
16353         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
16354         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
16355
16356 2004-01-15  Jim Meyering  <jim@meyering.net>
16357
16358         Merge from coreutils.
16359
16360         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
16361         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
16362         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
16363
16364         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
16365         optional configure-time default.
16366
16367         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16368
16369         * lib/xreadlink.c (xreadlink): Correct outdated comment.
16370
16371 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
16372
16373         Merge from coreutils.
16374
16375         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
16376         value, $ac_cv_search_nanosleep, if it's "none required".
16377
16378 2004-01-14  Paul Eggert  <eggert@twinsun.com>
16379
16380         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
16381         with like-named macro in fnmatch.c.
16382         (EXT): Use an internal constant instead.
16383
16384         Merge fnmatch patches from glibc.
16385         * lib/fnmatch.c (mbsinit): Remove define.
16386         Add libc_hidden_ver (__fnmatch, fnmatch).
16387         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
16388         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
16389
16390 2004-01-14  Karl Berry  <karl@gnu.org>
16391
16392         * config/install-sh: update from automake.
16393
16394 2004-01-13  Karl Berry  <karl@gnu.org>
16395
16396         * config/install-sh: update from automake.
16397
16398 2004-01-09  Karl Berry  <karl@gnu.org>
16399
16400         * config/install-sh: update from automake.
16401
16402 2004-01-05  Karl Berry  <karl@gnu.org>
16403
16404         * config/config.{sub,guess}: update from config.
16405
16406 2003-12-31  Karl Berry  <karl@gnu.org>
16407
16408         * config/depcomp: update from automake.
16409
16410 2003-12-14  Karl Berry  <karl@gnu.org>
16411
16412         * lib/config.charset: update from gettext-runtime.
16413
16414 2003-12-03  Paul Eggert  <eggert@twinsun.com>
16415
16416         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
16417         Bug reported by Alfred M. Szmidt.
16418
16419 2003-12-03  Bruno Haible  <bruno@clisp.org>
16420
16421         * m4/gettext.m4: Upgrade from gettext-0.13.
16422         * m4/po.m4: Upgrade from gettext-0.13.
16423         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
16424         * m4/intmax.m4: New file, from gettext-0.13.
16425         * m4/printf-posix.m4: New file, from gettext-0.13.
16426
16427 2003-11-29  Karl Berry  <karl@gnu.org>
16428
16429         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
16430
16431 2003-11-25  Paul Eggert  <eggert@twinsun.com>
16432             Bruno Haible  <bruno@clisp.org>
16433
16434         * lib/printf-parse.h: Don't include sys/types.h.
16435         (ARG_NONE): New macro.
16436         (char_directive): Change type of *arg_index fields to size_t.
16437         * lib/printf-parse.c: Don't include sys/types.h.
16438         (SSIZE_MAX): Remove macro.
16439         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
16440         Remove unnecessary overflow check.
16441         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
16442         fields.
16443
16444 2003-11-25  Bruno Haible  <bruno@clisp.org>
16445
16446         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
16447
16448 2003-11-25  Bruno Haible  <bruno@clisp.org>
16449
16450         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
16451         gt_TYPE_SSIZE_T.
16452
16453 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16454
16455         * modules/alloca: Remove dependency on xalloc.
16456
16457 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16458
16459         * lib/alloca.c: Remove dependency on xalloc module.
16460         (xalloc_die): Remove.
16461         (memory_full) [!defined emacs]: New macro.
16462         [!defined emacs]: Don't include xalloc.h.
16463         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
16464         address arithmetic overflows.  Change datatypes a bit to avoid
16465         unnecessary casts.
16466
16467 2003-11-22  Jim Meyering  <jim@meyering.net>
16468
16469         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
16470         s/size/size_t/.
16471
16472 2003-11-21  Karl Berry  <karl@gnu.org>
16473
16474         * config/config.{sub,guess}: update from config.
16475
16476 2003-11-18  Karl Berry  <karl@gnu.org>
16477
16478         * config/config.{sub,guess}: update from config.
16479
16480         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
16481
16482 2003-11-17  Paul Eggert  <eggert@twinsun.com>
16483
16484         * README: Mention that S+T cannot overflow if S is the size of
16485         an existing object and T is sufficiently small.
16486
16487 2003-11-17  Jim Meyering  <jim@meyering.net>
16488
16489         On systems without utime and without a utimes function capable of
16490         dealing with a NULL struct utimbuf* argument, this utime replacement
16491         could -- in unusual circumstances -- leak a file descriptor.
16492         * lib/utime.c: Include <unistd.h> and <errno.h>.
16493         (utime_null): Be sure to close `fd' and to preserve errno.
16494         Reported by Geoff Collyer via Arnold Robbins.
16495
16496 2003-11-17  Bruno Haible  <bruno@clisp.org>
16497
16498         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
16499         (Depends-on): Add xsize.
16500
16501 2003-11-17  Bruno Haible  <bruno@clisp.org>
16502
16503         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
16504
16505 2003-11-17  Bruno Haible  <bruno@clisp.org>
16506
16507         * lib/vasnprintf.c (alloca): Remove fallback definition.
16508         (freea): Remove definition.
16509         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
16510         Reported by Paul Eggert.
16511
16512 2003-11-16  Paul Eggert  <eggert@twinsun.com>
16513             Bruno Haible  <bruno@clisp.org>
16514
16515         Protect against address arithmetic overflow.
16516         * lib/printf-args.h: Include stddef.h.
16517         (arguments): Change type of field 'count' to size_t.
16518         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
16519         'unsigned int' where appropriate.
16520         * lib/printf-parse.h: Include sys/types.h.
16521         (char_directive): Change type of *arg_index fields to ssize_t.
16522         (char_directives): Change type of fields 'count', max_*_length to
16523         size_t.
16524         * lib/printf-parse.c: Include sys/types.h and xsize.h.
16525         (SSIZE_MAX): Define fallback value.
16526         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
16527         instead of 'int' where appropriate. Check a_allocated, d_allocated
16528         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
16529         * lib/vasnprintf.c: Include xsize.h.
16530         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
16531         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
16532         overflow. Avoid wraparound when converting a width or precision from
16533         decimal to binary.
16534
16535 2003-11-16  Bruno Haible  <bruno@clisp.org>
16536
16537         Update from GNU gettext.
16538         * lib/printf-parse.c: Generalize to it can be compiled for wide
16539         strings.
16540         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
16541         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
16542         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
16543         SNPRINTF): New macros.
16544         Don't include <alloca.h> if the file is used inside libintl.
16545         (local_wcslen): New function, for Solaris 2.5.1.
16546         (VASNPRINTF): Use it instead of wcslen.
16547
16548 2003-11-16  Bruno Haible  <bruno@clisp.org>
16549
16550         * lib/xsize.h (xmax): New function.
16551         (xsum, xsum3, xsum4): Declare as "pure" functions.
16552
16553 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16554
16555         * modules/xalloc (Files): Undo latest change, since xalloc.h
16556         no longer needs SIZE_MAX or PTRDIFF_MAX.
16557
16558 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16559
16560         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
16561         gl_PTRDIFF_MAX.
16562
16563 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16564
16565         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
16566         "return", to pacify some unknown compiler.  Problem reported
16567         by Joerg Schilling.
16568
16569 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16570
16571         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
16572         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
16573         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
16574         heuristic is just as accurate as far as we know, and it removes a
16575         dependency on size_max.m4 and ptrdiff_max.m4.
16576
16577 2003-11-11  Bruno Haible  <bruno@clisp.org>
16578
16579         * modules/xsize (Files): Add m4/size_max.m4.
16580         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
16581
16582 2003-11-11  Bruno Haible  <bruno@clisp.org>
16583
16584         * m4/size_max.m4: New file.
16585         * m4/ptrdiff_max.m4: New file.
16586         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
16587         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
16588         (gl_XALLOC): Invoke it.
16589
16590 2003-11-11  Bruno Haible  <bruno@clisp.org>
16591
16592         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
16593         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
16594         defined.
16595
16596 2003-11-10  Paul Eggert  <eggert@twinsun.com>
16597
16598         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
16599         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
16600         rejected some allocations of exactly SIZE_MAX - 2 bytes.
16601         From Bruno Haible.
16602         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
16603         not (size_t) -1, since it's defined here.
16604
16605 2003-11-09  Karl Berry  <karl@gnu.org>
16606
16607         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
16608
16609 2003-11-06  Paul Eggert  <eggert@twinsun.com>
16610
16611         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
16612         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
16613         Reject sizes of exactly SIZE_MAX bytes.
16614         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
16615         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
16616
16617 2003-11-05  Bruno Haible  <bruno@clisp.org>
16618
16619         * lib/xsize.h: Include limits.h, to avoid a possible collision with
16620         SIZE_MAX defined in <limits.h> on Solaris.
16621
16622 2003-11-04  Jim Meyering  <jim@meyering.net>
16623
16624         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
16625         variable names, rather than @VAR@.
16626         * modules/poll: Likewise.
16627
16628 2003-11-04  Bruno Haible  <bruno@clisp.org>
16629
16630         * modules/xsize: New file.
16631         * modules/linebreak: Depend on xsize.
16632         * MODULES.html.sh (func_all_modules): Add xsize.
16633
16634 2003-11-04  Bruno Haible  <bruno@clisp.org>
16635
16636         * m4/xsize.m4: New file.
16637
16638 2003-11-04  Bruno Haible  <bruno@clisp.org>
16639
16640         * lib/xsize.h: New file.
16641         * lib/linebreak.c: Include xsize.h.
16642         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
16643         argument for overflow.
16644         Suggested by Paul Eggert.
16645
16646 2003-11-03  Karl Berry  <karl@gnu.org>
16647
16648         * config/config.{guess,sub}: update from config.
16649
16650 2003-11-03  Jim Meyering  <jim@meyering.net>
16651
16652         * modules/userspec (lib_SOURCES): Add userspec.h.
16653         (Include): Add "userspec.h".
16654         Improve description.
16655
16656 2003-11-03  Jim Meyering  <jim@meyering.net>
16657
16658         * lib/userspec.c: Include "userspec.h".
16659         * lib/userspec.h: New file.
16660
16661 2003-11-03  Bruno Haible  <bruno@clisp.org>
16662
16663         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
16664
16665 2003-11-03  Bruno Haible  <bruno@clisp.org>
16666
16667         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
16668         available, to avoid (extremely rare) race condition.
16669         Suggested by Paul Eggert.
16670
16671 2003-11-02  Karl Berry  <karl@gnu.org>
16672
16673         * config/srclist.txt (vasprintf.c): sync broken, sigh.
16674
16675 2003-10-31  Paul Eggert  <eggert@twinsun.com>
16676
16677         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
16678         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
16679         (read_filesystem_list): Set and use me_type_malloced.
16680         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
16681         whatever the type happens to be), for brevity and consistency.
16682         Check for size calculation overflow on Alphas running OSF/1.
16683
16684 2003-10-31  Jim Meyering  <jim@meyering.net>
16685
16686         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
16687
16688         * lib/linebuffer.c: Include <string.h> for declaration of memset.
16689
16690 2003-10-30  Paul Eggert  <eggert@twinsun.com>
16691             Bruno Haible  <bruno@clisp.org>
16692
16693         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
16694         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
16695
16696 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16697
16698         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
16699         netbsd*-gnu*.  Suggested by Robert Millan.
16700
16701 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16702
16703         * modules/group-member: Depend on stdbool.
16704
16705 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16706
16707         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
16708
16709 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16710
16711         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
16712         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
16713         after the 'gnu' in these cases.  This fixes some bugs in the
16714         previous change, and is based on suggestions by Robert Millan.
16715
16716 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16717
16718         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
16719         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
16720         no longer needed.
16721         * lib/quotearg.c (quotearg_n_options): Use it.
16722         * lib/group-member.c: Include <stdbool.h>.
16723         (free_group_info): Arg is now const *; don't free arg.
16724         (get_group_info): Now returns bool and accepts struct group_info *,
16725         rather than returning a malloc'ed struct group_info *.
16726         All uses changed.  Check for overflow in internal size calculation.
16727
16728         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
16729         rather than xmalloc/xrealloc.
16730         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
16731         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
16732         conformance bug: the old code used a pointer after freeing the
16733         storage that it addressed.
16734         * lib/hash.c (hash_initialize): Simplify the code by using
16735         xalloc_oversized rather than doing it by hand.
16736         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
16737         the buffer preserved.  Use free and xmalloc instead.
16738         * lib/quotearg.c (quotearg_n_options): Likewise.
16739         Use a simpler test for size overflow.  Don't use xalloc_oversized
16740         because unsigned int might be wider than size_t (!); this suggests
16741         that we should switch from unsigned int to size_t for slot numbers.
16742
16743 2003-10-28  Paul Eggert  <eggert@twinsun.com>
16744
16745         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
16746         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
16747         NetBSD kernels.  Requested by Richard Stallman.
16748
16749 2003-10-27  Paul Eggert  <eggert@twinsun.com>
16750
16751         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
16752         to allocate the returned structure.  Do not allocate a subarray,
16753         as x2nrealloc will do that.
16754         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
16755         instead of xnrealloc.
16756         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
16757
16758 2003-10-27  Bruno Haible  <bruno@clisp.org>
16759
16760         * lib/stdbool_.h: Better support for BeOS.
16761
16762 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16763
16764         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
16765         now uses inline.
16766
16767 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16768
16769         * lib/xalloc.h (xalloc_oversized): New static inline function, for
16770         callers that want to do their own size-overflow checking.  Include
16771         <stdbool.h>, since xalloc_oversized returns bool.
16772         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
16773         to use xalloc_oversized.
16774
16775         Add two functions x2realloc, x2nrealloc, for programs that grow
16776         arrays dynamically by doubling their sizes.
16777         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
16778         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
16779         New functions.
16780
16781         Port to C99 semantics for 'inline' of external functions.
16782         Bug reported by Bruno Haible.
16783         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
16784         with the old contents of xnmalloc.
16785         (xnmalloc, xmalloc): Use it.
16786         (xnrealloc_inline): New static inline function,
16787         with the old contents of xnrealloc.
16788         (xnrealloc, xrealloc): Use it.
16789
16790         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
16791         that.
16792
16793 2003-10-26  Karl Berry  <karl@gnu.org>
16794
16795         * config/srclist.txt (COPYING.DOC): no longer available from
16796         /gd/gnuorg; don't know where the ultimate source is.
16797
16798 2003-10-25  Paul Eggert  <eggert@twinsun.com>
16799
16800         Fix several address-calculation bugs in the hash modules,
16801         plus some minor code cleanup.
16802
16803         * lib/hash.h: Include <stdbool.h>, for bool.
16804         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
16805         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
16806         hash_get_n_entries, hash_get_max_bucket_length,
16807         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
16808         hash_rehash): Use size_t rather than unsigned.
16809         * lib/hash.c (struct hash_table, hash_get_n_buckets,
16810         hash_get_n_buckets_used, hash_get_n_entries,
16811         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
16812         hash_get_entries, hash_do_for_each, hash_string, is_prime,
16813         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
16814         Likewise.
16815         (SIZE_MAX): Define if not defined.
16816         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
16817         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
16818         hash_print):
16819         Use const * when possible.
16820         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
16821         (check_tuning): Fix bug: if tuning parameters were very close to
16822         0 or 1, rounding errors could have caused subscript violations.
16823         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
16824         (hash_initialize): Add 'fail:' label
16825         to free table and return NULL, and use it to simplify code.
16826         Use calloc rather than clearing the storage ourself.
16827         (hash_initialize, hash_rehash): Check for arithmetic overflow in
16828         buffer size calculations.
16829         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
16830         Include <stddef.h>, for size_t.
16831         * lib/hash-pjw.c (hash_pjw): Likewise.
16832         Switch to method described by Bruno Haible.
16833         Include <limits.h>, for CHAR_BIT.
16834         (SIZE_BITS): New macro.
16835
16836 2003-10-23  Paul Eggert  <eggert@twinsun.com>
16837
16838         * m4/getline.m4 (AM_FUNC_GETLINE):
16839         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
16840         hosts.  Problem reported by Derek Robert Price in
16841         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
16842         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
16843         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
16844
16845 2003-10-21  Paul Eggert  <eggert@twinsun.com>
16846
16847         * lib/getndelim2.c (getndelim2): When size calculation overflows,
16848         ceiling the allocation at NMAX bytes rather than silently
16849         discarding input bytes before NMAX is reached.  This makes
16850         a difference only if NMAX exceeds SIZE_MAX / 2.
16851
16852         * lib/obstack.c: Merge from glibc.
16853         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
16854         Add libc_hidden_def (_obstack_newchunk).
16855         (_obstack_free) [! defined _LIBC]: Remove.
16856         [defined _LIBC]: Make a strong alias from obstack_free, rather than
16857         a clone of the function body.
16858         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
16859         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
16860
16861         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
16862         glibc.
16863         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
16864         arg to memcpy.
16865
16866         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
16867         (obstack_ptr_grow_fast, obstack_int_grow_fast):
16868         Don't use lvalue casts, as GCC plans to remove support for them
16869         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
16870         was also present in the non-GCC version, indicating that this
16871         code had always been buggy and had never been widely used.
16872         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
16873         Use the fast variant of each macro, rather than copying the
16874         definiens of the fast variant; that way, we'll be more likely to
16875         catch future bugs in the fast variants.
16876
16877 2003-10-20  Bruno Haible  <bruno@clisp.org>
16878
16879         * modules/wait-process: New file.
16880         * MODULES.html.sh (func_all_modules): Add wait-process.
16881
16882 2003-10-20  Bruno Haible  <bruno@clisp.org>
16883
16884         * m4/wait-process.m4: New file.
16885
16886 2003-10-20  Bruno Haible  <bruno@clisp.org>
16887
16888         * lib/wait-process.h: New file, from GNU gettext.
16889         * lib/wait-process.c: New file, from GNU gettext.
16890
16891 2003-10-19  Jim Meyering  <jim@meyering.net>
16892
16893         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
16894         HPUX 10.20.
16895
16896 2003-10-18  Karl Berry  <karl@gnu.org>
16897
16898         * config/config.guess: update from config.
16899
16900 2003-10-16  Paul Eggert  <eggert@twinsun.com>
16901
16902         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
16903         (getgroups): First arg is int, not size_t.
16904         Don't let 'free' mangle errno.
16905
16906 2003-10-16  Paul Eggert  <eggert@twinsun.com>
16907
16908         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
16909
16910 2003-10-16  Karl Berry  <karl@gnu.org>
16911
16912         * config/config.{guess,sub}: update from config.
16913
16914 2003-10-16  Jim Meyering  <jim@meyering.net>
16915
16916         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
16917         memcpy.
16918
16919 2003-10-15  Paul Eggert  <eggert@twinsun.com>
16920
16921         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
16922         (SIZE_MAX): Remove.
16923         (new_exclude, add_exclude_file): Initial size no longer needs to
16924         be a power of 2.
16925         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
16926         our own address arithmetic overflow checking.
16927
16928         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
16929         (fnmatch): Do not alloca more than 2000 wide characters;
16930         instead, use malloc for large buffers.
16931         Check for address arithmetic overflow, and return -1
16932         with errno set to ENOMEM in that case.
16933         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
16934         (NEW_PATTERN): Do not alloca more than 8000 bytes;
16935         instead, return -1.  Check for address arithmetic overflow.
16936
16937 2003-10-14  Paul Eggert  <eggert@twinsun.com>
16938
16939         Handle invalid suffixes and overflow independently, so that
16940         callers can treat them independently as needed.  Fix some bugs in
16941         suffix handling, e.g., "100k@" was not diagnosed as an invalid
16942         suffix for a human-readable blocksize.  The major caller-visible
16943         change is the addition of a new
16944         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
16945         that both overflow and suffix chars were found.
16946
16947         * lib/human.c (humblock): Don't check separately for invalid suffix
16948         char; that is xstrtoumax's job (now that its bug is fixed).
16949         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
16950         INTMAX_MAX]: New macros.
16951         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
16952         TYPE_MAXIMUM): New macros.
16953         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
16954         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
16955         if overflow occurs, as it's what __strtol does and it's more useful
16956         in practice.
16957         (__xstrtol): If __strtol reports some error other than ERANGE,
16958         reflect it to the caller as LONGINT_INVALID.  If it reports
16959         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
16960         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
16961         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
16962         value.
16963         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
16964         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
16965         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
16966         [defined UINTMAX_MAX]: New macros.
16967
16968 2003-10-14  Bruno Haible  <bruno@clisp.org>
16969
16970         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
16971
16972 2003-10-14  Bruno Haible  <bruno@clisp.org>
16973
16974         * m4/sig_atomic_t: New file, from GNU gettext.
16975         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
16976
16977 2003-10-14  Bruno Haible  <bruno@clisp.org>
16978
16979         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
16980         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
16981         Also use volatile where needed.
16982
16983 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16984
16985         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
16986         Change maintainer from Bruno Haible to 'all'.
16987
16988 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16989
16990         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
16991
16992 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16993
16994         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
16995         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
16996         and define in terms of the other primitives.
16997         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
16998         (SIZE_MAX): Define if not already defined.
16999         (array_size_overflow): New function.
17000         (xalloc_die): Abort instead of exiting if 'error' returns.
17001         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
17002         (xmalloc, xrealloc): Use them.
17003         (xcalloc): Check for address arithmetic overflow.
17004         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
17005         a bit faster than strcpy.
17006
17007 2003-10-10  Simon Josefsson  <jas@extundo.com>
17008
17009         * modules/argp (Depends-on): Add restrict and strcase.
17010
17011 2003-10-10  Simon Josefsson  <jas@extundo.com>
17012
17013         * m4/argp.m4: Add AC_C_INLINE.
17014
17015 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17016
17017         Merge getpass from libc, plus a few fixes.
17018
17019         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
17020         Include <stdbool.h>.
17021         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
17022         __fsetlocking to empty.
17023         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
17024         do include <bits/libc-lock.h>.
17025         Do not include <fcntl.h>; not needed.
17026         [_LIBC]: Include <wchar.h>.
17027         (NOTCANCEL_MODE): New macro.
17028         (flockfile, funlockfile) [_LIBC]: New macros.
17029         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
17030         [!_LIBC]: New macros.
17031         (call_fclose): New function.
17032         (getpass): Use it.  Save tty stream separately; this simplifies the
17033         code and makes it more reliable if stdin happens to equal stdout.
17034         Invoke __fsetlocking on tty.
17035         Handle thread cancellation if needed.
17036         Namespace cleanup (use __tcgetattr, __getline).
17037         Use bool for Booleans.
17038         [USE_IN_LIBIO]: Handle wide streams.
17039         [!_LIBC]: Unconditionally do the fseek, since we don't know what
17040         stream might go where.
17041
17042         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
17043         doesn't have to include <stdio.h> before us.
17044         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
17045         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
17046         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17047         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
17048         if not declared, so that we can use getpass.c code from libc without
17049         rewriting it.
17050         (flockfile, ftrylockfile, funlockfile): New macros.
17051
17052 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17053
17054         * modules/getpass: Depend on stdbool.
17055
17056 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17057
17058         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
17059
17060 2003-10-07  Karl Berry  <karl@gnu.org>
17061
17062         * config/config.{guess,sub}: update from config.
17063
17064 2003-10-06  Jim Meyering  <jim@meyering.net>
17065             Bruno Haible  <bruno@clisp.org>
17066
17067         This lets translators provide better translations for the
17068         "Written by ..." part of --version output.
17069         * lib/version-etc.h: Include stdarg.h.
17070         (version_etc_copyright): Declare as readonly.
17071         (version_etc): Make this function variadic with a NULL-terminated list
17072         of author name strings.
17073         (version_etc_va): New declaration.
17074         * lib/version-etc.c: Include stdarg.h, stdlib.h.
17075         (version_etc_copyright): Declare as readonly.
17076         (version_etc_va): New function. Provide a different translatable string
17077         for each possible number of authors < 10. Abbreviate when there are 10
17078         authors or more.
17079         (version_etc): Make this function variadic. Call version_etc_va.
17080         Suggestion from Gary V. Vaughan.
17081
17082         * lib/long-options.h (parse_long_options): Change prototype: the
17083         authors string is moved to the end and becomes variadic.
17084         * lib/long-options.c: Include stdarg.h.
17085         (parse_long_options): Make this function variadic, too.
17086         Call version_etc_va, not version_etc.
17087
17088 2003-10-06  Bruno Haible  <bruno@clisp.org>
17089
17090         * modules/version-etc-2: Remove file.
17091         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
17092
17093 2003-10-06  Bruno Haible  <bruno@clisp.org>
17094
17095         * modules/fatal-signal: New file.
17096         * MODULES.html.sh (func_all_modules): Add fatal-signal.
17097
17098 2003-10-06  Bruno Haible  <bruno@clisp.org>
17099
17100         * m4/fatal-signal.m4: New file.
17101         * m4/signalblocking.m4: New file, from GNU gettext.
17102
17103 2003-10-06  Bruno Haible  <bruno@clisp.org>
17104
17105         * lib/version-etc-2.h: Remove file.
17106         * lib/version-etc-2.c: Remove file.
17107
17108 2003-10-06  Bruno Haible  <bruno@clisp.org>
17109
17110         * lib/fatal-signal.h: New file, from GNU gettext.
17111         * lib/fatal-signal.c: New file, from GNU gettext.
17112
17113 2003-10-05  Paul Eggert  <eggert@twinsun.com>
17114
17115         * README: Rework advice for preventing empty .o files.
17116         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
17117         not <sys/types.h>.
17118
17119 2003-10-04  Karl Berry  <karl@gnu.org>
17120
17121         * lib/argp*: update from libc.
17122
17123 2003-10-04  Karl Berry  <karl@gnu.org>
17124
17125         * config/config.{guess,sub}: update from config.
17126
17127 2003-10-02  Bruno Haible  <bruno@clisp.org>
17128
17129         * modules/lchown (Include): Add lchown.h.
17130         * modules/time_r (Include): Use "..." syntax.
17131         * modules/xgetdomainname (Include): Add xgetdomainname.h.
17132
17133 2003-10-01  Simon Josefsson  <jas@extundo.com>
17134
17135         * MODULES.html.sh (func_all_modules): Move gethostname from section
17136         'based on' to section 'lacking' POSIX:2001.
17137
17138 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
17139
17140         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
17141         to output mode on the same stream.
17142
17143 2003-09-29  Paul Eggert  <eggert@twinsun.com>
17144
17145         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
17146         Fix arg typo in previous patch.
17147
17148 2003-09-28  Jim Meyering  <jim@meyering.net>
17149
17150         * lib/error.c: Correct cpp indentation.
17151
17152 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17153
17154         * modules/free: New file.
17155
17156 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17157
17158         * m4/free.m4: New file.
17159
17160 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17161
17162         * lib/minmax.h (MIN, MAX)
17163         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
17164         Omit the special code that used __typeof__, since we worry that
17165         it could be more trouble than it's worth.  See:
17166         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
17167         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
17168
17169         * lib/free.c: New file.
17170
17171 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
17172
17173         Trivial fixes to Makefile.am parts of module listings.
17174         * modules/strstr: Append strstr.h to lib_SOURCES.
17175         * modules/strcase: Likewise, for strcase.h.
17176
17177 2003-09-27  Karl Berry  <karl@gnu.org>
17178
17179         * config/mkinstalldirs: update from automake.
17180
17181 2003-09-26  Paul Eggert  <eggert@twinsun.com>
17182
17183         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
17184         (error_tail): Do not loop, reallocating temporary buffer, since
17185         the output cannot contain more wide characters than the input
17186         contains bytes, the size must be big enough already.  This avoids
17187         one potential size overflow calculation.  Check for size overflow
17188         when calculating temporary buffer size.  Free temporary buffer
17189         when done, if it was allocated with malloc; this plugs a memory
17190         leak.  Remove casts from void * to pointers, that are no longer
17191         needed now that we're assuming C89 or better.
17192
17193         Merge error changes from glibc.
17194
17195         * lib/error.c, error.h: Update copyright notice header to match glibc.
17196         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
17197         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
17198         Disable cancellation while printing error.
17199         * lib/error.h: Prepend __ to parameter names.
17200
17201 2003-09-26  Jim Meyering  <jim@meyering.net>
17202
17203         * lib/error.c (error_tail): Move some declarations
17204         into inner scope where the local variables are used.
17205
17206 2003-09-26  Bruno Haible  <bruno@clisp.org>
17207
17208         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
17209         stpncpy().
17210         Don't define stpncpy through config.h; it's now done through stpncpy.h.
17211
17212 2003-09-26  Bruno Haible  <bruno@clisp.org>
17213
17214         * lib/stpncpy.h (gnu_stpncpy): New declaration.
17215         (stpncpy): Define as alias for gnu_stpncpy.
17216         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
17217
17218 2003-09-25  Simon Josefsson  <jas@extundo.com>
17219
17220         * lib/xgetdomainname.h: New file.
17221         * lib/xgetdomainname.c: New file.
17222
17223 2003-09-25  Simon Josefsson  <jas@extundo.com>
17224             Bruno Haible  <bruno@clisp.org>
17225
17226         * modules/getdomainname: New file.
17227         * modules/xgetdomainname: New file.
17228         * MODULES.html.sh (func_all_modules): Add getdomainname,
17229         xgetdomainname.
17230
17231 2003-09-25  Simon Josefsson  <jas@extundo.com>
17232             Bruno Haible  <bruno@clisp.org>
17233
17234         * m4/getdomainname.m4: New file.
17235
17236 2003-09-25  Simon Josefsson  <jas@extundo.com>
17237             Bruno Haible  <bruno@clisp.org>
17238
17239         * lib/getdomainname.h: New file.
17240         * lib/getdomainname.c: New file.
17241
17242 2003-09-25  Karl Berry  <karl@gnu.org>
17243
17244         * lib/argp-fmtstream.c, argp-help.c: update from libc.
17245
17246 2003-09-25  Karl Berry  <karl@gnu.org>
17247
17248         * config/install-sh: update from automake.
17249
17250 2003-09-25  Bruno Haible  <bruno@clisp.org>
17251
17252         * modules/version-etc-2: New file, from modules/version-etc with
17253         modifications.
17254         * MODULES.html.sh (func_all_modules): Add version-etc-2.
17255
17256 2003-09-25  Bruno Haible  <bruno@clisp.org>
17257
17258         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
17259         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
17260
17261 2003-09-24  Simon Josefsson  <jas@extundo.com>
17262
17263         * modules/xgethostname: Add xgethostname.h.
17264
17265 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17266
17267         * lib/linebuffer.c (freebuffer): Don't free the argument, just
17268         the buffer associated with the argument.  Bug reported by
17269         Simon Josefsson.
17270
17271 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17272
17273         * README: Document assumptions that 'int' is at least 32 bits
17274         wide, that integer arithmetic is 2's complement without overflow,
17275         that there are no holes in integer values, that adding sizes of
17276         two nonoverlapping objects can't overflow, and that all-bits-zero
17277         yields scalar zero.  Fix spelling and capitalization typos.
17278
17279 2003-09-19  Karl Berry  <karl@gnu.org>
17280
17281         * lib/argp.h: update from libc.
17282
17283 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17284
17285         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
17286         to avoid spurious warnings like "AC_RUN_IFELSE was called before
17287         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
17288
17289 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17290
17291         * gnulib-tool: Use "test -h", not "test -L", for portability
17292         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
17293         (tags_regexp): Remove, since \| doesn't conform to POSIX.
17294         (sed_extract_prog): Issue s commands one-by-one, rather than
17295         using \| in one s command.
17296
17297 2003-09-16  Paul Eggert  <eggert@twinsun.com>
17298
17299         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
17300         input error, instead of returning NULL the next time we are called
17301         (and therefore losing track of errno).
17302
17303 2003-09-16  Bruno Haible  <bruno@clisp.org>
17304
17305         * gnulib-tool (func_create_testdir): Warn about duplicated
17306         dependencies.
17307
17308 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17309
17310         * modules/argmatch, modules/fatal, modules/obstack,
17311         modules/xalloc, modules/xgethostname: Sort dependencies by
17312         importance, not alphabetically.
17313
17314 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17315
17316         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
17317         fails, so that the caller gets the proper errno.
17318
17319         * lib/readutmp.c (read_utmp): Likewise.
17320         Check for fstat error.  Close stream and free storage
17321         when failing.
17322
17323 2003-09-14  Karl Berry  <karl@gnu.org>
17324
17325         * config/srclist.txt (strdup.c): disable for c89 changes.
17326
17327 2003-09-14  Jim Meyering  <jim@meyering.net>
17328
17329         * lib/getloadavg.c: Correct cpp indentation.
17330         * lib/strdup.c: Likewise.
17331         * lib/vasnprintf.c: Likewise.
17332
17333 2003-09-14  Bruno Haible  <bruno@clisp.org>
17334
17335         * modules/fwriteerror: New file.
17336         * MODULES.html.sh (func_all_modules): Add fwriteerror.
17337
17338 2003-09-14  Bruno Haible  <bruno@clisp.org>
17339
17340         * lib/fwriteerror.h: New file.
17341         * lib/fwriteerror.c: New file.
17342
17343 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17344
17345         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
17346         modules/xgethostname, modules/xalloc: Depend on exit.
17347
17348 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17349
17350         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
17351
17352         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
17353         and AC_MINIX, too, so that their extensions are available.
17354
17355         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
17356         This macro has been superseded by gl_BACKUPFILE.
17357
17358         More patches to assume C89 or better.
17359
17360         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
17361
17362         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
17363         unconditionally.
17364         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
17365         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
17366         Include <string.h>, <stdlib.h> unconditionally.
17367         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
17368         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
17369         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
17370         headers or for string.h.
17371         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
17372         or strtoul.
17373
17374         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
17375         headers.
17376         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
17377         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17378         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
17379         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
17380         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17381         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
17382         memcpy, memset.
17383         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
17384         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
17385         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
17386         strtol.
17387         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
17388         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
17389         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
17390         strtoul.
17391
17392 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17393
17394         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
17395         * lib/obstack.c [!defined _LIBC]: Likewise.
17396         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
17397         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
17398         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
17399
17400         More changes to assume C89 or better.
17401
17402         * lib/error.c (error_tail): Assume vprintf.
17403
17404         * lib/argmatch.c (getenv): Remove decl.
17405         * lib/progreloc.c (get_full_program_name): Define via prototype.
17406         * lib/setenv.c (clearenv): Likewise.
17407         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
17408         needed.
17409         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
17410         (malloc, memcpy): Remove decls.
17411         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
17412         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
17413         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17414         (memcpy): Remove macro.
17415         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
17416         (__P): Remove.  All uses removed.
17417         (PTR): Remove.  All uses changed to void *.
17418         (CHAR_BIT, NULL): Remove.
17419         (spaces, zeros, memset_space, memset_zero)
17420         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
17421         Remove.
17422         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
17423         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
17424         Define with prototype.
17425         Remove now-unnecessary prototype decl.
17426         (extra_args_spec): Assume ANSI C.  All uses changed.
17427         (extra_args_spec_iso): Remove.
17428         (my_strftime, emacs_strftimeu): Define via prototype.
17429         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
17430         unconditionally.
17431         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
17432         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
17433         (strtoul, strtol): Remove decls.
17434         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
17435         LONG_MAX): Remove.
17436         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17437         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
17438         (LOCALE_PARAM_PROTO): New macro.
17439         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
17440         (INTERNAL (strtol), strtol): Define with a prototype.
17441         (PARAMS): Remove.  All uses removed.
17442         * lib/tempname.c: Include <string.h> unconditionally.
17443         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
17444         * lib/xgethostname.c (main): Define with a prototype.
17445         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
17446         Include <stdlib.h> unconditionally.
17447         (calloc, malloc, realloc, free): Remove decls.
17448         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
17449         Include <stdlib.h> unconditionally.  Sort include file names.
17450         (strtod): Remove.
17451         (xstrtod): Define with a prototype.
17452         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
17453         (strtol, strtoul): Remove decls.
17454
17455 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17456
17457         More patches to assume C89 or better.
17458         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
17459         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
17460         string.h, memchr, STDC_HEADERS.
17461
17462 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17463
17464         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
17465         Include <stdlib.h>, <string.h> unconditionally.
17466         Remove now-unnecessary cast to char *.
17467         * lib/strnlen.c: Include <string.h> unconditionally.
17468         * lib/yesno.c (yesno): Define with a prototype.
17469
17470 2003-09-11  Bruno Haible  <bruno@clisp.org>
17471
17472         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
17473
17474 2003-09-10  Jim Meyering  <jim@meyering.net>
17475
17476         * lib/error.c: Correct indentation of cpp directives.
17477
17478 2003-09-10  Bruno Haible  <bruno@clisp.org>
17479
17480         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
17481         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
17482         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
17483         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
17484         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
17485         <stdlib.h> and <string.h> checks.
17486         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
17487         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
17488
17489 2003-09-10  Bruno Haible  <bruno@clisp.org>
17490
17491         * lib/strcspn.c: Include <string.h> unconditionally.
17492         * lib/strpbrk.c: Include <string.h> unconditionally.
17493         * lib/strstr.c: Include <string.h> unconditionally.
17494         * lib/unicodeio.c: Include <string.h> unconditionally.
17495         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
17496         * lib/unsetenv.c: Likewise.
17497         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
17498         * lib/yesno.c: Include <stdlib.h> unconditionally.
17499         (rpmatch): Add prototype.
17500
17501 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17502
17503         More patches to assume C89 or better.
17504         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
17505         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
17506         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
17507         or for string.h.
17508         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
17509         stdlib.h.
17510         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
17511         C headers.
17512         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
17513         string.h.
17514         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
17515         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
17516         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
17517         or for string.h.
17518         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
17519         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
17520         C headers.
17521         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
17522         memcpy.
17523         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
17524         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
17525         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
17526         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
17527         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
17528         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
17529         string.h, free.
17530         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
17531         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
17532         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
17533         C headers, or for string.h.
17534         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
17535         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
17536         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
17537         headers, memory.h, stdlib.h, string.h, strings.h.
17538         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
17539         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
17540         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
17541         strchr.
17542         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
17543         headers, memory.h, string.h.
17544         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
17545         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
17546         free.
17547         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
17548         headers.
17549         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
17550         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
17551         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
17552         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
17553         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
17554
17555 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17556
17557         More K&R removal.
17558
17559         * lib/acosl.c (main): Use a prototype.
17560         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
17561         tanl.c: Likewise.
17562
17563         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
17564
17565         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
17566         (getopt, etopt_long, getopt_long_only, _getopt_internal)
17567         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
17568         with a prototype.
17569         * lib/getopt.c (const): Remove macro.
17570         Include <string.h> unconditionally.
17571         (my_index): Remove; all uses changed to strchr.
17572         (strlen): Remove decl.
17573         (exchange): Remove forward decl; no longer needed.
17574         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
17575         Define with prototype.
17576         * lib/getopt1.c (const): Remove macro.
17577         (getopt_long, getopt_long_only, main): Define with prototype.
17578
17579         * lib/getugroups.c: Include <string.h> unconditionally.
17580
17581         * lib/getusershell.c: Include <stdlib.h> unconditionally.
17582         (getusershell, setusershell, endusershell, readname, main):
17583         Define with prototypes.
17584
17585         * lib/group-member.c: Include group-member.h first.
17586         Include <stdlib.h> unconditionally.
17587
17588         * lib/hard-locale.c: Include hard-locale.h first.
17589         Include <stdlib.h>, <string.h> unconditionally.
17590
17591         * lib/hash.c (free, malloc): Remove decls.
17592         Include <stdlib.h> unconditionally.
17593
17594         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
17595         (getenv): Do not declare.
17596
17597         * lib/idcache.c: Include <string.h> unconditionally.
17598
17599         * lib/long-options.c: Include long-options.h first, to test interface.
17600         Include <stdlib.h> unconditionally.
17601
17602         * lib/makepath.c: Include makepath.h first, to test interface.
17603         Include <stdlib.h> and <string.h> unconditionally.
17604
17605         * lib/linebuffer.c: Include <stdlib.h>.
17606         (free): Remove decl.
17607
17608         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
17609         stddef.h. rpl_malloc returns void *, not char *.
17610         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
17611         prototype.
17612
17613         * lib/md5.h: Include <limits.h> unconditionally.
17614         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
17615         (__P): Remove; all uses removed.
17616         * lib/md5.c: Include "md5.h" first.
17617         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
17618         md5_buffer, md5_process_bytes, md5_process_block):
17619         Define with prototypes.
17620         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
17621         * lib/sha.c: Include "sha.h" first.
17622         Include <stdlib.h>, <string.h> unconditionally.
17623
17624         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
17625         * lib/memcmp.c (__ptr_t): Likewise.
17626         * lib/memrchr.c (__ptr_t): Likewise.
17627         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
17628         Include <string.h> unconditionally.
17629         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
17630         * lib/memchr.c: Include <stdlib.h> unconditionally.
17631         * lib/memchr.c (LONG_MAX): Remove.
17632         * lib/memrchr.c (LONG_MAX): Likewise.
17633         * lib/memchr.c (__memchr): Define via a prototype.
17634         * lib/memrchr.c (__memrchr): Likewise.
17635         * lib/memcmp.c (__P): Remove, and remove all uses.
17636         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
17637         Remove forward decls; no longer needed.
17638         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
17639         Use types required by C89 in prototype.
17640
17641         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
17642         * lib/savedir.c: Likewise.
17643         * lib/mkdir.c (free): Remove decl.
17644         * lib/rmdir.c (rmdir): Define with a prototype.
17645         * lib/savedir.c: Include savedir.h first, to test interface.
17646
17647         * lib/mktime.c (STDC_HEADERS): Remove.
17648         Include <stdlib.h>, <string.h> unconditionally.
17649
17650         * lib/modechange.c: Include <stdlib.h> unconditionally.
17651         (malloc): Remove decl.
17652
17653         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
17654         (free): Remove decl.
17655
17656         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
17657         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
17658         (This type really should be intptr_t, but that's a C99ism.)
17659         (_obstack_memcpy): Remove: all uses changed to memcpy.
17660         Include <string.h> unconditionally.
17661         (struct obstack): Assume __STDC__ for types of members
17662         chunkfun, freefun, extra_arg.
17663         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
17664         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
17665         obstack_begin, obstack_specify_allocation,
17666         obstack_specify_allocation_with_arg, obstack_chunkfun,
17667         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
17668         Remove unprototyped decls and the macros that use them.
17669         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
17670         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
17671         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
17672         (defined __STDC__ && __STDC__)]:
17673         Remove nonprototyped code.
17674         Include <stdlib.h> unconditionally.
17675         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
17676         _obstack_allocated_p, _obstack_free, obstack_free,
17677         _obstack_memory_used, print_and_abort):
17678         Define using prototypes.
17679         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
17680         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
17681         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
17682         obstack_next_free, obstack_object_size, obstack_room) [0]:
17683         Remove unused, unprototyped code.
17684
17685         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
17686
17687         * lib/physmem.c (physmem_total, physmem_available, main): Define
17688         with prototypes.
17689
17690         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
17691         (main): Define with a prototype.
17692
17693         * lib/posixver.c (getenv): Remove decl.
17694
17695         * lib/putenv.c (malloc): Returns void *, not char *.
17696         Include <string.h> unconditionally.
17697         (strchr, memcpy, NULL): Do not define.
17698
17699         * lib/readtokens.c: Include readtokens.h first, to test interface.
17700         Include <stdlib.h>, <string.h> unconditionally.
17701         (init_tokenbuffer): Define with a prototype.
17702
17703         * lib/regex.c (PARAMS): Remove.  All uses removed.
17704         All uses of _RE_ARGS removed, too.
17705         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
17706         unconditionally.
17707         (bzero): Assume memset exists.
17708         (memcmp, memcpy, NULL): Remove.
17709         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
17710         char, or assignments to local vars of type signed char.
17711         (init_syntax_once, PREFIX(extract_number_and_incr),
17712         PREFIX(print_partial_compiled_pattern),
17713         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
17714         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
17715         PREFIX(regex_grow_registers), PREFIX(regex_compile),
17716         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
17717         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
17718         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
17719         wcs_compile_range, byte_compile_range, truncate_wchar,
17720         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
17721         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
17722         count_mbs_length, wcs_re_match_2_internal,
17723         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
17724         PREFIX(alt_match_null_string_p),
17725         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
17726         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
17727         regfree, PREFIX(extract_number)): Define with prototype.  Remove
17728         now-unnecessary declaration, if any.
17729         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
17730         regcomp, regexec):
17731         Remove now-unnecessary casts among pointer types.
17732         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
17733
17734         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
17735         (free): Remove decl.
17736
17737         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
17738
17739         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
17740         (free): Remove decl.
17741
17742         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
17743         * lib/xgetcwd.c: Likewise.
17744
17745         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
17746         (free): Remove decl.
17747
17748         * lib/strchrnul.c (strchrnul): Define with a prototype.
17749         Fix bug: c_in was not converted to char before searching.
17750
17751         The following changes are not K&R related:
17752
17753         * lib/group-member.h: Include <sys/types.h>, so that this file is
17754         self-contained.
17755         * lib/makepath.h: Likewise.
17756
17757         * lib/getusershell.c (readname, default_index, line_size, readname):
17758         Use size_t, not int, for sizes.
17759         (readname): If the size overflows, report an error instead of
17760         looping forever.
17761
17762 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17763
17764         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
17765         libc.
17766
17767 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17768
17769         * README: New section: portability guidelines.
17770
17771 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17772
17773         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
17774         C89 spec.
17775
17776 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17777
17778         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
17779
17780 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17781
17782         Assume C89 or better; remove K&R cruft.
17783         A few of these changes were first proposed by Derek Robert Price
17784         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
17785
17786         * lib/addext.c: Include <string.h> unconditionally.
17787         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
17788         Don't declare getenv or malloc.
17789
17790         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
17791         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
17792         (NULL): Remove.
17793         (find_stack_direction, alloca): Use prototypes.
17794
17795         * lib/atexit.c (atexit): Define using a prototype.
17796
17797         * lib/basename.c, dirname.c, stripslash.c:
17798         Include <string.h> unconditionally.
17799
17800         * lib/bcopy.c: Include <stddef.h>.
17801         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
17802
17803         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
17804
17805         * lib/error.h (error, error_at_line, error_print_progname)
17806         [! (defined (__STDC__) && __STDC__)]: Remove decls.
17807         * lib/error.c: Include error.h first, to check interface.
17808         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
17809         (VA_START): Remove; all uses changeed to va_start.
17810         (exit, strerror): Remove decls.
17811         (error_print_progname): Prototype uncondionally.
17812         Don't include <errno.h>; no longer needed.
17813         (private_strerror): Remove.
17814         (error_tail): Always define.
17815         (error, error_at_line): Assume C89 or better; always use prototypes.
17816         * lib/fatal.c: Include "fatal.h" first, to test interface.
17817         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
17818         (VA_START): Remove; all uses changed to va_start.
17819         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
17820         this case.
17821         (exit): Remove decl.
17822         (fatal): Prototype unconditionally.  Assume va_start works.
17823         Abort at end, to pacify gcc.
17824
17825         * lib/euidaccess.c (main): Define with a prototype.
17826
17827         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
17828
17829         * lib/exitfail.c: Include <stdlib.h> unconditionally.
17830
17831         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
17832         prototypes.
17833         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
17834         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
17835         (getenv): Remove decl.
17836         (fnmatch): Define using a prototype.
17837         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
17838         (FCT): Define using a prototype.
17839
17840         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
17841
17842         * lib/gethostname.c: Include <stddef.h>.
17843         (gethostname): Define with prototype.  Length is size_t, not int.
17844
17845 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17846
17847         Assume C89 or better; remove K&R cruft.
17848         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
17849         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
17850         string.h, getenv, malloc.
17851         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
17852         headers.
17853         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
17854         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
17855         do not check for strerror.
17856         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
17857         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
17858         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
17859         do not check for doprnt or vprintf.
17860         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
17861         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
17862
17863 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17864
17865         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
17866         getversion.c should have been removed then, but was accidentally
17867         preserved.
17868
17869         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
17870         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
17871
17872 2003-09-08  Karl Berry  <karl@gnu.org>
17873
17874         * config/config.sub, config.guess, srclistvars.sh: update from savannah
17875                 config, forget about prep.
17876
17877         * config/depcomp, missing: update from automake.
17878
17879 2003-09-07  Paul Eggert  <eggert@twinsun.com>
17880
17881         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
17882         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
17883
17884 2003-09-07  Paul Eggert  <eggert@twinsun.com>
17885
17886         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
17887         copy_tm_result.  Bug reported by Simon Josefsson in
17888         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
17889
17890 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17891
17892         * m4/time_r.m4: New file.
17893         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
17894         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
17895         is. Check for timegm declaration.
17896         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
17897         Do not check for gmtime_r.
17898         Replace mktime if __mktime_internal does not exist and if mktime
17899         hasn't been replaced already.
17900
17901 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17902
17903         * lib/time_r.c, lib/time_r.h: New files.
17904
17905         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
17906         __localtime_r.
17907         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
17908         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
17909
17910         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
17911         __gmtime_r.
17912         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
17913         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
17914         Include <time_r.h>.
17915
17916         * lib/timegm.c: Switch to glibc implementation, with the following
17917         changes:
17918         [defined HAVE_CONFIG_H]: Include <config.h>.
17919         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
17920         (__mktime_internal) [!defined _LIBC]: New decl.
17921         (__gmtime_r) [!defined _LIBC]: New macro and function.
17922         (timegm): Use a prototype, since gnulib assumes C89.
17923         Do not bother declaring tmp to be const, as it's not really usefu.
17924         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
17925         (timegm): Declare only if HAVE_DECL_TIMEGM.
17926
17927 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17928
17929         * MODULES.html.sh (func_all_modules): Add time_r.
17930         * modules/time_r: New file.
17931         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
17932         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
17933
17934 2003-09-03  Paul Eggert  <eggert@twinsun.com>
17935
17936         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
17937         Bug reported by Lute Kamstra in
17938         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
17939
17940         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
17941         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
17942         course with correspondingly smaller numbers for tomorrow and
17943         yesterday.  From Tadayoshi Funaba.  Originally installed into
17944         sh-utils on 1999-08-07, but the patch got lost (I guess during the
17945         coreutils merge?).
17946
17947 2003-08-31  Simon Josefsson  <jas@extundo.com>
17948
17949         * modules/timegm: New file.
17950         * MODULES.html.sh (func_all_modules): Add timegm.
17951
17952 2003-08-31  Simon Josefsson  <jas@extundo.com>
17953
17954         * m4/timegm.m4: New file.
17955
17956 2003-08-31  Simon Josefsson  <jas@extundo.com>
17957
17958         * lib/timegm.h: New file.
17959         * lib/timegm.c: New file.  Based on
17960         wget-1.8.2/src/http.c:mktime_from_utc.
17961
17962 2003-08-31  Karl Berry  <karl@gnu.org>
17963
17964         * lib/argp.h: update from libc.
17965
17966 2003-08-28  Bruno Haible  <bruno@clisp.org>
17967
17968         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
17969         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
17970         followed by '#define fnmatch fnmatch_posix' gives an error.
17971
17972 2003-08-28  Bruno Haible  <bruno@clisp.org>
17973
17974         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
17975         warning on QNX, which defines O_BINARY to 000000.
17976
17977 2003-08-27  Jim Meyering  <jim@meyering.net>
17978
17979         * m4/mkstemp.m4: Require that the system mkstemp be able to create
17980         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
17981         would fail after 32.  Reported by Danny Levinson.  Details here:
17982         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
17983
17984 2003-08-24  Bruno Haible  <bruno@clisp.org>
17985
17986         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
17987         MSVC7 <stdio.h> is included later.
17988
17989 2003-08-22  Simon Josefsson  <jas@extundo.com>
17990
17991         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
17992
17993 2003-08-20  Karl Berry  <karl@gnu.org>
17994
17995         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
17996
17997 2003-08-20  Bruno Haible  <bruno@clisp.org>
17998
17999         * modules/progname: New file.
18000         * MODULES.html.sh (func_all_modules): Add progname.
18001
18002 2003-08-20  Bruno Haible  <bruno@clisp.org>
18003
18004         * lib/progname.h: New file, from GNU gettext.
18005         * lib/progname.c: New file, from GNU gettext.
18006         * lib/progreloc.c: New file, from GNU gettext.
18007
18008 2003-08-19  Jim Meyering  <jim@meyering.net>
18009
18010         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
18011         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
18012
18013 2003-08-19  Bruno Haible  <bruno@clisp.org>
18014
18015         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
18016         more.
18017
18018 2003-08-19  Bruno Haible  <bruno@clisp.org>
18019
18020         * lib/xstrdup.c: Assume <string.h> exists.
18021
18022 2003-08-18  Paul Eggert  <eggert@twinsun.com>
18023
18024         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
18025         in makefile rules.
18026
18027 2003-08-18  Jim Meyering  <jim@meyering.net>
18028
18029         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
18030         * m4/lib-ld.m4: Likewise.
18031
18032 2003-08-18  Jim Meyering  <jim@meyering.net>
18033
18034         * lib/setenv.h: Indent nested cpp directive.
18035         * lib/vasnprintf.c: Remove trailing blanks.
18036
18037 2003-08-17  Simon Josefsson  <jas@extundo.com>
18038
18039         * modules/xstrndup: New file.
18040         * MODULES.html.sh (func_all_modules): Add xstrndup.
18041
18042 2003-08-17  Simon Josefsson  <jas@extundo.com>
18043
18044         * modules/argp: Fix autoconf macro name. Add more dependencies.
18045
18046 2003-08-17  Simon Josefsson  <jas@extundo.com>
18047
18048         * m4/xstrndup.m4: New file.
18049
18050 2003-08-17  Simon Josefsson  <jas@extundo.com>
18051
18052         * m4/argp.m4: New file.
18053
18054 2003-08-17  Simon Josefsson  <jas@extundo.com>
18055             Bruno Haible  <bruno@clisp.org>
18056
18057         * lib/xstrndup.h: New file.
18058         * lib/xstrndup.c: New file.
18059
18060 2003-08-17  Bruno Haible  <bruno@clisp.org>
18061
18062         * modules/strndup (Files, Include): Add lib/strndup.h.
18063
18064 2003-08-17  Bruno Haible  <bruno@clisp.org>
18065
18066         * modules/euidaccess (Files): Add lib/euidaccess.h.
18067
18068 2003-08-17  Bruno Haible  <bruno@clisp.org>
18069
18070         * lib/strndup.h: New file.
18071
18072 2003-08-17  Bruno Haible  <bruno@clisp.org>
18073
18074         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
18075         like AC_GNU_SOURCE.
18076         * modules/extensions (configure.ac): Comment out the invocation of
18077         gl_USE_SYSTEM_EXTENSIONS.
18078
18079 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18080
18081         Merges from coreutils, etc.
18082         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
18083         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
18084         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
18085         fixing a typo.
18086         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
18087         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
18088
18089 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18090
18091         Document merge from coreutils.
18092         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
18093         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
18094         * modules/utime: Add m4/utimes-null.m4.
18095
18096 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18097
18098         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
18099         space, undoing this 2003-08-12 change:
18100         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18101
18102 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18103
18104         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
18105         strtoul.c from libc, undoing this 2003-08-12 change:
18106         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18107
18108 2003-08-16  Jim Meyering  <jim@meyering.net>
18109
18110         Merges from coreutils.
18111         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
18112         prefix.  Adjust cache variables similarly.  Create 500 rather than
18113         just 300 files, to exercise bug on Darwin6.5, too.
18114         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
18115         $missing_dir.
18116         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
18117         AM_SYS_POSIX_TERMIOS.
18118         Reported by mkc@mathdogs.com.
18119         Also change use of $am_cv_sys_posix_termios
18120         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
18121         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
18122         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
18123         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
18124         in /proc/mounts until it finds one with matching device number.  This
18125         is unnecessary when the FILE argument *is* a mount point.  No stat call
18126         is necessary in that case.  So, disable the statvfs-testing code on
18127         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
18128         as RedHat bug# 84846.
18129         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18130         to 1MB, so as not to render systems with no stack size limit (e.g.,
18131         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18132         Include <unistd.h>.  On some systems,
18133         it is required for the definition of _SC_PAGESIZE.
18134
18135 2003-08-16  Jim Meyering  <jim@meyering.net>
18136
18137         Merge from coreutils.
18138         * lib/xstrtoimax.c: #else #if -> #elif.
18139         * lib/xstrtoumax.c: Likewise.
18140
18141 2003-08-16  Jim Meyering  <jim@meyering.net>
18142
18143         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
18144         * m4/utimes.m4: Removed.
18145         * m4/utimes-null.m4: Renamed from utimes.m4.
18146
18147         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18148         to 1MB, so as not to render systems with no stack size limit (e.g.,
18149         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18150         Include <unistd.h>.  On some systems,
18151         it is required for the definition of _SC_PAGESIZE.
18152
18153 2003-08-16  Jim Meyering  <jim@meyering.net>
18154         and Paul Eggert  <eggert@cs.ucla.edu>
18155
18156         Merges from coreutils, etc.
18157
18158         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
18159         using the latest version from cvs.  This avoids problems with #line
18160         directives using a vendor (Sun) compiler.
18161         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
18162         Don't set GETGROUPS_LIB here; now it's
18163         done via getgroups.m4's wrapper function.
18164         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
18165         rather than just in sh-util/configure.in, so that the
18166         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
18167         same.
18168         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
18169         AC_FUNC_GETLOADAVG where to find getloadavg.c.
18170         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
18171         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
18172         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
18173         Remove code that is now done by the newly-required macros.
18174         Append $(EXEEXT) to DF_PROG.
18175         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
18176         Do not invoke or require the following here,
18177         since prereq.m4 or some gnulib .m4 now does this for us:
18178         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
18179         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
18180         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
18181         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
18182         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
18183         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
18184         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
18185         AC_FUNC_OBSTACK.
18186         Do not replace the following functions, as this is now the job
18187         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
18188         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
18189         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
18190         atexit getpass, strdup, getpagesize.
18191         Replace 'raise'.
18192         Do not check for the following functions, as this is now the job
18193         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
18194         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
18195         setregid.
18196         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
18197         Check for sys/sysctl.h.
18198         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
18199         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
18200         of checking for ssize_t ourselves.
18201
18202         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
18203         Require every macro that gnulib/modules/* suggests for us.
18204         (jm_PREREQ_ADDEXT): New macro.
18205         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
18206         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
18207
18208         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
18209         (gl_PHYSMEM): Use it.
18210         Also check for `table' function.
18211         Check for new headers and functions.
18212         Add check for sys/sysmp.h.
18213         With suggestions from Kaveh Ghazi.
18214         Ignore headers that are present but cannot be compiled.  This
18215         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
18216         C 5.4.
18217
18218 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18219
18220         Document merge from coreutils.
18221         * modules/userspec: Depend on posixver.
18222         * modules/strftime: Depend on tzset.
18223
18224 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18225
18226         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
18227         rather than tab, after '#' in shell-script copyright notices.
18228         Suggested by Bruno Haible.
18229
18230 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18231
18232         * config/srclist-update: Use three spaces, rather than tab, after '#'
18233         in shell-script copyright notices.  Suggested by Bruno Haible.
18234         Remove unnecessary parenthesization in regular expression.
18235
18236 2003-08-15  Jim Meyering  <jim@meyering.net>
18237
18238         Merge from coreutils.
18239         * lib/xgethostname.c: Include <stdlib.h>.
18240         (xghostname): Don't exit for anything other than memory-related
18241         failure; just return NULL.
18242         * lib/userspec.c: Include "posixver.h".
18243         (parse_user_spec): Accept `.' as a separator only
18244         in pre-POSIX-200112 mode.
18245         * lib/strtoimax.c: Use #elif rather than #else #if.
18246         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
18247         Remove function, now that we can rely on a working tzset function.
18248         [!_LIBC]: Ensure that the required autoconf test has been run.
18249         [!defined _NL_CURRENT && HAVE_STRFTIME]:
18250         Use underlying_strftime for %r.
18251         * lib/sha.c: Merge in some clean-up and optimization changes from
18252         glibc.
18253         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
18254         Ensure that it is a multiple of 64.
18255         Rearrange loop exit tests so as to avoid performing an
18256         additional fread after encountering an error or EOF.
18257         * lib/realloc.c: Update copyright date.
18258
18259 2003-08-15  Jim Meyering  <jim@meyering.net>
18260         and Paul Eggert  <eggert@twinsun.com>
18261
18262         Merge from coreutils.
18263         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
18264         member but strut utmpx does not.  Needed for AIX 4.3.3.
18265         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
18266
18267 2003-08-15  Jim Meyering  <jim@meyering.net>
18268         and Paul Eggert  <eggert@cs.ucla.edu>
18269
18270         Merges from coreutils, etc.
18271         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
18272         Require gl_FUNC_TZSET_CLOBBER.
18273         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
18274         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
18275         members.
18276
18277 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18278
18279         Help the merge from coreutils.
18280         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
18281         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
18282         * m4/tzset.m4: Use it too.
18283
18284 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18285
18286         * modules/tzset: New file.
18287
18288 2003-08-14  Jim Meyering  <jim@meyering.net>
18289
18290         Merges from coreutils.
18291         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
18292         variable names, rather than @FNMATCH_H@.
18293         * modules/alloca: Likewise for $(ALLOCA_H).
18294
18295         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
18296         the three copies of the literal target, `fnmatch.h'.
18297         * modules/alloca (alloca.h): Likewise.
18298
18299 2003-08-14  Jim Meyering  <jim@meyering.net>
18300
18301         Merge from coreutils.
18302         * m4/tzset.m4: New file.
18303         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
18304         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
18305         otherwise, AIX 5.1 systems would end up using the latter.
18306         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
18307         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
18308         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
18309         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
18310
18311 2003-08-14  Jim Meyering  <jim@meyering.net>
18312
18313         Merge from coreutils.
18314         * lib/obstack.h: Whitespace changes.
18315         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
18316         and xcalloc return values.
18317         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
18318         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
18319         hang on OSF/1 5.1 for DIR on both local and remote file systems.
18320         Reported by (and fix confirmed by) Nelson H. F. Beebe.
18321         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18322         error from mntctl.
18323         Use mntctl's return value to drive the entry-processing loop, since
18324         we can't rely on the value of the vmt_length member in the last
18325         entry.  On some systems doing so could result in exhausting
18326         virtual memory.  Based in part on a patch from Mike Jetzer.
18327
18328 2003-08-14  Jim Meyering  <jim@meyering.net>
18329         and Paul Eggert  <eggert@twinsun.com>
18330
18331         Merges from coreutils, plus other fixes.
18332         * lib/physmem.c: Merge in portability changes from gcc/libiberty
18333         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
18334         for credits and details.  Thanks to Kaveh Ghazi for helping
18335         to keep these files in sync.
18336         (ARRAY_SIZE): Define it.
18337         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
18338         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
18339         (memcasecmp): Don't assume size_t fits in unsigned int.
18340         Remove casts and duplicate code.
18341         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
18342         (memcpy): Remove definition.
18343         Merge in some clean-up and optimization changes from glibc.
18344         [BLOCKSIZE]: Move definition to top of file.
18345         Ensure that it is a multiple of 64.
18346         Rearrange loop exit tests so as to avoid performing an
18347         additional fread after encountering an error or EOF.
18348         * lib/md5.h (md5_uintptr): Define.
18349         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
18350         return to the initial working directory.  Preserve errno
18351         for caller.
18352         * lib/idcache.c: Include "xalloc.h".
18353         (xmalloc, xrealloc): Remove decls.
18354         (getuser): Remove casts no longer required in C89.
18355         * lib/human.c: Include stdio.h, for sprintf.
18356         * lib/group-member.c: Include "xalloc.h".
18357         (xmalloc, xrealloc): Remove decls.
18358         (get_group_info): Remove casts no longer required in C89.
18359         * lib/getusershell.c (readname): Remove casts no longer required in
18360         C89.
18361         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
18362         * lib/getline.c: Whitespace fix, from coreutils.
18363
18364 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18365
18366         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
18367         Check for isascii.
18368
18369         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18370         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18371         Undo previous (whitespace-only) change.
18372
18373 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18374
18375         * lib/exclude.c: Include <ctype.h>
18376         (IN_CTYPE_DOMAIN): New macro.
18377         (is_space): New fn.
18378         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
18379         and empty lines.
18380
18381         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18382         Undo previous (whitespace-only) change.
18383
18384 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18385
18386         * config/srclist-update: Change update back to the old behavior,
18387         leaving whitespace alone.  Use one 'sed' command rather than a
18388         pipeline.
18389         (fixlicense): Now a variable, not a function.
18390         (remove_trailing_blanks): Remove.
18391         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
18392         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18393         Undo previous (whitespace-only) change.
18394
18395 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18396
18397         Merge from coreutils.
18398         * modules/euidaccess: Add lib_SOURCES, include for new
18399         file euidaccess.h
18400
18401 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18402
18403         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18404         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18405         Normalize leading white space and remove trailing white space.
18406
18407         Merge from coreutils
18408         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
18409
18410         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
18411         0.12.1.  These files are now being upgraded automatically by
18412         ../config/srclist-update.
18413
18414 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18415
18416         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18417         Normalize leading white space and remove trailing white space.
18418         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
18419         notice, as per ../config/srclist-update.
18420
18421         Merge from coreutils.
18422         * lib/euidaccess.h: New file.
18423         * lib/euidaccess.c: Include it.
18424         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
18425         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
18426         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
18427
18428 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18429
18430         * config/srclist-update: Add copyright notice.
18431         (remove_id_lines, remove_trailing_blanks): New constants.
18432         (fixfile): Use them to normalize spacing a bit in copied files.
18433         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18434         Normalize leading white space and remove trailing white space.
18435
18436         * config/texinfo.tex: Sync with texinfo.
18437
18438         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
18439         strtoul.c from libc, to merge coreutils whitespace changes.
18440
18441         * config/srclist.txt: Get the following m4 files from gettext:
18442         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
18443         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
18444         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
18445         wint_t.m4.
18446
18447 2003-08-12  Karl Berry  <karl@gnu.org>
18448
18449         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
18450         been made.
18451
18452 2003-08-11  Paul Eggert  <eggert@twinsun.com>
18453
18454         * modules/gnu-source, m4/gnu-source.m4:
18455         Remove; we're assuming Autoconf 2.54 or later now.
18456         Suggested by Bruno Haible.
18457         * MODULES.html.sh (func_all_modules): Remove gnu-source.
18458
18459 2003-08-11  Bruno Haible  <bruno@clisp.org>
18460
18461         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
18462
18463 2003-08-11  Bruno Haible  <bruno@clisp.org>
18464
18465         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
18466         (vasnprintf): Use it instead of wcslen.
18467
18468 2003-08-11  Bruno Haible  <bruno@clisp.org>
18469
18470         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
18471         value to ensure that _Bool promotes to int. Use #define for _Bool when
18472         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
18473
18474 2003-08-10  Karl Berry  <karl@gnu.org>
18475
18476         * lib/regex.h: update from libc (whitespace fix).
18477
18478 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18479
18480         Merge some files from coreutils.  These changes were
18481         originally made by Jim Meyering.
18482         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
18483         many older Unixes require this.
18484         * lib/alloca.c (alloca): Remove cast to argument of free;
18485         no longer needed in C89.
18486         * lib/alloca_.h, regex.h: Fix white space to match
18487         what GNU indent does.
18488
18489 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18490
18491         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
18492         apparently Emacs's Unicode mode got confused before my 2003-08-05
18493         checkin.
18494
18495 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18496
18497         * m4/extensions.m4: New file.
18498         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
18499         Require gl_USE_SYSTEM_EXTENSIONS.
18500         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
18501         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
18502
18503 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18504
18505         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
18506         * modules/extensions, modules/gnu-source: New files.
18507         * modules/timespec, modules/unlocked-io: Depend on extensions.
18508
18509 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18510
18511         * modules/restrict: New file.
18512         * MODULES.html.sh (func_all_modules): Add restrict.
18513         * modules/regex: Depend on restrict.
18514
18515 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18516
18517         * m4/restrict.m4: New file.
18518         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
18519
18520 2003-08-07  Bruno Haible  <bruno@clisp.org>
18521
18522         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
18523         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
18524
18525 2003-08-07  Bruno Haible  <bruno@clisp.org>
18526
18527         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
18528         makes the module 'getndelim2' compatible with the module 'getline'.
18529
18530 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18531
18532         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
18533         byte with "\201" to avoid glitches when editing that source file
18534         with multi-gnome-terminal.
18535
18536 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18537
18538         * lib/bumpalloc.h: Remove.
18539
18540 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18541
18542         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
18543         * modules/bumpalloc: Remove.
18544
18545 2003-08-04  Paul Eggert  <eggert@twinsun.com>
18546
18547         * lib/getloadavg.c: Change copyright notice and spacing to conform to
18548         GNU coding style.
18549
18550         Merge from coreutils.
18551         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
18552         1. From glibc.
18553         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
18554         from Karl Berry, implemented by Jim Meyering.
18555         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
18556         from Dmitry V. Levin.
18557         Remove anachronistic cast of xrealloc.
18558         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
18559         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
18560         type. Otherwise, it wouldn't compile with at least /bin/cc on
18561         ymp-cray-unicos9.0.2.X.
18562         Combine two mostly-identical uses of alloca into one.
18563         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
18564
18565 2003-08-04  Dave Love  <d.love@dl.ac.uk>
18566
18567         [From Emacs.]
18568
18569         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
18570         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
18571         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
18572         obsolete NLIST_NAME_UNION.
18573         [__GNU__]: Undef BSD and FSCALE.
18574         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
18575
18576 2003-08-03  Paul Eggert  <eggert@twinsun.com>
18577
18578         * lib/stdbool_.h (_Bool): Make it signed char, instead of
18579         an enum type, so that it's guaranteed to promote to int.  See:
18580         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
18581
18582 2003-08-03  Karl Berry  <karl@gnu.org>
18583
18584         * config/depcomp: update from automake.
18585
18586 2003-07-31  Paul Eggert  <eggert@twinsun.com>
18587
18588         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
18589         (strerror): Don't assume that a printable int fits in 14 bytes.
18590
18591 2003-07-31  Bruno Haible  <bruno@clisp.org>
18592
18593         * modules/getpass-gnu: New file.
18594         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
18595
18596 2003-07-31  Bruno Haible  <bruno@clisp.org>
18597
18598         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
18599
18600 2003-07-24  Karl Berry  <karl@gnu.org>
18601
18602         * config/missing: update from automake.
18603
18604 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
18605             Bruno Haible  <bruno@clisp.org>
18606
18607         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
18608         * lib/getline.c (getline, getdelim): Likewise.
18609         Remove _GNU_SOURCE define; now it's defined in config.h through
18610         m4/getline.m4.
18611
18612 2003-07-23  Karl Berry  <karl@gnu.org>
18613
18614         * config/config.sub: update from prep.
18615
18616 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18617
18618         * modules/xalloc (Depends-on): Add exitfail.
18619         * modules/xmemcoll: Likewise.
18620
18621 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18622
18623         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
18624         over-parenthesization in macros.
18625
18626         Sync with coreutils.
18627
18628         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
18629         required by C99.
18630
18631         Use `exit_failure' for xalloc and xmemcoll instead of their own
18632         private exit-failure variables.
18633         * lib/xalloc.h (xalloc_exit_failure): Remove.
18634         * lib/xmalloc.c: Likewise.  Include exitfail.h.
18635         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
18636         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
18637         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
18638         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
18639
18640 2003-07-20  Jim Meyering  <jim@meyering.net>
18641
18642         * modules/closeout (Depends-on): Add exitfail.
18643         Suggestion from Bruno Haible.
18644
18645 2003-07-19  Karl Berry  <karl@gnu.org>
18646
18647         * config/config.sub: update from prep.
18648
18649 2003-07-18  Paul Eggert  <eggert@twinsun.com>
18650
18651         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
18652         Remove.
18653         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
18654         to test that it can stand by itself.  Include "exitfail.h".
18655         Clients should set exit_failure instead.
18656         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
18657
18658 2003-07-18  Bruno Haible  <bruno@clisp.org>
18659
18660         * modules/getndelim2: New file.
18661         * modules/getline: Share files with module getndelim2.
18662         * modules/getnline: Depend on getndelim2 instead of sharing files with
18663         it. Add getnline.c to lib_SOURCES.
18664         * MODULES.html.sh (func_all_modules): Add getndelim2.
18665
18666 2003-07-18  Bruno Haible  <bruno@clisp.org>
18667
18668         * m4/getndelim2.m4: New file.
18669         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
18670         invoke gl_PREREQ_GETNDELIM2.
18671         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
18672         gl_PREREQ_GETNDELIM2.
18673         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
18674         gl_GETNDELIM2.
18675
18676 2003-07-18  Bruno Haible  <bruno@clisp.org>
18677
18678         * lib/getndelim2.h: New file.
18679         * lib/getndelim2.c: Make into a module of its own. Include config.h,
18680         getndelim2.h.
18681         (getndelim2): Make non-static. Change return type to ssize_t.
18682         * lib/getline.h: Change argument names.
18683         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
18684         * lib/getnline.c: Include getndelim2.h.
18685
18686 2003-07-18  Andreas Schwab  <schwab@suse.de>
18687
18688         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
18689
18690 2003-07-17  Karl Berry  <karl@gnu.org>
18691
18692         * config/config.sub: update from prep.
18693
18694 2003-07-17  Bruno Haible  <bruno@clisp.org>
18695
18696         * modules/getnline: New file.
18697         * modules/getline: Add lib/getndelim2.c to source file list.
18698         * MODULES.html.sh (func_all_modules): Add getnline.
18699
18700 2003-07-17  Bruno Haible  <bruno@clisp.org>
18701
18702         * m4/getnline.m4: New file.
18703
18704 2003-07-17  Bruno Haible  <bruno@clisp.org>
18705
18706         * m4/Makefile.am.in: Remove file.
18707         * m4/Makefile.am: Remove file.
18708         * m4/Makefile.in: Remove file.
18709
18710 2003-07-17  Bruno Haible  <bruno@clisp.org>
18711
18712         * lib/getnline.h: New file.
18713         * lib/getnline.c: New file.
18714         * lib/getndelim2.c: New file, extracted from getline.c.
18715         (getndelim2): Renamed from getdelim2, with added nmax argument.
18716         * lib/getline.c: Include getndelim2.c.
18717         (getdelim2): Moved out to getndelim2.c.
18718         (getline, getdelim): Update.
18719
18720 2003-07-17  Bruno Haible  <bruno@clisp.org>
18721
18722         * lib/Makefile.am: Remove file.
18723         * lib/Makefile.in: Remove file.
18724
18725 2003-07-17  Bruno Haible  <bruno@clisp.org>
18726
18727         * configure.in: Remove file.
18728         * Makefile.in: Remove file.
18729
18730 2003-07-17  Bruno Haible  <bruno@clisp.org>
18731
18732         * MODULES.html.sh: Put the </BODY> right before </HTML>.
18733
18734 2003-07-16  Karl Berry  <karl@gnu.org>
18735
18736         * config/srclist-update: was running fixlicense twice, which caused
18737                 texinfo.tex to be nullified for some reason.  Simplify,
18738                 $gplsrc is no longer needed as far as I can see?
18739
18740 2003-07-16  Jim Meyering  <jim@meyering.net>
18741
18742         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
18743
18744 2003-07-15  Paul Eggert  <eggert@twinsun.com>
18745
18746         * config/srclist.txt: Get the following files from gettext-runtime/intl
18747         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
18748         ref-del.sin.  From Bruno Haible.
18749         * config/srclist-update (fixfile): Change grep pattern again, since the
18750         previous fix didn't work (there was another trailing $).  Use
18751         '[$]' to escape the $s.
18752
18753 2003-07-15  Karl Berry  <karl@gnu.org>
18754
18755         * lib/vasnprintf.c: update from gettext.
18756
18757 2003-07-15  Karl Berry  <karl@gnu.org>
18758
18759         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
18760         gets expanded when surrounded by '$'.
18761
18762 2003-07-15  Jim Meyering  <jim@meyering.net>
18763
18764         * modules/save-cwd: Don't depend on error.  From Derek Price.
18765
18766 2003-07-15  Jim Meyering  <jim@meyering.net>
18767
18768         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
18769
18770 2003-07-14  Simon Josefsson  <jas@extundo.com>
18771
18772         * modules/mempcpy: New file.
18773         * MODULES.html.sh (func_all_modules): Add mempcpy.
18774
18775 2003-07-14  Simon Josefsson  <jas@extundo.com>
18776
18777         * m4/mempcpy.m4: New file.
18778
18779 2003-07-14  Simon Josefsson  <jas@extundo.com>
18780
18781         * lib/mempcpy.h: New file.
18782         * lib/mempcpy.c: New file.
18783
18784 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18785
18786         * modules/getdate, modules/posixtm: Depend on mktime.
18787
18788 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18789
18790         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
18791         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
18792         unicodeio.c, unicodeio.h, unlocked-io.h:
18793         Switch from LGPL to GPL.
18794
18795 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18796
18797         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
18798         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
18799         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
18800         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
18801         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
18802         updated automatically by ../config/srclist-update.  This changes
18803         their license from LPGL to GPL.
18804
18805 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18806
18807         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
18808         assumed to refer to the root of the most recent stable gettext version.
18809         * config/srclistvars.sh: Add defaults for eggert.
18810         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
18811         Match "This program" as well as "The program".  This is needed
18812         for gettext.
18813
18814 2003-07-14  Jim Meyering  <jim@meyering.net>
18815
18816         Don't emit diagnostics.  Let callers do that.
18817         * lib/save-cwd.c: Don't include "error.h".
18818         (save_cwd): Don't call error.  Ensure that errno is valid
18819         when returning nonzero.
18820
18821         * lib/save-cwd.h (restore_cwd): Update prototype.
18822         * lib/save-cwd.c (restore_cwd): Remove two parameters.
18823         Simplify.  Don't call error upon failure.  Let callers do that.
18824         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
18825         when auditing is enabled.  But don't bother updating the #if.
18826
18827 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
18828
18829         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
18830         it breaks C++ compilation.
18831         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
18832
18833 2003-07-10  Simon Josefsson  <jas@extundo.com>
18834
18835         * modules/strchrnul (Makefile.am): Add strchrnul.h.
18836
18837 2003-07-10  Jim Meyering  <jim@meyering.net>
18838
18839         * m4/clock_time.m4: Remove trailing blank.
18840         * m4/intmax_t.m4: Likewise.
18841
18842 2003-07-10  Jim Meyering  <jim@meyering.net>
18843
18844         * lib/vasnprintf.c: Remove trailing blanks.
18845         Make cpp indentation consistent.
18846
18847 2003-07-09  Paul Eggert  <eggert@twinsun.com>
18848
18849         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
18850         posixver.c, strftime.c, strnlen.c, strverscmp.c:
18851         Switch from LGPL to GPL.
18852
18853 2003-07-09  Paul Eggert  <eggert@twinsun.com>
18854
18855         * config/srclist.txt: Sort sublists.  Add
18856         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
18857         that differ from gnulib for one reason or another; we'd like this list
18858         to be smaller but for now let's document what we have.
18859
18860 2003-07-08  Paul Eggert  <eggert@twinsun.com>
18861
18862         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
18863         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
18864         and sweeter "eval x=$x".
18865         * config/srclist.txt: Get lib/argp* from glibc.
18866
18867 2003-07-07  Paul Eggert  <eggert@twinsun.com>
18868
18869         * lib/mktime.c: Fix some boundary cases and remove need for floating
18870         point.
18871
18872         Issue a compile-time diagnostic if time_t is floating point, or if
18873         two's complement arithmetic is not in effect, or if arithmetic
18874         right shift does not propagate the sign.  These assumptions were
18875         all in the original code but they weren't checked.
18876
18877         (TIME_T_MIDPOINT, verify): New macros.
18878         (__isleap): Remove; it has integer overflow problems.
18879         (leapyear): New function, without those problems.
18880         (ydhms_tm_diff): Remove; splitting into two parts.
18881         (ydhms_diff): New function, containing the arithmetic part of
18882         the old ydhms_tm_diff function.  Issue a compile-time
18883         diagnostic if we are not using C99 integer division.
18884         Avoid casts when possible.
18885         (guess_time_tm): New function, containing the checking part of
18886         the old ydhms_tm_diff function.  Return the new value, rather than
18887         the difference between it and the old.  Accept a new argument T
18888         so that *T specifies the old value.  Check for overflow in the result.
18889
18890         (__mktime_internal): Use a time_t offset, not a long int offset.
18891         This undoes the 2003-06-04 change, which is no longer needed now
18892         that we have better overflow checking.
18893         (localtime_offset): Likewise.
18894
18895         (__mktime_internal): Avoid harmful overflow on hosts where time_t
18896         and long are 64-bit but int is only 32-bit.
18897         (ydhms_diff): Use long int to store year1 and yday1.
18898         Issue a compile-time diagnostic if long int is not wide enough.
18899
18900         (__mktime_internal): Use long int to store adjusted year and yday.
18901         Use plain C rather than preprocessor commands, if that doesn't
18902         affect efficiency.
18903         Check for overflow (and try to repair) after each probe
18904         rather than checking only at the very end.  This avoids some bugs
18905         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
18906         does not equal GMT offset at maximum time).
18907         Use integer to check for overflow rather than floating point; this
18908         is more portable to non-IEEE hosts, and is a tad faster.
18909         When we detect that we are oscillating between two values,
18910         don't check whether tm_isdst has the requested value, since
18911         we already know the answer.  When tm_isdst has the wrong value,
18912         use a different heuristic to find the right one, based on the
18913         extreme values actually observed in practice in tz2003a,
18914         rather than the (overly optimistic) "previous 3 calendar quarters".
18915
18916         (not_equal_tm, print_tm, check_result): Use "const T" rather than
18917         "T const" to accommodate glibc style.
18918         (check_result): Use less-confusing report format.  "long" -> "long int.
18919         (main): Likewise.
18920         Don't loop if the iteration overflows time_t.
18921         Allow a negative step in the iteration.
18922
18923 2003-07-06  Karl Berry  <karl@gnu.org>
18924
18925         * config/depcomp: update from automake.
18926         * config/config.sub: update from prep.
18927
18928 2003-07-03  Karl Berry  <karl@gnu.org>
18929
18930         * config/config.guess: update from prep.
18931
18932 2003-07-01  Paul Eggert  <eggert@twinsun.com>
18933
18934         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
18935         xreadlink.c now includes it unconditionally.
18936
18937 2003-07-01  Paul Eggert  <eggert@twinsun.com>
18938
18939         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
18940         having it depend on HAVE_SYS_TYPES_H.
18941
18942 2003-07-01  Bruno Haible  <bruno@clisp.org>
18943
18944         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
18945         <sys/types.h> should be sufficient.
18946         Reported by Paul Eggert.
18947
18948 2003-06-26  Karl Berry  <karl@gnu.org>
18949
18950         * config/depcomp: update from automake.
18951
18952 2003-06-26  Bruno Haible  <bruno@clisp.org>
18953
18954         * modules/human: Depend on module stdbool.
18955
18956 2003-06-25  Bruno Haible  <bruno@clisp.org>
18957
18958         * modules/readlink: New file.
18959         * modules/xreadlink: Depend on it.
18960         * MODULES.html.sh (func_all_modules): Add readlink.
18961
18962 2003-06-25  Bruno Haible  <bruno@clisp.org>
18963
18964         * m4/readlink.m4: New file.
18965
18966 2003-06-25  Bruno Haible  <bruno@clisp.org>
18967
18968         * lib/readlink.c: New file.
18969
18970 2003-06-22  Karl Berry  <karl@gnu.org>
18971
18972         * config/srclist.txt: update mkinstalldirs from automake.
18973         * config/mkinstalldirs: update.
18974
18975 2003-06-22  Bruno Haible  <bruno@clisp.org>
18976
18977         Portability to mingw32.
18978         * m4/ssize_t.m4: New file, from GNU gettext.
18979         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
18980         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
18981
18982 2003-06-22  Bruno Haible  <bruno@clisp.org>
18983
18984         * modules/safe-read: Add m4/ssize_t.m4.
18985         * modules/xreadlink: Add m4/ssize_t.m4.
18986
18987 2003-06-20  Bruno Haible  <bruno@clisp.org>
18988
18989         Assume C89, so PARAMS isn't needed.
18990         * lib/unicodeio.h (PARAMS): Remove.
18991         * lib/unicodeio.c: Don't use PARAMS.
18992
18993 2003-06-18  Karl Berry  <karl@gnu.org>
18994
18995         * config/config.{guess,sub}: update from prep.
18996
18997 2003-06-18  Jim Meyering  <jim@meyering.net>
18998
18999         Merge changes from coreutils.
19000         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
19001         Remove explicit declarations of xmalloc and realloc.
19002         Include xalloc.h.
19003         (read_utmp): Remove anachronistic cast of xmalloc.
19004
19005 2003-06-17  Paul Eggert  <eggert@twinsun.com>
19006
19007         Assume C89, so PARAMS isn't needed.
19008         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
19009         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
19010         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
19011         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
19012         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
19013         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
19014         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
19015         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
19016         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
19017         lib/xstrtod.h, lib/xstrtol.h: Likewise.
19018         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
19019         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
19020         no longer needed. Anyway, config.h should always be included before any
19021         other file.
19022
19023 2003-06-11  Simon Josefsson  <jas@extundo.com>
19024
19025         * modules/sysexits: New file.
19026         * MODULES.html.sh (func_all_modules): Add sysexits.
19027
19028 2003-06-11  Simon Josefsson  <jas@extundo.com>
19029
19030         * lib/sysexit_.h: New file.
19031
19032 2003-06-11  Derek Price  <derek@ximbiot.com>
19033
19034         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
19035         necessary.
19036
19037 2003-06-11  Bruno Haible  <bruno@clisp.org>
19038
19039         * m4/sysexits.m4: New file.
19040
19041 2003-06-10  Simon Josefsson  <jas@extundo.com>
19042
19043         * lib/argp.h: New file, from glibc.
19044         * lib/argp-ba.c: New file, from glibc.
19045         * lib/argp-eexst.c: New file, from glibc.
19046         * lib/argp-fmtstream.c: New file, from glibc.
19047         * lib/argp-fmtstream.h: New file, from glibc.
19048         * lib/argp-fs-xinl.c: New file, from glibc.
19049         * lib/argp-help.c: New file, from glibc.
19050         * lib/argp-namefrob.h: New file, from glibc.
19051         * lib/argp-parse.c: New file, from glibc.
19052         * lib/argp-pv.c: New file, from glibc.
19053         * lib/argp-pvh.c: New file, from glibc.
19054         * lib/argp-xinl.c: New file, from glibc.
19055
19056 2003-06-10  Simon Josefsson  <jas@extundo.com>
19057
19058         * modules/strchrnul: New file.
19059
19060 2003-06-10  Simon Josefsson  <jas@extundo.com>
19061
19062         * modules/argp: New file.
19063
19064 2003-06-10  Simon Josefsson  <jas@extundo.com>
19065
19066         * m4/strchrnul.m4: New file.
19067
19068 2003-06-10  Simon Josefsson  <jas@extundo.com>
19069
19070         * lib/strchrnul.h: New file.
19071         * lib/strchrnul.c: New file.
19072
19073 2003-06-10  Bruno Haible  <bruno@clisp.org>
19074
19075         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
19076
19077 2003-06-07  Karl Berry  <karl@gnu.org>
19078
19079         * config/config.{guess,sub}: update from prep.
19080
19081 2003-06-07  Jim Meyering  <jim@meyering.net>
19082
19083         * modules/strtod: Use $(...) notation, not @...@ for
19084         AC_REPLACE'd variables.
19085         * modules/localcharset: Likewise.
19086
19087 2003-06-07  Jim Meyering  <jim@meyering.net>
19088
19089         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
19090         in place of my name in the copyright comment.
19091         Remove definition and uses of __P.
19092
19093         From coreutils.
19094         * lib/stat.c: Don't declare xmalloc explicitly.
19095         Instead, include "xalloc.h".
19096         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
19097         xrealloc, and xcalloc return values.
19098         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
19099         Improve comment.
19100         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
19101
19102 2003-06-07  Bruno Haible  <bruno@clisp.org>
19103
19104         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
19105         avoid AC_CONFIG_LINKS.
19106         * modules/fnmatch (Makefile.am): Use explicit creation rule for
19107         fnmatch.h, to avoid AC_CONFIG_LINKS.
19108         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
19109
19110 2003-06-07  Bruno Haible  <bruno@clisp.org>
19111
19112         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
19113         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
19114         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19115         directory.
19116         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
19117         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19118         directory.
19119
19120 2003-06-06  Jim Meyering  <jim@meyering.net>
19121
19122         Merge from coreutils.
19123         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
19124         Consolidate declarations and initializations of *_base* locals.
19125
19126         Merge from coreutils.
19127         This avoids a core dump on systems without GNU putenv,
19128         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
19129         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
19130         (unsetenv): New static function, from GNU libc.
19131         (rpl_putenv): Use it.
19132
19133         * lib/modechange.c: Remove trailing blanks.
19134
19135         Merge from coreutils.
19136         * lib/fsusage.c: Remove declaration of statfs.
19137         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
19138
19139         * lib/posixtm.c: Include <stdbool.h> unconditionally.
19140
19141 2003-06-06  Jim Meyering  <jim@meyering.net>
19142
19143         * lib/stdbool_.h: Renamed from stdbool.h.in.
19144
19145 2003-06-06  Jim Meyering  <jim@meyering.net>
19146             Bruno Haible  <bruno@clisp.org>
19147
19148         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
19149         Adjust Makefile.am snippet not to redirect directly to target.
19150         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
19151
19152 2003-06-05  Paul Eggert  <eggert@twinsun.com>
19153
19154         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
19155         mismatch, look in future quarters as well as past.  This fixes a
19156         bug when processing fall-backwards gaps immediately after a long
19157         period of daylight-saving time.
19158
19159         * lib/mktime.c: Assume freestanding C89 or better.
19160         (HAVE_LIMITS_H): Remove.  Assume it's 1.
19161         (__P): Remove; not used.
19162         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
19163         (mktime, not_equal_tm, print_tm, check_result,
19164         main): Use prototypes.  Use const * where appropriate.
19165         (main): Fix typo in testing code that uncovered by above changes.
19166         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
19167
19168 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19169
19170         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
19171         locale.h, localeconv.  This merges changes from coreutils.
19172
19173         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
19174         It can be removed after the next Autoconf is released.
19175         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
19176         needed.
19177
19178 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19179
19180         * lib/mktime.c: Fix Debian bug 177940
19181         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
19182         (localtime_offset): Now long int, not time_t, because we want it
19183         to be guaranteed to be signed.  All uses changed.
19184         (__mktime_internal): If overflow would occur when adding offset,
19185         don't add it.
19186
19187         Merge 'human' changes from coreutils.  Rewrite to support
19188         locale-specific notations like thousands separators.
19189         * lib/human.c: Simplify authorship notice.
19190         Include human.h immediately after config.h.
19191         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
19192         <limits.h>: Do not include, since human.h does.
19193         (SIZE_MAX, UINTMAX_MAX): New macros.
19194         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
19195         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
19196         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
19197         (power_letter): Renamed from suffixes.
19198         (generate_suffix_backwards): Remove.
19199         (adjust_value): Now takes int style (because of human.h changes)
19200         and long double value (for greater precision on some platforms).
19201         (group_number): New function.
19202         (human_readable): Use it.  Use integer options, not enum.
19203         Put the options before the sizes in the arg list.
19204         Support all the new options.
19205         The old human_readable function has been removed;
19206         use inttostr.h instead.
19207         (human_readable, default_block_size, humblock):
19208         Use uintmax_t, not int, for block sizes.
19209         (human_readable_inexact, block_size_types): Remove.
19210         (block_size_opts): New constant.
19211         (human_options): Renamed from human_block_size, with new signature
19212         that allows block sizes up to UINTMAX_MAX.  All callers changed.
19213         * lib/human.h: Add copyright and authorship notice.
19214         Include <limits.h> and <stdbool.h> unconditionally.
19215         (PARAMS): Remove.  All uses removed.
19216         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
19217         (enum human_inexact_style): Remove tag; now a nameless enum.
19218         (human_floor, human_ceiling, human_round_to_even): Now have
19219         values 2, 0, 1 rather than -1, 1, 0.
19220         (human_group_digits, human_suppress_point_zero, human_autoscale,
19221         human_base_1024, human_SI, human_B): New constants.
19222         (human_readable_inexact, human_block_size): Remove.
19223         (human_readable): Size args are now uintmax_t, not int.
19224         (human_options): New decl.
19225
19226         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
19227         unnecessary now that we assume C89 or better.  This change
19228         imported from coreutils.
19229
19230         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19231         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
19232         in the 2003-05-30 sync from glibc.
19233
19234         .h files should stand alone, but we shouldn't include <sys/types.h>
19235         if we can get away with just <stddef.h>.
19236
19237         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
19238         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
19239         rather than <sys/types.h>, as we merely need size_t.
19240         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
19241         to get size_t.
19242         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
19243         Include <stdio.h>, to get FILE.
19244         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
19245         memcasecmp.h has included <stddef.h> and all we need is size_t.
19246         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
19247         our interface, instead of including <sys/types.h>
19248
19249 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19250
19251         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
19252         now, as glibc mktime is buggy on non-glibc systems.
19253
19254 2003-06-03  Karl Berry  <karl@gnu.org>
19255
19256         * config/config.sub: update from prep.
19257
19258 2003-06-02  Paul Eggert  <eggert@twinsun.com>
19259
19260         [from coreutils]
19261         Fix some minor time-related bugs with POSIX time arguments.
19262         Some valid time stamps were being rejected (notably -1, and
19263         time stamps before 1900 on 64-bit hosts).  And some invalid
19264         time stamps were being accepted, e.g. September 31.
19265
19266         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
19267         that we can return (time_t) -1 successfully.
19268         * lib/posixtm.c: Likewise.
19269         [HAVE_STDBOOL_H]: Include <stdbool.h>.
19270         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
19271         (t): Remove static var.
19272         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
19273         of static var.  All uses changed.
19274         (year): Do not reject years before 1900; they can occur with
19275         64-bit time_t.
19276         (posix_time_parse): Do not check for out-of-range components;
19277         that is now the caller's responsibility, since our checks were
19278         only approximations.
19279         (posixtime): Use mktime to check for out-of-range components,
19280         since it knows them exactly.
19281         If mktime returns (time_t) -1, check whether an error actually occurred
19282         by invoking localtime on -1.
19283         (main) [TEST_POSIXTIME]: Check for input data errors, and report
19284         posixtime failures better.
19285         Improve the test data (in comments only).
19286
19287 2003-06-02  Karl Berry  <karl@gnu.org>
19288
19289         * config/mkinstalldirs (version): new variable.
19290         (--version): new option.
19291         (usage): improve message.
19292
19293 2003-05-30  Karl Berry  <karl@gnu.org>
19294
19295         * lib/mktime.c: update from libc.
19296
19297 2003-05-30  Bruno Haible  <bruno@clisp.org>
19298
19299         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
19300         * config/config.rpath: Upgrade to gettext-0.12.1.
19301
19302 2003-05-30  Bruno Haible  <bruno@clisp.org>
19303
19304         * m4/gettext.m4: Upgrade to gettext-0.12.1.
19305         * m4/nls.m4: New file, from gettext-0.12.1.
19306         * m4/po.m4: New file, from gettext-0.12.1.
19307         * m4/progtest.m4: Upgrade to gettext-0.12.1.
19308
19309 2003-05-30  Bruno Haible  <bruno@clisp.org>
19310
19311         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
19312         * lib/localcharset.h: Likewise.
19313         * lib/localcharset.c: Likewise.
19314
19315 2003-05-29  Karl Berry  <karl@gnu.org>
19316
19317         * config/config.rpath: update from gettext.
19318
19319 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19320
19321         Assume the headers required for C89 freestanding compilers.
19322         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
19323         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
19324         * m4/human.m4 (gl_HUMAN): Likewise.
19325         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
19326         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
19327         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19328         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
19329         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19330         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
19331
19332 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19333
19334         Assume the headers required for C89 freestanding compilers.
19335         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
19336         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
19337         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
19338         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
19339         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
19340         define, since <limits.h> is guaranteed to do that.
19341         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
19342         * lib/exclude.c: Include <stdbool.h> unconditionally.
19343         * lib/tempname.c: Include <stddef.h> unconditionally.
19344         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
19345         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
19346         <stddef.h> does that.
19347         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
19348         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
19349         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
19350         needed.
19351         * lib/xstrtol.c: Likewise.
19352         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
19353         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
19354
19355         * lib/addext.c (addext): Use assignment rather than cast, to avoid
19356         warnings on some platforms.
19357
19358         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19359         arbitrarily.
19360
19361 2003-05-26  Jim Meyering  <jim@meyering.net>
19362
19363         Merge in a change from coreutils:
19364         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
19365         that is guaranteed to be `no'.  Use `no_such_member' to indicate
19366         that condition, rather than `-1' which is slightly misleading.
19367         Change the name of the cache variable to have the gl_ prefix.
19368         Prompted by a patch from Richard Dawe for DJGPP.
19369
19370 2003-05-24  Karl Berry  <karl@gnu.org>
19371
19372         * config/config.guess: update from prep.
19373
19374 2003-05-22  Karl Berry  <karl@gnu.org>
19375
19376         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
19377
19378 2003-05-20  Karl Berry  <karl@gnu.org>
19379
19380         * config/config.guess: update from prep.
19381
19382 2003-05-18  Karl Berry  <karl@gnu.org>
19383
19384         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
19385         might actually be set by the user.
19386
19387         * config/depcomp, install-sh, mdate-sh: update from automake.
19388
19389 2003-05-17  Bruno Haible  <bruno@clisp.org>
19390
19391         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
19392         invalid expansion for AC_EGREP_CPP.
19393         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
19394         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
19395         Suggested by Akim Demaille <akim@epita.fr> in
19396         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
19397
19398 2003-05-12  Jim Meyering  <jim@meyering.net>
19399
19400         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
19401         the space-padded-by-default conversion specifiers, %e, %k, %l.
19402
19403 2003-05-12  Bruno Haible  <bruno@clisp.org>
19404
19405         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
19406         the string is longer than 4 KB.
19407
19408 2003-05-11  Karl Berry  <karl@gnu.org>
19409
19410         * config/config.{guess,sub}: update from prep.
19411
19412 2003-05-09  Bruno Haible  <bruno@clisp.org>
19413
19414         * modules/error: Add m4/strerror_r.m4 to file list.
19415
19416 2003-05-03  Bruno Haible  <bruno@clisp.org>
19417
19418         Upgrade to Unicode-4.0.
19419         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
19420         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
19421         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
19422         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
19423         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
19424         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
19425         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
19426         Change width of U+E0100..U+E01EF from 1 to 0.
19427
19428 2003-04-25  Jim Meyering  <jim@meyering.net>
19429
19430         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
19431         of type size_t, not int.
19432
19433 2003-04-25  Bruno Haible  <bruno@clisp.org>
19434
19435         * lib/copy-file.c: Include <stddef.h>, for size_t.
19436
19437 2003-04-21  Paul Eggert  <eggert@twinsun.com>
19438
19439         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
19440         code which expansion is under static control.  Patch imported from
19441         Akim Demaille's patch to Bison; see
19442         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
19443
19444 2003-04-14  Bruno Haible  <bruno@clisp.org>
19445
19446         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
19447
19448 2003-04-11  Jim Meyering  <jim@meyering.net>
19449
19450         Merge changes from Coreutils.
19451
19452         2003-03-22  Jim Meyering  <jim@meyering.net>
19453
19454         * lib/strftime.c (widen): Cast alloca return value to proper type.
19455
19456         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
19457
19458         From GNU libc.
19459         * lib/strftime.c (my_strftime): Handle very large width
19460         specifications for numeric values correctly.  Improve checks for
19461         overflow.
19462
19463         2003-01-19  Jim Meyering  <jim@meyering.net>
19464
19465         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
19466         definitions.
19467         (nl_get_alt_digit) [! defined my_strftime]: Define.
19468         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
19469         _nl_get_alt_digit and _nl_get_walt_digit.
19470
19471         * lib/strftime.c (my_strftime): Merge in locale-related changes from
19472         libc. These changes have no effect outside of _LIBC.
19473
19474 2003-04-10  Bruno Haible  <bruno@clisp.org>
19475
19476         * modules/findprog: New file.
19477         * MODULES.html.sh (func_all_modules): Add it.
19478
19479 2003-04-10  Bruno Haible  <bruno@clisp.org>
19480
19481         * m4/findprog.m4: New file.
19482         * m4/eaccess.m4: New file.
19483
19484 2003-04-10  Bruno Haible  <bruno@clisp.org>
19485
19486         * lib/findprog.h: New file, from GNU gettext.
19487         * lib/findprog.c: New file, from GNU gettext.
19488
19489 2003-04-05  Jim Meyering  <jim@meyering.net>
19490
19491         Merge changes from Coreutils.
19492
19493         * lib/exclude.h (PARAMS): Remove definition and uses.
19494         * lib/exclude.c: Remove uses of `PARAMS'.
19495
19496         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
19497         Add test-cases for DOS filenames. Declare program_name.
19498         (main): Set up program_name.  Patch by Rich Dawe.
19499
19500         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19501         error from mntctl.
19502         Use mntctl's return value to drive the entry-processing loop, since
19503         we can't rely on the value of the vmt_length member in the last
19504         entry.  On some systems doing so could result in exhausting
19505         virtual memory.  Based in part on a patch from Mike Jetzer.
19506
19507 2003-04-04  Bruno Haible  <bruno@clisp.org>
19508
19509         * modules/linebreak: New file.
19510         * MODULES.html.sh (func_all_modules): Add it.
19511
19512 2003-04-04  Bruno Haible  <bruno@clisp.org>
19513
19514         * m4/linebreak.m4: New file.
19515
19516 2003-04-04  Bruno Haible  <bruno@clisp.org>
19517
19518         * lib/linebreak.h: New file, from GNU gettext.
19519         * lib/linebreak.c: New file, from GNU gettext with slight
19520         modifications.
19521         * lib/lbrkprop.h: New file, from GNU gettext.
19522
19523 2003-04-03  Bruno Haible  <bruno@clisp.org>
19524
19525         * modules/utf8-ucs4: New file.
19526         * modules/utf16-ucs4: New file.
19527         * modules/ucs4-utf8: New file.
19528         * modules/ucs4-utf16: New file.
19529         * MODULES.html.sh (func_all_modules): Add them.
19530
19531 2003-04-03  Bruno Haible  <bruno@clisp.org>
19532
19533         * m4/utf-ucs4.m4: New file.
19534         * m4/ucs4-utf.m4: New file.
19535
19536 2003-04-03  Bruno Haible  <bruno@clisp.org>
19537
19538         * lib/utf8-ucs4.h: New file, from GNU gettext.
19539         * lib/utf16-ucs4.h: New file, from GNU gettext.
19540         * lib/ucs4-utf8.h: New file, from GNU gettext.
19541         * lib/ucs4-utf16.h: New file, from GNU gettext.
19542
19543 2003-04-02  Bruno Haible  <bruno@clisp.org>
19544
19545         * modules/binary-io: New file.
19546         * MODULES.html.sh (func_all_modules): Add it.
19547
19548 2003-04-02  Bruno Haible  <bruno@clisp.org>
19549
19550         * lib/binary-io.h: New file, from GNU gettext.
19551
19552 2003-04-01  Bruno Haible  <bruno@clisp.org>
19553
19554         * modules/pathname: New file.
19555         * MODULES.html.sh (func_all_modules): Add it.
19556
19557 2003-04-01  Bruno Haible  <bruno@clisp.org>
19558
19559         * lib/pathname.h: New file, from GNU gettext.
19560         * lib/concatpath.c: New file, from GNU gettext.
19561
19562 2003-03-30  Bruno Haible  <bruno@clisp.org>
19563
19564         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
19565
19566 2003-03-30  Bruno Haible  <bruno@clisp.org>
19567
19568         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
19569         function chown() doesn't exist.
19570
19571 2003-03-28  Bruno Haible  <bruno@clisp.org>
19572
19573         * modules/copy-file: New file.
19574         * MODULES.html.sh (func_all_modules): Add it.
19575
19576 2003-03-28  Bruno Haible  <bruno@clisp.org>
19577
19578         * m4/copy-file.m4: New file.
19579
19580 2003-03-28  Bruno Haible  <bruno@clisp.org>
19581
19582         * lib/copy-file.h: New file, from GNU gettext.
19583         * lib/copy-file.c: New file, from GNU gettext.
19584
19585 2003-03-18  Jim Meyering  <jim@meyering.net>
19586
19587         * lib/quote.c (quote_n): Fix typo in comment.
19588
19589 2003-03-18  Bruno Haible  <bruno@clisp.org>
19590
19591         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
19592         checking.
19593         * m4/onceonly_2_57.m4: Likewise.
19594
19595 2003-03-17  Bruno Haible  <bruno@clisp.org>
19596
19597         * m4/onceonly.m4: Require autoconf 2.54 or newer.
19598         (m4_quote): Remove macro.
19599         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
19600
19601 2003-03-14  Jim Meyering  <jim@meyering.net>
19602
19603         Merge changes from Coreutils.
19604         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
19605         to be const, in order to avoid warnings.
19606         (obstack_room): Likewise.
19607         (obstack_empty_p): Likewise.
19608
19609 2003-03-14  Bruno Haible  <bruno@clisp.org>
19610
19611         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
19612         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
19613
19614 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19615
19616         Merge changes from Bison.
19617         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
19618         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
19619         when compiling Bison 1.875's `bitset bset = obstack_alloc
19620         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
19621         * lib/hash.c: Include <stdbool.h> unconditionally.
19622
19623 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19624
19625         * m4/onceonly.m4 (m4_quote): New macro.
19626         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
19627         Quote AC_FOREACH variable-expansions properly.
19628
19629 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19630
19631         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
19632
19633 2003-03-09  Paul Eggert  <eggert@twinsun.com>
19634
19635         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
19636         Reported by Bruce Becker; see:
19637         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
19638
19639 2003-03-03  Paul Eggert  <eggert@twinsun.com>
19640             Bruno Haible  <bruno@clisp.org>
19641
19642         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
19643         Reported by John Hughes, see
19644         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
19645
19646 2003-02-20  Bruno Haible  <bruno@clisp.org>
19647
19648         * MODULES.html.sh (func_all_modules): Add poll.
19649
19650 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19651
19652         * modules/poll: New file.
19653
19654 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19655
19656         * lib/poll_.h: New file.
19657         * lib/poll.c: New file.
19658
19659 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19660
19661         * m4/poll.m4: New file.
19662
19663 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19664
19665         * modules/mathl: New file.
19666
19667 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19668
19669         * lib/mathl.h: New file.
19670         * lib/acosl.c: New file.
19671         * lib/asinl.c: New file.
19672         * lib/atanl.c: New file.
19673         * lib/ceill.c: New file.
19674         * lib/cosl.c: New file.
19675         * lib/expl.c: New file.
19676         * lib/floorl.c: New file.
19677         * lib/frexpl.c: New file.
19678         * lib/ldexpl.c: New file.
19679         * lib/logl.c: New file.
19680         * lib/sincosl.c: New file.
19681         * lib/sinl.c: New file.
19682         * lib/sqrtl.c: New file.
19683         * lib/tanl.c: New file.
19684         * lib/trigl.c: New file.
19685         * lib/trigl.h: New file.
19686
19687 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19688
19689         * m4/mathl.m4: New file.
19690
19691 2003-02-18  Bruno Haible  <bruno@clisp.org>
19692
19693         * MODULES.html.sh (func_all_modules): Add mathl.
19694
19695 2003-02-17  Bruno Haible  <bruno@clisp.org>
19696
19697         * modules/mkdtemp: New module.
19698         * MODULES.html.sh (func_all_modules): Add it.
19699
19700 2003-02-17  Bruno Haible  <bruno@clisp.org>
19701
19702         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
19703
19704 2003-02-17  Bruno Haible  <bruno@clisp.org>
19705
19706         * lib/mkdtemp.h: New file, from GNU gettext.
19707         * lib/mkdtemp.c: New file, from GNU gettext.
19708
19709 2003-02-02  Jim Meyering  <jim@meyering.net>
19710
19711         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
19712         e.g. glibc-2.2.93.
19713
19714 2003-01-31  Bruno Haible  <bruno@clisp.org>
19715
19716         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
19717         'rpl_rename'.
19718         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
19719         'rpl_strnlen'.
19720         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
19721         'rpl_strtod'.
19722         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
19723         'rpl_utime'.
19724
19725 2003-01-31  Bruno Haible  <bruno@clisp.org>
19726
19727         * lib/rename.c: #undef rename before defining rpl_rename.
19728         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
19729
19730 2003-01-30  Bruno Haible  <bruno@clisp.org>
19731
19732         * modules/vasnprintf, modules/vasprintf: New modules.
19733         * MODULES.html.sh (func_all_modules): Add them.
19734
19735 2003-01-30  Bruno Haible  <bruno@clisp.org>
19736
19737         * m4/signed.m4: New file, from GNU gettext.
19738         * m4/longdouble.m4: New file, from GNU gettext.
19739         * m4/wchar_t.m4: New file, from GNU gettext.
19740         * m4/wint_t.m4: New file, from GNU gettext.
19741         * m4/vasnprintf.m4: New file.
19742         * m4/vasprintf.m4: New file.
19743
19744 2003-01-30  Bruno Haible  <bruno@clisp.org>
19745
19746         * lib/printf-args.h: New file, from GNU gettext.
19747         * lib/printf-args.c: New file, from GNU gettext.
19748         * lib/printf-parse.h: New file, from GNU gettext.
19749         * lib/printf-parse.c: New file, from GNU gettext.
19750         * lib/vasnprintf.h: New file, from GNU gettext.
19751         * lib/vasnprintf.c: New file, from GNU gettext.
19752         * lib/asnprintf.c: New file, from GNU gettext.
19753         * lib/vasprintf.h: New file, from GNU gettext with modifications.
19754         * lib/vasprintf.c: New file, from GNU gettext.
19755         * lib/asprintf.c: New file, from GNU gettext.
19756
19757 2003-01-29  Bruno Haible  <bruno@clisp.org>
19758
19759         * modules/stpncpy: New module.
19760         * MODULES.html.sh (func_all_modules): Add it.
19761
19762 2003-01-29  Bruno Haible  <bruno@clisp.org>
19763
19764         * m4/stpncpy.m4: New file.
19765
19766 2003-01-29  Bruno Haible  <bruno@clisp.org>
19767
19768         * lib/stpncpy.h: New file, from GNU gettext with modifications.
19769         * lib/stpncpy.c: New file, from GNU gettext with modifications.
19770
19771 2003-01-28  Bruno Haible  <bruno@clisp.org>
19772
19773         * modules/c-ctype: New module.
19774         * MODULES.html.sh (func_all_modules): Add it.
19775
19776 2003-01-28  Bruno Haible  <bruno@clisp.org>
19777
19778         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
19779         Paul Eggert.
19780         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
19781         Paul Eggert.
19782
19783 2003-01-27  Bruno Haible  <bruno@clisp.org>
19784
19785         * modules/xsetenv: New module.
19786         * MODULES.html.sh (func_all_modules): Add it.
19787
19788 2003-01-27  Bruno Haible  <bruno@clisp.org>
19789
19790         * lib/xsetenv.h: New file, from GNU gettext.
19791         * lib/xsetenv.c: New file, from GNU gettext.
19792
19793 2003-01-23  Jim Meyering  <jim@meyering.net>
19794
19795         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
19796         from working on systems without dirfd (at least Irix and OSF1/Tru64).
19797
19798 2003-01-23  Bruno Haible  <bruno@clisp.org>
19799
19800         * modules/minmax: New module.
19801         * MODULES.html.sh (func_all_modules): Add it.
19802
19803 2003-01-23  Bruno Haible  <bruno@clisp.org>
19804
19805         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
19806         Eggert.
19807
19808 2003-01-22  Bruno Haible  <bruno@clisp.org>
19809
19810         * modules/exit: New module.
19811         * MODULES.html.sh (func_all_modules): Add it.
19812
19813 2003-01-22  Bruno Haible  <bruno@clisp.org>
19814
19815         * lib/exit.h: New file, from GNU gettext.
19816
19817 2003-01-19  Bruno Haible  <bruno@clisp.org>
19818
19819         * gnulib-tool: Recognize option --extract-maintainer.
19820         (func_get_maintainer): New function.
19821         * modules/*: Add Maintainer entry.
19822
19823 2003-01-16  Jim Meyering  <jim@meyering.net>
19824
19825         * m4/regex.m4: The `regex' struct is both input and output.
19826         Initialize it before each use.  Patch by Tim Waugh.
19827
19828 2003-01-16  Bruno Haible  <bruno@clisp.org>
19829
19830         * MODULES.html.sh: Add a table of contents. Add the module name as
19831         leftmost column. Add hyperlinks.
19832
19833 2003-01-15  Bruno Haible  <bruno@clisp.org>
19834
19835         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
19836
19837 2003-01-15  Bruno Haible  <bruno@clisp.org>
19838
19839         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
19840         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
19841         suffix.
19842
19843 2003-01-15  Bruno Haible  <bruno@clisp.org>
19844
19845         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
19846
19847 2003-01-15  Bruno Haible  <bruno@clisp.org>
19848
19849         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
19850         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
19851
19852 2003-01-14  Jim Meyering  <jim@meyering.net>
19853
19854         * lib/same.c (same_name): Tweak a comment.
19855
19856 2003-01-14  Bruno Haible  <bruno@clisp.org>
19857
19858         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
19859         when a string comparison is sufficient.
19860
19861 2003-01-14  Bruno Haible  <bruno@clisp.org>
19862
19863         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
19864         'unsigned int'.
19865
19866 2003-01-14  Bruno Haible  <bruno@clisp.org>
19867
19868         * lib/hash-pjw.c: Add comment about low quality of this function.
19869
19870 2003-01-13  Bruno Haible  <bruno@clisp.org>
19871
19872         * modules/stpcpy: Distribute lib/stpcpy.h.
19873         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
19874
19875 2003-01-13  Bruno Haible  <bruno@clisp.org>
19876
19877         * modules/*: Add a description.
19878         * modules/strpbrk: Fix Makefile.am snippet.
19879         * modules/strtoimax: Fix dependencies.
19880         * modules/strtoumax: Likewise.
19881
19882 2003-01-13  Bruno Haible  <bruno@clisp.org>
19883
19884         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
19885         * modules/alloca (Makefile.am): All object files depend on alloca.h.
19886         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
19887
19888 2003-01-13  Bruno Haible  <bruno@clisp.org>
19889
19890         * gnulib-tool (func_create_testdir): Store config/* files in the main
19891         directory.
19892         * config.rpath: Move to ...
19893         * config/config.rpath: ... here.
19894         * modules/gettext: Contains config/config.rpath, not config.rpath.
19895         * modules/iconv: Likewise.
19896
19897 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19898
19899         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19900         to avoid collisions with libcurses and libreadline.
19901
19902         * m4/getstr.m4: Remove.
19903         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
19904
19905 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19906
19907         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19908         to avoid collisions with libcurses and libreadline.
19909
19910         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
19911         * lib/getstr.h, getstr.c: Remove.
19912         * lib/getline.c: Include "getline.h", to check interface.
19913         Move body of old getstr.c here: this defines MIN_CHUNK and
19914         declares getdelim2, which is renamed from getstr.
19915         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
19916
19917         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
19918         All uses changed.
19919         * lib/linebuffer.h: Likewise.
19920         (readline): Remove backward-compatibility macro.
19921
19922 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19923
19924         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19925         to avoid collisions with libcurses and libreadline.
19926         * getstr: Remove.
19927         * MODULES.html.sh: Remove getstr.
19928         * modules/getline: Depend on unlocked-io, not getstr.
19929
19930 2003-01-12  Jim Meyering  <jim@meyering.net>
19931
19932         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
19933
19934 2003-01-10  Bruno Haible  <bruno@clisp.org>
19935
19936         * modules/alloca: Change Makefile.am requirements. Simplify Include
19937         requirements. Add lib/alloca_.h to file list.
19938
19939 2003-01-10  Bruno Haible  <bruno@clisp.org>
19940
19941         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
19942
19943 2003-01-10  Bruno Haible  <bruno@clisp.org>
19944
19945         * lib/alloca_.h: New file.
19946         * lib/getdate.y: Unconditionally include alloca.h.
19947         * lib/makepath.c: Likewise.
19948         * lib/setenv.c: Likewise.
19949         * lib/userspec.c: Likewise.
19950
19951 2003-01-09  Karl Berry  <karl@gnu.org>
19952
19953         * MODULES.html.sh: include `dirname $0` in PATH, to find
19954         gnulib-tool.
19955
19956 2003-01-09  Bruno Haible  <bruno@clisp.org>
19957
19958         * modules/stdbool: Change configure.ac, Makefile.am requirements.
19959         Simplify Include requirements. Add lib/stdbool.h.in to file list.
19960
19961 2003-01-09  Bruno Haible  <bruno@clisp.org>
19962
19963         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
19964
19965 2003-01-09  Bruno Haible  <bruno@clisp.org>
19966
19967         * lib/stdbool.h.in: New file.
19968
19969 2003-01-09  Bruno Haible  <bruno@clisp.org>
19970
19971         * gnulib-tool (func_all_modules): Ignore files ending in ~.
19972         * MODULES.html.sh: Likewise.
19973
19974 2003-01-08  Jim Meyering  <jim@meyering.net>
19975
19976         * lib/full-write.c: Undefine and define-away `const' after inclusion
19977         of errno.h, not before.  Suggestion from Bruno Haible.
19978
19979 2003-01-08  Bruno Haible  <bruno@clisp.org>
19980
19981         * modules/full-read: Depend on full-write.
19982
19983 2003-01-08  Bruno Haible  <bruno@clisp.org>
19984
19985         * lib/safe-read.c: Include specification header first, to ensure its
19986         selfcontainedness.
19987         * lib/full-write.c: Likewise.
19988
19989 2003-01-07  Jim Meyering  <jim@meyering.net>
19990
19991         * lib/full-write.c: Rework so that it may serve to define full_read,
19992         too.
19993         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
19994
19995 2003-01-07  Bruno Haible  <bruno@clisp.org>
19996
19997         * lib/strtoimax.c: Include <stdint.h> as an alternative to
19998         <inttypes.h>.
19999         * lib/xstrtol.h: Likewise.
20000         * lib/xstrtoimax.c: Likewise.
20001         * lib/xstrtoumax.c: Likewise.
20002         * lib/human.h: Likewise.
20003
20004         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
20005         on systems that have <inttypes.h> but not <stdint.h>.
20006
20007 2003-01-07  Bruno Haible  <bruno@clisp.org>
20008
20009         * MODULES.html.sh: Add copyright notice.
20010         (missed_files): Omit CVS directory entries.
20011         (func_module): Make it work with sed-3.02.
20012         * MODULES.txt: Remove file.
20013
20014 2003-01-06  Jim Meyering  <jim@meyering.net>
20015
20016         * lib/version-etc.c: Update year in translatable copyright string.
20017
20018 2003-01-03  Karl Berry  <karl@gnu.org>
20019
20020         * config/config.{guess,sub}: update from prep.
20021
20022 2003-01-02  Karl Berry  <karl@gnu.org>
20023
20024         * doc/COPYING.DOC: belatedly updated to 1.2.
20025
20026 2003-01-01  Karl Berry  <karl@gnu.org>
20027
20028         * gnulib-tool (func_verify_module): report module name $module in
20029         error message, not $1.
20030         * gnulib-tool (create-testdir): don't complain if destdir couldn't
20031         be created, only if it doesn't exist.
20032         * gnulib-tool (last_checkin_date): don't expand the $Date here.
20033
20034 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20035
20036         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
20037
20038 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20039
20040         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
20041         memcmp if strcoll doesn't work.
20042
20043 2002-12-31  Bruno Haible  <bruno@clisp.org>
20044
20045         * lib/utime.c (utime_null): No need to call ftruncate if the file was
20046         nonempty.
20047
20048 2002-12-31  Bruno Haible  <bruno@clisp.org>
20049
20050         * lib/memcoll.c (STRCOLL): New macro.
20051         (memcoll): Use it.
20052
20053 2002-12-31  Bruno Haible  <bruno@clisp.org>
20054
20055         * lib/localcharset.h: New file.
20056         * lib/localcharset.c: Include it.
20057         * lib/unicodeio.c: Likewise.
20058
20059 2002-12-31  Bruno Haible  <bruno@clisp.org>
20060
20061         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
20062         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
20063
20064 2002-12-31  Bruno Haible  <bruno@clisp.org>
20065
20066         * lib/getline.h: Include <stddef.h>, for size_t.
20067
20068         * lib/unicodeio.h: Include <stddef.h>, for size_t.
20069         * lib/unicodeio.c: Don't include <stddef.h>.
20070
20071 2002-12-31  Bruno Haible  <bruno@clisp.org>
20072
20073         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
20074         HAVE_TM_ZONE.
20075
20076 2002-12-24  Karl Berry  <karl@gnu.org>
20077
20078         * config/config.guess: update from prep.
20079
20080 2002-12-24  Bruno Haible  <bruno@clisp.org>
20081
20082         General infrasructure.
20083         * m4/README: Rewritten.
20084         * m4/onceonly.m4: New file.
20085         * m4/onceonly_2_57.m4: New file.
20086
20087         Module atexit.
20088         * m4/atexit.m4: New file.
20089
20090         Module strtod.
20091         * m4/strtod.m4: New file.
20092
20093         Module strtol.
20094         * m4/strtol.m4: New file.
20095
20096         Module strtoul.
20097         * m4/strtoul.m4: New file.
20098
20099         Module memchr.
20100         * m4/memchr.m4: New file.
20101
20102         Module memcmp.
20103         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
20104         (jm_FUNC_MEMCMP): Invoke it.
20105
20106         Module memcpy.
20107         * m4/memcpy.m4: New file.
20108
20109         Module memmove.
20110         * m4/memmove.m4: New file.
20111
20112         Module memset.
20113         * m4/memset.m4: New file.
20114
20115         Module strcspn.
20116         * m4/strcspn.m4: New file.
20117
20118         Module strpbrk.
20119         * m4/strpbrk.m4: New file.
20120
20121         Module strstr.
20122         * m4/strstr.m4: New file.
20123
20124         Module strerror.
20125         * m4/strerror.m4: New file.
20126
20127         Module mktime.
20128         * m4/mktime.m4: Renamed from jm-mktime.m4.
20129         (gl_PREREQ_MKTIME): New macro.
20130         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
20131
20132         Module malloc.
20133         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
20134         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
20135         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
20136
20137         Module realloc.
20138         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
20139         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
20140         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
20141
20142         Module strftime.
20143         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
20144         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
20145         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
20146         gl_TM_GMTOFF.
20147         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
20148
20149         Module xalloc.
20150         * m4/xalloc.m4: New file.
20151
20152         Module alloca.
20153         * m4/alloca.m4: New file.
20154
20155         Module putenv.
20156         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
20157         (jm_FUNC_PUTENV): Invoke it.
20158
20159         Module setenv.
20160         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
20161         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
20162         when invoked twice.
20163         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
20164         gt_FUNC_SETENV.
20165
20166         Module memrchr.
20167         * m4/memrchr.m4: New file.
20168
20169         Module stpcpy.
20170         * m4/stpcpy.m4: New file.
20171
20172         Module strcase.
20173         * m4/strcase.m4: New file.
20174
20175         Module strdup.
20176         * m4/strdup.m4: New file.
20177
20178         Module strnlen.
20179         * m4/strnlen.m4: New file.
20180
20181         Module strndup.
20182         * m4/strndup.m4: New file.
20183
20184         Module xstrtod.
20185         * m4/xstrtod.m4: New file.
20186
20187         Module xstrtol.
20188         * m4/xstrtol.m4: New file.
20189
20190         Module getdate.
20191         * m4/getdate.m4: New file.
20192
20193         Module unlocked-io.
20194         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
20195         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
20196         * m4/jm-glibc-io.m4n: Remove file.
20197
20198         Module long-options.
20199         * m4/long-options.m4: New file.
20200
20201         Module md5.
20202         * m4/md5.m4: New file.
20203
20204         Module sha.
20205         * m4/sha.m4: New file.
20206
20207         Module getstr.
20208         * m4/getstr.m4: New file.
20209
20210         Module getline.
20211         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
20212         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
20213         <sys/types.h>, for size_t. Use the function name gnu_getline, not
20214         simply getline. Infoke gl_PREREQ_GETLINE.
20215
20216         Module obstack.
20217         * m4/obstack.m4: New file.
20218
20219         Module hash.
20220         * m4/hash.m4: New file.
20221
20222         Module readtokens.
20223         * m4/readtokens.m4: New file.
20224
20225         Module strverscmp.
20226         * m4/strverscmp.m4: New file.
20227
20228         Module stdbool.
20229         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
20230         OSF/1.
20231
20232         Module strtoll.
20233         * m4/strtoll.m4: New file.
20234
20235         Module strtoull.
20236         * m4/strtoull.m4: New file.
20237
20238         Module strtoimax.
20239         * m4/strtoimax.m4: New file.
20240
20241         Module strtoumax.
20242         * m4/strtoumax.m4: New file.
20243
20244         Module xstrtoimax.
20245         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
20246         jm_AC_PREREQ_XSTRTOIMAX.
20247         Moved the strtol prerequisites to strtol.m4.
20248         Moved the strtoll prerequisites to strtoll.m4.
20249         Moved the strtoimax prerequisites to strtoimax.m4.
20250
20251         Module xstrtoumax.
20252         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
20253         jm_AC_PREREQ_XSTRTOUMAX.
20254         Moved the strtoul prerequisites to strtoul.m4.
20255         Moved the strtoull prerequisites to strtoull.m4.
20256         Moved the strtoumax prerequisites to strtoumax.m4.
20257
20258         Module chown.
20259         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
20260         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
20261
20262         Module dup2.
20263         * m4/dup2.m4: New file.
20264
20265         Module ftruncate.
20266         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
20267         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
20268
20269         Module getgroups.
20270         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
20271         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
20272
20273         Module gettimeofday.
20274         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
20275         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
20276         gl_PREREQ_GETTIMEOFDAY.
20277
20278         Module mkdir.
20279         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
20280         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
20281
20282         Module mkstemp.
20283         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
20284         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
20285         jm_AC_TYPE_UINTMAX_T.
20286         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
20287
20288         Module stat.
20289         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
20290         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
20291
20292         Module lstat.
20293         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
20294         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
20295
20296         Module timespec.
20297         * m4/timespec.m4 (gl_TIMESPEC): New macro.
20298         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
20299         * m4/st_mtim.m4: Indentation.
20300
20301         Module nanosleep.
20302         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
20303         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
20304         gl_PREREQ_NANOSLEEP.
20305
20306         Module regex.
20307         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
20308         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
20309         (gl_REGEX): New macro.
20310
20311         Module rename.
20312         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
20313         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
20314
20315         Module rmdir.
20316         * m4/rmdir.m4: New file.
20317
20318         Module utime.
20319         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
20320         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
20321         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
20322
20323         Module dirname.
20324         * m4/dirname.m4: New file.
20325
20326         Module getopt.
20327         * m4/getopt.m4: New file.
20328
20329         Module unistd-safer.
20330         * m4/unistd-safer.m4: New file.
20331
20332         Module fnmatch.
20333         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
20334         declaration.
20335         (gl_PREREQ_FNMATCH_EXTRA): New macro.
20336         (gl_FUNC_FNMATCH_POSIX): New macro.
20337         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
20338         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
20339         simply fnmatch.
20340
20341         Module exclude.
20342         * m4/exclude.m4: New file.
20343
20344         Module human.
20345         * m4/human.m4: New file.
20346
20347         Module acl.
20348         * m4/acl.m4: Nop.
20349
20350         Module backupfile.
20351         * m4/backupfile.m4: New file.
20352         * m4/d-ino.m4: Indentation.
20353
20354         Module fsusage.
20355         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
20356         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
20357         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
20358
20359         Module dirfd.
20360         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
20361         requirements.
20362
20363         Module euidaccess.
20364         * m4/euidaccess.m4: New file.
20365
20366         Module file-type.
20367         * m4/file-type.m4: New file.
20368
20369         Module fileblocks.
20370         * m4/fileblocks.m4: New file.
20371
20372         Module filemode.
20373         * m4/filemode.m4: New file.
20374
20375         Module isdir.
20376         * m4/isdir.m4: New file.
20377
20378         Module lchown.
20379         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
20380         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
20381
20382         Module makepath.
20383         * m4/makepath.m4: New file.
20384
20385         Module modechange.
20386         * m4/modechange.m4: New file.
20387
20388         Module mountlist.
20389         * m4/mountlist.m4: New file.
20390         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
20391         Indentation.
20392
20393         Module path-concat.
20394         * m4/path-concat.m4: New file.
20395
20396         Module pathmax.
20397         * m4/pathmax.m4: New file.
20398
20399         Module same.
20400         * m4/same.m4: New file.
20401
20402         Module save-cwd.
20403         * m4/save-cwd.m4: New file.
20404
20405         Module savedir.
20406         * m4/savedir.m4: New file.
20407
20408         Module xgetcwd.
20409         * m4/xgetcwd.m4: New file.
20410         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
20411
20412         Module xreadlink.
20413         * m4/xreadlink.m4: New file.
20414
20415         Module safe-read.
20416         * m4/safe-read.m4: New file.
20417
20418         Module safe-write.
20419         * m4/safe-write.m4: New file.
20420
20421         Module closeout.
20422         * m4/closeout.m4: New file.
20423
20424         Module stdio-safer.
20425         * m4/stdio-safer.m4: New file.
20426
20427         Module getpass.
20428         * m4/getpass.m4: New file.
20429
20430         Module getugroups.
20431         * m4/getugroups.m4: New file.
20432
20433         Module group-member.
20434         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
20435         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
20436
20437         Module idcache.
20438         * m4/idcache.m4: New file.
20439
20440         Module userspec.
20441         * m4/userspec.m4: New file.
20442
20443         Module gettime.
20444         * m4/clock_time.m4: New file.
20445         * m4/gettime.m4: New file.
20446
20447         Module settime.
20448         * m4/settime.m4: New file.
20449
20450         Module posixtm.
20451         * m4/posixtm.m4: New file.
20452
20453         Module gethostname.
20454         * m4/gethostname.m4: New file.
20455
20456         Module canon-host.
20457         * m4/canon-host.m4: New file.
20458
20459         Module gettext.
20460         * m4/codeset.m4: New file, from gettext-0.11.5.
20461         * m4/gettext.m4: New file, from gettext-0.11.5.
20462         * m4/glibc21.m4: New file, from gettext-0.11.5.
20463         * m4/iconv.m4: New file, from gettext-0.11.5.
20464         * m4/intdiv0.m4: New file, from gettext-0.11.5.
20465         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
20466         * m4/inttypes.m4: New file, from gettext-0.11.5.
20467         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
20468         * m4/isc-posix.m4: New file, from gettext-0.11.5.
20469         * m4/lcmessage.m4: New file, from gettext-0.11.5.
20470         * m4/lib-ld.m4: New file, from gettext-0.11.5.
20471         * m4/lib-link.m4: New file, from gettext-0.11.5.
20472         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
20473         * m4/progtest.m4: New file, from gettext-0.11.5.
20474         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
20475         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
20476         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
20477
20478         Module localcharset.
20479         * m4/localcharset.m4: New file.
20480
20481         Module hard-locale.
20482         * m4/hard-locale.m4: New file.
20483
20484         Module mbswidth.
20485         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
20486         onceonly macros.
20487         * m4/mbrtowc.m4: Add comment.
20488
20489         Module memcasecmp.
20490         * m4/memcasecmp.m4: New file.
20491
20492         Module memcoll.
20493         * m4/memcoll.m4: New file.
20494
20495         Module unicodeio.
20496         * m4/unicodeio.m4: New file.
20497
20498         Module rpmatch.
20499         * m4/rpmatch.m4: New file.
20500
20501         Module yesno.
20502         * m4/yesno.m4: New file.
20503
20504         Module exitfail.
20505         * m4/exitfail.m4: New file.
20506
20507         Module c-stack.
20508         * m4/c-stack.m4 (gl_C_STACK): New macro.
20509         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
20510
20511         Module error.
20512         * m4/error.m4 (gl_ERROR): New macro.
20513         (jm_PREREQ_ERROR): Use onceonly macros.
20514
20515         Module fatal.
20516         * m4/fatal.m4: New file.
20517
20518         Module getloadavg.
20519         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
20520         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
20521
20522         Module getpagesize.
20523         * m4/getpagesize.m4: New file.
20524
20525         Module getusershell.
20526         * m4/getusershell.m4: New file.
20527
20528         Module physmem.
20529         * m4/physmem.m4: New file.
20530
20531         Module posixver.
20532         * m4/posixver.m4: New file.
20533
20534         Module quotearg.
20535         * m4/quotearg.m4: New file.
20536
20537         Module quote.
20538         * m4/quote.m4: New file.
20539
20540         Module readutmp.
20541         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
20542
20543         Module sig2str.
20544         * m4/sig2str.m4: New file.
20545
20546         Other.
20547         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
20548         ulonglong.m4.
20549         * m4/intmax_t.m4: New file.
20550         * m4/d-type.m4: Indentation.
20551         * m4/jm-macros.m4: Update.
20552         * m4/prereq.m4 (jm_PREREQ): Update.
20553         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
20554         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
20555         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
20556         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
20557         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
20558         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
20559         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
20560         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
20561         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
20562         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
20563         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
20564         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
20565         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
20566         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
20567         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
20568         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
20569         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
20570         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
20571         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
20572
20573 2002-12-24  Bruno Haible  <bruno@clisp.org>
20574
20575         * MODULES.txt: Update according to m4/ changes.
20576
20577         Module gettext.
20578         * config.rpath: New file, from gettext-0.11.5.
20579
20580         * modules/*: New module descriptions.
20581         * gnulib-tool: New file.
20582         * MODULES.html.sh: New file.
20583
20584 2002-12-21  Karl Berry  <karl@gnu.org>
20585
20586         * doc/fdl.texi: update to version 1.2.
20587
20588 2002-12-19  Karl Berry  <karl@gnu.org>
20589
20590         * config/config.guess: update from prep.
20591
20592 2002-12-18  Bruno Haible  <bruno@clisp.org>
20593
20594         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
20595         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
20596
20597 2002-12-17  Bruno Haible  <bruno@clisp.org>
20598
20599         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
20600         stdlib.h, string.h.
20601
20602 2002-12-17  Bruno Haible  <bruno@clisp.org>
20603
20604         * lib/canon-host.c (strdup): Remove unused declaration.
20605
20606         * lib/fsusage.c: Include full_read.h.
20607         (get_fs_usage): Use full_read instead of safe_read.
20608
20609         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
20610
20611 2002-12-12  Karl Berry  <karl@gnu.org>
20612
20613         * config/config.guess: update from prep.
20614
20615 2002-12-11  Bruno Haible  <bruno@clisp.org>
20616
20617         * m4/setenv.m4: New file, from gettext-0.11.5.
20618
20619 2002-12-11  Bruno Haible  <bruno@clisp.org>
20620
20621         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
20622         not unsetenv().
20623         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
20624         modifications:
20625
20626         2002-12-11  Bruno Haible  <bruno@clisp.org>
20627
20628                 * setenv.c (alloca): Fall back to malloc.
20629                 (freea): New macro.
20630                 (setenv): Use freea() to free memory allocated with alloca().
20631
20632         2002-11-13  Bruno Haible  <bruno@clisp.org>
20633
20634                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
20635                 function declarations.
20636                 * unsetenv.c (unsetenv): Likewise.
20637
20638         2002-03-04  Bruno Haible  <bruno@clisp.org>
20639
20640                 Portability to AIX 4.3.3.
20641                 * unsetenv.c: New file, extracted from setenv.c.
20642                 * setenv.c: Move the unsetenv() function to unsetenv.c.
20643
20644         2001-12-20  Bruno Haible  <bruno@clisp.org>
20645
20646                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
20647                 use malloc instead. For SunOS 4.
20648
20649         2001-12-11  Bruno Haible  <bruno@clisp.org>
20650
20651                 * setenv.c: Declare alloca.
20652                 (compar_fn_t): New typedef.
20653                 (KNOWN_VALUE, STORE_VALUE): Use it.
20654
20655         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
20656         setenv.h.
20657
20658 2002-12-10  Paul Eggert  <eggert@twinsun.com>
20659
20660         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
20661         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
20662         Choose values that are less likely to collide with system fnmatch
20663         options.
20664         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
20665         defined (e.g., a pure POSIX system).
20666         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
20667         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
20668
20669 2002-12-06  Paul Eggert  <eggert@twinsun.com>
20670
20671         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
20672         a pain in practice to deal with generated m4 files.  This change
20673         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
20674
20675         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
20676         and jm-glibc-io.m4, as they are no longer a special case.
20677         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
20678         kludge and the auto-generation stuff.  Check only whether the
20679         functions are declared, not whether they exist, since older hosts
20680         that don't declare the functions can't use the optimization anyway.
20681
20682 2002-12-06  Jim Meyering  <jim@meyering.net>
20683
20684         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
20685
20686         Merge in changes from libc's misc/error.c, in preparation
20687         for the merge of gnulib's changes back into libc.
20688
20689         * lib/error.c (_): Define only if not already defined.
20690         Move definition to follow all #include directives.
20691         Include unlocked-io.h only if !_LIBC.
20692         [_LIBC]: Include <libio/libioP.h>.
20693         [USE_IN_LIBIO]: Include <libio/iolibio.h>
20694         (fflush): Tweak definition to use INTUSE.
20695         (putc): Define.
20696
20697 2002-12-05  Paul Eggert  <eggert@twinsun.com>
20698
20699         * lib/alloca.c [defined emacs]: Include "lisp.h".
20700         (xalloc_die) [defined emacs]: New macro.
20701         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
20702         [! defined emacs]: Include <xalloc.h>.
20703         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
20704         (pointer): Typedef to POINTER_TYPE *.
20705         (malloc): Remove decl; we now always use xmalloc.
20706         (alloca): Use old-style definition, since Emacs needs this.
20707         Check for arithmetic overflow when computing combined size.
20708
20709 2002-12-04  Paul Eggert  <eggert@twinsun.com>
20710
20711         Do not generate unlocked-io.h automatically, since it's easier to
20712         maintain it by hand.
20713
20714         * lib/unlocked-io.h: New file, from GNU diffutils,
20715         but with proper copyright notice and attribution.
20716         * lib/gen-uio: Remove.
20717         * lib/Makefile.am: Add copyright notice.
20718         (libfetish_a_SOURCES): Add unlocked-io.h.
20719         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
20720         (DISTCLEANFILES, io_functions): Remove macros.
20721         (EXTRA_DIST): Remove gen_uio.
20722         (unlocked-io.h): Remove rule.
20723
20724 2002-12-04  Jim Meyering  <jim@meyering.net>
20725
20726         Reflect the fact that stat.c and lstat.c are no longer generated.
20727         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
20728         (DISTCLEANFILES): Likewise.
20729         (EXTRA_DIST): Likewise.
20730         (all_local): Don't depend on stat.c or lstat.c.
20731         (stat.c, lstat.c): Remove rules.
20732         (EXTRA_DIST): Remove xstat.in.
20733
20734         * lib/xstat.in: Remove file.  Contents moved into stat.c.
20735         * lib/stat.c: New file.  Contents mostly from xstat.in.
20736         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
20737         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
20738
20739         * lib/safe-read.c: Rework so that it may serve to define safe_write,
20740         too.
20741         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
20742
20743 2002-12-03  Jim Meyering  <jim@meyering.net>
20744
20745         * lib/safe-read.c, safe-write.c: Change variable names and comments,
20746         but not semantics, to minimize the differences between these two files.
20747         (safe_read): Change comment to mention SAFE_READ_ERROR.
20748
20749         * lib/safe-read.c (IS_EINTR): Define.
20750         (safe_read): Use IS_EINTR in place of in-function cpp directives.
20751
20752 2002-12-02  Jim Meyering  <jim@meyering.net>
20753
20754         * lib/safe-read.c (EINTR): Define.
20755         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
20756         (INT_MAX): Provide fallback.
20757         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
20758
20759         * lib/safe-read.h (SAFE_READ_ERROR): Define.
20760
20761 2002-12-02  Bruno Haible  <bruno@clisp.org>
20762
20763         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
20764         Define, taken from safe-read.c.
20765         (INT_MAX): Provide fallback.
20766         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
20767         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
20768
20769         * lib/safe-read.c (EINTR): Remove definition.
20770         (safe_read): Don't use EINTR if it is absent.
20771
20772 2002-12-01  Jim Meyering  <jim@meyering.net>
20773
20774         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
20775         zero.
20776         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
20777
20778 2002-11-27  Paul Eggert  <eggert@twinsun.com>
20779
20780         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
20781         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
20782         with `if (! (value < limit)) abort ();', for readability.
20783
20784 2002-11-26  Karl Berry  <karl@gnu.org>
20785
20786         * lib/strdup.c: copy from libc again, with jim's ok.
20787         * lib/.cppi-disable: re-add strdup.c
20788
20789 2002-11-25  Karl Berry  <karl@gnu.org>
20790
20791         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
20792         instead of "strtol.c".
20793
20794 2002-11-25  Karl Berry  <karl@gnu.org>
20795
20796         * config/install-sh: update from automake for variable quoting, $0 in
20797         error msgs, etc.
20798
20799         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
20800         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
20801         entry.
20802
20803 2002-11-25  Jim Meyering  <jim@meyering.net>
20804
20805         * lib/mktime.c: Sync from libc, now that it has the latest fix.
20806
20807 2002-11-24  Karl Berry  <karl@gnu.org>
20808
20809         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
20810         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
20811
20812 2002-11-24  Jim Meyering  <jim@meyering.net>
20813
20814         Update from coreutils:
20815
20816         * lib/mktime.c: Merge in changes from libc.
20817
20818         Avoid a link-time failure on some Linux systems.
20819         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
20820         (otherwise).
20821         (__mon_yday): Declare with the STATIC attribute.
20822         (__mktime_internal): Likewise.
20823         Based on a report from Greg Schafer.
20824
20825 2002-11-23  Jim Meyering  <jim@meyering.net>
20826
20827         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
20828         Use `unsigned', not `int', as type of index.
20829
20830         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
20831
20832         * lib/fsusage.c: Remove unneeded parentheses around operands of
20833         `defined'.
20834
20835 2002-11-22  Paul Eggert  <eggert@twinsun.com>
20836
20837         * lib/quotearg.h: Allow multiple inclusion by surrounding with
20838         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
20839         so that we can be included first.
20840         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
20841         * lib/quotearg.c: Include quotearg.h immediately after config.h.
20842         No need to include stddef.h or sys/types.h any more.
20843         Surround local include files with "", not "<>".
20844         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
20845         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
20846         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
20847         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20848         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20849         (ISPRINT): Remove; no longer needed now that we assume C89.
20850
20851         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
20852         Preserve errno.
20853
20854         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
20855         quotearg_char): Use SIZE_MAX rather than
20856         (size_t) -1 when we are talking about "infinity".
20857
20858         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
20859
20860 2002-11-22  Paul Eggert  <eggert@twinsun.com>
20861
20862         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
20863         hint that one should use `if (! x) abort ();' rather than `assert
20864         (x);', and anyway it's one less thing to worry about configuring.
20865         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
20866         hash_rehash, hash_insert): Use abort rather than assert.
20867
20868 2002-11-22  Bruno Haible  <bruno@clisp.org>
20869
20870         * lib/safe-read.h: Assume C89. Add comments.
20871         (safe_read): Change return type to size_t.
20872         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
20873         byte counts > SSIZE_MAX correctly.
20874         * lib/safe-write.h: New file.
20875         * lib/safe-write.c: New file.
20876         * lib/full-read.h: New file.
20877         * lib/full-read.c: New file.
20878         * lib/full-write.h: Assume C89. Add comments.
20879         * lib/full-write.c: Include safe-write.h.
20880         (full_write): Rewritten to use safe_write.
20881         Suggested by Jim Meyering and Paul Eggert.
20882
20883 2002-11-21  Jim Meyering  <jim@meyering.net>
20884
20885         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
20886
20887         Merge in changes from the coreutils.
20888
20889         2002-09-25  Paul Eggert  <eggert@twinsun.com>
20890         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
20891         <stdint.h>.
20892         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
20893         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
20894         int.  Work more efficiently if X is the same width as uintmax_t.
20895         Do not compare X to -1, to avoid bogus compiler warning.
20896         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
20897         Don't assume that f_frsize and f_bsize are the same type.
20898
20899         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
20900         warning on FreeBSD.
20901
20902         * lib/makepath.c (make_path): Restore umask *before* creating the final
20903         component.
20904         (make_path): Minor reformatting.
20905
20906         * lib/xmalloc.c: Adjust to work with new autoconf macros,
20907         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
20908         HAVE_MALLOC/HAVE_REALLOC.
20909
20910         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
20911         dummy ones.  At least on GNU/Linux systems, `auto' means something
20912         else.
20913         From Michael Stone.
20914
20915 2002-11-21  Bruno Haible  <bruno@clisp.org>
20916
20917         Remove case insensitive option matching.
20918         * lib/argmatch.h (argcasematch): Remove declaration.
20919         (ARGCASEMATCH): Remove macro.
20920         (__xargmatch_internal): Remove case_sensitive argument.
20921         (XARGMATCH): Update.
20922         (XARGCASEMATCH): Remove macro.
20923         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
20924         case_sensitive argument.
20925         (argcasematch): Remove function.
20926         (__xargmatch_internal): Remove case_sensitive argument.
20927         (main): Use XARGMATCH instead of XARGCASEMATCH.
20928
20929         * lib/xmalloc.c: Change compile-time error message. Add comment about
20930         required autoconf version.
20931
20932 2002-11-20  Paul Eggert  <eggert@twinsun.com>
20933
20934         Merge argmatch cleanups from Bison.  Assume C89.
20935
20936         * lib/argmatch.c: Include config.h here, not in argmatch.h.
20937         Include stdlib.h, for EXIT_FAILURE.
20938         Always include <string.h>, since we assume C89.
20939         (EXIT_FAILURE): Remove pre-C89 bug workaround.
20940         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
20941         Include <stddef.h> instead, since it's all we need for size_t.
20942         (PARAMS): Remove.  All uses removed.
20943         (ARRAY_CARDINALITY): Do not bother to #undef.
20944         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
20945         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20946         Remove unnecessary parentheses.
20947         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20948         Insert necessary parentheses.
20949         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
20950         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
20951
20952 2002-11-19  Bruno Haible  <bruno@clisp.org>
20953
20954         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
20955         * lib/mbswidth.h: Include <stddef.h>, for size_t.
20956
20957         * lib/mbswidth.h (PARAMS): Remove macro.
20958         (mbswidth, mbsnwidth): Use ANSI C function declarations.
20959         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
20960
20961         * lib/gcd.h (PARAMS): Remove macro.
20962         (gcd): Use ANSI C function declarations.
20963         * lib/gcd.c (gcd): Likewise.
20964
20965 2002-11-15  Bruno Haible  <bruno@clisp.org>
20966
20967         * lib/strcspn.c: Include <stddef.h>.
20968         (strcspn): Use ANSI C function declaration. Change return type to
20969         size_t. Use NULL.
20970         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
20971         (strpbrk): Use NULL.
20972         * lib/strpbrk.h (PARAMS): Remove macro.
20973         (strpbrk): Use ANSI C function declaration.
20974         * lib/strstr.c: Don't include <sys/types.h>.
20975         * lib/strstr.h (PARAMS): Remove macro.
20976         (strstr): Use ANSI C function declarations.
20977
20978 2002-11-14  Karl Berry  <karl@gnu.org>
20979
20980         * config/mkinstalldirs: `do' on separate line, instead of
20981         `for var; do'.
20982
20983 2002-11-06  Bruno Haible  <bruno@clisp.org>
20984
20985         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
20986         * lib/gcd.c (gcd): Likewise.
20987
20988 2002-11-05  Bruno Haible  <bruno@clisp.org>
20989
20990         * lib/gcd.h: New file, from gettext-0.11.5.
20991         * lib/gcd.c: New file, from gettext-0.11.5.
20992
20993 2002-11-05  Bruno Haible  <bruno@clisp.org>
20994
20995         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20996         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20997         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20998         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20999
21000         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
21001         <libintl.h>.
21002         * lib/makepath.c: Include gettext.h instead of <locale.h> and
21003         <libintl.h>.
21004
21005         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
21006         * lib/human.c: Include gettext.h instead of <libintl.h>.
21007         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
21008         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
21009         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
21010         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
21011         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
21012         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
21013         (textdomain): Remove definition.
21014         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
21015
21016         * lib/long-options.c: Remove include of <libintl.h> and definition of
21017         _.
21018         * lib/same.c: Remove include of <libintl.h> and definition of _.
21019
21020 2002-11-04  Owen Taylor  <otaylor@redhat.com>
21021
21022         * lib/config.charset: A few additions for Solaris.
21023
21024 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21025
21026         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
21027         * lib/localcharset.c (locale_charset): Declare as extern "C".
21028
21029 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21030
21031         * lib/config.charset: msdos in uk_UA uses CP1125.
21032
21033 2002-11-04  Bruno Haible  <bruno@clisp.org>
21034
21035         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
21036         * lib/strcase.h: New file, from GNU gettext-0.11.5.
21037         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
21038         * lib/strstr.h: New file, from GNU gettext-0.11.5.
21039         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
21040
21041 2002-11-04  Bruno Haible  <bruno@clisp.org>
21042
21043         * lib/localcharset.c (locale_charset): Don't return an empty string.
21044
21045 2002-11-04  Bruno Haible  <bruno@clisp.org>
21046
21047         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
21048         aliases.
21049
21050 2002-11-04  Bruno Haible  <bruno@clisp.org>
21051
21052         * lib/config.charset: Update for newest glibc. Add canonical names
21053         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
21054
21055 2002-11-04  Bruno Haible  <bruno@clisp.org>
21056
21057         * lib/config.charset: Add support for NetBSD.
21058
21059 2002-11-04  Bruno Haible  <bruno@clisp.org>
21060
21061         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
21062
21063 2002-11-01  Bruno Haible  <bruno@clisp.org>
21064
21065         * configure.in: Add AC_CONFIG_AUX_DIR call.
21066         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
21067         test/Makefile.
21068         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
21069
21070 2002-09-28  Karl Berry  <karl@gnu.org>
21071
21072         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
21073         installed automake until the next release, since changes have been
21074         made.
21075
21076 2002-09-25  Karl Berry  <karl@gnu.org>
21077
21078         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
21079         * lib/getopt*: copy from libc/posix.
21080         * lib/gettext.h: copy from gettext.
21081         * lib/.cppi-disable: add strdup.c, gettext.h.
21082
21083 2002-09-25  Karl Berry  <karl@gnu.org>
21084
21085         * config/srclist.txt: enable gettext.h check.
21086         * config/config.{guess,sub}: update from prep.
21087         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
21088                 from automake 1.6.3.
21089         See srclist*.
21090
21091 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
21092
21093         * regex.c (PATFETCH): Remove the translating fetch.
21094         (PATFETCH_RAW): Rename to PATFETCH.
21095         (set_image_of_range): New fun.
21096         (SET_RANGE_TABLE_WORK_AREA): Use it.
21097         (regex_compile): Don't translate the pattern chars so eagerly.
21098         Only do it when inserting an `exactn' bytecode or when handling
21099         a char-range.
21100         (mutually_exclusive_p): Avoid empty statement.
21101
21102 2002-07-06  Jim Meyering  <meyering@lucent.com>
21103
21104         * m4/README: Don't mention Makefile.am.in.
21105         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
21106
21107 2002-07-01  Jim Meyering  <meyering@lucent.com>
21108
21109         * lib/c-stack.c: Include sys/time.h.
21110         From Volker Borchert.
21111
21112 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21113
21114         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
21115
21116 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21117
21118         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
21119         New macro.  Use it uniformly instead of
21120         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
21121         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
21122         reported by Vin Shelton.
21123
21124 2002-06-22  Paul Eggert  <eggert@twinsun.com>
21125
21126         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
21127         Do not assume SA_SIGINFO behavior.
21128         Bug reported by Jim Meyering on NetBSD 1.5.2.
21129
21130 2002-06-22  Jim Meyering  <meyering@lucent.com>
21131
21132         * m4/c-stack.m4: New file, from diffutils-2.8.2.
21133         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
21134
21135         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
21136         now that configure.ac uses AC_GNU_SOURCE.
21137         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
21138         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
21139
21140         Update to latest tools.  Suggestions from Paul Eggert.
21141         * m4/stdbool.m4: New file, from diffutils-2.8.2.
21142         * m4/gnu-source.m4: Update from diffutils-2.8.2.
21143         * m4/fnmatch.m4: Likewise.
21144         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
21145         to AC_HEADER_STDBOOL
21146
21147 2002-06-22  Jim Meyering  <meyering@lucent.com>
21148
21149         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
21150         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
21151
21152 2002-06-22  Jim Meyering  <meyering@lucent.com>
21153
21154         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
21155
21156         * lib/exitfail.c, exitfail.h: Likewise.
21157         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
21158
21159         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
21160         of fnmatch.h.
21161         (EXTRA_DIST): Add fnmatch_loop.c.
21162         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
21163
21164         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
21165         * lib/fnmatch.c: Update from diffutils-2.8.2.
21166         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
21167         * lib/fnmatch.h: Remove file.
21168
21169 2002-06-21  Jim Meyering  <meyering@lucent.com>
21170
21171         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
21172         * m4/mbrtowc.m4: Likewise.
21173
21174         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
21175         * m4/mbswidth.m4: Reflect name change:
21176         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
21177         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21178
21179         * m4/lib-link.m4: Update from gettext-0.11.2.
21180         * m4/gettext.m4: Likewise.
21181
21182         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
21183         From Alfred M. Szmidt.
21184
21185 2002-06-18  Paul Eggert  <eggert@twinsun.com>
21186
21187         * lib/file-type.h: Report an error if neither S_ISREG nor
21188         S_IFREG is defined, instead of using a test specific to glibc
21189         2.2.  This should be safe, since POSIX requires S_ISREG and
21190         Unix Version 7 had S_IFREG.  We don't need to check for
21191         <sys/types.h> since we don't use any symbols that it defines.
21192
21193 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
21194
21195         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
21196         $@-t, so that each temporary file name is unique and valid in the first
21197         8 characters, for operation under DOS.
21198
21199 2002-06-15  Paul Eggert  <eggert@twinsun.com>
21200
21201         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
21202
21203 2002-06-15  Jim Meyering  <meyering@lucent.com>
21204
21205         Work even with DJGPP 2.03, which lacks support for symlinks.
21206         From Richard Dawe.
21207         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
21208         is defined.
21209         * lib/lchown.c (S_ISLNK): Likewise.
21210
21211 2002-06-15  Jim Meyering  <meyering@lucent.com>
21212
21213         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
21214         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
21215         have been included before this file.
21216
21217 2002-06-14  Jim Meyering  <meyering@lucent.com>
21218
21219         * lib/file-type.h: Use the version from diffutils-2.8.2.
21220         * lib/file-type.c: Likewise.
21221
21222 2002-06-07  Jim Meyering  <meyering@lucent.com>
21223
21224         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
21225         They're needed at least for NetBSD 1.5.2.
21226         ($statxfs_includes): Include those same headers.
21227         ($statxfs_includes): Include sys/vfs.h if available.
21228         ($statxfs_includes): Likewise for sys/statvfs.h.
21229         Check for the following members in both structs statfs and statvfs:
21230         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
21231
21232 2002-06-01  Jim Meyering  <meyering@lucent.com>
21233
21234         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
21235         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
21236
21237 2002-05-28  Jim Meyering  <meyering@lucent.com>
21238
21239         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
21240         Reported by Volker Borchert.
21241
21242 2002-05-27  Jim Meyering  <meyering@lucent.com>
21243
21244         Fix a problem seen only on nonconforming systems whereby ls.c's
21245         use of localtime, and then of gettimeofday would cause trouble:
21246         the localtime call used to initialize rpl_gettimeofday's save
21247         mechanism would clobber ls's current local time information so
21248         that in any long listing the first file would always be listed
21249         with date 1970-01-01.  Analysis by Volker Borchert.
21250
21251         * lib/gettimeofday.c (localtime): Undefine.
21252         (rpl_localtime): New function.
21253
21254 2002-05-27  Jim Meyering  <meyering@lucent.com>
21255
21256         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
21257         localtime.
21258
21259         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
21260         use the replacement function; it wouldn't resolve at link time.
21261         Reported by Volker Borchert.
21262
21263 2002-05-22  Jim Meyering  <meyering@lucent.com>
21264
21265         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
21266         file-type.h.
21267         * lib/file-type.h: New file.
21268         * lib/file-type.c (file_type): New file/function.  Extracted from
21269         diffutils.
21270
21271 2002-04-30  Jim Meyering  <meyering@lucent.com>
21272
21273         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
21274
21275 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21276
21277         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
21278
21279 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21280
21281         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
21282         Do not check for alloca.h (no longer used) or stdbool.h (was never
21283         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
21284
21285 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21286
21287         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
21288
21289 2002-04-29  Jim Meyering  <meyering@lucent.com>
21290
21291         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
21292         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
21293         Use AC_FUNC_STRNLEN here instead.
21294
21295         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
21296         With autoconf-2.53a, it's part of AC_PROG_CC.
21297
21298 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21299
21300         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
21301         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
21302
21303 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21304
21305         * lib/sig2str.h, lib/sig2str.c: New files.
21306         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
21307
21308 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21309
21310         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
21311         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
21312         of 127, since 64 is the largest conceivable number for ancient
21313         nonstandard hosts.
21314         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
21315
21316 2002-04-28  Jim Meyering  <meyering@lucent.com>
21317
21318         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
21319
21320 2002-04-24  Jim Meyering  <meyering@lucent.com>
21321
21322         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
21323         (jm_PREREQ): Use it.
21324
21325         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
21326         mach/mach.h fcntl.h.
21327         Check for this function: setlocale.
21328
21329 2002-04-24  Jim Meyering  <meyering@lucent.com>
21330
21331         * lib/gettext.h: New file, from Gettext.
21332         * lib/Makefile.am (INCLUDES): Remove -I../intl.
21333         (libfetish_a_SOURCES): Add gettext.h.
21334
21335 2002-04-16  Jim Meyering  <meyering@lucent.com>
21336
21337         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
21338         ut_pid, ut_id, ut_exit.
21339
21340 2002-04-16  Jim Meyering  <meyering@lucent.com>
21341
21342         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
21343         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
21344         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
21345
21346 2002-04-12  Jim Meyering  <meyering@lucent.com>
21347
21348         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
21349         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
21350         existence of the getmntinfo function.  Needed for Darwin 5.3.
21351
21352         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
21353         This is necessary at least on Darwin 5.3.
21354
21355         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
21356         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
21357         strnlen.o in the library, and that makes some versions of ranlib
21358         object.
21359
21360 2002-04-12  Jim Meyering  <meyering@lucent.com>
21361
21362         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
21363
21364 2002-04-09  Jim Meyering  <meyering@lucent.com>
21365
21366         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
21367         to be more precise.  Rather than saying we're checking whether the
21368         function `works', say what we're testing.
21369         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
21370         Reported by Bruno Haible.
21371
21372 2002-03-10  Jim Meyering  <meyering@lucent.com>
21373
21374         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
21375         Suggestion from Santiago Vila.
21376
21377 2002-03-08  Jim Meyering  <meyering@lucent.com>
21378
21379         * lib/rename.c: Mention that this wrapper is needed also on
21380         mips-dec-ultrix4.4 systems.
21381
21382 2002-03-02  Jim Meyering  <meyering@lucent.com>
21383
21384         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
21385         not HAVE_CLOCK_SETTIME.
21386
21387 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21388
21389         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
21390         Check for clock_settime.
21391
21392 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21393
21394         * lib/nanosleep.h: Rename to....
21395         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
21396
21397         * lib/gettime.c: New file.
21398         * lib/settime.c: New file.
21399         * lib/stime.c: Remove.
21400
21401         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
21402         timespec.h.  Remove nanosleep.h.
21403
21404 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21405
21406         * m4/acl.m4: New file.
21407         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
21408         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
21409
21410 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21411
21412         * lib/acl.c, lib/acl.h: New files.
21413         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
21414
21415 2002-02-24  Jim Meyering  <meyering@lucent.com>
21416
21417         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
21418         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
21419         cause trouble.  Reported by Nelson Beebe.
21420
21421 2002-02-23  Paul Eggert  <eggert@twinsun.com>
21422
21423         * lib/path-concat.c (xpath_concat): Reorder code to pacify
21424         compilers that don't know that xalloc_die never returns.
21425
21426 2002-02-20  Jim Meyering  <meyering@lucent.com>
21427
21428         * lib/getdate.c: Regenerate using bison-1.33.
21429
21430 2002-02-17  Jim Meyering  <meyering@lucent.com>
21431
21432         * config/config.guess (main): Don't use `head -1'; it's no longer
21433         portable. Use `sed 1q' instead.
21434
21435 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
21436
21437         * m4/codeset.m4: Upgrade to gettext-0.11.
21438         * m4/gettext.m4: Upgrade to gettext-0.11.
21439         * m4/glibc21.m4: Upgrade to gettext-0.11.
21440         * m4/iconv.m4: Upgrade to gettext-0.11.
21441         * m4/isc-posix.m4: Upgrade to gettext-0.11.
21442         * m4/lcmessage.m4: Upgrade to gettext-0.11.
21443         * m4/lib-ld.m4: New file, from gettext-0.11.
21444         * m4/lib-link.m4: New file, from gettext-0.11.
21445         * m4/lib-prefix.m4: New file, from gettext-0.11.
21446         * m4/progtest.m4: Upgrade to gettext-0.11.
21447
21448 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21449
21450         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
21451         (jm_PREREQ): Use it.
21452
21453 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21454
21455         * lib/posixver.c, lib/posixver.h: New files.
21456         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21457
21458 2002-02-02  Paul Eggert  <eggert@twinsun.com>
21459             Bruno Haible  <bruno@clisp.org>
21460
21461         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
21462         (fwrite_success_callback): New declaration.
21463         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
21464         print_unicode_char. Call failure callback instead of error.
21465         (fwrite_success_callback): New function.
21466         (exit_failure_callback): New function.
21467         (fallback_failure_callback): New function.
21468         (print_unicode_char): Call unicode_to_mb.
21469
21470 2002-01-26  Jim Meyering  <meyering@lucent.com>
21471
21472         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
21473         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
21474
21475 2002-01-26  Jim Meyering  <meyering@lucent.com>
21476
21477         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
21478
21479 2002-01-22  Paul Eggert  <eggert@twinsun.com>
21480
21481         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
21482
21483 2002-01-22  Jim Meyering  <meyering@lucent.com>
21484
21485         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
21486         Otherwise, some versions of automake would omit the rule that makes
21487         Makefile from Makefile.in.
21488
21489 2002-01-21  Paul Eggert  <eggert@twinsun.com>
21490
21491         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
21492         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21493         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
21494         (memcoll): Set errno to zero if there is no error.
21495
21496         * lib/quotearg.c (quotearg_buffer_restyled):
21497         Fix bug with quoting buffers containing NUL when backslashing escapes.
21498         This bug was exposed by the other changes in this patch.
21499         (quotearg_n_options): New arg ARGSIZE.
21500         All callers changed.
21501         (quoting_options_from_style): New function.
21502         (quotearg_n_style): Use it.
21503         (quotearg_n_style_mem): New function.
21504
21505         * lib/quotearg.h (quotearg_n_style_mem): New function.
21506
21507 2002-01-19  Jim Meyering  <meyering@lucent.com>
21508
21509         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
21510         Remove useless quotes: DF_PROG="df".
21511         * m4/strnlen.m4: New file.
21512
21513 2002-01-16  Paul Eggert  <eggert@twinsun.com>
21514
21515         * lib/backupfile.c (ISDIGIT): Comment fix.
21516         * lib/getdate.y (ISDIGIT): Likewise.
21517         * lib/posixtm.c (ISDIGIT, year): Likewise.
21518         * lib/strverscmp.c (ISDIGIT): Likewise.
21519         * lib/userspec.c (ISDIGIT): Likewise.
21520
21521 2002-01-16  Jim Meyering  <meyering@lucent.com>
21522
21523         * lib/getdate.y: Add three semicolons, each just before a closing
21524         brace. Bison (as of version 1.31) no longer papers over that mistake.
21525
21526 2002-01-05  Jim Meyering  <meyering@lucent.com>
21527
21528         * lib/version-etc.c (version_etc_copyright): Update copyright year.
21529
21530 2001-12-19  Paul Eggert  <eggert@twinsun.com>
21531
21532         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
21533         not silently exit merely because the output buffer happens to
21534         have nothing pending.
21535
21536 2001-12-18  Paul Eggert  <eggert@twinsun.com>
21537
21538         See the big note in ../ChangeLog.
21539         * lib/human.c (suffixes): Prefer K to k for 1024.
21540         (generate_suffix_backwards): New function.
21541         (human_readable_inexact): Use it.
21542         * lib/xstrtol.c (__xstrtol): If there is no number but there
21543         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
21544         Accept 'K' as well as 'k'.
21545
21546 2001-12-15  Jim Meyering  <meyering@lucent.com>
21547
21548         * lib/regex.h (__restrict_arr): Update from libc.
21549
21550         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
21551         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
21552         (STREQ): Define.
21553
21554 2001-12-14  Jim Meyering  <meyering@lucent.com>
21555
21556         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
21557         Suggestion from Bruno Haible.
21558
21559 2001-12-10  Jim Meyering  <meyering@lucent.com>
21560
21561         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
21562         xrealloc, Instead, include "xalloc.h".
21563         (initbuffer): Don't cast xmalloc return value to char*.
21564         (readline): Reword comment.
21565         Don't cast xrealloc return value to char*
21566         Return NULL, not 0.
21567
21568 2001-12-09  Jim Meyering  <meyering@lucent.com>
21569
21570         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
21571         about `signed and unsigned type in conditional expression'.
21572         * lib/posixtm.c (posix_time_parse): Likewise.
21573
21574         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
21575
21576         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
21577         to avoid a pedantic warning.
21578
21579         * lib/getstr.c: Don't include assert.h.
21580         (getstr): Remove warning-evoking assertions.
21581         Return -1 if offset parameter is out of bounds.
21582         Change the type of a local from int to size_t.
21583
21584         * lib/strftime.c (my_strftime_localtime_r): Include this function
21585         definition in the `#if ! HAVE_TM_GMTOFF' block.
21586
21587         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
21588         Include xalloc.h instead.
21589
21590 2001-12-02  Jim Meyering  <meyering@lucent.com>
21591
21592         * lib/tempname.c: Don't declare getenv, thus reverting the change of
21593         2001-11-18.  It's no longer necessary, now that stdlib.h is always
21594         included.
21595
21596         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
21597         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
21598
21599 2001-11-30  Akim Demaille  <akim@epita.fr>
21600
21601         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
21602         before being defined.
21603
21604 2001-11-27  Paul Eggert  <eggert@twinsun.com>
21605
21606         * lib/quotearg.h (quotearg_n, quotearg_n_style):
21607         First arg is int, not unsigned.
21608         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21609         (SIZE_MAX, UINT_MAX): New macros.
21610         (quotearg_n_options): Abort if N is negative.
21611         Avoid overflow check on hosts where size_t is 64 bits and int
21612         is 32 bits, as overflow is impossible there.
21613         Fix off-by-one typo that caused unnecessary reallocation.
21614
21615 2001-11-27  Jim Meyering  <meyering@lucent.com>
21616
21617         * lib/tempname.c: Merge with version from libc.
21618         * lib/regex.c: Likewise.
21619
21620         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
21621         systems for which STDC_HEADERS is 0, it was not included, resulting in
21622         a warning about an integer-to-pointer conversion problem with getenv.
21623         Reported by Volker Borchert.
21624
21625 2001-11-26  Jim Meyering  <meyering@lucent.com>
21626
21627         * lib/gtod.h: Remove file.
21628         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
21629         * lib/gettimeofday.c: Don't include gtod.h.
21630         (GTOD_init): Remove function.
21631         (rpl_gettimeofday): Do its job here instead, rather than aborting.
21632         Suggestion from Volker Borchert.
21633
21634 2001-11-23  Jim Meyering  <meyering@lucent.com>
21635
21636         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
21637         it.
21638         * lib/hash.c (struct hash_table): Define it here instead.
21639
21640 2001-11-22  Jim Meyering  <meyering@lucent.com>
21641
21642         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
21643
21644 2001-11-20  Jim Meyering  <meyering@lucent.com>
21645
21646         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
21647         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
21648
21649 2001-11-19  Jim Meyering  <meyering@lucent.com>
21650
21651         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
21652         directory.  Use "conftestXXXXXX" as the template.
21653         Suggestion from Paul Eggert.
21654
21655         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
21656         immediately, so the test doesn't mistakenly hit the max-open-files
21657         limit.
21658
21659 2001-11-18  Paul Eggert  <eggert@twinsun.com>
21660
21661         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
21662         (TEMPORARIES): New macro.
21663         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
21664         removes an artificial limitation (e.g. HP-UX 10.20, where
21665         TMP_MAX is 17576).
21666
21667 2001-11-18  Jim Meyering  <meyering@lucent.com>
21668
21669         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
21670
21671 2001-11-18  Jim Meyering  <meyering@lucent.com>
21672
21673         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
21674         on SunOS 4.
21675
21676         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
21677         files will be created before anything else.
21678
21679 2001-11-17  Paul Eggert  <eggert@twinsun.com>
21680
21681         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
21682         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
21683
21684 2001-11-17  Jim Meyering  <meyering@lucent.com>
21685
21686         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
21687         Prompted by a report from Bob Proulx.
21688
21689         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
21690         Instead, require UTILS_FUNC_MKSTEMP.
21691
21692 2001-11-17  Jim Meyering  <meyering@lucent.com>
21693
21694         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
21695         Now, that's done as part of AC_FUNC_STRTOD.
21696
21697 2001-11-17  Jim Meyering  <meyering@lucent.com>
21698
21699         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
21700         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
21701         rather than group writable.  Patch by Juan F. Codagnone.
21702
21703         * lib/readtokens.c: Remove explicit declarations of xmalloc and
21704         xrealloc, Instead, include "xalloc.h".
21705
21706         * lib/mountlist.c: Include unlocked-io.h after all system headers.
21707         Remove explicit declarations of xmalloc, xrealloc,
21708         and xstrdup.  Instead, include "xalloc.h".
21709
21710         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
21711         unlocked-io.h.
21712         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
21713         Likewise.
21714         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
21715
21716         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
21717         Reported by Padraig Brady.
21718
21719         * lib/mkstemp.c: #undef mkstemp.
21720         Include config.h.
21721         (rpl_mkstemp): Rename from mkstemp.
21722         Protoize.
21723
21724 2001-11-16  Jim Meyering  <meyering@lucent.com>
21725
21726         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
21727         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
21728         determine the amount of total physical memory, use pstat_getstatic.
21729         HPUX-11 doesn't define _SC_PHYS_PAGES.
21730         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
21731         If sysconf couldn't be used to determine the amount of available
21732         physical memory, use both pstat_getstatic and pstat_getdynamic.
21733         Based on a patch from Bob Proulx.
21734
21735 2001-11-10  Jim Meyering  <meyering@lucent.com>
21736
21737         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
21738         (jm_PREREQ): Use it.
21739
21740 2001-11-09  Jim Meyering  <meyering@lucent.com>
21741
21742         * m4/jm-macros.m4: Require autoconf-2.52f.
21743         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
21744         Use these AC_-prefixed names, not the AM_-prefixed ones.
21745
21746         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
21747
21748 2001-11-05  Jim Meyering  <meyering@lucent.com>
21749
21750         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
21751
21752 2001-11-04  Jim Meyering  <meyering@lucent.com>
21753
21754         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
21755         $DEFS.
21756
21757 2001-11-03  Jim Meyering  <meyering@lucent.com>
21758
21759         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
21760         of AC_DEFUN.
21761
21762         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
21763         know the name of the variable in the macro definition.
21764
21765 2001-11-03  Jim Meyering  <meyering@lucent.com>
21766
21767         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
21768         in argmatch_to_argument call.
21769
21770         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
21771         argument.
21772
21773         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
21774         e.g., a fault due to an attempt to free a NULL pointer.
21775
21776 2001-11-01  Jim Meyering  <meyering@lucent.com>
21777
21778         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
21779         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
21780
21781 2001-11-01  Jim Meyering  <meyering@lucent.com>
21782
21783         * lib/dirfd.c, lib/dirfd.h: New files.
21784         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
21785
21786         * lib/hash.c (hash_print) [TESTING]: Clean up.
21787
21788 2001-10-22  Paul Eggert  <eggert@twinsun.com>
21789
21790         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
21791         to avoid a warning if -Wall.
21792
21793 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
21794
21795         * README: New file
21796         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
21797         (per RMS's instructions, this is now the canonical source)
21798         * lgpl/, gpl/: New directories.
21799
21800 2001-10-21  Paul Eggert  <eggert@twinsun.com>
21801
21802         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
21803
21804 2001-10-21  Jim Meyering  <meyering@lucent.com>
21805
21806         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
21807         this code would end up calling gettext even in packages built
21808         with --disable-nls.
21809         * lib/getopt.c (_): Likewise.
21810         * lib/regex.c (_): Likewise.
21811
21812 2001-10-20  Paul Eggert  <eggert@twinsun.com>
21813
21814         * m4/error.m4 (jm_PREREQ_ERROR):
21815         Do not invoke AC_CHECK_FUNCS with strerror_r, as
21816         AC_FUNC_STRERROR_R does that.
21817         Check for strerror declaration.
21818
21819         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
21820         are supposed to have them these days.
21821         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
21822         Merge changes from latest Autoconf CVS.
21823         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
21824         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
21825         POSIX decided to standardize on the int flavor of strerror_r.
21826
21827 2001-10-20  Paul Eggert  <eggert@twinsun.com>
21828
21829         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
21830         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
21831         Use strerror_r that is only a macro, even if it is not a function.
21832         (strerror): Check for HAVE_DECL_STRERROR before declaring.
21833         (private_strerror): Use prototypes, not old-style function definition.
21834         (print_errno_message): New function.
21835         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
21836         char*-flavored one.
21837         (error_tail, error, error_at_line): Use it.
21838
21839 2001-10-11  Jim Meyering  <meyering@lucent.com>
21840
21841         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
21842         and quote_n (1, ... to avoid clobbering a buffer.
21843
21844 2001-10-05  Jim Meyering  <meyering@lucent.com>
21845
21846         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
21847         hash-pjw.h.
21848         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
21849         * lib/hash-pjw.h: New file.
21850
21851 2001-09-30  Jim Meyering  <meyering@lucent.com>
21852
21853         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
21854         `struct fsstat' has the `f_fstypename' member.
21855         Use that to define FS_TYPE, which is now used to make
21856         the getfsstat link test tighter.
21857
21858 2001-09-30  Jim Meyering  <meyering@lucent.com>
21859
21860         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
21861         Include <sys/ucred.h>, for Apple Darwin.
21862         Include sys/mount.h and sys/fs_types.h only if available.
21863         (FS_TYPE): Define.
21864         (read_filesystem_list): Use FS_TYPE.
21865
21866 2001-09-29  Paul Eggert  <eggert@twinsun.com>
21867
21868         * lib/exclude.c (excluded_filename): 0 -> false, since it's
21869         a boolean context.
21870
21871 2001-09-29  Jim Meyering  <meyering@lucent.com>
21872
21873         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
21874         [one-argument getmntent function]): Include stdio.h before mntent.h.
21875         SunOS 4.1.x needs it for the declaration of `FILE'.
21876         Patch by Volker Borchert.
21877
21878         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
21879         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
21880         sys/fs_types.h, and make the link-test for getfsstat guard #include
21881         directives with appropriate #if HAVE_*_H tests so that we can
21882         detect getfsstat on Apple Darwin1.3.7 systems.
21883         Reported by Nelson Beebe.
21884         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
21885
21886 2001-09-28  Paul Eggert  <eggert@twinsun.com>
21887
21888         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
21889         #defines strtoimax.  Also treat the other strto* functions
21890         like strtoimax.
21891
21892         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
21893         Check for strtoul and strtoumax,
21894         as those declarations are made even in the signed case.
21895         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
21896         Likewise, for strtol and strtoimax.
21897
21898 2001-09-28  Paul Eggert  <eggert@twinsun.com>
21899
21900         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
21901         #defines strtoimax.  Also treat the other strto* functions
21902         like strtoimax.
21903
21904         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
21905         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
21906         (strtoimax, strtoumax): Do not declare if already defined as a macro.
21907
21908 2001-09-26  Jim Meyering  <meyering@lucent.com>
21909
21910         Most macros in unlocked-io.h had the wrong number of arguments.
21911         * lib/gen-uio: New script.
21912         (USE_UNLOCKED_IO): Define to 1 if not already defined.
21913         * lib/unlocked-io.hin: Remove file.
21914         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
21915         rather than trying to embed it here.
21916         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
21917         Reported by Padraig Brady.
21918
21919 2001-09-25  Volker Borchert  <bt@teknon.de>
21920
21921         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
21922         `result'.
21923
21924 2001-09-24  Jim Meyering  <meyering@lucent.com>
21925
21926         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
21927
21928 2001-09-23  Jim Meyering  <meyering@lucent.com>
21929
21930         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
21931         instead of the mere test for existence of mntent.h.  The latter
21932         would get a false-positive on AIX 3.4 systems.
21933         In the outer getmntent if-block, don't die if neither of the getmntent
21934         tests succeeds.  Instead, just fall through and continue with the
21935         remaining tests.
21936
21937 2001-09-23  Jim Meyering  <meyering@lucent.com>
21938
21939         * lib/mountlist.c: Remove useless parentheses in #if directives.
21940         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
21941         the deprecated MOUNTED symbol is no longer defined in mntent.h.
21942
21943 2001-09-22  Jim Meyering  <meyering@lucent.com>
21944
21945         * m4/gettext.m4: New file.  From gettext.
21946         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
21947         * m4/progtest.m4: Likewise
21948         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
21949         * m4/glibc21.m4: Likewise.
21950
21951         * m4/libintl.m4: Remove.  No longer used.
21952
21953 2001-09-22  Jim Meyering  <meyering@lucent.com>
21954
21955         * lib/localcharset.c: Update from latest gettext.
21956         * lib/config.charset: Likewise.
21957
21958 2001-09-20  Jim Meyering  <meyering@lucent.com>
21959
21960         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
21961         strtoimax.
21962         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
21963         strtoumax.
21964
21965 2001-09-20  Jim Meyering  <meyering@lucent.com>
21966
21967         * lib/xstrtol.c (strtoimax): Guard declaration with
21968         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
21969         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
21970         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
21971         (strtoumax): Likewise, for completeness (it wasn't necessary).
21972
21973 2001-09-17  Paul Eggert  <eggert@twinsun.com>
21974
21975         * lib/strtoimax.c (HAVE_LONG_LONG):
21976         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
21977         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
21978         to work around bug in IBM C compiler.
21979
21980 2001-09-17  Jim Meyering  <meyering@lucent.com>
21981
21982         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
21983         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
21984         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
21985         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
21986         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
21987         whenever the right hand side need not be expanded by the shell.
21988
21989 2001-09-16  Paul Eggert  <eggert@twinsun.com>
21990
21991         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
21992         library.  It's not correct, as some older glibcs are buggy.
21993         fnmatch wasn't fixed until glibc 2.2.
21994
21995         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
21996         special shell magic here.
21997
21998 2001-09-16  Jim Meyering  <meyering@lucent.com>
21999
22000         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
22001         * m4/jm-macros.m4: Require it.
22002
22003 2001-09-16  Jim Meyering  <meyering@lucent.com>
22004
22005         * lib/mkdir.c: New file.
22006
22007 2001-09-15  Jim Meyering  <meyering@lucent.com>
22008
22009         * m4/jm-macros.m4: Check for help2man.
22010
22011 2001-09-11  Jim Meyering  <meyering@lucent.com>
22012
22013         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
22014         The body, by Paul Eggert, was moved here from configure.in.
22015         * m4/jm-macros.m4: Require UTILS_HOST_OS.
22016
22017 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22018
22019         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
22020         (jm_PREREQ): Use it.
22021
22022 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22023
22024         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
22025         Use ssize_t, not int, to store result of readlink.
22026         Check for ssize_t overflow as well as size_t overflow,
22027         as POSIX says the result of readlink is implementation-defined
22028         when ssize_t overflows.
22029         Remove unnecessary cast to char*.
22030         Use free+malloc instead of realloc, as the storage doesn't need
22031         to be preserved and it's clearer and can be more efficient that way.
22032         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
22033         * lib/xreadlink.h (xreadlink): Update prototype.
22034
22035 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22036
22037         * lib/xgetcwd.c: Revert some of the previous change; intead,
22038         fix the HAVE_GETCWD_NULL code to behave more like the
22039         !HAVE_GETCWD_NULL code used to.
22040
22041         Include "xalloc.h".
22042         (xgetcwd): Do not return NULL when memory is exhausted; instead,
22043         invoke xalloc_die.
22044
22045 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22046
22047         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
22048         sys/param.h, as pathmax.h includes them.
22049
22050 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22051
22052         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
22053         (jm_PREREQ_XGETCWD): New macro.
22054
22055         * m4/getcwd.m4: New file.
22056
22057 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22058
22059         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
22060         like the HAVE_GETCWD_NULL code.
22061         Include pathmax.h if not HAVE_GETCWD.
22062         Do not include xalloc.h.
22063         (INITIAL_BUFFER_SIZE): New symbol.
22064         Do not use xmalloc / xrealloc, since the caller is responsible for
22065         handling errors.  Preserve errno around `free' during failure.
22066         Do not overrun buffer when using getwd.
22067
22068 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22069
22070         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
22071         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
22072         getcwd (NULL, 0).
22073
22074 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22075
22076         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
22077         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
22078         spotted by Jim Meyering.
22079
22080 2001-09-03  Jim Meyering  <meyering@lucent.com>
22081
22082         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
22083         failure.
22084
22085 2001-09-02  Jim Meyering  <meyering@lucent.com>
22086
22087         * lib/error.c: Update from GNU libc.
22088
22089 2001-09-01  Jim Meyering  <meyering@lucent.com>
22090
22091         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
22092         Used by df.
22093
22094 2001-09-01  Jim Meyering  <meyering@lucent.com>
22095
22096         * lib/xreadlink.c: New file.
22097         * lib/xreadlink.h: New file.
22098         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
22099         xreadlink.h.
22100
22101         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
22102         doesn't conflict with sparc Solaris 7's definition in
22103         /usr/include/sys/int_types.h.
22104
22105         * lib/exclude.c: Use `""', not `<>' to #include non-system header
22106         files.
22107         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
22108         and strncasecmp as r-values.  Unixware didn't have declarations.
22109
22110 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22111
22112         * lib/xstrtol.h: Add copyright notice.
22113         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
22114         LONGINT_INVALID_SUFFIX_CHAR.
22115
22116 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22117
22118         * lib/xstrtol.c (strtoimax): New decl.
22119
22120 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22121
22122         * lib/xgetcwd.c: Don't include pathmax.h.
22123         Include stdlib.h and unistd.h if available.
22124         Include xalloc.h.
22125         (xmalloc, xstrdup, free): Remove decls.
22126         (xgetcwd): Don't assume sizes fit in unsigned.
22127         Check for overflow when computing sizes.
22128         Simplify reallocation code.
22129
22130 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22131
22132         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
22133         a directory's st_size can have an arbitrary value, so the old
22134         usage could waste an arbitrary amount of memory.  All uses
22135         changed.
22136         * lib/savedir.h: Update prototype.
22137
22138 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22139
22140         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
22141
22142         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
22143         old strtoimax.c.
22144
22145         Also, make the following further changes to make this file's
22146         configuration more similar to that of strtol.c:
22147         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
22148         (strtoumax, uintmax_t, strtoull, strtol): Remove.
22149         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
22150         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
22151         changed to signed values.
22152
22153         And make the following changes as well:
22154         Fix copyright notice, as 1999 was missing.
22155         (verify): New macro.
22156         (strtoimax): Check sizes at compile-time, not run-time.
22157         Prefer strtol to strtoll if both work.
22158         (main): Remove; it was not that useful and was a pain to maintain.
22159
22160         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
22161
22162 2001-08-31  Jim Meyering  <meyering@lucent.com>
22163
22164         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
22165         Use an initial, malloc'd, buffer of length 128 rather than
22166         a statically allocated one of length 1024.
22167
22168 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22169
22170         Simplify code, partly by assuming autoconf 2.52 semantics.
22171
22172         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
22173
22174         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
22175         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
22176         All uses removed.
22177         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
22178         Move AC_REQUIRE to next-to-top level, to avoid confusion.
22179         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
22180         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
22181         jm_AC_HEADER_INTTYPES_H.
22182         * m4/jm-macros.m4 (jm_MACROS): Likewise.
22183
22184         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
22185
22186         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22187         Quote first arg of AC_DEFUN.
22188         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
22189         since they are needed to parse the include file even if we need
22190         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
22191         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
22192         but with opposite signedness.
22193
22194 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22195
22196         Merge 'exclude' changes from tar 1.13.22.
22197         This fixes one or two unlikely storage allocation overflow bugs,
22198         but doesn't change user-visible behavior otherwise.
22199
22200 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22201
22202         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
22203         (jm_PREREQ_EXCLUDE): New macro.
22204
22205 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22206
22207         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22208         tm to be declared.
22209
22210 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22211
22212         * lib/hash.c: Remove '2001' from copyright notice.
22213
22214 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22215
22216         * lib/full-write.h: New file.
22217         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
22218         * lib/full-write.c: Correct credits, as cccp.c no longer
22219         exists and anyway it was so heavily changed from the old cccp
22220         code as to be unrecognizable.  Include full-write.h.
22221         (full_write) Return size_t, with short writes meaning failure.
22222         All callers changed.  This fixes a bug with large buffers
22223         on 64-bit hosts.
22224         * lib/utime.c: Include full-write.h.
22225
22226 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22227
22228         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
22229         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
22230         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
22231         Include if available.
22232         (<xalloc.h>): Include
22233         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
22234         (verify): New macro.  Use it to verify that EXCLUDE macros do not
22235         collide with FNM macros.
22236         (struct patopts): New struct.
22237         (struct exclude): Use it, as exclude patterns now come with options.
22238         (new_exclude): Support above changes.
22239         (new_exclude, add_exclude_file):
22240         Initial size must now be a power of two to simplify overflow checking.
22241         (free_exclude, fnmatch_no_wildcards): New function.
22242         (excluded_filename): No longer requires options arg, as the options
22243         are determined by add_exclude.  Now returns bool, not int.
22244         (excluded_filename, add_exclude):
22245         Add support for the fancy new exclusion options.
22246         (add_exclude, add_exclude_file): Now takes int options arg.
22247         Check for arithmetic overflow when computing sizes.
22248         (add_exclude_file): xrealloc might modify errno, so don't
22249         realloc until after errno might be used.
22250
22251         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
22252         New macros.
22253         (free_exclude): New decl.
22254         (add_exclude, add_exclude_file): Now takes int options arg.
22255         (excluded_filename): No longer requires options arg, as the options
22256         are determined by add_exclude.  Now returns bool, not int.
22257
22258 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22259
22260         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
22261
22262 2001-08-27  Jim Meyering  <meyering@lucent.com>
22263
22264         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
22265
22266         * lib/version-etc.c (N_): Remove definition.
22267         Revert most of last change.
22268         Instead, simply don't mark the `Copyright...' string for translation.
22269         Based on advice from Paul Eggert.
22270
22271         * lib/strtoxmax.c: Tweak comment.
22272
22273 2001-08-26  Jim Meyering  <meyering@lucent.com>
22274
22275         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
22276
22277         * m4/xstrtoimax.m4: New file.
22278         * m4/xstrtoumax.m4: Add comments explaining why we
22279         AC_REPLACE_FUNCS(strtol).
22280
22281 2001-08-26  Jim Meyering  <meyering@lucent.com>
22282
22283         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
22284         of copyright with `%s' so translators don't get an untranslated
22285         message in 2002.
22286         (COPYRIGHT_YEAR): Define.
22287         (version_etc): Use fprintf rather than fputs.
22288         Suggestion from Ulrich Drepper.
22289
22290         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
22291
22292         * lib/strtoll.c: New file, from GNU libc.
22293         * lib/xstrtoimax.c: New file.
22294
22295         * lib/xstrtol.h: Add xstrtoimax.
22296         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
22297         * lib/strtoimax.c: New file.  Likewise, but first define
22298         STRTOUXMAX_SIGNED.
22299
22300         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
22301         ...
22302         * lib/strtoxmax.c: ... then renamed to this.
22303
22304 2001-08-18  Paul Eggert  <eggert@twinsun.com>
22305
22306         * m4/inttypes.m4: Add AC_PREREQ(2.13).
22307         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
22308         (jm_AC_TYPE_INTMAX_T): New macro.
22309         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
22310
22311         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
22312
22313         * m4/longlong.m4: Renamed from ulonglong.m4.
22314         * m4/inttypes.m4: Renamed from inttypes_h.m4.
22315         * m4/uintmax_t.m4: Removed.
22316
22317 2001-08-13  Paul Eggert  <eggert@twinsun.com>
22318
22319         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
22320         Port to Solaris 8, where 'sed' requires a space after the 'r'
22321         command, and where sh dislikes "$/".  Clean up the spacing a bit.
22322         Redirect output to $tmp just once.
22323
22324 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
22325
22326         * lib/addext.c (<errno.h>): Include.
22327         (errno): Declare if not defined.
22328         (addext): Work correctly when pathconf returns -1 and leaves
22329         errno alone because there is no limit.  Also, work even if
22330         pathconf returns a value greater than SIZE_MAX.
22331
22332 2001-08-12  Jim Meyering  <meyering@lucent.com>
22333
22334         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
22335         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
22336         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
22337         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
22338         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
22339         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
22340         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
22341         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
22342         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
22343         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
22344         utime.m4, utimes.m4, xstrtoumax.m4:
22345         Quote the first argument in each use of AC_DEFUN.
22346
22347 2001-08-12  Jim Meyering  <meyering@lucent.com>
22348
22349         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
22350         Simply `return getcwd (NULL, 0);'.
22351         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
22352         Use 1300 as initial value for length, not PATH_MAX.
22353
22354         * lib/pathmax.h: Clean up cpp syntax.
22355
22356 2001-08-12  Jim Meyering  <meyering@lucent.com>
22357
22358         * lib/gettimeofday.c: New file.
22359         * lib/gtod.h: New file.
22360         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
22361
22362 2001-08-05  Jim Meyering  <meyering@lucent.com>
22363
22364         * m4/jm-macros.m4: Require autoconf-2.52.
22365
22366 2001-08-04  Jim Meyering  <meyering@lucent.com>
22367
22368         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
22369         stmt, to get in sync with glibc.
22370
22371 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22372
22373         The following changes are from gettext 0.10.39 as maintained by
22374         Bruno Haible.
22375
22376         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
22377         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
22378         with inverted sense.  All uses changed.
22379
22380         * lib/mbswidth.c: Don't include <limits.h>.
22381         Include <stdlib.h> and <string.h> unconditionally.
22382         (iswcntrl, mbsinit, ISCNTRL): New macros.
22383         (mbsnwidth): Use K&R style function declarations.
22384         Don't bother checking for MB_LEN_MAX == 1, since the compiler
22385         can optimize it when MB_CUR_MAX == 1.
22386         The width of control characters is zero, not 1.
22387
22388 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22389
22390         The following changes are from gettext 0.10.39 as maintained by
22391         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
22392
22393         * m4/codeset.m4: Upgrade to serial AM1.
22394         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
22395         all uses changed.  Quote first arg of AC_DEFUN.
22396         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
22397
22398         * m4/iconv.m4: Upgrade to serial AM2.
22399         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
22400         Add --with-libconv-prefix.
22401         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
22402         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
22403         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
22404         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
22405         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
22406
22407         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
22408         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
22409         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
22410         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
22411         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
22412         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
22413         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
22414         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
22415         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
22416
22417         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
22418         string.h any more.
22419
22420         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
22421         not the default value.
22422
22423         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
22424         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
22425         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
22426         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
22427         Also check for iswcntrl, used for wcwidth fallback.
22428         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
22429         to Autoconf 2.13.
22430
22431 2001-08-03  Jim Meyering  <meyering@lucent.com>
22432
22433         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
22434         as it was in the original.  Reported by Paul Eggert.
22435
22436 2001-07-16  Jim Meyering  <meyering@lucent.com>
22437
22438         * m4/gettimeofday.m4: New file.
22439         Prompted by a report from Bernhard Baehr.
22440
22441 2001-07-15  Jim Meyering  <meyering@lucent.com>
22442
22443         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
22444         stuff. Now it's in ../Makefile.cfg.
22445
22446 2001-07-15  Jim Meyering  <meyering@lucent.com>
22447
22448         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
22449         (BUILT_SOURCES): Add unlocked-io.h.
22450         (io_functions): Define.
22451         (unlocked-io.h): New rule.
22452         (DISTCLEANFILES): Add unlocked-io.h.
22453         (all-local): Depend on unlocked-io.h, to ensure it is created.
22454
22455         * lib/unlocked-io.hin: New file
22456
22457         * lib/regex.c: Update from glibc.
22458
22459 2001-07-05  Jim Meyering  <meyering@lucent.com>
22460
22461         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
22462         recommendation.
22463         (libfetish_a_SOURCES): Put all .h files here instead.
22464         Remove a thus-exposed (better checks in automake) duplicate and
22465         two unnecessary .h files.
22466
22467 2001-07-04  Jim Meyering  <meyering@lucent.com>
22468
22469         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
22470         that generates jm-glibc-io.m4 so that it doesn't trigger any make
22471         distcheck failure.
22472
22473 2001-07-02  Jim Meyering  <meyering@lucent.com>
22474
22475         The following changes were prompted by suggestions from Bruno Haible.
22476
22477         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
22478         is now generated.
22479         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
22480         definition of EXTRA_DIST.
22481         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
22482         ensure that the generated file is created/updated whenever the list
22483         of $(unlocked_functions) is changed.
22484         (jm-glibc-io.m4): New rule.
22485         (unlocked-io.h): New rule -- currently unused.
22486
22487 2001-06-24  Jim Meyering  <meyering@lucent.com>
22488
22489         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
22490         unmatched right bracket, rather than kludging it with an extra,
22491         falsely-matching quote in a comment.  Patch by Akim Demaille.
22492
22493 2001-06-11  Jim Meyering  <meyering@lucent.com>
22494
22495         * lib/regex.c: Update from GNU libc.
22496
22497 2001-05-27  Jim Meyering  <meyering@lucent.com>
22498
22499         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
22500         Check for ut_type in struct utmp.
22501
22502 2001-05-27  Jim Meyering  <meyering@lucent.com>
22503
22504         * lib/readutmp.h (UT_TYPE): Define.
22505
22506 2001-05-24  Jim Meyering  <meyering@lucent.com>
22507
22508         * lib/argmatch.c: Include "quote.h".
22509         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
22510         quote function.  Reported by Göran Uddeborg.
22511
22512 2001-05-22  Jim Meyering  <meyering@lucent.com>
22513
22514         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
22515         now that we use the package-supplied version unconditionally.
22516         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
22517
22518 2001-05-21  Jim Meyering  <meyering@lucent.com>
22519
22520         * m4/regex.m4: Change a couple backticks to single quotes to avoid
22521         shell syntax errors.
22522
22523 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22524
22525         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
22526
22527 2001-05-20  Paul Eggert  <eggert@twinsun.com>
22528
22529         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
22530         Don't bother to check library strftime, since
22531         we'll be using our own my_strftime function anyway.
22532         Define my_strftime instead of strftime.
22533
22534 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
22535
22536         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
22537         which is not yet declared.
22538
22539 2001-05-15  Jim Meyering  <meyering@lucent.com>
22540
22541         * m4/regex.m4: Use proper quoting so brackets appear in the test
22542         program.
22543         Reported by, and with help from, Bruno Haible.
22544
22545 2001-05-13  Jim Meyering  <meyering@lucent.com>
22546
22547         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
22548         undefined.
22549
22550 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22551
22552         dirname code cleanup.  base_name now behaves more compatibly
22553         with POSIX basename when given file names that have trailing
22554         slashes, and similarly for dir_name.  Add new primitives
22555         base_len and dir_len.  Put the directory-name-related decls
22556         into dirname.h.
22557
22558         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
22559         * lib/backupfile.c (base_name): Likewise.
22560         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
22561         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
22562         * lib/makepath.c (strip_trailing_slashes): Likewise.
22563         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
22564         ISSLASH): Likewise.
22565         * lib/rename.c (strip_trailing_slashes): Likewise.
22566         * lib/same.c (base_name): Likewise.
22567         * lib/stripslash.c (ISSLASH): Likewise.
22568
22569         * lib/addext.c: Include <dirname.h> after size_t is defined.
22570         * lib/backupfile.c: Likewise.
22571
22572         * lib/addext.c (addext): Use base_len to trim redundant
22573         trailing slashes instead of doing it ourselves.
22574         But do not trim the last slash if it is not redundant.
22575
22576         * lib/backupfile.c (find_backup_file_name,
22577         max_backup_version): Use base_len instead of rolling it ourselves.
22578         Handle the case of "" and (on DOS) "C:" correctly.
22579
22580         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
22581         needed. Include <string.h>, <dirname.h>.
22582         (base_name): Allow file names ending in slashes, other than names
22583         that are all slashes.  In this case, return the basename followed
22584         by the slashes.  This is more general, and can be used in places
22585         where the original base_name purposely had an assertion failure.
22586         (base_len): New function.
22587
22588         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
22589         Do not include <assert.h>; no longer needed.
22590         Include xalloc.h.
22591         (memrchr): Remove decl.
22592         (dir_name_r): Remove.
22593         (dir_len): Renamed from dirlen.  All callers changed.
22594         Rewrite in terms of base_name, for simplicity and consistency.
22595         (dir_name): Never return NULL.  All callers changed.
22596         Do not include <stdlib.h> in test program; no longer needed.
22597         return 0; is fine for test program.
22598
22599         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
22600         New macros.
22601         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
22602
22603         * lib/path-concat.c (path_concat): Use base_len to compute
22604         base length, not strlen; this means we cannot rely on memcpy
22605         to null-terminate.
22606
22607         * lib/same.c (STREQ): Remove.
22608         (same_name): Handle the case where the basename ends in trailing '/'.
22609
22610         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
22611         a slash was stripped.  Do not strip the last slash after a
22612         file system prefix.
22613
22614 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22615
22616         * lib/Makefile.am (libfetish_a_SOURCES):
22617         Add strftime.c, since we now compile it on all hosts.
22618
22619         * lib/strftime.c (my_strftime):
22620         Define to nstrftime if emacs, but only if my_strftime is not defined.
22621         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
22622         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
22623         Add one more extra argument: a nanoseconds value.
22624         All uses changed.
22625         (ns): New macro.
22626         (my_strftime function): Add %N format.
22627         (emacs_strftimeu): Renamed from emacs_strftime,
22628         with extra ut argument.
22629
22630 2001-05-09  Paul Eggert  <eggert@twinsun.com>
22631
22632         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
22633
22634 2001-04-21  Jim Meyering  <meyering@lucent.com>
22635
22636         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
22637         doesn't interfere.
22638
22639 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22640
22641         * m4/ftruncate.m4: Check for chsize.
22642         Link with ftruncate.o unconditionally if ftruncate is missing.
22643         This was required when cross-compiling to i586-mingw32msvc.
22644
22645 2001-04-08  Jim Meyering  <meyering@lucent.com>
22646
22647         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
22648         recomputed; that's necessary when the offset spans a DST transition.
22649         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
22650
22651 2001-04-02  Jim Meyering  <meyering@lucent.com>
22652
22653         * lib/regex.h, regex.c: Update from GNU libc.
22654
22655 2001-03-24  Jim Meyering  <meyering@lucent.com>
22656
22657         * m4/jm-macros.m4: Require autoconf-2.49d.
22658
22659 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
22660
22661         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
22662
22663 2001-03-19  Paul Eggert  <eggert@twinsun.com>
22664
22665         * lib/version-etc.c (version_etc_copyright): Update to 2001.
22666
22667 2001-03-17  Jim Meyering  <meyering@lucent.com>
22668
22669         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
22670         now that the version in autoconf is equivalent.
22671         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
22672
22673         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
22674         Suggestion from Akim Demaille.
22675
22676         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
22677         (jm_PREREQ_TEMPNAME): New function.
22678
22679 2001-03-16  Paul Eggert  <eggert@twinsun.com>
22680
22681         * lib/tempname.c (uint64_t): Define to uintmax_t if
22682         not defined, and if UINT64_MAX is not defined.
22683         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
22684         Reported by John David Anglin.
22685
22686 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
22687
22688         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
22689         resolve alias if codeset is empty.
22690         * lib/config.charset (BeOS): Use wildcard syntax.
22691
22692 2001-03-13  Jim Meyering  <meyering@lucent.com>
22693
22694         * lib/path-concat.c (path_concat)
22695         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
22696         concatenating e.g., `C:' and `foo'.
22697         From Bruno Haible.
22698
22699 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22700
22701         * lib/localcharset.c (locale_charset): Don't use
22702         setlocale(LC_CTYPE,NULL). Don't return NULL.
22703         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
22704
22705 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22706
22707         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
22708         support for DOS/DJGPP.
22709
22710 2001-03-01  Paul Eggert  <eggert@twinsun.com>
22711
22712         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
22713         lacks mkstemp.  Compile our own tempname.c if we compile our own
22714         mkstemp.c, as mkstemp relies on tempname.
22715
22716 2001-03-01  Jim Meyering  <meyering@lucent.com>
22717
22718         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
22719         AH_VERBATIM really does output its argument verbatim.
22720
22721 2001-02-28  Paul Eggert  <eggert@twinsun.com>
22722
22723         * lib/Makefile.am (libfetish_a_SOURCES):
22724         Add dup-safer.c, fopen-safer.c.
22725         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
22726
22727         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
22728         * lib/unistd-safer.h: New files.
22729
22730 2001-02-25  Paul Eggert  <eggert@twinsun.com>
22731
22732         The mkstemp replacement is taken from glibc 2.2.2, with some
22733         portability fixes for use outside glibc, as follows:
22734
22735         * lib/tempname.c (struct_stat64): New macro.
22736         (direxists, __gen_tempname): Use it.
22737         This avoids a portability problem with Solaris 8.
22738
22739         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
22740         (<stddef.h>, <stdint.h>, <string.h>):
22741         Include only if STDC_HEADERS || _LIBC.
22742         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
22743         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
22744         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
22745         (__set_errno): Define this macro if <errno.h> doesn't.
22746         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
22747         Define these macros if <stdio.h> doesn't.
22748         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
22749         Define these macros if <sys/stat.h>
22750         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
22751         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
22752         __xstat64): Define if not _LIBC.
22753         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
22754         (__gen_tempname): Invoke gettimeofday only if
22755         HAVE_GETTIMEOFDAY || _LIBC;
22756         otherwise, fall back on plain "time".
22757         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
22758
22759         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
22760
22761         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
22762
22763 2001-02-18  Paul Eggert  <eggert@twinsun.com>
22764
22765         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
22766
22767 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22768
22769         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
22770         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
22771         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
22772         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22773
22774 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22775
22776         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
22777         Remove workaround macros for hosts that have mbrtowc but not
22778         mbstate_t, as we now insist on proper declarations for both
22779         before using mbrtowc.
22780
22781 2001-02-17  Jim Meyering  <meyering@lucent.com>
22782
22783         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
22784         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
22785         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
22786         UnixWare 7.1.1.
22787
22788         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
22789         rather than AC_CACHE_VAL.
22790
22791 2001-02-17  Jim Meyering  <meyering@lucent.com>
22792
22793         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
22794         around included file name.
22795
22796         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
22797
22798         * lib/strftime.c: Update from GNU libc (the only changes were to
22799         comments).
22800
22801 2001-02-17  Jim Meyering  <meyering@lucent.com>
22802
22803         * lib/regex.c: Update from libc.
22804
22805 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
22806
22807         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
22808         clash.
22809
22810 2001-02-16  Paul Eggert  <eggert@twinsun.com>
22811
22812         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
22813         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
22814         Reported by Mark Hounschell via Paul Eggert.
22815
22816 2001-02-07  Jim Meyering  <meyering@lucent.com>
22817
22818         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
22819
22820 2001-02-05  Jim Meyering  <meyering@lucent.com>
22821
22822         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
22823         it includes the patch required for `large file' support with at least
22824         HP-UX's 10.20 /bin/cc.
22825
22826 2001-02-03  Jim Meyering  <meyering@lucent.com>
22827
22828         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
22829         AS_IF, now that it works once again (mysteriously).
22830         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
22831
22832 2001-01-30  Jim Meyering  <meyering@lucent.com>
22833
22834         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
22835         * m4/chown.m4: Rename conftestchown to conftest.chown.
22836         * m4/rename.m4: s/conftestdir/conftest.d1/ and
22837         s/conftestdir2/conftest.d2/.
22838         * m4/utimes.m4: s/conftestdata/conftest.data/
22839         Inspired by Pavel Roskin's change in autoconf.
22840
22841 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
22842
22843         * lib/config.charset: Update for FreeBSD 4.2.
22844
22845 2001-01-27  Jim Meyering  <meyering@lucent.com>
22846
22847         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
22848         a use of AS_IF.
22849         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
22850
22851 2001-01-26  Jim Meyering  <meyering@lucent.com>
22852
22853         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
22854         quotearg.c includes it.
22855
22856 2001-01-26  Jim Meyering  <meyering@lucent.com>
22857
22858         * lib/quotearg.c: Include stddef.h.
22859         * lib/quote.c: Include stddef.h.
22860         Reported by Axel Kittenberger.
22861
22862         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
22863         line in double quotes so that it evokes a better diagnostic.
22864         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
22865         Reported by Axel Kittenberger.
22866
22867 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
22868
22869         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
22870         as if it was a `charset'.
22871
22872 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
22873
22874         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
22875         has const.
22876
22877 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
22878
22879         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
22880         to avoid a warning.  Add back 'const' to inptr.
22881
22882 2001-01-20  Jim Meyering  <meyering@lucent.com>
22883
22884         Be sure that headers are checked before used in code compiled
22885         for the type checks.
22886         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
22887         In place of that, invoke jm_CHECK_ALL_TYPES.
22888         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
22889         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
22890         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
22891         The check for ssize_t was mistakenly run before the test for unistd.h.
22892
22893         The configure-time check for stdbool.h was missing.
22894         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
22895         (jm_PREREQ_HASH): New function.
22896
22897 2001-01-17  Jim Meyering  <meyering@lucent.com>
22898
22899         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
22900         for autoconf-2.49c.
22901         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
22902
22903 2001-01-16  Jim Meyering  <meyering@lucent.com>
22904
22905         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
22906         From Bruno Haible.
22907
22908 2001-01-14  Jim Meyering  <meyering@lucent.com>
22909
22910         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
22911         foo and bar.  Create conftestdir/ in the script, not in the C code.
22912         Remove directories in the script, not in the C code.
22913         Remove conftestdir{,2} before trying to create the directory.
22914         Make the entire configure script fail if the mkdir fails.
22915
22916 2001-01-14  Jim Meyering  <meyering@lucent.com>
22917
22918         * lib/rename.c: New file.  From Volker Borchert.
22919         Include stdlib.h, string.h or strings.h, and xalloc.h.
22920         Use strip_trailing_slashes rather than open-coding it.
22921
22922 2001-01-03  Paul Eggert  <eggert@twinsun.com>
22923
22924         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
22925
22926 2001-01-03  Jim Meyering  <meyering@lucent.com>
22927
22928         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
22929         of local `inptr' to avoid warning with some system declarations of
22930         iconv.
22931
22932 2001-01-02  Volker Borchert  <bt@teknon.de>
22933
22934         * m4/rename.m4: New file.
22935         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
22936
22937 2001-01-01  Jim Meyering  <meyering@lucent.com>
22938
22939         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
22940         even on systems with utmpx.h.  It's necessary for the declaration of
22941         utmp's ut_user member.  Reported by Andreas Jaeger.
22942
22943         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
22944         available. They are required for the declarations of getgrgid and
22945         getpwuid resp.
22946         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
22947         Reported by Andreas Jaeger.
22948
22949 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
22950
22951         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
22952         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
22953         so `make install' also works in VPATH builds.
22954
22955 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
22956
22957         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
22958         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
22959         can be used in subdirectories.
22960
22961 2000-12-29  Paul Eggert  <eggert@twinsun.com>
22962
22963         * lib/modechange.c: Do not assume that mode_t uses the
22964         traditional octal encoding.  E.g. "chmod 1 FOO" should set
22965         the other-execute bit of FOO even if S_IXOTH != 1.
22966
22967         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
22968         WOTH, XOTH, ALLM): New macros.
22969         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
22970          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
22971         Use them.
22972         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
22973         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
22974         (mode_compile):
22975         No need to use uintmax_t; unsigned long is long enough.
22976         Don't bother to get suffix since we don't use it.
22977
22978 2000-12-26  Jim Meyering  <meyering@lucent.com>
22979
22980         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
22981         better with autoheader.
22982
22983 2000-12-24  Jim Meyering  <meyering@lucent.com>
22984
22985         * lib/hash.c (is_prime): Return explicit boolean values.
22986         (hash_get_first): Return NULL to appease Irix5.6's 89.
22987         Reported by Nelson Beebe.
22988
22989 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
22990
22991         * lib/localcharset.c (locale_charset): Add support for Win32.
22992
22993 2000-12-18  Paul Eggert  <eggert@twinsun.com>
22994
22995         * lib/physmem.h, lib/physmem.c: New files.
22996
22997         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
22998         (noinst_HEADERS): Add physmem.h.
22999
23000         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
23001         't' for compatibility with Solaris 8 sort.
23002
23003 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
23004
23005         * lib/config.charset: Add support for BeOS.
23006
23007 2000-12-17  Jim Meyering  <meyering@lucent.com>
23008
23009         * m4/dos.m4 (jm_AC_DOS): New file and macro.
23010         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
23011
23012 2000-12-16  Jim Meyering  <meyering@lucent.com>
23013
23014         This bug had a serious impact on chown: `chown N:M FILE' (for integer
23015         N and M) would have treated it like `chown N:N FILE'.
23016
23017         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
23018
23019 2000-12-16  Jim Meyering  <meyering@lucent.com>
23020
23021         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
23022         SHELLS_FILE to a file name that's useful on djgpp systems.
23023         Include stdlib.h.
23024         (ADDITIONAL_DEFAULT_SHELLS): Define.
23025         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
23026         Based mostly on a patch from Prashant TR.
23027
23028 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
23029
23030         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
23031         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
23032         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
23033
23034 2000-12-08  Andreas Schwab  <schwab@suse.de>
23035
23036         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
23037         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
23038
23039 2000-12-07  Jim Meyering  <meyering@lucent.com>
23040
23041         * lib/stripslash.c (ISSLASH): Define.
23042         (strip_trailing_slashes): Use ISSLASH rather than comparing against
23043         `/'.
23044         From Prashant TR.
23045
23046         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
23047         (dir_name_r): Declare this function as static.
23048         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
23049         manifest itself on a name containing a mix of slashes and
23050         backslashes.
23051         Make this function work with names starting with a DOS-style
23052         drive letter and colon prefix.
23053         (dir_name): Append `.' if necessary.
23054         Based mostly on patches from Prashant TR and Eli Zaretskii.
23055
23056         * lib/dirname.h (dir_name_r): Remove prototype.
23057
23058 2000-12-06  Paul Eggert  <eggert@twinsun.com>
23059
23060         * m4/off_t-format.m4: Remove this file.
23061         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
23062
23063 2000-12-06  Jim Meyering  <meyering@lucent.com>
23064
23065         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
23066         replacement strtoull, we may well need the replacement strtoul, too.
23067         Check for declarations of strtoul and strtoull.
23068         Check for strtol.  Mainly as a cue to cause automake to include
23069         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
23070         Check for limits.h -- strtol.c needs it.
23071
23072 2000-12-05  Jim Meyering  <meyering@lucent.com>
23073
23074         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
23075
23076 2000-12-04  Jim Meyering  <meyering@lucent.com>
23077
23078         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
23079         Also include memory.h, stdlib.h, unistd.h if appropriate.
23080         Reported by Andreas Jaeger (conflicting declaration of malloc).
23081
23082 2000-12-02  Jim Meyering  <meyering@lucent.com>
23083
23084         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
23085         * m4/jm-macros.m4 (jm_MACROS): require it.
23086
23087 2000-12-02  Jim Meyering  <meyering@lucent.com>
23088
23089         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
23090
23091 2000-12-01  Paul Eggert  <eggert@twinsun.com>
23092
23093         * lib/memrchr.c: Include <config.h> before any system include file.
23094
23095 2000-11-30  Jim Meyering  <meyering@lucent.com>
23096
23097         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
23098
23099 2000-11-30  Jim Meyering  <meyering@lucent.com>
23100
23101         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
23102
23103 2000-11-29  Paul Eggert  <eggert@twinsun.com>
23104
23105         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
23106
23107 2000-11-26  Jim Meyering  <meyering@lucent.com>
23108
23109         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
23110
23111 2000-11-22  Paul Eggert  <eggert@twinsun.com>
23112
23113         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
23114         size of (size_t) -1; it's not portable.
23115
23116 2000-11-17  Jim Meyering  <meyering@lucent.com>
23117
23118         * lib/strstr.c: Update from GNU libc.
23119
23120 2000-11-17  Akim Demaille  <akim@epita.fr>
23121
23122         * lib/obstack.h: Formatting changes.
23123         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
23124         prevent type checking.
23125         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23126         cast the value to (void *): assigning a `foo *' to a `void *'
23127         variable is valid.
23128         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23129
23130 2000-11-16  Jim Meyering  <meyering@lucent.com>
23131
23132         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
23133
23134 2000-11-11  Jim Meyering  <meyering@lucent.com>
23135
23136         * lib/error.c: Add a couple #includes, merging from GNU libc version.
23137
23138 2000-11-10  Jim Meyering  <meyering@lucent.com>
23139
23140         * lib/obstack.h: Update from GNU libc.
23141         * lib/obstack.c: Likewise.
23142
23143 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
23144
23145         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
23146
23147 2000-11-06  Paul Eggert  <eggert@twinsun.com>
23148
23149         * lib/getusershell.c (setusershell): Use rewind rather than
23150         fseek/fseeko, to avoid configuration hassles with fseeko.
23151         Don't bother opening SHELLS_FILE if shellstream is NULL;
23152         it's not necessary.
23153
23154 2000-11-05  Jim Meyering  <meyering@lucent.com>
23155
23156         * lib/makepath.h (make_dir): Declare.
23157         * lib/makepath.c (make_dir): Remove `static' attribute.
23158         Tweak a comment.
23159
23160 2000-11-04  Jim Meyering  <meyering@lucent.com>
23161
23162         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
23163
23164 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
23165
23166         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
23167         last one in a bucket, advance to the next bucket.
23168
23169 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
23170
23171         * lib/fnmatch.c: Do not comment out all the code if we are using
23172         the GNU C library, because in some cases we are replacing buggy
23173         code in the GNU C library itself.
23174
23175 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
23176
23177         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
23178         (regex_compile): Catch bogus \(\1\).
23179
23180 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23181
23182         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
23183         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
23184         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
23185
23186 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23187
23188         * lib/error.h, getline.h, modechange.h:
23189         Remove "2000" from Copyright line, as the file hasn't been
23190         changed this year other than in the copyright notice.
23191
23192         * lib/xalloc.h: Add "2000" to Copyright line, as this file
23193         was changed this year.
23194
23195 2000-10-29  Jim Meyering  <meyering@lucent.com>
23196
23197         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
23198         renaming.
23199         * m4/ls-mntd-fs.m4: Likewise
23200
23201 2000-10-29  Jim Meyering  <meyering@lucent.com>
23202
23203         * lib/xstat.in: Fix grammar in comment.
23204
23205 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
23206
23207         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
23208         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
23209         doesn't define __restrict_arr.
23210
23211 2000-10-28  Jim Meyering  <meyering@lucent.com>
23212
23213         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
23214         (jm_PREREQ_MEMCHR): New function.
23215
23216 2000-10-28  Jim Meyering  <meyering@lucent.com>
23217
23218         * lib/memchr.c: Update from libc.
23219         Adjust for portability:
23220         [HAVE_STDLIB_H]: Include stdlib.h.
23221         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
23222         Undef __memchr, too.
23223         [!weak_alias]: Define __memchr to memchr.
23224
23225         * lib/regex.c: Update from libc.
23226         * lib/regex.h: Likewise.
23227         * lib/getopt1.c: Likewise.
23228         * lib/memcmp.c: Likewise.
23229
23230         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
23231         Avoid using fseek, when possible -- it's broken by design.
23232         Patch by Ulrich Drepper.
23233
23234 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
23235
23236         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
23237         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
23238         Giving in to popular pressure to shut up the compiler with casts.
23239
23240 2000-10-26  Jim Meyering  <meyering@lucent.com>
23241
23242         * lib/strftime.c: Update from libc.
23243
23244 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
23245
23246         * regex.c: More `unsigned char' -> `re_char' changes.
23247         Also change several `int' into `re_wchar_t'.
23248         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
23249         (PUSH_FAILURE_POINTER): Don't cast any more.
23250         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
23251         We want GCC to complain, since this piece of code makes
23252         re_match non-reentrant, which *should* be fixed.
23253         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
23254         (EXTEND_BUFFER): Use RETALLOC.
23255         (SET_LIST_BIT): Don't cast.
23256         (re_wchar_t): New type.
23257         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
23258         that those two functions will always properly return.
23259         (IMMEDIATE_QUIT_CHECK): Cast to void.
23260         (analyse_first): Use recursion rather than an explicit stack.
23261         (re_compile_fastmap): Can't fail anymore.
23262         (re_search_2): Don't check re_compile_fastmap for failure.
23263         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
23264         Now also sets the new value (passed in a new argument).
23265         (re_match_2_internal): Use it.
23266         Also, use a new var `reg' of type size_t when looping through regs
23267         rather than reuse the inappropriate `mcnt'.
23268
23269 2000-10-25  Jim Meyering  <meyering@lucent.com>
23270
23271         * lib/obstack.c: Update from libc.
23272
23273 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
23274
23275         * regex.c (regex_compile): Change the way of handling a range from
23276         a char less than 256 to a char not less than 256.
23277
23278 2000-10-24  Andrew Innes  <andrewi@gnu.org>
23279
23280         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
23281         NT-Emacs only.
23282         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
23283         so that re_search functions only quit when callers expect them to.
23284
23285 2000-10-23  Jim Meyering  <meyering@lucent.com>
23286
23287         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
23288         wrong.  That set_locale call must not have any side effects.
23289         From Paul Eggert.
23290
23291 2000-10-22  Jim Meyering  <meyering@lucent.com>
23292
23293         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
23294         [CYCLIC]: Remove now-unused definition.
23295
23296         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
23297         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
23298         Suggestion from Ulrich Drepper.
23299
23300 2000-10-21  Jim Meyering  <meyering@lucent.com>
23301
23302         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
23303         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
23304         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
23305
23306 2000-10-21  Jim Meyering  <meyering@lucent.com>
23307
23308         * lib/dirname.c (memrchr): Declare if necessary.
23309         (dir_name): Remove the restriction that there be no
23310         trailing slashes.  Now, this code skips past them, effectively
23311         ignoring them.
23312         [TEST_DIRNAME] (main): New unit tests.
23313
23314         * lib/memrchr.c: New file from GNU libc.
23315         Undef __memrchr, too.
23316         [!weak_alias]: Define __memrchr to memrchr.
23317         Guard weak_alias use with `#ifdef weak_alias'.
23318
23319 2000-10-21  Jim Meyering  <meyering@lucent.com>
23320
23321         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
23322         (dir_name): Use dir_name_r.
23323         * lib/dirname.h (dir_name_r): Declare it.
23324
23325 2000-10-17  Jim Meyering  <meyering@lucent.com>
23326
23327         * lib/quote.h (PARAMS): Define and use.
23328         Reported by Akim Demaille.
23329
23330         * lib/getopt.c: Update from libc.
23331
23332 2000-10-16  Jim Meyering  <meyering@lucent.com>
23333
23334         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
23335         setlocale.
23336         From Jan Fedak.
23337
23338 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
23339
23340         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
23341
23342 2000-09-25  Jim Meyering  <meyering@lucent.com>
23343
23344         * lib/md5.h (rol): Define (from GnuPG).
23345
23346         * lib/sha.c: Give credit (GnuPG) where due.
23347         (M): Use rol rather than open-coding it.
23348         Add a FIXME comment.
23349
23350 2000-09-21  Jim Meyering  <meyering@lucent.com>
23351
23352         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
23353         Reported by Michael Stone.
23354
23355 2000-09-20  Jim Meyering  <meyering@lucent.com>
23356
23357         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
23358         (noinst_HEADERS): Add sha.h.
23359         Based on code from Scott G. Miller and from GnuPG.
23360
23361 2000-09-18  Jim Meyering  <meyering@lucent.com>
23362
23363         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
23364         LIBS. Otherwise, everyone ends up linking with -lelf for some
23365         configurations.
23366         Reported by Mike Stone.
23367
23368 2000-09-15  Jim Meyering  <meyering@lucent.com>
23369
23370         * lib/regex.c: Update from libc.
23371
23372 2000-09-10  Jim Meyering  <meyering@lucent.com>
23373
23374         * lib/getopt.c (_getopt_internal): Update from glibc.
23375
23376 2000-09-09  Jim Meyering  <meyering@lucent.com>
23377
23378         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
23379         think it should be used as a general replacement for isascii.
23380         * lib/fnmatch.c: Likewise.
23381         * lib/mbswidth.c: Likewise
23382         * lib/regex.c: Likewise.
23383
23384         Don't use atoi.
23385         * lib/userspec.c: Include sys/param.h and limits.h.
23386         Include xstrtol.h.
23387         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23388         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
23389         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
23390         UID, GID.  Check range.
23391
23392 2000-09-06  Jim Meyering  <meyering@lucent.com>
23393
23394         * lib/getopt.c (_getopt_internal): Update from glibc.
23395
23396 2000-08-30  Jim Meyering  <meyering@lucent.com>
23397
23398         * lib/strftime.c: Merge in changes from GNU libc.
23399
23400 2000-08-26  Jim Meyering  <meyering@lucent.com>
23401
23402         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
23403         * m4/fpending.m4: New file.
23404
23405 2000-08-26  Jim Meyering  <meyering@lucent.com>
23406
23407         * lib/closeout.c: Include "__fpending.h".
23408         (close_stdout_status): Return right away if there's nothing to flush.
23409
23410         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
23411         * lib/__fpending.c: New file.
23412         * lib/__fpending.h: New file.
23413
23414 2000-08-20  Jim Meyering  <meyering@lucent.com>
23415
23416         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
23417         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
23418         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
23419
23420 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
23421
23422         Improve fileutils installation on systems where running
23423         programs (like install) can't be unlinked.
23424         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
23425         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
23426
23427 2000-08-07  Paul Eggert  <eggert@twinsun.com>
23428
23429         Standardize on "memory exhausted" instead of "Memory exhausted"
23430         or "virtual memory exhausted".
23431         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
23432         "virtual memory exhausted".
23433         * lib/same.c (same_name): Invoke xalloc_die instead of printing
23434         our own message.
23435         * lib/userspec.c (parse_user_spec): Likewise.
23436         * lib/bumpalloc.h: comment fix
23437         * lib/same.c, userspec.c: Include xalloc.h.
23438
23439         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
23440         not char *const and pointing to a constant array.
23441         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
23442         (xrealloc): Comment fix.
23443
23444         * lib/userspec.c (parse_user_spec):
23445         Don't translate a message until just before returning,
23446         to avoid unnecessary translation.
23447
23448 2000-08-07  Jim Meyering  <meyering@lucent.com>
23449
23450         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
23451         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
23452         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
23453         getgroups.c, gethostname.c, getopt.h, group-member.c,
23454         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
23455         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
23456         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
23457         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
23458         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
23459         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
23460         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
23461         yesno.c: Back out Copyright date changes for each file with no change
23462         this year.  This eases coordination with other programs using the same
23463         source code modules.  From Paul Eggert.
23464
23465 2000-08-06  Paul Eggert  <eggert@twinsun.com>
23466
23467         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
23468         not char, for compatibility with glibc 2.1.3 strftime.c.
23469
23470 2000-08-03  Greg McGary  <greg@mcgary.org>
23471
23472         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
23473         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
23474         (EXTEND_BUFFER): Use them.
23475
23476 2000-08-01  Jim Meyering  <meyering@lucent.com>
23477
23478         * lib/dirname.c (ISSLASH): Define.
23479         (BACKSLASH_IS_PATH_SEPARATOR): Define.
23480         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
23481         both `\' and `/' may be use as path separators.
23482         Based on a patch from Prashant TR.
23483
23484 2000-07-31  Paul Eggert  <eggert@twinsun.com>
23485
23486         * lib/quotearg.c (quotearg_n_options): Don't make the initial
23487         slot vector a constant, since it might get modified.
23488
23489 2000-07-31  Jim Meyering  <meyering@lucent.com>
23490
23491         * lib/xmalloc.c: Use `virtual memory exhausted', not
23492         `Memory exhausted'.
23493         * lib/obstack.c (print_and_abort): Likewise.
23494
23495 2000-07-30  Paul Eggert  <eggert@twinsun.com>
23496
23497         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
23498         buffer, so that the caller can always quote one small
23499         component of a "memory exhausted" message in slot 0.
23500         From a suggestion by Jim Meyering.
23501
23502 2000-07-30  Jim Meyering  <meyering@lucent.com>
23503
23504         * lib/makepath.c (make_path): Quote the other instance, too.
23505
23506         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
23507         (STATIC_BUF_SIZE): Define.
23508         (quotearg_n_options): Use only statically allocated storage when
23509         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
23510         than STATIC_BUF_SIZE.
23511
23512 2000-07-29  Jim Meyering  <meyering@lucent.com>
23513
23514         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
23515         * lib/dirname.c (dir_name): Likewise.
23516
23517         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
23518         `/'.
23519
23520         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
23521         (dir_name): Assert that there are no trailing slashes.
23522
23523 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
23524
23525         * lib/mbswidth.h (mbswidth): Add a flags argument.
23526         (mbswidth): New declaration.
23527         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
23528         * lib/mbswidth.c (mbswidth): Add a flags argument.
23529         (mbsnwidth): New function.
23530
23531 2000-07-24  Jim Meyering  <meyering@lucent.com>
23532
23533         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
23534
23535 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23536
23537         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
23538
23539 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23540
23541         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
23542         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
23543         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
23544         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
23545         invoke multibyte primitives.
23546
23547 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23548
23549         * lib/quotearg.c:
23550         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
23551         so that mbstate_t is always defined.
23552
23553         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
23554         be 1 in at least one GCC installation, and this configuration
23555         error is likely to be common.  Ignoring MB_LEN_MAX hurts
23556         performance on hosts that have mbrtowc but have only unibyte
23557         locales, but I assume these hosts are rare.
23558
23559 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23560
23561         * lib/mbswidth.c (_XOPEN_SOURCE):
23562         Don't define; this causes problems on Solaris 7.
23563         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
23564
23565 2000-07-23  Jim Meyering  <meyering@lucent.com>
23566
23567         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
23568         too: getgrgid, getpwuid, getuid.
23569
23570 2000-07-23  Jim Meyering  <meyering@lucent.com>
23571
23572         * lib/basename.c (base_name): Add an assertion.
23573
23574 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
23575
23576         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
23577         shadow its mbsinit function.
23578
23579 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23580
23581         * lib/mbswidth.h: New file.
23582         * lib/mbswidth.c: New file.
23583         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
23584         (noinst_HEADERS): Add mbswidth.h.
23585
23586 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23587
23588         * lib/config.charset: Add support for FreeBSD. Improve support for
23589         HP-UX and IRIX 6.
23590
23591 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
23592
23593         * m4/mbswidth.m4: New file.
23594         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
23595
23596 2000-07-15  Jim Meyering  <meyering@lucent.com>
23597
23598         * lib/makepath.c: Include quote.h.
23599         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
23600         corresponding argument in a `quote (...)' call.
23601         Give better diagnostics.
23602
23603         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
23604         (noinst_HEADERS): Add quote.h.
23605
23606         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
23607         from tar's src/misc.c.
23608         * lib/quote.h: New file.  Prototypes for same.
23609
23610 2000-07-14  Paul Eggert  <eggert@twinsun.com>
23611
23612         From a suggestion by Bruno Haible.
23613         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
23614         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
23615         to decide whether to define the BeOS workaround macro;
23616         this adjusts to the change to AC_MBSTATE_T.
23617
23618 2000-07-14  Jim Meyering  <meyering@lucent.com>
23619
23620         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
23621         jm_AC_TYPE_UINTMAX_T.
23622
23623 2000-07-13  Paul Eggert  <eggert@twinsun.com>
23624
23625         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
23626
23627         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
23628         quotearg_buffer_restyled): Add support for
23629         clocale_quoting_style.  Undo previous change to
23630         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
23631         and "{RIGHT QUOTATION MARK}" msgids.
23632
23633 2000-07-10  Paul Eggert  <eggert@twinsun.com>
23634
23635         From a suggestion by Bruno Haible.
23636         * m4/mbstate_t.m4 (AC_MBSTATE_T):
23637         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
23638         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
23639         and mbstate_t, to a single-part test that simply defines mbstate_t.
23640         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
23641         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
23642
23643 2000-07-10  Jim Meyering  <meyering@lucent.com>
23644
23645         * m4/strerror_r.m4: Mirror the correction made in autoconf.
23646
23647         * m4/gnu-source.m4: Output to confdefs.h directly.
23648         Suggestion from Akim Demaille.
23649
23650 2000-07-09  Paul Eggert  <eggert@twinsun.com>
23651
23652         The old behavior of quoting `like this' doesn't look good with
23653         newer, ISO-style fonts.  See:
23654         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
23655
23656         Instead, quote "like this" by default.  Let the translator
23657         tailor the locale-specific quoting behavior by providing
23658         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
23659
23660         * lib/quotearg.c (N_): New macro.
23661         (gettext_default): New function.
23662         (quotearg_buffer_restyled): Use
23663         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
23664         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
23665
23666 2000-07-09  Jim Meyering  <meyering@lucent.com>
23667
23668         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
23669         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
23670
23671         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
23672         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
23673
23674 2000-07-09  Jim Meyering  <meyering@lucent.com>
23675
23676         * lib/Most files: Update copyright dates to include 2000.
23677
23678 2000-07-08  Jim Meyering  <meyering@lucent.com>
23679
23680         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
23681         if not defined.
23682         (xgethostname): Remove now-unnecessary #ifdef.
23683         Move declaration of `err' into loop where it's used.
23684
23685 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23686         and Bruno Haible  <haible@clisp.cons.org>
23687
23688         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
23689         only if the test for an object-type mbstate_t fails.  This
23690         prevents us from mistakenly reporting that mbstate_t is a
23691         system object type after we "#define mbstate_t int" to work
23692         around its lack.
23693
23694 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23695         and Bruno Haible  <haible@clisp.cons.org>
23696
23697         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
23698
23699 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23700
23701         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
23702         to strerror_r.
23703         Include <ctype.h> for use of isalpha.
23704
23705 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23706
23707         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
23708         by allocating a larger buffer. Test the gethostname return value for
23709         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
23710         returns an error and ENAMETOOLONG isn't defined.
23711
23712 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23713
23714         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
23715         dimension.
23716
23717 2000-07-04  Jim Meyering  <meyering@lucent.com>
23718
23719         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
23720         of the deprecated AC_CHECKING.
23721
23722 2000-07-04  Jim Meyering  <meyering@lucent.com>
23723
23724         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
23725         Reported by Bruno Haible.
23726
23727 2000-07-04  Jim Meyering  <meyering@lucent.com>
23728
23729         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
23730         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
23731         lacks mbrtowc.
23732
23733 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23734
23735         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
23736         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
23737
23738 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23739         and Bruno Haible  <haible@clisp.cons.org>
23740
23741         * lib/quotearg.c (mbrtowc):
23742         Assign to *pwc, and return 1 only if result is nonzero.
23743         (iswprint): Use ISPRINT when substituting our own mbrtowc.
23744
23745 2000-07-03  Jim Meyering  <meyering@lucent.com>
23746
23747         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
23748
23749 2000-07-03  Jim Meyering  <meyering@lucent.com>
23750
23751         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
23752         This is necessary to get a definition of e.g., UTMP_FILE on
23753         HP-UX 10.20.
23754         From Bob Proulx.
23755
23756 2000-07-02  Jim Meyering  <meyering@lucent.com>
23757
23758         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
23759
23760         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
23761         AC_LIBOBJ(function_name).
23762         * m4/chown.m4: Likewise.
23763         * m4/fnmatch.m4: Likewise.
23764         * m4/ftruncate.m4: Likewise.
23765         * m4/getgroups.m4: Likewise.
23766         * m4/getline.m4: Likewise.
23767         * m4/group-member.m4: Likewise.
23768         * m4/jm-macros.m4: Likewise.
23769         * m4/lstat.m4: Likewise.
23770         * m4/malloc.m4: Likewise.
23771         * m4/memcmp.m4: Likewise.
23772         * m4/nanosleep.m4: Likewise.
23773         * m4/putenv.m4: Likewise.
23774         * m4/realloc.m4: Likewise.
23775         * m4/regex.m4: Likewise.
23776         * m4/stat.m4: Likewise.
23777         * m4/strftime.m4: Likewise.
23778
23779 2000-07-02  Jim Meyering  <meyering@lucent.com>
23780
23781         * lib/quotearg.c (mbstate_t): Don't define here.
23782
23783 2000-07-02  Jim Meyering  <meyering@lucent.com>
23784
23785         * lib/nanosleep.c (SIGCONT): Define if not already defined.
23786
23787 2000-07-01  Jim Meyering  <meyering@lucent.com>
23788
23789         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
23790
23791 2000-07-01  Jim Meyering  <meyering@lucent.com>
23792
23793         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
23794         problem.
23795
23796 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
23797
23798         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
23799         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
23800
23801 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
23802
23803         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
23804         per change in ../m4/ls-mntd-fs.m4.
23805         (read_filesystem_list): Ignore symbolic links.
23806
23807 2000-06-29  Jim Meyering  <meyering@lucent.com>
23808
23809         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
23810         for declaration of strcmp.
23811
23812         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
23813
23814         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
23815         Avoid warning by casting result to `char *' to remove `const'.
23816
23817 2000-06-28  Jim Meyering  <meyering@lucent.com>
23818
23819         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
23820         included by quotearg.c, for which we perform this test.  From
23821         Bruno Haible.
23822
23823 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
23824
23825         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
23826         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
23827         <utmpx.h> exists, put readutmp.o into LIBOBJS.
23828
23829 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
23830
23831         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
23832
23833 2000-06-26  Paul Eggert  <eggert@twinsun.com>
23834
23835         savedir now sets errno on failure and invokes xmalloc to get memory.
23836         Fix a couple of other minor bugs while we're at it.
23837
23838         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
23839         (NAMLEN): Remove macro.
23840         (malloc, realloc): Remove decls.
23841         (stpcpy): Likewise.
23842         ("xalloc.h"): Include.
23843         (NAME_SIZE_DEFAULT): New macro.
23844         (savedir): Use xmalloc / xrealloc to allocate memory.
23845         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
23846         Skip "" directory entries.
23847         Use strlen to calculate directory entry length, since the old method
23848         is rarely used these days and isn't worth supporting.
23849         Don't use a pointer after freeing it.
23850         Check for integer overflow when calculating allocation size.
23851         Use memcpy to copy entries, instead of stpcpy.
23852         Set errno properly when returning NULL.
23853         Check for readdir error.
23854
23855 2000-06-26  Jim Meyering  <meyering@lucent.com>
23856
23857         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
23858
23859 2000-06-25  Jim Meyering  <meyering@lucent.com>
23860
23861         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
23862         Linux header bug when _XOPEN_SOURCE is defined to 500.
23863
23864 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
23865
23866         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
23867         deficiency.
23868
23869 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
23870
23871         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
23872         Include xalloc.h.
23873         Don't include <stdlib.h>.  Don't declare malloc, realloc.
23874
23875 2000-06-24  Jim Meyering  <meyering@lucent.com>
23876
23877         * m4/strerror_r.m4: Revive this file -- to try out an experimental
23878         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
23879         for which strerror does return char*, but which lacks a conveniently
23880         accessible declaration of the function.  If the compile-test says
23881         strerror_r doesn't work, then resort to a `run'-test that works on
23882         BeOS and segfaults on DEC Unix.
23883
23884 2000-06-24  Jim Meyering  <meyering@lucent.com>
23885
23886         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
23887
23888 2000-06-23  Paul Eggert  <eggert@twinsun.com>
23889
23890         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
23891         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
23892
23893 2000-06-23  Paul Eggert  <eggert@twinsun.com>
23894
23895         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
23896         (mbrtowc, mbstate_t): Define substitutes if
23897         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
23898         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
23899         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
23900
23901 2000-06-23  Jim Meyering  <meyering@lucent.com>
23902
23903         * m4/afs.m4: Add missing AC_MSG_RESULT.
23904         Reported by Bruno Haible.
23905
23906         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
23907         Suggestion from Bruno Haible.
23908
23909 2000-06-23  Jim Meyering  <meyering@lucent.com>
23910
23911         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
23912
23913 2000-06-21  Jim Meyering  <meyering@lucent.com>
23914
23915         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
23916
23917 2000-06-21  Jim Meyering  <meyering@lucent.com>
23918
23919         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
23920         (noinst_HEADERS): Add getstr.h.
23921
23922         * lib/getline.c (getstr): Move into a separate file.
23923         * lib/getstr.c (getstr): New file, extracted from getline.c, with
23924         the following changes: new parameter, delim2; both delim[12]
23925         parameters have type `int', not `char'.  The latter would lose
23926         with 8-bit delimiters.
23927         * lib/getstr.h: New file.
23928
23929 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23930
23931         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
23932         than 1024, return a memory chunk of least possible size, instead
23933         of size PATH_MAX + 2. In the loop, increment the size proportionally.
23934         Use free/xmalloc instead of xrealloc to avoid copying for very long
23935         paths.
23936
23937 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23938
23939         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
23940         the empty string.
23941
23942 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23943
23944         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
23945         address, not strdup.  Include <stdlib.h> and don't declare free().
23946
23947 2000-06-19  Jim Meyering  <meyering@lucent.com>
23948
23949         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
23950
23951 2000-06-18  Jim Meyering  <meyering@lucent.com>
23952
23953         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
23954
23955         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
23956         `checking whether...' message to be consistent with that of the
23957         lstat test.
23958
23959 2000-06-18  Jim Meyering  <meyering@lucent.com>
23960
23961         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
23962         Besides, these days every porting target provides a mkdir function.
23963
23964         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
23965         needed. (this snippet comes from src/system.h).
23966
23967 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
23968
23969         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
23970
23971 2000-06-15  Paul Eggert  <eggert@twinsun.com>
23972
23973         * lib/human.c (adjust_value): New function.
23974         (human_readable_inexact): Apply rounding style even when
23975         printing approximate values.
23976
23977 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23978
23979         * lib/human.c (human_readable_inexact): Allow an input block
23980         size that is not a multiple of the output block size, and vice versa.
23981         Reported by Piergiorgio Sartor.
23982
23983 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23984
23985         * lib/getdate.y (get_date): Apply relative times after time
23986         zone indicator, not before.  Reported by Todd A. Jacobs.
23987
23988 2000-06-13  Jim Meyering  <meyering@lucent.com>
23989
23990         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
23991
23992         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
23993
23994 2000-06-12  Paul Eggert  <eggert@twinsun.com>
23995
23996         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
23997
23998 2000-06-12  Jim Meyering  <meyering@lucent.com>
23999
24000         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
24001         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
24002         optional argument.
24003         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
24004         the optional argument, `lib'.
24005
24006 2000-06-08  Jim Meyering  <meyering@lucent.com>
24007
24008         * m4/largefile.m4: Remove file (now that it's part of autoconf).
24009
24010 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24011
24012         Rewrite largefile configuration so that we don't need to run
24013         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
24014         AC_CANONICAL_HOST in configure.in -- jmm]
24015
24016         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
24017         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
24018         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
24019         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
24020         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
24021         All uses changed.
24022         Instead of inspecting the output of getconf, try to compile the
24023         test program without and with the macro definition.
24024         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
24025         for getconf.  Instead, check for the needed flags by compiling
24026         test programs.
24027
24028 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24029
24030         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
24031
24032 2000-06-04  Jim Meyering  <meyering@lucent.com>
24033
24034         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
24035         SunOS 4.1.4 for which gid_t is an unsigned type.
24036
24037 2000-06-03  Jim Meyering  <meyering@lucent.com>
24038
24039         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
24040         now that autoconf requires that.
24041
24042         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
24043         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
24044         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
24045
24046 2000-06-03  Jim Meyering  <meyering@lucent.com>
24047
24048         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
24049
24050 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24051
24052         * m4/glibc21.m4: New file.
24053         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
24054
24055 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24056
24057         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
24058         newer, don't install charset.alias.
24059         * lib/config.charset: Change the Linux/glibc rules so they become empty
24060         on glibc-2.1 or newer.
24061
24062 2000-06-02  Jim Meyering  <meyering@lucent.com>
24063
24064         * lib/mountlist.c: Back out last change.  Instead, do this...
24065         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
24066         me_dummy member using the same `ignore'-testing code.
24067         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
24068         fs_type strings.
24069         From Mark D. Roth.
24070
24071 2000-05-29  Jim Meyering  <meyering@lucent.com>
24072
24073         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
24074         mounts with the `ignore' attribute.  Based on a patch from
24075         Mark D. Roth.
24076
24077 2000-05-28  Jim Meyering  <meyering@lucent.com>
24078
24079         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
24080         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24081         * m4/stat.m4: Likewise.
24082         * m4/lstat.m4: Likewise.
24083         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
24084
24085         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
24086         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
24087
24088 2000-05-26  Jim Meyering  <meyering@lucent.com>
24089
24090         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
24091
24092 2000-05-24  Jim Meyering  <meyering@lucent.com>
24093
24094         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
24095         autoconf requires that.
24096         * m4/lib-check.m4: Likewise.
24097         * m4/jm-macros.m4: Likewise.
24098         * m4/strftime.m4: Likewise.
24099
24100         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
24101         AC_CHECK_DECLS, now that autoconf requires that.
24102
24103 2000-05-22  Jim Meyering  <meyering@lucent.com>
24104
24105         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24106         * m4/lstat.m4: Likewise.
24107
24108 2000-05-22  Jim Meyering  <meyering@lucent.com>
24109
24110         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
24111
24112 2000-05-20  Jim Meyering  <meyering@lucent.com>
24113
24114         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
24115         (jm_PREREQ): Use it.
24116
24117 2000-05-18  Jim Meyering  <meyering@lucent.com>
24118
24119         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
24120         back, too, since it may have been modified by allocate_entry.
24121         (hash_delete): Rewrite to use neither the assignment operator
24122         nor the comma operator in an if-expression.
24123
24124 2000-05-15  Paul Eggert  <eggert@twinsun.com>
24125
24126         * lib/closeout.c:
24127         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
24128         Remove; no longer needed.
24129         "quotearg.h": Add include.
24130         (file_name): Do not bother to explicitly initialize to NULL; it's less
24131         efficient on some hosts.
24132         (close_stdout_status): Remove test as to whether stdout was already
24133         closed; it breaks for the case "echo x | sort >&-".
24134         Quote file name colons.
24135         Do not assume that _("write error") lacks format strings.
24136
24137 2000-05-15  Jim Meyering  <meyering@lucent.com>
24138
24139         * lib/version-etc.c (version_etc_copyright): Update the copyright
24140         string used in all --version output.
24141
24142 2000-05-14  Jim Meyering  <meyering@lucent.com>
24143
24144         * lib/closeout.c (close_stdout_set_file_name): New function.
24145         (close_stdout_status): Use new file-scoped global.
24146         Return right away if fstat says the stdout file descriptor is invalid.
24147         * lib/closeout.h (close_stdout_set_file_name): Declare.
24148
24149 2000-05-10  Jim Meyering  <meyering@lucent.com>
24150
24151         * lib/closeout.c [default_exit_status]: New file-scoped variable.
24152         (close_stdout_set_status): New function.
24153         * lib/closeout.h (close_stdout_set_status): Declare.
24154
24155 2000-05-09  Jim Meyering  <meyering@lucent.com>
24156
24157         * m4/gettext.m4: Rename this...
24158         * m4/libintl.m4: ...to this.
24159
24160 2000-05-08  Jim Meyering  <meyering@lucent.com>
24161
24162         * lib/long-options.c: Don't include closeout.h.
24163         (parse_long_options): Don't call close_stdout for --version.
24164
24165 2000-05-06  Paul Eggert  <eggert@twinsun.com>
24166
24167         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
24168         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
24169         2.1.3 bug.  This avoids a clash when files like regex.c define
24170         _GNU_SOURCE.
24171
24172 2000-05-06  Jim Meyering  <meyering@lucent.com>
24173
24174         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
24175         (AC_REPLACE_FUNCS): Add strnlen.
24176
24177         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
24178         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
24179
24180         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
24181         AC_SEARCH_LIBS call for nanosleep.
24182         (LIB_NANOSLEEP): Set and AC_SUBST.
24183
24184 2000-05-06  Jim Meyering  <meyering@lucent.com>
24185
24186         * lib/strnlen.c: Undefine __strnlen and strnlen.
24187         [!weak_alias]: Define __strnlen to strnlen.
24188
24189         * lib/atexit.c: New file, from libiberty.
24190
24191 2000-05-06  Jim Meyering  <meyering@lucent.com>
24192
24193         * lib/closeout.c (close_stdout_status): Also check for errors on the
24194         stderr stream.
24195
24196 2000-05-05  Jim Meyering  <meyering@lucent.com>
24197
24198         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
24199         AC_SEARCH_LIBS call for clock_gettime.
24200         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
24201
24202         * m4/search-libs.m4: Update from autoconf.
24203
24204         su doesn't work on Solaris 2.6.
24205         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
24206         <shadow.h>.  Reported by Dragos Harabor.
24207
24208 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
24209
24210         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
24211         memcpy instead of xmalloc, xrealloc, path_concat.
24212         (locale_charset): Treat empty environment variables as absent.
24213         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
24214
24215 2000-05-04  Jim Meyering  <meyering@lucent.com>
24216
24217         * lib/getopt.c: Update from glibc.
24218         * lib/obstack.c: Likewise.
24219         * lib/obstack.h: Likewise.
24220         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
24221         file
24222
24223         * lib/regex.h: Likewise.
24224         * lib/strndup.c: Likewise.
24225         * lib/strnlen.c: New file, from glibc.
24226
24227 2000-05-03  Jim Meyering  <meyering@lucent.com>
24228
24229         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
24230
24231 2000-05-02  Paul Eggert  <eggert@twinsun.com>
24232
24233         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
24234         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
24235         compile-time test, rather than inspecting host and OS, to
24236         decide whether to define _LARGEFILE_SOURCE.
24237
24238 2000-05-01  Jim Meyering  <meyering@lucent.com>
24239
24240         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
24241
24242         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
24243         Based on a patch from Bruno Haible.
24244
24245 2000-05-01  Jim Meyering  <meyering@lucent.com>
24246
24247         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
24248
24249 2000-04-29  Jim Meyering  <meyering@lucent.com>
24250
24251         * lib/path-concat.c: Declare strdup only if it's not defined.
24252         * lib/canon-host.c: Likewise.
24253
24254 2000-04-28  Jim Meyering  <meyering@lucent.com>
24255
24256         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
24257         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
24258         is included first, then limits.h is included by locale.h by libintl.h.
24259         From John David Anglin.
24260
24261 2000-04-25  Jim Meyering  <meyering@lucent.com>
24262
24263         * lib/makepath.c (S_IRWXUGO): Define.
24264         (make_path): Always perform explicit chmod if MODE specifies any
24265         of the `special' permission bits.  Prompted by a bug report against
24266         install from Mate Wierdl and Joost van Baal.
24267
24268 2000-04-18  Jim Meyering  <meyering@lucent.com>
24269
24270         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
24271         (jm_PREREQ): Use it.
24272
24273 2000-04-18  Jim Meyering  <meyering@lucent.com>
24274
24275         * lib/README: New file.
24276
24277         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
24278         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
24279
24280 2000-04-17  Jim Meyering  <meyering@lucent.com>
24281
24282         Get it right :-)
24283         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
24284         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
24285         Suggestion from Akim Demaille.
24286
24287 2000-04-17  Jim Meyering  <meyering@lucent.com>
24288
24289         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
24290         the definition of it to rpl_strftime also defined-away the system's
24291         declaration.
24292
24293 2000-04-15  Jim Meyering  <meyering@lucent.com>
24294
24295         Use `C' to denote so-called `contiguous' files, the same way
24296         that tar does.
24297         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
24298         (ftypelet): Use S_ISCTG.
24299         From Michael Deutschmann.
24300
24301 2000-04-14  Jim Meyering  <meyering@lucent.com>
24302
24303         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
24304         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
24305         clobbered.
24306
24307 2000-04-14  Jim Meyering  <meyering@lucent.com>
24308
24309         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
24310
24311 2000-04-13  Jim Meyering  <meyering@lucent.com>
24312
24313         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
24314         AH_VERBATIM to insert required #ifndef into config.h.in.
24315         Suggestion from Akim Demaille.
24316
24317 2000-04-12  Jim Meyering  <meyering@lucent.com>
24318
24319         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
24320         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
24321         Christian Krackowizer.
24322
24323         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
24324         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
24325         (AC_SYS_LARGEFILE): Require.
24326         (AM_C_PROTOTYPES): Require.
24327
24328 2000-04-08  Jim Meyering  <meyering@lucent.com>
24329
24330         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
24331         names don't conflict.  Reported by Eli Zaretskii.
24332
24333 2000-04-07  Jim Meyering  <meyering@lucent.com>
24334
24335         * lib/putenv.c: Move inclusion of errno.h so it follows that of
24336         sys/types.h, to work around system header problems on AIX 3.2.5.
24337         From Bruno Haible.
24338
24339 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
24340
24341         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
24342         bug.  Deal with the different error behavior of Irix iconv.
24343
24344 2000-04-05  Paul Eggert  <eggert@twinsun.com>
24345
24346         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
24347         IRIX if the installer said otherwise.
24348
24349 2000-04-05  Jim Meyering  <meyering@lucent.com>
24350
24351         Portability tweaks required for ultrix4.3.
24352         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
24353         (jm_CHECK_DECLS): Add getutent to the list of functions.
24354         (_jm_DECL_HEADERS): Add utmpx.h.
24355         From John David Anglin.
24356
24357         * m4/strftime.m4: Back out the 2000-04-02 change.
24358         Instead of that change, simply undefine putenv in the test program.
24359
24360 2000-04-05  Jim Meyering  <meyering@lucent.com>
24361
24362         Portability tweaks required for ultrix4.3.
24363         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
24364         getutent.
24365         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
24366         * lib/canon-host.c: Declare strdup.
24367         * lib/path-concat.c: Likewise.
24368         From John David Anglin.
24369
24370 2000-04-04  Jim Meyering  <meyering@lucent.com>
24371
24372         Be more DOS 8.3-friendly.
24373         * lib/ref-add.sin: Renamed from ref-add.sed.in.
24374         * lib/ref-del.sin: Renamed from ref-del.sed.in.
24375         * lib/Makefile.am: Reflect renaming.
24376         Reported by Eli Zaretskii.
24377
24378         Use a temporary file name that won't clash with `charset.alias'
24379         in the DOS 8.3 name space.
24380         * lib/Makefile.am (charset_tmp): Define.
24381         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
24382         (uninstall-local): Likewise.
24383         Reported by Eli Zaretskii.
24384
24385 2000-04-03  Jim Meyering  <meyering@lucent.com>
24386
24387         * m4/gettext.m4: Fix typo in comment.
24388
24389         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
24390         textutils/configure.in).  Suggestion from Paul Eggert.
24391         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
24392
24393 2000-04-02  Paul Eggert  <eggert@twinsun.com>
24394
24395         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
24396         variable in the shell rather than using putenv, which isn't
24397         portable.  This avoids the configure-time inter-test dependency
24398         on the potentially-renamed putenv function.
24399
24400 2000-03-30  Paul Eggert  <eggert@twinsun.com>
24401
24402         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
24403         before checking struct stat.st_blksize, so that
24404         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
24405
24406 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24407
24408         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
24409         since strftime.c uses HAVE_STRFTIME to decide whether to use
24410         the underlying strftime.
24411
24412 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24413
24414         * lib/time/strftime.c (my_strftime): Make sure we call the system
24415         strftime, not ourselves, when invoking the underlying strftime.
24416
24417 2000-03-24  Jim Meyering  <meyering@lucent.com>
24418
24419         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
24420         (charset_alias): Define.
24421         (install-exec-local): Factor out common code.
24422         (uninstall-local): Split lines longer than 80.
24423         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
24424         (SUFFIXES): Define.
24425         (.sed.in.sed): New rule.  Don't redirect directly to $@.
24426         (CLEANFILES): Add ref-add.sed and ref-del.sed.
24427
24428 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
24429
24430         * lib/config.charset: Output a line containing "Packages using this
24431         file".
24432         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
24433         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
24434         ref-del.sed): New rules.
24435
24436 2000-03-17  Jim Meyering  <meyering@lucent.com>
24437
24438         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
24439         Otherwise, include <strings.h>
24440
24441 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
24442
24443         * lib/unicodeio.c (utf8_wctomb): New function.
24444         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
24445         format instead of in UCS-4 with platform dependent endianness.
24446
24447 2000-03-10  Jim Meyering  <meyering@lucent.com>
24448
24449         * m4/lib-check.m4: Look for getspnam in -lgen, too.
24450         From Marco Franzen.
24451
24452 2000-03-07  Paul Eggert  <eggert@twinsun.com>
24453
24454         * lib/savedir.c (savedir): Work even if directory size is
24455         negative; this can happen with some screwy NFS configurations.
24456
24457 2000-03-06  Jim Meyering  <meyering@lucent.com>
24458
24459         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
24460         if it's NULL (because we ran out of memory).  From Bruno Haible.
24461
24462 2000-03-05  Jim Meyering  <meyering@lucent.com>
24463
24464         * lib/localcharset.c ("path-concat.h"): Include.
24465         (get_charset_aliases): Use path_concat instead of ANSI string
24466         concatenation.
24467
24468         * lib/unicodeio.h (PARAMS): Define.
24469         Use it to guard prototype.
24470
24471 2000-03-04  Jim Meyering  <meyering@lucent.com>
24472
24473         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
24474         for lib/localcharset.c.
24475
24476 2000-03-04  Jim Meyering  <meyering@lucent.com>
24477
24478         * lib/Makefile.am (install-exec-local): Create $(libdir) before
24479         installing into it.
24480         (uninstall-local): Uncomment this rule so `make distcheck' works
24481         once again.
24482
24483         * lib/unicodeio.c (<errno.h>): Include it.
24484         (errno): Declare if not defined.
24485
24486         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
24487
24488         * lib/config.charset: New version, incorporating remarks from a linux
24489         i18n mailing list.  From Bruno Haible.
24490
24491 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
24492
24493         * m4/codeset.m4: New file.
24494         * m4/iconv.m4: New file.
24495         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
24496
24497 2000-03-03  Jim Meyering  <meyering@lucent.com>
24498
24499         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
24500
24501 2000-03-02  Jim Meyering  <meyering@lucent.com>
24502
24503         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
24504         the messages come out on separate lines.
24505
24506         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
24507         rather than jm_CHECK_DECLARATIONS.
24508         * m4/decl.m4: Remove now-unused file.
24509
24510         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
24511         geteuid.
24512
24513 2000-03-02  Jim Meyering  <meyering@lucent.com>
24514
24515         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
24516
24517 2000-03-01  Jim Meyering  <meyering@lucent.com>
24518
24519         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
24520         * lib/unicodeio.c: Likewise.
24521
24522 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
24523
24524         * lib/config.charset: New file.
24525         * lib/localcharset.c: New file.
24526         * lib/unicodeio.h, lib/unicodeio.c: New files.
24527         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
24528         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
24529         (noinst_HEADERS): Add unicodeio.h.
24530         (all-local, install-exec-local, charset.alias): New targets.
24531
24532 2000-02-28  Paul Eggert  <eggert@twinsun.com>
24533
24534         * lib/quotearg.c (ALERT_CHAR): New macro.
24535         (quotearg_buffer_restyled): Use it.
24536
24537 2000-02-27  Jim Meyering  <meyering@lucent.com>
24538
24539         * m4/check-decl.m4: Add getenv to the list.
24540
24541 2000-02-27  Jim Meyering  <meyering@lucent.com>
24542
24543         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
24544         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
24545
24546         * lib/backupfile.c: Guard inclusion of stdlib.h with
24547         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
24548         Declare malloc if needed.
24549
24550         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
24551         `#ifndef HAVE_DECL..'
24552         now that autoconf always defines the HAVE_DECL_ symbols.
24553         * lib/human.c: Likewise.
24554         * lib/same.c: Likewise.
24555         * lib/strtoumax.c: Likewise.
24556
24557         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
24558         declaration check was not run.
24559         * lib/hash.c: Likewise.
24560         * lib/human.c: Likewise.
24561         * lib/same.c: Likewise.
24562         * lib/strtoumax.c: Likewise.
24563
24564         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
24565         `.', then first look up the entire `.'-containing string as a login
24566         name.
24567
24568 2000-02-23  Jim Meyering  <meyering@lucent.com>
24569
24570         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
24571         in place of my hack.
24572
24573 2000-02-18  Paul Eggert  <eggert@twinsun.com>
24574
24575         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
24576         (textint): New typedef.
24577         (parser_control): Member year changed from int to textint.
24578         All uses changed.
24579         (YYSTYPE): Removed; replaced by %union with int and textint members.
24580         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
24581         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
24582         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
24583         (tSNUMBER, tUNUMBER): Now of type <textintval>.
24584         (date, number, to_year): Use width of number in digits, not its value,
24585         to determine whether it's a 2-digit year, or a 2-digit time.
24586         (yylex): Store number of digits of numeric tokens.
24587         Reported by John Kendall.
24588
24589         (parser_control): Changed from struct parser_control to typedef (for
24590         consistency).  All uses changed.
24591
24592         (tID): Removed; not used.
24593         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
24594
24595 2000-02-14  Paul Eggert  <eggert@twinsun.com>
24596
24597         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
24598         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
24599
24600 2000-02-12  Jim Meyering  <meyering@lucent.com>
24601
24602         * lib/userspec.c (ISDIGIT): Define it.
24603         (isdigit): Remove definition.
24604         (is_number): Use ISDIGIT, not isdigit.
24605         <libintl.h>: Include.
24606         (_ and N_): Define.
24607         (parse_user_spec): Mark translatable strings.
24608
24609 2000-02-10  Jim Meyering  <meyering@lucent.com>
24610
24611         With these changes, nanosleep.[ch] are finally enough like the other
24612         lib/* replacement files to compile on a few more losing systems.
24613
24614         * lib/nanosleep.h: Don't include config.h.
24615         Remove prototype from declaration of nanosleep.
24616         (PARAMS): Remove now-unneeded definition.
24617         * lib/nanosleep.c: #undef nanosleep.
24618         (rpl_nanosleep): Rename from nanosleep.
24619
24620 2000-02-10  Jim Meyering  <meyering@lucent.com>
24621
24622         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
24623         gnu_nanosleep to rpl_nanosleep.
24624
24625 2000-02-09  Jim Meyering  <meyering@lucent.com>
24626
24627         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
24628         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
24629
24630 2000-02-08  Akim Demaille  <akim@epita.fr>
24631
24632         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
24633         `[' and `]' and remove uses of `changequote'.
24634         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
24635         (AC_SYS_LARGEFILE): Likewise.
24636         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
24637         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
24638         of changequote.
24639         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
24640         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
24641         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
24642         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
24643
24644 2000-02-05  Jim Meyering  <meyering@lucent.com>
24645
24646         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
24647         Remove explicit use of AC_HEADER_TIME.  It is required by
24648         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
24649         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
24650         in autoconf whereby the expansion of the latter ended up preceding
24651         the expansion of its prerequisite, AC_HEADER_TIME.
24652         Reported by Volker Borchert.
24653
24654 2000-02-03  Jim Meyering  <meyering@lucent.com>
24655
24656         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
24657
24658 2000-02-03  Jim Meyering  <meyering@lucent.com>
24659
24660         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
24661         rather than with `#if HAVE_UTMPNAME'.
24662
24663 2000-02-02  Jim Meyering  <meyering@lucent.com>
24664
24665         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
24666         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
24667         Reported by Eli Zaretskii.
24668
24669 2000-02-01  Jim Meyering  <meyering@lucent.com>
24670
24671         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
24672
24673 2000-01-31  Jim Meyering  <meyering@lucent.com>
24674
24675         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
24676         functions.  Add the time.h and sys/time.h headers along with the
24677         AC_REQUIRE'ment of AC_HEADER_TIME.
24678
24679 2000-01-31  Jim Meyering  <meyering@lucent.com>
24680
24681         * lib/nanosleep.h (nanosleep): Guard declaration with
24682         `#if ! HAVE_DECL_NANOSLEEP'.
24683         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
24684         the declaration in that vendor's sys/timers.h.
24685         Reported by Christian Krackowizer.
24686
24687         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
24688         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
24689         (ISPRINT): Likewise.
24690         Reported by Tom Tromey.
24691
24692 2000-01-30  Jim Meyering  <meyering@lucent.com>
24693
24694         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
24695
24696         * m4/prereq.m4 (utmp_includes): Define.
24697         Check for ut_user and ut_name members in both struct utmpx
24698         and struct utmp.
24699
24700 2000-01-30  Jim Meyering  <meyering@lucent.com>
24701
24702         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
24703         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
24704         header files where only utmpx.ut_user is declared.
24705
24706         * lib/readutmp.h (UT_USER): Define.
24707
24708 2000-01-29  Jim Meyering  <meyering@lucent.com>
24709
24710         * m4/lib-check.m4: New file containing library-related checks from
24711         fileutils and sh-utils (textutils had none).
24712
24713 2000-01-28  Jim Meyering  <meyering@lucent.com>
24714
24715         * m4/perl.m4: Change format of warning message to look more like that
24716         from the missing script.  Suggestion from François Pinard.
24717
24718 2000-01-25  Jim Meyering  <meyering@lucent.com>
24719
24720         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
24721         well as time.h in the compile check.
24722         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
24723         Fix typo in cross-compiling case: s/yes/no/.
24724
24725 2000-01-23  Jim Meyering  <meyering@lucent.com>
24726
24727         * m4/jm-macros.m4: Move df-related tests here from
24728         fileutils/configure.in
24729
24730         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
24731         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
24732
24733         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
24734         s/space/ac_fsusage_space/.
24735         (jm_FILE_SYSTEM_USAGE): Take two parameters.
24736
24737         * m4/ftruncate.m4: New file (derived from part of
24738         fileutils/configure.in).
24739         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
24740         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
24741
24742         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
24743         AC_SUBST these here, rather than just in sh-util/configure.in, so
24744         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
24745         all the same.
24746         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
24747         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
24748         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
24749         (AC_SUBST(POW_LIBM)): Likewise.
24750         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
24751
24752 2000-01-23  Jim Meyering  <meyering@lucent.com>
24753
24754         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
24755         obstack.c.
24756
24757 2000-01-22  Jim Meyering  <meyering@lucent.com>
24758
24759         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
24760
24761         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
24762
24763         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
24764         configure.in
24765         (AC_CHECK_HEADERS): Likewise for sh-utils.
24766         (AC_CHECK_HEADERS): Likewise for textutils.
24767         Merge the three lists of headers.
24768
24769         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
24770         from fileutils' configure.in.
24771
24772         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
24773         code. Moved tests into their own function (_jm_DECL_HEADERS) in
24774         check-decl.m4.
24775
24776         * m4/check-decl.m4: Use #if rather than #ifdef.
24777         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
24778         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
24779         (_jm_DECL_HEADERS): Define new function.
24780         (jm_CHECK_DECLARATIONS): Require it.
24781
24782 2000-01-22  Jim Meyering  <meyering@lucent.com>
24783
24784         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
24785         [! HAVE_DECL_STRTOULL]: Declare strtoull.
24786         Required for some AIX systems.  Reported by Christian Krackowizer.
24787         [TESTING] (main): New function.
24788
24789         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
24790         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
24791         letters.
24792
24793         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
24794         iswprint.
24795
24796         * lib/strverscmp.c (ISDIGIT): Define.
24797         (strverscmp): Use ISDIGIT, not isdigit.
24798
24799 2000-01-19  Jim Meyering  <meyering@lucent.com>
24800
24801         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
24802         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
24803         defines `struct timespec' in <sys/time.h>
24804
24805         * m4/c-bs-a.m4: Remove uses of changequote altogether.
24806         Thanks to Akim for explaining.
24807
24808 2000-01-17  Paul Eggert  <eggert@twinsun.com>
24809
24810         * lib/nanosleep.c (nanosleep):
24811         Don't use SA_INTERRUPT to decide whether to call sigaction, as
24812         POSIX.1 doesn't require SA_INTERRUPT and some systems
24813         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
24814         it's been part of POSIX.1 since day 1 (in 1988).
24815
24816 2000-01-17  Jim Meyering  <meyering@lucent.com>
24817
24818         * lib/interlock: Remove unused file.  Reported by François Pinard.
24819
24820 2000-01-16  Paul Eggert  <eggert@twinsun.com>
24821
24822         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
24823         alert, backslash, formfeed, and vertical tab unnecessarily in
24824         shell quoting style.
24825
24826 2000-01-16  Jim Meyering  <meyering@lucent.com>
24827
24828         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
24829         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
24830         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
24831         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
24832
24833 2000-01-16  Jim Meyering  <meyering@lucent.com>
24834
24835         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
24836         because the latter didn't work.
24837
24838 2000-01-15  Jim Meyering  <meyering@lucent.com>
24839
24840         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
24841         (AC_REPLACE_FUNCS): Add memcpy and memset.
24842         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
24843         Add strpbrk.
24844         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
24845
24846 2000-01-12  Jim Meyering  <meyering@lucent.com>
24847
24848         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
24849         (jm_PREREQ): Use it.
24850         (jm_PREREQ_READUTMP): New macro.
24851         (jm_PREREQ): Use it.
24852
24853 2000-01-11  Paul Eggert  <eggert@twinsun.com>
24854
24855         Quote multibyte characters correctly.
24856         * m4/c-bs-a.m4: New file.
24857         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
24858         (jm_PREREQ): Use it.
24859
24860 2000-01-11  Paul Eggert  <eggert@twinsun.com>
24861
24862         * m4/uintmax_t.m4: Port to autoconf 2.13.
24863
24864 2000-01-08  Jim Meyering  <meyering@ascend.com>
24865
24866         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
24867         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
24868
24869 2000-01-04  Jim Meyering  <meyering@ascend.com>
24870
24871         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
24872         jm_STRUCT_DIRENT_D_TYPE.
24873         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
24874         jm_STRUCT_DIRENT_D_INO.
24875         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
24876         jm_STRUCT_UTIMBUF.
24877         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
24878         renamings.
24879         * m4/utime.m4: Likewise.
24880
24881         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
24882         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
24883
24884 2000-01-03  Paul Eggert  <eggert@twinsun.com>
24885
24886         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
24887         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
24888
24889 2000-01-02  Jim Meyering  <meyering@ascend.com>
24890
24891         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
24892         remember if this is necessary.
24893
24894 1999-12-26  Jim Meyering  <meyering@ascend.com>
24895
24896         * m4/jm-macros.m4: Use it here.
24897         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
24898
24899 1999-12-23  Jim Meyering  <meyering@ascend.com>
24900
24901         * m4/jm-macros.m4: Check for clock_gettime (moved from
24902         fileutils/configure.in)
24903         Check for gettimeofday.
24904
24905 1999-12-20  Jim Meyering  <meyering@ascend.com>
24906
24907         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
24908         autoconf-2.14a-1999-12-20.
24909
24910 1999-12-19  Jim Meyering  <meyering@ascend.com>
24911
24912         * m4/lstat-slash.m4: New file.
24913         * m4/jm-macros.m4: Use the new macro:
24914         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24915
24916 1999-12-07  Jim Meyering  <meyering@ascend.com>
24917
24918         * m4/perl.m4: Require that File::Compare be available, too.
24919         Too many systems seem to lack it.
24920
24921         * m4/strftime.m4: Add checks for most of the cpp macros tested in
24922         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
24923
24924 1999-11-18  Paul Eggert  <eggert@twinsun.com>
24925
24926         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
24927         problem with the QNX 4.25 shell, which doesn't propagate exit
24928         status of failed commands inside shell assignments.
24929
24930 1999-11-17  Jim Meyering  <meyering@ascend.com>
24931
24932         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
24933
24934 1999-11-07  Jim Meyering  <meyering@ascend.com>
24935
24936         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
24937
24938 1999-11-06  Jim Meyering  <meyering@ascend.com>
24939
24940         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
24941         * m4/jm-macros.m4 (jm_MACROS): Use it here.
24942
24943 1999-11-05  Jim Meyering  <meyering@ascend.com>
24944
24945         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
24946         configure.in of textutils, fileutils, and sh-utils into this one
24947         (shared between those packages) file.
24948         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
24949         AC_STRUCT_ST_BLKSIZE.
24950
24951 1999-11-03  Jim Meyering  <meyering@ascend.com>
24952
24953         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
24954         of AC_CHECK_TYPE checks includes unistd.h.
24955         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
24956         Suggestion from Akim Demaille.
24957
24958 1999-10-30  Jim Meyering  <meyering@ascend.com>
24959
24960         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
24961         m4-quoted string.
24962         * m4/ls-mntd-fs.m4: Likewise.
24963         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
24964         * m4/jm-winsz1.m4: Likewise.
24965
24966         * m4/const.m4: Remove file, since the fix made it into the experimental
24967         version of autoconf.
24968         * m4/mktime.m4: Likewise.
24969
24970         * m4/check-type.m4: Remove file, now that the latest version of
24971         AC_CHECK_TYPE takes a third arg to specify additional #includes.
24972
24973         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
24974         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
24975         AC_CHECK_TYPE.
24976
24977 1999-10-04  Jim Meyering  <meyering@ascend.com>
24978
24979         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
24980
24981 1999-09-22  Paul Eggert  <eggert@twinsun.com>
24982
24983         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
24984         2.95.1 bug with HP-UX 10.20.
24985
24986 1999-09-17  Jim Meyering  <meyering@ascend.com>
24987
24988         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
24989         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
24990         due to missing strdup (against sh-utils-2.0).
24991
24992 1999-08-29  Jim Meyering  <meyering@ascend.com>
24993
24994         * m4/jm-macros.m4: Require jm_BISON.
24995         * m4/bison.m4: New file.
24996
24997 1999-08-17  Paul Eggert  <eggert@twinsun.com>
24998
24999         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
25000         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
25001
25002 1999-08-05  Jim Meyering  <meyering@ascend.com>
25003
25004         * m4/getline.m4: Rename test file from conftestdata to conftest.data
25005         to avoid conflicts with `conftest' on 8+3 filesystems.
25006         Suggestion from Eli Zaretskii.
25007
25008 1999-08-04  Jim Meyering  <meyering@ascend.com>
25009
25010         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
25011         fileutils and sh-utils (textutils's getline test was inadequate).
25012         (AM_FUNC_GETLINE): Run this test.
25013         (AC_CHECK_FUNCS): Check for getdelim.
25014         Reported by Bob Proulx.
25015
25016 1999-08-02  Jim Meyering  <meyering@ascend.com>
25017
25018         * m4/jm-macros.m4: Add a comment.
25019
25020 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25021
25022         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
25023         <inttypes.h> defines strtoumax as a macro (and not as a
25024         function).
25025
25026 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25027
25028         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
25029         that we can shift, multiply and divide unsigned long long
25030         values; Ultrix cc can't do it.
25031
25032 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25033
25034         * m4/mktime.m4: New file, which is a preview of what should appear
25035         in the next public autoconf release.
25036
25037 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25038
25039         * m4/lfs.m4: Remove this file.
25040         * m4/largefile.m4: New file.  It contains the old contents of
25041         lfs.m4, except that all names with prefix AC_LFS have been
25042         changed to use the prefix AC_SYS_LARGEFILE instead, to be
25043         compatible with future autoconf versions.  Also, some minor m4
25044         quoting problems have been fixed.
25045
25046 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25047
25048         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
25049         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
25050         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
25051         and simplify the shell code.
25052
25053 1999-08-01  Jim Meyering  <meyering@ascend.com>
25054
25055         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
25056         m4.
25057
25058 1999-07-20  Jim Meyering  <meyering@ascend.com>
25059
25060         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
25061
25062 1999-07-15  Jim Meyering  <meyering@ascend.com>
25063
25064         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
25065
25066 1999-05-22  Jim Meyering  <meyering@ascend.com>
25067
25068         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
25069
25070 1999-05-20  Jim Meyering  <meyering@ascend.com>
25071
25072         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
25073         Add a colon after each `then' in case $4 is empty.
25074
25075 1999-05-16  Jim Meyering  <meyering@ascend.com>
25076
25077         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
25078
25079 1999-05-10  Jim Meyering  <meyering@ascend.com>
25080
25081         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
25082
25083         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
25084         AC_FUNC_MKTIME.
25085
25086 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
25087
25088         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
25089
25090 1999-05-04  Paul Eggert  <eggert@twinsun.com>
25091
25092         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
25093         not CPPFLAGS, so that linking works correctly in IRIX.
25094
25095 1999-04-30  Paul Eggert  <eggert@twinsun.com>
25096
25097         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
25098
25099 1999-04-20  Paul Eggert  <eggert@twinsun.com>
25100
25101         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
25102         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
25103         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
25104         jm_AC_TYPE_UNSIGNED_LONG_LONG.
25105         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
25106
25107         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
25108
25109 1999-04-20  Jim Meyering  <meyering@ascend.com>
25110
25111         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
25112         AC_REPLACE xstroull if necessary.  From Paul Eggert.
25113         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
25114
25115 1999-04-18  Jim Meyering  <meyering@ascend.com>
25116
25117         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
25118         * m4/jm-macros.m4: Use it.
25119
25120 1999-04-06  Jim Meyering  <meyering@ascend.com>
25121
25122         * m4/strftime.m4: Remove test for %f.
25123
25124 1999-03-29  Jim Meyering  <meyering@ascend.com>
25125
25126         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
25127         superset of the AC_TYPE_* checks in the textutils, fileutils,
25128         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
25129         AC_TYPE_PID_T.
25130
25131 1999-03-28  Jim Meyering  <meyering@ascend.com>
25132
25133         * m4/jm-macros.m4: Define GNU_PACKAGE here.
25134         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
25135         replaced e.g., in the *.sh files of the sh-utils.
25136
25137 1999-03-20  Jim Meyering  <meyering@ascend.com>
25138
25139         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
25140         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
25141         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
25142
25143 1999-03-19  Jim Meyering  <meyering@ascend.com>
25144
25145         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
25146
25147 1999-03-12  Jim Meyering  <meyering@ascend.com>
25148
25149         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
25150
25151 1999-03-07  Jim Meyering  <meyering@ascend.com>
25152
25153         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
25154         declared.
25155
25156 1999-02-17  Jim Meyering  <meyering@ascend.com>
25157
25158         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
25159         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
25160
25161 1999-02-07  Jim Meyering  <meyering@ascend.com>
25162
25163         * m4/group-member.m4: New file -- extracted from sh-utils'
25164         configure.in.
25165
25166         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
25167         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
25168
25169 1999-02-06  Jim Meyering  <meyering@ascend.com>
25170
25171         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
25172         * m4/fnmatch.m4: Likewise.
25173         * m4/getgroups.m4: Likewise.
25174         * m4/lstat.m4: Likewise.
25175         * m4/malloc.m4: Likewise.
25176         * m4/putenv.m4: Likewise.
25177         * m4/realloc.m4: Likewise.
25178         * m4/regex.m4: Likewise.
25179         * m4/stat.m4: Likewise.
25180         * m4/strftime.m4: Likewise.
25181         Suggestion from Alain Magloire.
25182
25183         * m4/chown.m4: Use `.$ac_objext', not `.o'.
25184         * m4/fnmatch.m4: Likewise.
25185         * m4/getgroups.m4: Likewise.
25186         * m4/getline.m4: Likewise.
25187         * m4/lstat.m4: Likewise.
25188         * m4/malloc.m4: Likewise.
25189         * m4/memcmp.m4: Likewise.
25190         * m4/putenv.m4: Likewise.
25191         * m4/realloc.m4: Likewise.
25192         * m4/regex.m4: Likewise.
25193         * m4/stat.m4: Likewise.
25194         * m4/strftime.m4: Likewise.
25195         Suggestion from Alain Magloire.
25196
25197         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
25198         an argument.
25199
25200         * m4/regex.m4: Add a run-time Test for proper operation of
25201         re_compile_pattern.
25202
25203 1999-01-31  Jim Meyering  <meyering@ascend.com>
25204
25205         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
25206
25207 1999-01-30  Jim Meyering  <meyering@ascend.com>
25208
25209         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
25210
25211         * m4/jm-mktime.m4: Make this a wrapper around the official
25212         AM_FUNC_MKTIME rather than my private copy, now that the official one
25213         is up to date.
25214         * m4/mktime.m4: Remove file.
25215
25216         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
25217         * m4/uptime.m4: Likewise.
25218         * m4/uintmax_t.m4: Likewise.
25219
25220 1999-01-28  Jim Meyering  <meyering@ascend.com>
25221
25222         * m4/jm-macros.m4: Use jm_AFS.
25223         * m4/afs.m4: New file (from fileutils' configure.in).
25224
25225         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
25226         * m4/chown.m4: Likewise.
25227         * m4/d-ino.m4: Likewise.
25228         * m4/d-type.m4: Likewise.
25229         * m4/fnmatch.m4: Likewise.
25230         * m4/getgroups.m4: Likewise.
25231         * m4/gettext.m4: Likewise.
25232         * m4/jm-mktime.m4: Likewise.
25233         * m4/jm-winsz2.m4: Likewise.
25234         * m4/lcmessage.m4: Likewise.
25235         * m4/ls-mntd-fs.m4: Likewise.
25236         * m4/malloc.m4: Likewise.
25237         * m4/memcmp.m4: Likewise.
25238         * m4/putenv.m4: Likewise.
25239         * m4/realloc.m4: Likewise.
25240         * m4/st_mtim.m4: Likewise.
25241         * m4/strftime.m4: Likewise.
25242
25243 1999-01-16  Jim Meyering  <meyering@ascend.com>
25244
25245         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
25246         (ARGMATCH_DIE_DECL): Define.
25247
25248 1999-01-12  Jim Meyering  <meyering@ascend.com>
25249
25250         * m4/Makefile.am.in: Rewrite to avoid using fmt.
25251         Reported by Lars Hecking.
25252
25253 1999-01-10  Jim Meyering  <meyering@ascend.com>
25254
25255         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
25256         gross kludge.
25257         * m4/inttypes_h.m4: Likewise.
25258         * m4/lstat.m4: Likewise.
25259         * m4/malloc.m4: Likewise.
25260         * m4/readdir.m4: Likewise.
25261         * m4/realloc.m4: Likewise.
25262         * m4/st_dm_mode.m4: Likewise.
25263         * m4/stat.m4: Likewise.
25264         * m4/utimbuf.m4: Likewise.
25265         * m4/utimes.m4: Likewise.
25266
25267         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
25268         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
25269         comments in config.h.in are meaningful.
25270
25271         * m4/jm-macros.m4: Require autoconf-2.13 here.
25272
25273         * m4/regex.m4: By default, don't use the included regex.c on systems
25274         with glibc 2.  Suggestion from Uli Drepper.
25275
25276 1999-01-02  Jim Meyering  <meyering@ascend.com>
25277
25278         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
25279
25280 1998-12-18  Jim Meyering  <meyering@ascend.com>
25281
25282         * m4/Makefile.am.in (Makefile.am): Simplify rule.
25283         Based on a suggestion from Lars Hecking.
25284
25285 1998-11-16  Paul Eggert  <eggert@twinsun.com>
25286
25287         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
25288
25289 1998-11-16  Jim Meyering  <meyering@ascend.com>
25290
25291         * m4/lfs.m4: Double-quote the `uname...` expression.
25292
25293 1998-11-14  Jim Meyering  <meyering@ascend.com>
25294
25295         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
25296         * m4/stat.m4: Likewise.
25297
25298 1998-11-03  Jim Meyering  <meyering@ascend.com>
25299
25300         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
25301         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
25302
25303 1998-10-18  Jim Meyering  <meyering@ascend.com>
25304
25305         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
25306
25307 1998-10-17  Jim Meyering  <meyering@ascend.com>
25308
25309         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
25310         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
25311         calls for those previously hard-coded headers.  Instead, take a new
25312         parameter.
25313         (jm_CHECK_DECLARATIONS): Reflect interface change.
25314         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
25315         (jm_CHECK_DECL_LOCALTIME_R): New macro.
25316
25317         * m4/mktime.m4: Test for spring-forward gap before long-running test.
25318
25319 1998-10-14  Jim Meyering  <meyering@ascend.com>
25320
25321         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
25322         instead of "TZ=America/Vancouver".  From Paul Eggert.
25323
25324 1998-10-11  Jim Meyering  <meyering@ascend.com>
25325
25326         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
25327         This adds a test for a recently added compatibility fix for mktime.c.
25328         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
25329
25330 1998-09-27  Jim Meyering  <meyering@ascend.com>
25331
25332         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
25333
25334         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
25335         ../configure.in, including a change from Gordon Matzigkeit to allow
25336         cross-compiling for the Hurd.
25337
25338         * m4/glibc.m4: New file/macro to test for the GNU C Library
25339         versions 1 and 2.  From Gordon Matzigkeit.
25340         Indent.
25341
25342 1998-09-21  Jim Meyering  <meyering@ascend.com>
25343
25344         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
25345
25346 1998-08-18  Paul Eggert  <eggert@twinsun.com>
25347
25348         Port nanosecond-resolution times to UnixWare 2.1.2 and
25349         pedantic Solaris 2.6.
25350
25351         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
25352         AC_STRUCT_ST_MTIM.
25353         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
25354         Generate name of ns member, instead of just 1 or undef.
25355         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
25356
25357 1998-08-15  Jim Meyering  <meyering@ascend.com>
25358
25359         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
25360         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
25361         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
25362         instead of jm_TYPE_SSIZE_T.
25363
25364 1998-08-12  Jim Meyering  <meyering@ascend.com>
25365
25366         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
25367
25368 1998-08-02  Jim Meyering  <meyering@ascend.com>
25369
25370         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
25371         in acconfig.h manually.
25372
25373 1998-07-31  Paul Eggert  <eggert@twinsun.com>
25374
25375         * m4/st_mtim.m4: New file.
25376
25377 1998-07-28  Jim Meyering  <meyering@ascend.com>
25378
25379         * m4/utimes.m4: Undef stat.
25380
25381 1998-07-25  Jim Meyering  <meyering@ascend.com>
25382
25383         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
25384         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
25385
25386 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
25387
25388         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
25389         uid and gid actually remain unchanged.
25390
25391 1998-07-07  Jim Meyering  <meyering@ascend.com>
25392
25393         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
25394
25395 1998-07-04  Jim Meyering  <meyering@ascend.com>
25396
25397         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
25398         to prove that this macro can be used in packages without regex.c.
25399
25400 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
25401
25402         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
25403         is to be used.
25404
25405 1998-07-03  Jim Meyering  <meyering@ascend.com>
25406
25407         * m4/gettext.m4: Add -lintl if it's found to be necessary.
25408
25409         * m4/gettext.m4: New file -- from gettext-0.10.35.
25410         * m4/lcmessage.m4: Likewise.
25411         * m4/progtest.m4: Likewise.
25412
25413         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
25414         * m4/jm-macros.m4: Require the new macro.
25415
25416 1998-06-29  Jim Meyering  <meyering@ascend.com>
25417
25418         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
25419         for the definition of NGROUPS (used in a system header included
25420         by sys/mount.h).
25421
25422 1998-06-28  Jim Meyering  <meyering@ascend.com>
25423
25424         * m4/ls-mntd-fs.m4: New file.
25425         * m4/fstypename.m4: New file.
25426
25427         * m4/jm-macros.m4: Require the new macro.
25428         * m4/jm-glibc-io.m4: New file.
25429
25430 1998-05-19  Jim Meyering  <meyering@ascend.com>
25431
25432         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
25433         * m4/lchown.m4: New file.
25434
25435         * m4/Makefile.am.in: New file.
25436         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
25437
25438 1998-05-14  Jim Meyering  <meyering@ascend.com>
25439
25440         * m4/Makefile.am (EXTRA_DIST): Add them.
25441         * m4/jm-macros.m4: New file.
25442         * m4/utimbuf.m4: New file.
25443
25444 1998-05-12  Jim Meyering  <meyering@ascend.com>
25445
25446         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
25447
25448 1998-05-11  Jim Meyering  <meyering@ascend.com>
25449
25450         * m4/isc-posix.m4: New file.
25451
25452 1998-05-10  Jim Meyering  <meyering@ascend.com>
25453
25454         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
25455
25456 1998-05-09  Jim Meyering  <meyering@ascend.com>
25457
25458         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
25459         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
25460         with automake.
25461
25462         * m4/ssize_t.m4: New file.
25463         * m4/mktime.m4: Remove file -- the new automake has this now.
25464
25465 1998-04-26  Jim Meyering  <meyering@ascend.com>
25466
25467         * m4/assert.m4: New file.
25468         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
25469
25470 1998-04-05  Jim Meyering  <meyering@ascend.com>
25471
25472         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
25473         (jm_PREREQ): Use it here.
25474
25475 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
25476
25477         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
25478         in acconfig.h.
25479
25480 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
25481
25482         * m4/prereq.m4: New file.
25483         * m4/error.m4: New file.
25484         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
25485
25486 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
25487
25488         * m4/getline.m4: Don't set am_cv_func_working_getline before the
25489         cache-check for the same variable -- that defeated the purpose of
25490         the test; the test program was never run.  This was a problem only
25491         on systems with losing getline functions -- HP-UX 10.20 is one.
25492         Reported by Bjorn Helgaas.
25493
25494 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
25495
25496         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
25497
25498 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
25499
25500         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
25501
25502         * m4/const.m4: New file.  Use an initializer in this declaration
25503         typedef int charset[2]; const charset x;
25504         Reported by Bob Glickstein.
25505
25506 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
25507
25508         * m4/chown.m4: Fix reversed types on -1 args to chown.
25509         From Kaveh Ghazi.
25510
25511 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
25512
25513         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
25514         Add lseek and memchr.
25515
25516         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
25517         T.E.Dickey <dickey@clark.net> said that some older preprocessors
25518         have a 20-character limit on names.
25519
25520 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
25521
25522         * m4/inttypes_h.m4: New file.
25523         * m4/uintmax_t.m4: New file.
25524         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
25525
25526 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
25527   Free Software Foundation, Inc.
25528 Copying and distribution of this file, with or without modification,
25529 are permitted provided the copyright notice and this notice are preserved.