7b1f1b33eac76a7b4d7389695090760f13617067
[gnulib.git] / ChangeLog
1 2007-01-18  Bruno Haible  <bruno@clisp.org>
2
3         * tests/test-gettimeofday.c: Include <time.h>.
4         (dummy): Remove variable.
5
6         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
7         gl_HEADER_SYS_TIME_H.
8         (gl_HEADER_SYS_TIME_H): New macro.
9
10         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
11         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
12         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
13         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
14         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
15         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
16         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
17         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
18         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
19         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
20         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
21
22         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
23         last change; it caused a compilation error when cross-compiling to
24         Cygwin.
25
26 2007-01-18  Jim Meyering  <jim@meyering.net>
27
28         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
29         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
30         than the race-prone "test -d sys || mkdir sys".
31         (configure.ac): Use AC_PROG_MKDIR_P.
32         * modules/sys_select: Likewise.
33         * modules/sys_socket: Likewise.
34         * modules/sys_time: Likewise.
35
36 2007-01-18  Eric Blake  <ebb9@byu.net>
37
38         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
39         replace gettimeofday.
40         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
41         name, to avoid infinite recursion.
42
43 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
44
45         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
46         module sys_time.
47         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
48         assume timespec.h defines struct timeval.
49         * lib/settime.c: Likewise.
50         * lib/utimens.c: Likewise.
51         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
52         since we now assume the gettimeofday module.
53         * lib/tempname.c (__gen_tempname): Likewise.
54         * lib/gettimeofday.h: Remove.
55         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
56         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
57         Include <time.h>, for 'time()'.
58         (localtime_buffer_addr): Also use this workaround if
59         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
60         to simplify the uses.  All uses changed.
61         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
62         that #undef is inside {}, and 'const' follows type name consistently.
63         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
64         (gettimeofday): Do not use the maximum possible value for
65         tv->tv_usec, since that might break usages other than ls.c.
66         Instead, we'll leave ls.c alone.  This undoes today's patch
67         by Bruno.  Add a compile-time warning for 1s-clock resolution;
68         we've never observed the problem but might as well keep the
69         canary.
70         * lib/nanosleep.c: Include timespec.h first, for interface check.
71         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
72         now assume the sys_time module.
73         * lib/tempname.c: Likewise.
74         * lib/timespec.h: Likewise.
75         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
76         needed.
77         * lib/strftime.c: Likewise.
78         * lib/timespec.h: Likewise.
79         * lib/posixtm.c: Include posixtm.h first, for interface check.
80         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
81         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
82         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
83         * lib/sys_time_.h: New file.
84         * lib/timespec.h (struct timespec): Use long int, not long.
85         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
86         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
87         Remove obsolescent call to AC_HEADER_TIME.
88         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
89         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
90         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
91         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
92         Likewise.
93         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
94         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
95         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
96         into the sys_time module.  Check for gettimeofday just once.
97         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
98         for gettimeofday signature to just check the signature.  Merely
99         compile it, since linking doesn't test signature.  Improve test for
100         whether gettimeofday.o is actually needed.
101         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
102         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
103         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
104         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
105         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
106         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
107         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
108         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
109         than worrying about sys/time.h.
110         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
111         Don't bother worrying about TIME_WITH_SYS_TIME.
112         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
113         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
114         * m4/sys_time_h.m4: New file.
115         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
116         Don't include sys/time.h.  Return from main rather than exiting.
117         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
118         all uses changed.
119         * modules/gethrxtime (Depends-on): Add sys_time.
120         * modules/gettime (Depends-on): Likewise.
121         * modules/gettimeofday (Depends-on): Likewise.
122         * modules/nanosleep (Depends-on): Likewise.
123         * modules/settime (Depends-on): Likewise.
124         * modules/tempname (Depends-on): Likewise.
125         * modules/utimens (Depends-on): Likewise.
126         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
127         (Include:) Change back to <sys/time.h>.
128         (Maintainer:) Add self.
129         * modules/sys_time: New file.
130         * modules/tempname (Depends-on): Add gettimeofday.
131         * tests/test-gettimeofday.c: Include <sys/time.h>
132         rather than gettimeofday.h.
133
134 2007-01-17  Bruno Haible  <bruno@clisp.org>
135
136         * gnulib-tool (func_get_license): Revert last patch. Instead, let
137         the license default to GPL.
138         (func_create_testdir): Don't complain if a module is LGPL and its
139         tests module depends on GPLed modules.
140
141 2007-01-17  Bruno Haible  <bruno@clisp.org>
142
143         * lib/gettimeofday.c (gettimeofday): Add code for the case
144         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
145         maximum possible value for tv->tv_usec, rather than the minimum one.
146
147 2005-10-08  Martin Lambers  <marlam@marlam.de>
148 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
149 2007-01-16  Bruno Haible  <bruno@clisp.org>
150
151         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
152         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
153         gl_FUNC_GETTIMEOFDAY.
154         (Include): Add gettimeofday.h.
155         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
156         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
157         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
158         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
159         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
160         * lib/gettimeofday.h: New file.
161         * lib/gettimeofday.c: Include <sys/timeb.h>.
162         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
163         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
164         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
165         fall back on time().
166
167         * tests/test-gettimeofday.c: New file.
168         * modules/gettimeofday-tests: New file.
169
170 2007-01-16  Eric Blake  <ebb9@byu.net>
171
172         * modules/fnmatch (Depends-on): Depend on wchar.
173         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
174         * m4/fnmatch.m4: Likewise.
175         * modules/mbchar (Makefile.am): Assume <wchar.h>.
176         * m4/mbchar.m4: Likewise.
177         * modules/mbswidth (Depends-on): Depend on wchar.
178         * lib/mbswidth.c: Assume <wchar.h>.
179         * m4/mbswidth.m4: Likewise.
180         * modules/quotearg (Depends-on): Depend on wchar.
181         * lib/quotearg.c: Assume <wchar.h>.
182         * m4/quotearg.m4: Likewise.
183         * modules/regex (Depends-on): Depend on wchar.
184         * lib/regex_internal.h: Assume <wchar.h>.
185         * m4/regex.m4: Likewise.
186         * modules/stdint (Depends-on): Depend on wchar.
187         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
188         * m4/stdint.m4: Likewise.
189         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
190         * modules/strftime (Depends-on): Depend on wchar.
191         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
192         * modules/strtol (Depends-on): Depend on wchar.
193         * lib/strtol.c: Assume <wchar.h>.
194         * modules/wcwidth (Depends-on): Depend on wchar.
195         * lib/wcwidth.h: Assume <wchar.h>.
196         * m4/wcwidth.m4: Likewise.
197
198 2007-01-16  Bruno Haible  <bruno@clisp.org>
199
200         * modules/csharpexec-script: New, created from...
201         * modules/csharpexec: ... this.
202
203 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
204
205         * modules/javaexec-script: New, created from...
206         * modules/javaexec: ... this.
207
208 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
209
210         * modules/poll (Dependencies): Add sys_select.
211
212 2007-01-15  Jim Meyering  <jim@meyering.net>
213
214         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
215         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
216         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
217         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
218
219 2007-01-15  Bruno Haible  <bruno@clisp.org>
220
221         * modules/striconveh: New file.
222         * lib/striconveh.h: New file.
223         * lib/striconveh.c: New file.
224         * MODULES.html.sh (Internationalization functions): Add striconveh.
225
226         * modules/striconveh-tests: New file.
227         * tests/test-striconveh.c: New file.
228
229 2007-01-15  Bruno Haible  <bruno@clisp.org>
230
231         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
232         not from GNU libiconv or GNU libc.
233
234 2007-01-15  Bruno Haible  <bruno@clisp.org>
235
236         * doc/gnulib-intro.texi (Copyright): Explain the different license
237         terms for module descriptions, autoconf macros, tests, documentation.
238
239 2007-01-14  Bruno Haible  <bruno@clisp.org>
240
241         * modules/striconv-tests: New file.
242         * tests/test-striconv.c: New file.
243
244 2007-01-14  Bruno Haible  <bruno@clisp.org>
245
246         * modules/iconv-tests: New file.
247         * tests/test-iconv.c: New file.
248
249 2007-01-14  Bruno Haible  <bruno@clisp.org>
250
251         * gnulib-tool (func_get_license): For test modules, use the license of
252         the main module.
253
254 2007-01-14  Bruno Haible  <bruno@clisp.org>
255
256         * modules/iconv (Include): Clarify that <iconv.h> can only be included
257         if iconv is found to exist.
258
259 2007-01-14  Bruno Haible  <bruno@clisp.org>
260
261         * modules/c-ctype-tests: New file.
262         * tests/test-c-ctype.c: New file.
263
264 2007-01-14  Bruno Haible  <bruno@clisp.org>
265
266         * modules/binary-io-tests: New file.
267         * tests/test-binary-io.sh: New file.
268         * tests/test-binary-io.c: New file.
269
270 2007-01-14  Bruno Haible  <bruno@clisp.org>
271
272         * modules/array-oset-tests: New file.
273         * tests/test-array_oset.c: New file.
274
275 2007-01-14  Bruno Haible  <bruno@clisp.org>
276
277         * modules/array-list-tests: New file.
278         * tests/test-array_list.c: New file.
279
280 2007-01-14  Bruno Haible  <bruno@clisp.org>
281
282         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
283         and make.
284         Reported by Simon Josefsson in
285         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
286
287 2007-01-14  Bruno Haible  <bruno@clisp.org>
288
289         * modules/allocsa-tests: New file.
290         * tests/test-allocsa.c: New file.
291
292 2007-01-14  Bruno Haible  <bruno@clisp.org>
293
294         * modules/fchdir (Depends-on): Add absolute-header.
295         * modules/unistd (Depends-on): Likewise.
296
297 2006-12-30  Bruno Haible  <bruno@clisp.org>
298
299         * modules/fchdir: New file.
300         * modules/unistd (Files): Add lib/unistd_.h.
301         (Makefile.am): Generate unistd.h from unistd_.h.
302         * lib/fchdir.c: New file.
303         * lib/dirent_.h: New file.
304         * lib/unistd_.h: New file.
305         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
306         * m4/fchdir.m4: New file.
307         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
308         (gl_HEADER_UNISTD): Invoke it.
309         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
310         function.
311         * lib/backupfile.c (opendir, closedir): Undefine.
312         * lib/chown.c (open, close): Undefine.
313         * lib/clean-temp.c (open, close): Undefine.
314         * lib/copy-file.c (open, close): Undefine.
315         * lib/execute.c (open, close): Undefine.
316         * lib/fsusage.c (open, close): Undefine.
317         * lib/gc-gnulib.c (open, close): Undefine.
318         * lib/getcwd.c (opendir, closedir): Undefine.
319         * lib/glob.c (opendir, closedir): Undefine.
320         * lib/javacomp.c (open, close): Undefine.
321         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
322         * lib/openat-proc.c (open, close): Undefine.
323         * lib/pagealign_alloc.c (open, close): Undefine.
324         * lib/pipe.c (open, close): Undefine.
325         * lib/progreloc.c (open, close): Undefine.
326         * lib/savedir.c (opendir, closedir): Undefine.
327         * lib/utime.c (open, close): Undefine.
328         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
329
330 2007-01-10  Bruno Haible  <bruno@clisp.org>
331
332         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
333
334 2007-01-12  Eric Blake  <ebb9@byu.net>
335
336         Provide a robust <wchar.h>.  Further simplifications are now
337         possible in other modules, but not included here.
338         * modules/wchar: New module.
339         * m4/wchar.m4: New file.
340         * lib/wchar_.h: Likewise.
341         * modules/mbchar (Depends-on): Depend on wchar, as the first use
342         of the new module.
343         * MODULES.html.sh (Extended multibyte and wide character utilities):
344         New section.
345
346 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
347
348         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
349         to a reasonable default for memory allocation.
350         (xreadlink): Don't allocate a huge buffer, to work around a buggy
351         file system that reports garbage st_size values for symlinks.
352         Problem reported by Liyang Hu.
353
354 2007-01-11  Simon Josefsson  <simon@josefsson.org>
355
356         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
357         Emacs .#* auto-save files).
358
359 2007-01-11  Bruno Haible  <bruno@clisp.org>
360
361         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
362         directory.
363
364 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
365
366         Use @...@ consistently in lib/wctype_.h.
367         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
368         on it being set to 1 or 0.
369         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
370         go back to AC_SUBSTing it.
371         * modules/wctype (Makefile.am): Undo previous change.
372
373 2007-01-10  Eric Blake  <ebb9@byu.net>
374
375         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
376         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
377         * modules/wctype (Makefile.am): Likewise.
378         Reported by Chris McGuire.
379
380 2007-01-10  Jim Meyering  <jim@meyering.net>
381
382         fts.c: a small readability/maintainability improvement
383         * lib/fts.c (fts_read): Make this code slightly more readable and
384         maintainable by hoisting the "sp->fts_cur = p" assignments to
385         immediately follow the statements that set P.  Derived from
386         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
387
388 2007-01-10  Eric Blake  <ebb9@byu.net>
389
390         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
391         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
392         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
393         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
394         Reported by Chris McGuire.
395
396 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
397
398         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
399         in sed script.
400
401 2007-01-09  Bruno Haible  <bruno@clisp.org>
402
403         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
404         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
405         variables.
406         (func_module): Use them.
407
408 2007-01-09  Bruno Haible  <bruno@clisp.org>
409
410         * modules/unistr/base: New file.
411         * lib/unistr.h: New file.
412
413         * modules/unistr/u8-to-u16: New file.
414         * lib/unistr/u8-to-u16.c: New file.
415
416         * modules/unistr/u8-to-u32: New file.
417         * lib/unistr/u8-to-u32.c: New file.
418
419         * modules/unistr/u16-to-u8: New file.
420         * lib/unistr/u16-to-u8.c: New file.
421
422         * modules/unistr/u16-to-u32: New file.
423         * lib/unistr/u16-to-u32.c: New file.
424
425         * modules/unistr/u32-to-u8: New file.
426         * lib/unistr/u32-to-u8.c: New file.
427
428         * modules/unistr/u32-to-u16: New file.
429         * lib/unistr/u32-to-u16.c: New file.
430
431         * modules/unistr/u8-check: New file.
432         * modules/unistr/u16-check: New file.
433         * modules/unistr/u32-check: New file.
434         * lib/unistr/u8-check.c: New file.
435         * lib/unistr/u16-check.c: New file.
436         * lib/unistr/u32-check.c: New file.
437
438         * modules/unistr/u8-chr: New file.
439         * modules/unistr/u16-chr: New file.
440         * modules/unistr/u32-chr: New file.
441         * lib/unistr/u8-chr.c: New file.
442         * lib/unistr/u16-chr.c: New file.
443         * lib/unistr/u32-chr.c: New file.
444
445         * modules/unistr/u8-cmp: New file.
446         * modules/unistr/u16-cmp: New file.
447         * modules/unistr/u32-cmp: New file.
448         * lib/unistr/u8-cmp.c: New file.
449         * lib/unistr/u16-cmp.c: New file.
450         * lib/unistr/u32-cmp.c: New file.
451
452         * modules/unistr/u8-cpy: New file.
453         * modules/unistr/u16-cpy: New file.
454         * modules/unistr/u32-cpy: New file.
455         * lib/unistr/u8-cpy.c: New file.
456         * lib/unistr/u16-cpy.c: New file.
457         * lib/unistr/u32-cpy.c: New file.
458         * lib/unistr/u-cpy.h: New file.
459
460         * modules/unistr/u8-cpy-alloc: New file.
461         * modules/unistr/u16-cpy-alloc: New file.
462         * modules/unistr/u32-cpy-alloc: New file.
463         * lib/unistr/u8-cpy-alloc.c: New file.
464         * lib/unistr/u16-cpy-alloc.c: New file.
465         * lib/unistr/u32-cpy-alloc.c: New file.
466         * lib/unistr/u-cpy-alloc.h: New file.
467
468         * modules/unistr/u8-endswith: New file.
469         * modules/unistr/u16-endswith: New file.
470         * modules/unistr/u32-endswith: New file.
471         * lib/unistr/u8-endswith.c: New file.
472         * lib/unistr/u16-endswith.c: New file.
473         * lib/unistr/u32-endswith.c: New file.
474         * lib/unistr/u-endswith.h: New file.
475
476         * modules/unistr/u8-mblen: New file.
477         * modules/unistr/u16-mblen: New file.
478         * modules/unistr/u32-mblen: New file.
479         * lib/unistr/u8-mblen.c: New file.
480         * lib/unistr/u16-mblen.c: New file.
481         * lib/unistr/u32-mblen.c: New file.
482
483         * modules/unistr/u8-mbtouc: New file.
484         * modules/unistr/u16-mbtouc: New file.
485         * modules/unistr/u32-mbtouc: New file.
486         * lib/unistr/u8-mbtouc.c: New file.
487         * lib/unistr/u16-mbtouc.c: New file.
488         * lib/unistr/u32-mbtouc.c: New file.
489
490         * modules/unistr/u8-mbtouc-safe: New file.
491         * modules/unistr/u16-mbtouc-safe: New file.
492         * modules/unistr/u32-mbtouc-safe: New file.
493         * lib/unistr/u8-mbtouc-safe.c: New file.
494         * lib/unistr/u16-mbtouc-safe.c: New file.
495         * lib/unistr/u32-mbtouc-safe.c: New file.
496
497         * modules/unistr/u8-move: New file.
498         * modules/unistr/u16-move: New file.
499         * modules/unistr/u32-move: New file.
500         * lib/unistr/u8-move.c: New file.
501         * lib/unistr/u16-move.c: New file.
502         * lib/unistr/u32-move.c: New file.
503         * lib/unistr/u-move.h: New file.
504
505         * modules/unistr/u8-next: New file.
506         * modules/unistr/u16-next: New file.
507         * modules/unistr/u32-next: New file.
508         * lib/unistr/u8-next.c: New file.
509         * lib/unistr/u16-next.c: New file.
510         * lib/unistr/u32-next.c: New file.
511
512         * modules/unistr/u8-prev: New file.
513         * modules/unistr/u16-prev: New file.
514         * modules/unistr/u32-prev: New file.
515         * lib/unistr/u8-prev.c: New file.
516         * lib/unistr/u16-prev.c: New file.
517         * lib/unistr/u32-prev.c: New file.
518
519         * modules/unistr/u8-set: New file.
520         * modules/unistr/u16-set: New file.
521         * modules/unistr/u32-set: New file.
522         * lib/unistr/u8-set.c: New file.
523         * lib/unistr/u16-set.c: New file.
524         * lib/unistr/u32-set.c: New file.
525         * lib/unistr/u-set.h: New file.
526
527         * modules/unistr/u8-startswith: New file.
528         * modules/unistr/u16-startswith: New file.
529         * modules/unistr/u32-startswith: New file.
530         * lib/unistr/u8-startswith.c: New file.
531         * lib/unistr/u16-startswith.c: New file.
532         * lib/unistr/u32-startswith.c: New file.
533         * lib/unistr/u-startswith.h: New file.
534
535         * modules/unistr/u8-stpcpy: New file.
536         * modules/unistr/u16-stpcpy: New file.
537         * modules/unistr/u32-stpcpy: New file.
538         * lib/unistr/u8-stpcpy.c: New file.
539         * lib/unistr/u16-stpcpy.c: New file.
540         * lib/unistr/u32-stpcpy.c: New file.
541         * lib/unistr/u-stpcpy.h: New file.
542
543         * modules/unistr/u8-stpncpy: New file.
544         * modules/unistr/u16-stpncpy: New file.
545         * modules/unistr/u32-stpncpy: New file.
546         * lib/unistr/u8-stpncpy.c: New file.
547         * lib/unistr/u16-stpncpy.c: New file.
548         * lib/unistr/u32-stpncpy.c: New file.
549         * lib/unistr/u-stpncpy.h: New file.
550
551         * modules/unistr/u8-strcat: New file.
552         * modules/unistr/u16-strcat: New file.
553         * modules/unistr/u32-strcat: New file.
554         * lib/unistr/u8-strcat.c: New file.
555         * lib/unistr/u16-strcat.c: New file.
556         * lib/unistr/u32-strcat.c: New file.
557         * lib/unistr/u-strcat.h: New file.
558
559         * modules/unistr/u8-strchr: New file.
560         * modules/unistr/u16-strchr: New file.
561         * modules/unistr/u32-strchr: New file.
562         * lib/unistr/u8-strchr.c: New file.
563         * lib/unistr/u16-strchr.c: New file.
564         * lib/unistr/u32-strchr.c: New file.
565
566         * modules/unistr/u8-strcmp: New file.
567         * modules/unistr/u16-strcmp: New file.
568         * modules/unistr/u32-strcmp: New file.
569         * lib/unistr/u8-strcmp.c: New file.
570         * lib/unistr/u16-strcmp.c: New file.
571         * lib/unistr/u32-strcmp.c: New file.
572
573         * modules/unistr/u8-strcpy: New file.
574         * modules/unistr/u16-strcpy: New file.
575         * modules/unistr/u32-strcpy: New file.
576         * lib/unistr/u8-strcpy.c: New file.
577         * lib/unistr/u16-strcpy.c: New file.
578         * lib/unistr/u32-strcpy.c: New file.
579         * lib/unistr/u-strcpy.h: New file.
580
581         * modules/unistr/u8-strcspn: New file.
582         * modules/unistr/u16-strcspn: New file.
583         * modules/unistr/u32-strcspn: New file.
584         * lib/unistr/u8-strcspn.c: New file.
585         * lib/unistr/u16-strcspn.c: New file.
586         * lib/unistr/u32-strcspn.c: New file.
587         * lib/unistr/u-strcspn.h: New file.
588
589         * modules/unistr/u8-strdup: New file.
590         * modules/unistr/u16-strdup: New file.
591         * modules/unistr/u32-strdup: New file.
592         * lib/unistr/u8-strdup.c: New file.
593         * lib/unistr/u16-strdup.c: New file.
594         * lib/unistr/u32-strdup.c: New file.
595         * lib/unistr/u-strdup.h: New file.
596
597         * modules/unistr/u8-strlen: New file.
598         * modules/unistr/u16-strlen: New file.
599         * modules/unistr/u32-strlen: New file.
600         * lib/unistr/u8-strlen.c: New file.
601         * lib/unistr/u16-strlen.c: New file.
602         * lib/unistr/u32-strlen.c: New file.
603         * lib/unistr/u-strlen.h: New file.
604
605         * modules/unistr/u8-strmblen: New file.
606         * modules/unistr/u16-strmblen: New file.
607         * modules/unistr/u32-strmblen: New file.
608         * lib/unistr/u8-strmblen.c: New file.
609         * lib/unistr/u16-strmblen.c: New file.
610         * lib/unistr/u32-strmblen.c: New file.
611
612         * modules/unistr/u8-strmbtouc: New file.
613         * modules/unistr/u16-strmbtouc: New file.
614         * modules/unistr/u32-strmbtouc: New file.
615         * lib/unistr/u8-strmbtouc.c: New file.
616         * lib/unistr/u16-strmbtouc.c: New file.
617         * lib/unistr/u32-strmbtouc.c: New file.
618
619         * modules/unistr/u8-strncat: New file.
620         * modules/unistr/u16-strncat: New file.
621         * modules/unistr/u32-strncat: New file.
622         * lib/unistr/u8-strncat.c: New file.
623         * lib/unistr/u16-strncat.c: New file.
624         * lib/unistr/u32-strncat.c: New file.
625         * lib/unistr/u-strncat.h: New file.
626
627         * modules/unistr/u8-strncmp: New file.
628         * modules/unistr/u16-strncmp: New file.
629         * modules/unistr/u32-strncmp: New file.
630         * lib/unistr/u8-strncmp.c: New file.
631         * lib/unistr/u16-strncmp.c: New file.
632         * lib/unistr/u32-strncmp.c: New file.
633
634         * modules/unistr/u8-strncpy: New file.
635         * modules/unistr/u16-strncpy: New file.
636         * modules/unistr/u32-strncpy: New file.
637         * lib/unistr/u8-strncpy.c: New file.
638         * lib/unistr/u16-strncpy.c: New file.
639         * lib/unistr/u32-strncpy.c: New file.
640         * lib/unistr/u-strncpy.h: New file.
641
642         * modules/unistr/u8-strnlen: New file.
643         * modules/unistr/u16-strnlen: New file.
644         * modules/unistr/u32-strnlen: New file.
645         * lib/unistr/u8-strnlen.c: New file.
646         * lib/unistr/u16-strnlen.c: New file.
647         * lib/unistr/u32-strnlen.c: New file.
648         * lib/unistr/u-strnlen.h: New file.
649
650         * modules/unistr/u8-strpbrk: New file.
651         * modules/unistr/u16-strpbrk: New file.
652         * modules/unistr/u32-strpbrk: New file.
653         * lib/unistr/u8-strpbrk.c: New file.
654         * lib/unistr/u16-strpbrk.c: New file.
655         * lib/unistr/u32-strpbrk.c: New file.
656         * lib/unistr/u-strpbrk.h: New file.
657
658         * modules/unistr/u8-strrchr: New file.
659         * modules/unistr/u16-strrchr: New file.
660         * modules/unistr/u32-strrchr: New file.
661         * lib/unistr/u8-strrchr.c: New file.
662         * lib/unistr/u16-strrchr.c: New file.
663         * lib/unistr/u32-strrchr.c: New file.
664
665         * modules/unistr/u8-strspn: New file.
666         * modules/unistr/u16-strspn: New file.
667         * modules/unistr/u32-strspn: New file.
668         * lib/unistr/u8-strspn.c: New file.
669         * lib/unistr/u16-strspn.c: New file.
670         * lib/unistr/u32-strspn.c: New file.
671         * lib/unistr/u-strspn.h: New file.
672
673         * modules/unistr/u8-strstr: New file.
674         * modules/unistr/u16-strstr: New file.
675         * modules/unistr/u32-strstr: New file.
676         * lib/unistr/u8-strstr.c: New file.
677         * lib/unistr/u16-strstr.c: New file.
678         * lib/unistr/u32-strstr.c: New file.
679         * lib/unistr/u-strstr.h: New file.
680
681         * modules/unistr/u8-strtok: New file.
682         * modules/unistr/u16-strtok: New file.
683         * modules/unistr/u32-strtok: New file.
684         * lib/unistr/u8-strtok.c: New file.
685         * lib/unistr/u16-strtok.c: New file.
686         * lib/unistr/u32-strtok.c: New file.
687         * lib/unistr/u-strtok.h: New file.
688
689         * modules/unistr/u8-uctomb: New file.
690         * modules/unistr/u16-uctomb: New file.
691         * modules/unistr/u32-uctomb: New file.
692         * lib/unistr/u8-uctomb.c: New file.
693         * lib/unistr/u16-uctomb.c: New file.
694         * lib/unistr/u32-uctomb.c: New file.
695
696         * MODULES.html.sh (Unicode string functions): Add the new modules.
697
698 2007-01-08  Bruno Haible  <bruno@clisp.org>
699
700         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
701         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
702         subdirectories.
703
704 2007-01-08  Karl Berry  <karl@gnu.org>
705
706         * doc/error.texi: mention that main() fns must set program_name
707         when progname is used.
708
709 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
710
711         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
712         WCTYPE_H is empty, for the benefit of builds from non-distclean
713         directories.  Problem reported by Eric Blake in
714         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
715
716 2007-01-08  Bruno Haible  <bruno@clisp.org>
717
718         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
719         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
720         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
721         PROVIDE_CANONICALIZE_FILENAME_MODE.
722         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
723
724 2007-01-08  Bruno Haible  <bruno@clisp.org>
725
726         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
727         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
728         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
729         * lib/fts.c: Likewise.
730         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
731
732 2006-12-25  Bruno Haible  <bruno@clisp.org>
733
734         * modules/utf8-ucs4-safe: New file.
735         * lib/utf8-ucs4-safe.h: New file.
736         * lib/unistr/utf8-ucs4-safe.c: New file.
737
738         * modules/utf16-ucs4-safe: New file.
739         * lib/utf16-ucs4-safe.h: New file.
740         * lib/unistr/utf16-ucs4-safe.c: New file.
741
742         * MODULES.html.sh (Unicode string functions): Add the new modules.
743
744 2007-01-08  Bruno Haible  <bruno@clisp.org>
745
746         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
747         (Depends-on): Add unitypes.
748         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
749         (u8_mbtouc_aux): Move out to separate file.
750         (u8_mbtouc): Use ucs4_t, uint8_t types.
751         * lib/unistr/utf8-ucs4.c: New file.
752
753         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
754         (Depends-on): Add unitypes.
755         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
756         (u16_mbtouc_aux): Move out to separate file.
757         (u16_mbtouc): Use ucs4_t, uint16_t types.
758         * lib/unistr/utf16-ucs4.c: New file.
759
760         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
761         (Depends-on): Add unitypes.
762         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
763         (u8_uctomb_aux): Move out to separate file.
764         (u8_uctomb): Use ucs4_t, uint8_t types.
765         * lib/unistr/ucs4-utf8.c: New file.
766
767         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
768         (Depends-on): Add unitypes.
769         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
770         (u16_uctomb_aux): Move out to separate file.
771         (u16_uctomb): Use ucs4_t, uint16_t types.
772         * lib/unistr/ucs4-utf16.c: New file.
773
774 2006-12-25  Bruno Haible  <bruno@clisp.org>
775
776         * modules/unitypes: New file.
777         * lib/unitypes.h: New file.
778         * MODULES.html.sh (func_all_modules): New section "Unicode string
779         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
780         this section. Add unitypes.
781
782 2007-01-08  Bruno Haible  <bruno@clisp.org>
783
784         Avoid variable names that conflict with those from libtool.
785         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
786         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
787         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
788         library_names_spec to acl_library_names_spec, hardcode_* to
789         acl_hardcode_*.
790         Reported by Ralf Wildenhues.
791
792 2007-01-08  Bruno Haible  <bruno@clisp.org>
793
794         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
795         definition.
796         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
797         definition.
798         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
799         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
800         definition.
801         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
802         definition.
803         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
804         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
805         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
806         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
807         definition.
808         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
809         definition.
810         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
811         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
812         GC_USE_<algorithm>.
813         * lib/gc-libgcrypt.c: Likewise.
814         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
815         * modules/gc-arctwo (configure.ac): Likewise.
816         * modules/gc-des (configure.ac): Likewise.
817         * modules/gc-hmac-md5 (configure.ac): Likewise.
818         * modules/gc-hmac-sha1 (configure.ac): Likewise.
819         * modules/gc-md2 (configure.ac): Likewise.
820         * modules/gc-md4 (configure.ac): Likewise.
821         * modules/gc-md5 (configure.ac): Likewise.
822         * modules/gc-random (configure.ac): Likewise.
823         * modules/gc-rijndael (configure.ac): Likewise.
824         * modules/gc-sha1 (configure.ac): Likewise.
825
826 2007-01-08  Bruno Haible  <bruno@clisp.org>
827
828         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
829         macro definition.
830         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
831         definition.
832         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
833         definition.
834         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
835         * modules/fcntl-safer (configure.ac): Likewise.
836         * modules/fopen-safer (configure.ac): Likewise.
837         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
838         GNULIB_FWRITEERROR macro definition.
839
840 2007-01-08  Bruno Haible  <bruno@clisp.org>
841
842         * m4/gnulib-common.m4: New file.
843         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
844         (func_get_filelist): Add m4/gnulib-common.m4.
845
846 2007-01-08  Bruno Haible  <bruno@clisp.org>
847
848         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
849         command.
850
851 2007-01-08  Jim Meyering  <jim@meyering.net>
852
853         Use a more robust test for a "can't happen" condition.
854         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
855         narrowed the st_size value.  Presuming the "can't happen" condition
856         is true, that narrowing could conceivably convert an invalid st_size
857         value into a valid one.  Instead, use a change based on Matthew
858         Woehlke's original patch.
859
860         Slight readability improvement: use an assert-like macro
861         in place of literal "abort ()" uses.
862         * lib/fts.c (fts_assert): Define.
863         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
864         Use this macro instead of a bare 'abort'.
865
866 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
867
868         Don't worry about using IRIX 5.3's wctype.h broken definitions;
869         simply work around them.
870         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
871         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
872         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
873         Don't bother to define as macros, since the standard doesn't require it.
874         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
875         longer worry about IRIX 5.3.
876         (HAVE_WCTYPE_CTMP_BUG): Remove.
877
878 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
879
880         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
881         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
882         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
883         Problems reported by Georg Schwarz for IRIX 5.3.
884
885         * gnulib-tool (autoconf_minversion): Take the maximum version number
886         found, not the minimum.  Problem reported by James Youngman.
887
888 2007-01-03  Karl Berry  <karl@gnu.org>
889
890         * doc/error.texi: new file, explaining interaction with progname.
891         * doc/gnulib.texi: include it.  Update copyright.
892
893 2007-01-03  Simon Josefsson  <simon@josefsson.org>
894
895         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
896         AC_CANONICAL_HOST, to improve autobuild outputs.
897
898 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
899             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
900
901         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
902         sockets, server sockets, and other file descriptors.  Count errors
903         to compute the return value.  Reorder the code a bit to be easier
904         to follow.  Don't set event bits that were not requested (except
905         POLLERR and POLLHUP).
906
907 2007-01-01  Bruno Haible  <bruno@clisp.org>
908
909         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
910
911 2007-01-03  Jim Meyering  <jim@meyering.net>
912
913         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
914
915 2007-01-02  Bruno Haible  <bruno@clisp.org>
916
917         * modules/settime (Include): Require timespec.h.
918         * modules/nanosleep (Include): Likewise.
919
920 2007-01-01  Bruno Haible  <bruno@clisp.org>
921
922         * gnulib-tool (func_emit_copyright_notice): Bump year.
923         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
924
925 2007-01-01  Bruno Haible  <bruno@clisp.org>
926
927         Improve support for OpenBSD.
928         * build-aux/config.rpath (libname_spec): Export.
929         (library_names_spec): New variable. Export.
930         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
931         library_names_spec from the config.rpath output. Locate shared library
932         through the name pattern in library_names_spec.
933
934 2007-01-01  Eric Blake  <ebb9@byu.net>
935
936         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
937
938 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
939
940         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
941         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
942         assume the C locale, and avoid an "eval" that could cause trouble.
943         Problem with SORT reported by Bob Proulx.
944
945         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
946         Define.  Trivial patch from Henning Nielsen Lund, originally
947         sent to bug-grep@gnu.org today.
948
949 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
950
951         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
952         struct stat.  Problem reported by Henning Nielsen Lund.
953         * lib/acl.c: Include acl.h first, to check interface.  Don't
954         bother to include sys/types.h and sys/stat.h again.
955
956 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
957
958         Import the following change from libc; problem reported by
959         Sven Verdoolaege.
960
961         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
962
963         [BZ #1373]
964         * lib/argp.h: Remove __NTH for __argp_usage inline function.
965
966 2006-12-28  Jim Meyering  <jim@meyering.net>
967
968         * build-aux/announce-gen: Do not assume that the package
969         builds any of tar.gz, tar.bz2, and .xdelta files.
970         Suggestion from Simon Josefsson.
971
972 2006-12-28  Simon Josefsson  <simon@josefsson.org>
973
974         * modules/announce-gen: New file.
975
976 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
977
978         * lib/mbchar.h: Just include <wctype.h>; the wctype module
979         handles its gotchas now.
980         * lib/mbswidth.c: Likewise.
981         * lib/wcwidth.h: Likewise.
982         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
983         and iswcntrl; the wctype module does this stuff now.
984         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
985         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
986         * modules/mbchar (Depends-on): Add wctype.
987         * modules/mbswidth (Depends-on): Likewise.
988         * modules/wcwidth (Depends-on): Likewise.
989
990 2006-12-27  Eric Blake  <ebb9@byu.net>
991
992         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
993         module uses more than what <wctype.h> is required to provide.
994
995 2006-12-26  Eric Blake  <ebb9@byu.net>
996
997         * gnulib-tool (sed_extract_prog): Avoid space-tab.
998
999 2006-12-26  Eric Blake  <ebb9@byu.net>
1000
1001         * modules/absolute-header: New module.
1002         * modules/fcntl (Depends-on): Depend on it.
1003         * modules/inttypes (Depends-on): Likewise.
1004         * modules/stdint (Depends-on): Likewise.
1005         * modules/sys_stat (Depends-on): Likewise.
1006         * modules/wctype (Depends-on): Likewise.
1007         * MODULES.html.sh (Support for building libraries and
1008         executables): Document it.
1009
1010 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
1011
1012         * gnulib-tool (SED): Remove, undoing previous change.
1013         The problem was that it broke coreutils on Solaris, because
1014         "sed --posix" leaked into a makefile.
1015         (sed): New alias, if 'alias' and GNU sed.
1016
1017 2006-12-24  Jim Meyering  <jim@meyering.net>
1018
1019         Work around an fchownat bug in glibc-2.4:
1020         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
1021         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
1022         in spite of the -P option.
1023         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
1024         New macros.
1025         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
1026         * modules/openat (Files): Add lib/fchownat.c.
1027         * lib/openat.c (fchownat): Don't define here.  Move to...
1028         * lib/fchownat.c: ...this new file.
1029
1030 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
1031
1032         Fix bug reported by Bruno Haible in
1033         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
1034         where quotearg.c didn't compile on Mac OS X 10.2 because it
1035         lacks <wchar.h> and wint_t.
1036         * lib/wctype_.h (__wctype_wint_t): New type.
1037         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
1038         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
1039         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
1040         Arg is now of type __wctype_wint_t, not wint_t.
1041         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
1042         substitute HAVE_WINT_T.
1043         * modules/wctype (Files): Add m4/wint_t.m4.
1044         (wctype.h): Substitute HAVE_WINT_T.
1045
1046 2006-12-23  Bruno Haible  <bruno@clisp.org>
1047
1048         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
1049
1050 2006-12-23  Bruno Haible  <bruno@clisp.org>
1051
1052         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
1053         S_ISLNK.
1054         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
1055         mingw.
1056
1057 2006-12-22  Bruno Haible  <bruno@clisp.org>
1058
1059         * lib/copy-file.c: Include acl.h.
1060         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
1061         Close the file descriptors only after being done with copy_acl.
1062         * modules/copy-file (Depends-on): Add acl.
1063
1064 2006-12-22  Bruno Haible  <bruno@clisp.org>
1065
1066         * gnulib-tool (SED): New variable.
1067         Use $SED instead of sed everywhere.
1068
1069 2006-12-22  Bruno Haible  <bruno@clisp.org>
1070
1071         * modules/no-c++: New file.
1072         * m4/no-c++.m4: New file.
1073         * MODULES.html.sh (Support for building libraries and executables):
1074         Add no-c++.
1075
1076 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
1077
1078         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1079         Include <limits.h>, and use its INT_MAX to rewrite the
1080         j loop so that it does not overflow 'int'.  Problem reported by
1081         Ralf Wildenhues in
1082         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
1083         Play it safe by shifting left by 1 rather than multiplying by 2,
1084         as GCC is less likely to optimize this away when the value
1085         is signed (when it assumes overflow leads to undefined behavior).
1086         Also, don't assume time_t uses two's complement.
1087
1088 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1089
1090         * MODULES.html.sh: New module wctype.
1091         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
1092         * lib/fnmatch.c: Don't bother to include <wchar.h> before
1093         <wctype.h>, since the new wctype module should fix this.
1094         * lib/quotearg.c: Include <wctype.h> unconditionally, since
1095         the wctype module should arrange for it.
1096         * lib/regex_internal.h: Likewise.
1097         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
1098         since the wctype module should handle this now.
1099         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
1100         * modules/fnmatch (Depends-on): Add wctype.
1101         * modules/quotearg (Depends-on): Likewise.
1102         * modules/regex (Depends-on): Likewise.
1103
1104 2006-12-19  Bruno Haible  <bruno@clisp.org>
1105
1106         * lib/strdup.h [C++]: Wrap definitions in extern "C".
1107         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
1108
1109 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1110
1111         * modules/savewd (Depends-on): Fix dependency on fcntl.
1112
1113 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1114
1115         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
1116         conforms to C99, rather than relying on the user's environment
1117         setting of STDINT_H.
1118
1119 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1120         and Eric Blake  <ebb9@byu.net>
1121
1122         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
1123         This is more consistent with the other defines here.
1124         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
1125         Port to z/OS.  Problem reported by Paul Gilmartin.
1126         Change local vars to use gl_ prefix rather than ac_.
1127         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
1128         with other defines.
1129         * modules/double-slash-root: New module.
1130         * modules/dirname (Files): Remove m4/double-slash-root.m4.
1131         (Depends-on): Add double-slash-root.
1132         * MODULES.html.sh (File system functions): Mention new module.
1133
1134 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1135
1136         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
1137         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
1138         This is for the benefit of gzip, which doesn't do i18n.
1139
1140 2006-12-12  Jim Meyering  <jim@meyering.net>
1141
1142         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
1143         Reported by Andreas Schwab <schwab@suse.de>.
1144
1145 2006-12-12  Bruno Haible  <bruno@clisp.org>
1146
1147         Merge these changes.
1148         2006-09-05  Bruno Haible  <bruno@clisp.org>
1149         * lib/iconvme.c (iconv_string): No need to save and restore errno when
1150         iconv_alloc succeeded.
1151         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
1152         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
1153         test for " && dest " at the end - dest is always != NULL there. Call
1154         iconv with 4xNULL arguments initially, to reset the state. Call iconv
1155         with 2xNULL arguments, also to flush the state storage. Handle the
1156         IRIX iconv behaviour. Realloc the final result, to throw away unused
1157         memory.
1158
1159 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1160
1161         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
1162         and fchmodat unconditionally, since glibc 2.4 has them.
1163         Problem reported by Arkadiusz Miskiewicz.
1164
1165 2006-12-10  Bruno Haible  <bruno@clisp.org>
1166
1167         * gnulib-tool (func_import): Show the include files only for those
1168         modules that are copied and specified.
1169         Reported by Karl Berry.
1170
1171 2006-12-08  Jim Meyering  <jim@meyering.net>
1172
1173         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
1174         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
1175
1176         * build-aux/announce-gen: Add two new options, both optional:
1177         --bootstrap-tools=TOOL_LIST
1178               a comma-separated list of tools, e.g.,
1179               autoconf,automake,bison,gnulib
1180         --gnulib-snapshot-date=DATE
1181               if gnulib is in the bootstrap tool list,
1182               then report this as the snapshot date.
1183               If not specified, use the current date/time.
1184               If you specify a date here, be sure it's UTC.
1185
1186 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1187
1188         * tests/test-argp-2.sh: Fix test to match actual output.
1189         (func_compare): Fix sed script to be portable.
1190
1191 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
1192
1193         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
1194         workaround for this case.  It is not autoconfigured now; offhand
1195         it's hard to see how to autoconfigure it.
1196
1197 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1198
1199         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
1200         a directory that is about to be chowned.  Such a directory's
1201         initial file permissions should permit the owner only and this
1202         should not be changed until after the chown, since the group and
1203         other bits would be incorrect if they granted permission before
1204         the chown.
1205
1206         Fix porting problem for iswctype reported by Georg Schwarz in:
1207         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
1208         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
1209         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
1210         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
1211         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1212
1213 2006-12-03  Jim Meyering  <jim@meyering.net>
1214
1215         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
1216         p->fts_statp may not yet be defined.
1217         (fts_read): Instead, set it in the caller, once p->fts_statp is
1218         sure to be defined, and corresponds to a top-level directory.
1219         This bug made du -x fail.  Here's the coreutils test case:
1220         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
1221         Reported by Mike Frysinger.
1222
1223 2006-12-01  Jim Meyering  <jim@meyering.net>
1224
1225         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
1226         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
1227         Reported by Simon Josefsson.
1228
1229 2006-11-30  Jim Meyering  <jim@meyering.net>
1230
1231         * m4/warning.m4: Use the all-permissive copyright notice
1232         recommended by RMS (rather than LGPL).
1233         * m4/vararrays.m4: Likewise.
1234         * m4/flexmember.m4: Likewise.
1235
1236 2006-11-29  Bruno Haible  <bruno@clisp.org>
1237
1238         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1239         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
1240         using +=.
1241         Reported by Simon Josefsson <simon@josefsson.org>.
1242
1243 2006-11-28  James Youngman <jay@gnu.org>
1244
1245         * README: Advise users that they might find the bug-gnulib@gnu.org
1246         and autotools-announce@gnu.org mailing lists useful.
1247
1248 2006-11-28  Bruno Haible  <bruno@clisp.org>
1249
1250         * m4/ptrdiff_max.m4: Remove file.
1251
1252 2006-11-21  Bruno Haible  <bruno@clisp.org>
1253
1254         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
1255         _AC_COMPUTE_INT.
1256         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1257         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
1258         _AC_COMPUTE_INT.
1259         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1260         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
1261         _AC_COMPUTE_INT.
1262         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1263
1264 2006-11-28  Jim Meyering  <jim@meyering.net>
1265
1266         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
1267         warning from "gcc -Wshadow" about shadowing the builtin.
1268
1269 2006-11-27  Bruno Haible  <bruno@clisp.org>
1270
1271         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
1272         _AC_COMPUTE_INT.
1273         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1274
1275 2006-11-27  Bruno Haible  <bruno@clisp.org>
1276             Paul Eggert  <eggert@cs.ucla.edu>
1277
1278         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
1279
1280 2006-11-26  Bruno Haible  <bruno@clisp.org>
1281
1282         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1283         noinst_LTLIBRARIES.
1284
1285 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
1286             Bruno Haible  <bruno@clisp.org>
1287
1288         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
1289         if compiling with "gcc -ansi".
1290
1291 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1292
1293         Fix some incompatibilities with gcc -ansi -pedantic.
1294         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
1295         if compiling pedantically with GCC, unless it's C99 or later.
1296         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
1297         it mishandles gcc -ansi -pedantic as well.
1298         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
1299         if gcc -pedantic.
1300         * lib/regexec.c (check_node_accept_bytes): Don't use auto
1301         initializers for struct if -pedantic, unless it's C99 or later.
1302
1303 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
1304
1305         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
1306         Don't close an fd more than once. Identical atimes indicate
1307         success, not failure.
1308
1309 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
1310
1311         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
1312
1313 2006-11-23  Jim Meyering  <jim@meyering.net>
1314
1315         * build-aux/announce-gen: New file.  From coreutils.
1316
1317 2006-11-22  Jim Meyering  <jim@meyering.net>
1318
1319         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
1320         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
1321         (fts_read): Use a temporary to narrow the overused st_size member
1322         before using it in a switch statement.  Reported by Matthew Woehlke.
1323
1324         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
1325         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
1326
1327 2006-11-20  Bruno Haible  <bruno@clisp.org>
1328
1329         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
1330         changequote instead of pairs of brackets.
1331         Reported by Andreas Schwab <schwab@suse.de>.
1332
1333 2006-11-21  Jim Meyering  <jim@meyering.net>
1334
1335         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
1336         so as to remain compatible with older compilers.
1337         Patch from Michael Deutschmann.
1338
1339 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1340
1341         * MODULES.html.sh (File system functions): Add openat.
1342
1343         * lib/openat.h (rpl_fstatat): New macro, if
1344         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
1345         (fstatat): Define to rpl_fstatat under the same conditions,
1346         unless COMPILING_FSTATAT.
1347         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
1348         seems to have the bug.
1349         * lib/fstatat.c: New file.
1350         * modules/openat (Files): Add it.
1351
1352 2006-11-20  Bruno Haible  <bruno@clisp.org>
1353
1354         * Makefile: New file.
1355
1356 2006-11-20  Jim Meyering  <jim@meyering.net>
1357
1358         The beginnings of syntax-related checks for gnulib.
1359         * lib/Makefile: New file.
1360         * lib/t-idcache: New script.  Ensure that the two halves of
1361         idcache.c stay in sync.
1362
1363         * lib/idcache.c: Adjust comments in user- and group- portions to
1364         be more accurate, and to be consistent with one another.
1365
1366 2006-11-20  Jim Meyering  <jim@meyering.net>
1367
1368         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
1369         continue using the flexible array member (thus, this module performs
1370         half as many malloc calls), with the addition that...
1371         (getgroup, getuser): Consistently record a non-match via an empty
1372         "name" string, and map an empty string match to a NULL return value.
1373         * modules/idcache (Depends-on): Re-add flexmember.
1374
1375         * lib/idcache.c (getuser): Remove all uses of the register keyword.
1376         (getuidbyname, getgroup, getgidbyname): Likewise.
1377
1378         Use cleaner syntax: NULL rather than 0.
1379         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
1380
1381 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1382
1383         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
1384         It mishandled the case where the group was missing.
1385         Problem reported by Greg Schafer.
1386         * modules/idcache: Likewise.
1387
1388 2006-11-18  Jim Meyering  <jim@meyering.net>
1389
1390         * check-module (%exempt_header): Add exception for some
1391         conditionally-included headers.
1392
1393         * modules/i-ring (Depends-on): Add verify.
1394         (License): Change to LGPL.
1395
1396 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1397
1398         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
1399         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
1400         and inttostr.h.  Use snprintf rather than uinttostr, so that
1401         LGPLed code doesn't depend on GPLed.
1402
1403 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
1404
1405         * modules/inline (License): Change from GPL to LGPL.
1406
1407 2006-11-17  Jim Meyering  <jim@meyering.net>
1408
1409         * modules/d-type (License): Switch to LGPL.
1410
1411 2006-11-15  Bruno Haible  <bruno@clisp.org>
1412
1413         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
1414
1415 2006-11-15  Eric Blake  <ebb9@byu.net>
1416
1417         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
1418         the module dependency.
1419
1420 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1421             Bruno Haible  <bruno@clisp.org>
1422
1423         * gnulib-tool (func_create_testdir): Add license consistency check.
1424
1425 2006-11-15  Eric Blake  <ebb9@byu.net>
1426
1427         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
1428         random "(cached)" in configure output.
1429
1430 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1431
1432         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
1433         test for conforming inttypes.h is both announced and cached.
1434
1435         * MODULES.html.sh (seen_modules, seen_files): New variables.
1436         (func_module): Rewrite to use a few less gnulib-tool and sed
1437         invocations.  Avoid a couple of quadratic algorithms for ...
1438         (missed_modules, missed_files): ... these, with ...
1439         (func_append, func_tmpdir): ... these new functions, from
1440         gnulib-tool.  Analogously, install traps for cleanup.
1441
1442         * tests/test-gc.c (main): Remove unused variables.
1443         * tests/test-read-file.c: Include stdlib.h, for 'free'.
1444
1445 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
1446
1447         * modules/inttostr (License): Change to LGPL.
1448
1449 2006-11-14  Eric Blake  <ebb9@byu.net>
1450
1451         * modules/tempname (License): Change to LGPL.
1452
1453 2006-11-14  Eric Blake  <ebb9@byu.net>
1454
1455         * doc/functions.texi (Function Portability): *printf functions on
1456         Cygwin now understand all POSIX size specifiers.
1457
1458 2006-11-14  Bruno Haible  <bruno@clisp.org>
1459
1460         * modules/c-ctype (License): Change to LGPL.
1461
1462 2006-11-12  Bruno Haible  <bruno@clisp.org>
1463
1464         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
1465         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
1466         for GNOME libraries, for which the include files are installed in
1467         subdirectories of $prefix/include.
1468
1469 2006-11-12  Bruno Haible  <bruno@clisp.org>
1470
1471         * m4/lib-link.m4: Require at least autoconf-2.54.
1472         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
1473         name to underscores for the --with option.
1474
1475 2006-11-13  Bruno Haible  <bruno@clisp.org>
1476
1477         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
1478         the tests directory.
1479         Reported by Ralf Wildenhues.
1480
1481 2006-11-13  Bruno Haible  <bruno@clisp.org>
1482
1483         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
1484         (func_emit_initmacro_end): Undo the override here.
1485         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
1486         Works around the famous automake error in coreutils.
1487
1488 2006-11-13  Eric Blake  <ebb9@byu.net>
1489
1490         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
1491         element, not its node.
1492
1493 2006-11-12  Bruno Haible  <bruno@clisp.org>
1494
1495         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
1496         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
1497
1498 2006-11-12  Bruno Haible  <bruno@clisp.org>
1499
1500         * gnulib-tool: New option --local-symlink.
1501         (func_usage): Document it.
1502         (lsymbolic): New variable.
1503         (func_import, func_create_testdir): If --symlink was not specified,
1504         test whether --local-symlink was specified and the file comes from
1505         the local_gnulib_dir.
1506
1507 2006-11-12  Bruno Haible  <bruno@clisp.org>
1508
1509         * gnulib-tool (func_ln): New function.
1510         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
1511
1512 2006-11-12  Bruno Haible  <bruno@clisp.org>
1513
1514         Finish support for source files in subdirectories.
1515         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
1516         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
1517         AUTOMAKE_OPTIONS.
1518         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
1519
1520 2006-11-12  Bruno Haible  <bruno@clisp.org>
1521
1522         * gnulib-tool (func_get_automake_snippet): Synthesize also an
1523         EXTRA_lib_SOURCES augmentation.
1524         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
1525
1526 2006-11-12  Jim Meyering  <jim@meyering.net>
1527
1528         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
1529         file descriptors.  This also averts a failure on systems with
1530         native openat support when a traversed directory lacks "x" access.
1531         * lib/fts_.h: Include "i-ring.h"
1532         (struct FTS) [fts_fd_ring]: New member.
1533         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
1534         (FCHDIR): Add parentheses.
1535         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
1536         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
1537         When descending, rather than simply closing the previous
1538         fts_cwd_fd value, push that file descriptor onto the ring.
1539         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
1540         (fts_open): Initialize the new fd_ring member.
1541         (fts_close): Clear the ring.
1542         (fts_safe_changedir): When possible, use our new fd_ring to skip
1543         the diropen and fstat and dev/ino comparison that would normally
1544         accompany a virtual `chdir ("..")'.
1545
1546         * modules/fts (Depends-on): Add i-ring.
1547         * modules/i-ring: New module.
1548         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
1549         * m4/i-ring.m4: New file.
1550
1551 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1552
1553         * gnulib-tool (func_create_testdir): Fix replacement of
1554         `build-aux' in configure.ac.  Run autotools in gltests
1555         subdirectory.
1556         (func_create_testdir, func_create_megatestdir, test): There is
1557         no need for '--force' in most autotool invocations in a new
1558         tree.  Actually fail the whole test if any of the tools, or the
1559         configure or make stages fail.
1560
1561         Sync from Automake.
1562         * build-aux/gnupload: Revert last change.  Add pointer to upload
1563         instructions of the GNU Maintenance Instructions.
1564         Suggestion by Karl Berry.
1565
1566 2006-11-10  Jim Meyering  <jim@meyering.net>
1567
1568         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
1569
1570 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1571
1572         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
1573         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
1574         (bind_textdomain_codeset) [! ENABLE_NLS]:
1575         Evaluate all the arguments.  That way, callers get compatible behavior
1576         if the arguments have side effects.  Also, it avoids some GCC
1577         diagnostics in some cases; Joel E. Denny reported problems when Bison
1578         was configured with --enable-gcc-warnigs.
1579
1580 2006-11-10  Jim Meyering  <jim@meyering.net>
1581
1582         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
1583         relevant options in CFLAGS (like -O, -fno-inline) are taken into
1584         account.
1585
1586 2006-11-10  Jim Meyering  <jim@meyering.net>
1587
1588         * modules/inline: New file/module.
1589         * modules/xalloc (Files): Remove m4/inline.m4.
1590         (Depends-on): Add inline, instead.
1591         * modules/oset: Likewise.
1592         * modules/list: Likewise.
1593
1594 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1595
1596         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
1597         Problem reported by Matthew Woehlke.
1598
1599 2006-11-09  Bruno Haible  <bruno@clisp.org>
1600
1601         * lib/tempname.c (gen_tempname): Remove variant that invokes
1602         __gen_tempname.
1603         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
1604         __gen_tempname.
1605
1606 2006-11-08  Bruno Haible  <bruno@clisp.org>
1607
1608         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
1609         to 'yes' instead of 'cross-compiling'.
1610
1611 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
1612
1613         * lib/quotearg.h (quotearg_free): New decl.
1614         * lib/quotearg.c (quotearg_free): New function.
1615         (slot0, nslots, slotvec0, slotvec):
1616         Now file-scope so that quotearg_free can get at them.
1617
1618 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1619
1620         Sync from Automake.
1621         * build-aux/gnupload: Add missing 'gnu' to example URL.
1622         Report by Karl Berry.
1623
1624 2006-11-08  Bruno Haible  <bruno@clisp.org>
1625
1626         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
1627         Suggested by Paul Eggert.
1628
1629 2006-11-08  Jim Meyering  <jim@meyering.net>
1630
1631         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
1632         It's already included if !_LIBC.
1633         (fts_safe_changedir): Add a comment.
1634
1635 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1636
1637         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
1638         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
1639         Matthew Woehlke.
1640
1641         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
1642         definitions up, to avoid colliding with change below.
1643         (static_inline) [HAVE_INLINE]: New macro.
1644         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
1645         Provide extern decls when !HAVE_INLINE.  Do not define unless
1646         static_inline is defined, either by us or by xmalloc.c.  Use
1647         static_inline rather than static inline.
1648         (XCALLOC): Optimize sizeof(T) = 1 case.
1649         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
1650
1651 2006-11-07  Bruno Haible  <bruno@clisp.org>
1652
1653         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
1654         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
1655         AC_C_INLINE.
1656         * modules/xalloc (Files): Add m4/inline.m4.
1657
1658 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1659
1660         * README: Fix typo.
1661         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
1662         (Miscellanous Notes): ...from this.
1663
1664 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1665
1666         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
1667         Mention that offsetof should be used instead of sizeof.
1668         From Bruno Haible.
1669
1670 2006-11-07  Bruno Haible  <bruno@clisp.org>
1671
1672         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
1673
1674 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1675
1676         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1677         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
1678         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1679         (gl_tree_add_before, gl_tree_add_after):
1680         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
1681         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
1682         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
1683         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
1684         (gl_linked_add_after, gl_linked_add_at): Likewise.
1685         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
1686         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1687         (gl_tree_add_before, gl_tree_add_after): Likewise.
1688         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
1689         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
1690         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
1691
1692 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1693
1694         * lib/gl_oset.h: Use C comment style, not C++ comment style.
1695
1696 2006-11-06  Bruno Haible  <bruno@clisp.org>
1697
1698         * m4/inline.m4: New file.
1699         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
1700         * modules/list (Files): Add m4/inline.m4.
1701         * modules/oset (Files): Likewise.
1702
1703 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1704
1705         * lib/idcache.c: Include <stddef.h>, for offsetof.
1706         (struct userid.name): Change from char * to a flexible array member.
1707         All uses changed.
1708         * modules/idcache (Depends-on): Add flexmember.
1709
1710         * MODULES.html.sh (Core language properties): New module flexmember.
1711         * modules/flexmember, m4/flexmember.m4: New files.
1712
1713         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
1714         inline functions that are identical with the old xnmalloc_inline,
1715         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
1716         that we can avoid some unnecessary integer multiplications and
1717         divisions in the common case where the element size is known at
1718         compile time.
1719         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
1720         needed.
1721         (xnboundedmalloc): Remove.
1722         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
1723         arguments, for consistency with rest of this header.
1724         (xcharalloc): Rewrite using XNMALLOC.
1725         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
1726         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
1727         versions have been moved to lib/xalloc.h and renamed to be the
1728         non-*_inline versions.
1729         (xmalloc, xrealloc): Implement without reference to the xnmalloc
1730         and xnrealloc functions, since those functions are now inline and
1731         now call us.
1732         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
1733         renaming described above.
1734         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
1735         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
1736         captures the dependency in AC_C_INLINE.
1737
1738         New module canonicalize-lgpl, proposed by Charles Wilson in
1739         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
1740         with a few small changes afterwards.
1741         * MODULES.html.sh (File system functions): New module
1742         canonicalize-lgpl.
1743         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
1744         and canonicalize_file_name.
1745         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
1746         * modules/canonicalize-lgpl: New files.
1747
1748 2006-11-05  Bruno Haible  <bruno@clisp.org>
1749
1750         * gnulib-tool (func_import, func_create_testdir): Create directories
1751         also for files in subdirectories of lib/.
1752
1753 2006-11-05  Bruno Haible  <bruno@clisp.org>
1754
1755         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
1756         ANSI C compliant.
1757
1758 2006-11-03  Bruno Haible  <bruno@clisp.org>
1759
1760         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1761         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
1762         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
1763         (xnboundedmalloc): New inline function.
1764         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
1765         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
1766         xmalloc.
1767         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
1768         xmalloc.
1769         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
1770         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
1771         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
1772         xmalloc.
1773         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1774         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
1775         xmalloc.
1776         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
1777         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1778         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
1779         xmalloc.
1780         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1781         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
1782         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1783         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
1784         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
1785         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
1786         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
1787
1788 2006-11-03  Bruno Haible  <bruno@clisp.org>
1789
1790         * lib/c-ctype.h [C++]: Define functions without name mangling.
1791         * lib/fwriteerror.h [C++]: Likewise.
1792         * lib/gcd.h [C++]: Likewise.
1793         * lib/linebreak.h [C++]: Likewise.
1794
1795 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
1796
1797         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
1798         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
1799         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
1800         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
1801         Check for functions and headers just once.
1802         Check for declaration of canonicalize_file_name.
1803         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
1804
1805 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1806
1807         * gnulib-tool (func_import): Fix typo in actioncmd.
1808
1809 2006-11-02  Bruno Haible  <bruno@clisp.org>
1810
1811         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
1812         newline sequence in the Makefile.am snippet as a space, like "make"
1813         does.
1814         Reported by Roger Persson <perrog@gmail.com>.
1815
1816 2006-11-01  Bruno Haible  <bruno@clisp.org>
1817
1818         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
1819         already declared in <string.h>.
1820         * lib/strcase.h (strncasecmp): Don't declare it if yes.
1821
1822 2006-11-01  Bruno Haible  <bruno@clisp.org>
1823
1824         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
1825         * lib/strcase.h: Include <string.h>.
1826         (strcasecmp): Define to rpl_strcasecmp here.
1827
1828 2006-11-01  Bruno Haible  <bruno@clisp.org>
1829
1830         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
1831
1832 2006-11-01  Eric Blake  <ebb9@byu.net>
1833
1834         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
1835
1836         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
1837
1838 2006-10-29  Bruno Haible  <bruno@clisp.org>
1839
1840         Make it compile in C++ mode.
1841         * lib/full-write.c (full_rw): Add a cast.
1842
1843 2006-11-01  Bruno Haible  <bruno@clisp.org>
1844
1845         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
1846         be POSIX compliant.
1847         Reported by Roger Persson <perrog@gmail.com>.
1848
1849 2006-11-01  Eric Blake  <ebb9@byu.net>
1850
1851         * lib/getopt_.h: Fix comments.
1852
1853 2006-10-31  Eric Blake  <ebb9@byu.net>
1854
1855         * modules/tmpdir (Depends-on): Add sys_stat.
1856         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
1857         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
1858         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
1859         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
1860         tempname.
1861
1862 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
1863
1864         Avoid some C++ diagnostics reported by Bruno Haible.
1865         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
1866         xmalloc.
1867         (quotearg_alloc): Use xcharalloc rather than xmalloc.
1868         (struct slotvec): Move to top level.
1869         (quotearg_n_options): Rewrite to avoid xmalloc.
1870         * lib/xalloc.h (xcharalloc): New function.
1871         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
1872         [defined __cplusplus]: Add function template that provides result
1873         type propagation.  This part of the change is from Bruno Haible.
1874
1875 2006-10-29  Bruno Haible  <bruno@clisp.org>
1876
1877         Make it compile in C++ mode.
1878         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
1879         * lib/strnlen1.c (strnlen1): Cast memchr result.
1880         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
1881         * lib/clean-temp.c (string_equals, string_hash): Add casts.
1882         (create_temp_dir): Rename local variable 'template'.
1883         (compile_csharp_using_sscli): Add cast.
1884         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
1885         * lib/findprog.c (find_in_path): Likewise.
1886         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
1887         * lib/wait-process.c (register_slave_subprocess): Likewise.
1888
1889 2006-10-22  Bruno Haible  <bruno@clisp.org>
1890
1891         * modules/tsearch: New file.
1892         * lib/tsearch.h: New file.
1893         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
1894         * m4/tsearch.m4: New file.
1895         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
1896
1897 2006-10-29  Eric Blake  <ebb9@byu.net>
1898
1899         * lib/arcfour.c: Assume config.h.
1900         * lib/arctwo.c: Likewise.
1901         * lib/base64.c: Likewise.
1902         * lib/check-version.c: Likewise.
1903         * lib/crc.c: Likewise.
1904         * lib/des.c: Likewise.
1905         * lib/gc-gnulib.c: Likewise.
1906         * lib/gc-libgcrypt.c: Likewise.
1907         * lib/gc-pbkdf2-sha1.c: Likewise.
1908         * lib/getaddrinfo.c: Likewise.
1909         * lib/getdelim.c: Likewise.
1910         * lib/getline.c: Likewise.
1911         * lib/hmac-md5.c: Likewise.
1912         * lib/hmac-sha1.c: Likewise.
1913         * lib/iconvme.c: Likewise.
1914         * lib/md2.c: Likewise.
1915         * lib/md4.c: Likewise.
1916         * lib/memxor.c: Likewise.
1917         * lib/read-file.c: Likewise.
1918         * lib/readline.c: Likewise.
1919         * lib/rijndael-alg-fst.c: Likewise.
1920         * lib/rijndael-api-fst.c: Likewise.
1921         * lib/xgetdomainname.c: Likewise.
1922
1923 2006-10-28  Eric Blake  <ebb9@byu.net>
1924
1925         * lib/xstrndup.c: Assume config.h.
1926
1927 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
1928
1929         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
1930         stat-macros.h is now for our own macros, whereas stat_h is for
1931         macros in the <sys/stat.h> name space.
1932         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
1933         (STAT_MACROS_H): Remove.
1934         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
1935         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
1936         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
1937         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
1938         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
1939         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
1940         Move these macros to ...
1941         * lib/stat_.h: here.  Don't include stat-macros.h.
1942         * lib/canonicalize.c: Don't include stat-macros.h.
1943         * lib/chown.c: Likewise.
1944         * lib/euidaccess.c: Likewise.
1945         * lib/file-type.c: Likewise.
1946         * lib/filemode.c: Likewise.
1947         * lib/glob.c: Likewise.
1948         * lib/isapipe.c: Likewise.
1949         * lib/lchown.c: Likewise.
1950         * lib/lstat.c: Likewise.
1951         * lib/mkdir-p.c: Likewise.
1952         * lib/rmdir.c: Likewise.
1953         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
1954         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
1955         unless mkdir isn't declared, to speed up 'configure'.
1956         Always create sys/stat.h, since it's unlikely any real sys/stat.h
1957         would define all the S_* symbols.
1958         * modules/canonicalize (Depends-on):
1959         Depend on sys_stat, not stat-macros.
1960         * modules/chown: Likewise.
1961         * modules/euidaccess: Likewise.
1962         * modules/filemode: Likewise.
1963         * modules/file-type: Likewise.
1964         * modules/glob: Likewise.
1965         * modules/isapipe: Likewise.
1966         * modules/lchown: Likewise.
1967         * modules/lstat: Likewise.
1968         * modules/mkancesdirs: Likewise.
1969         * modules/rmdir: Likewise.
1970         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
1971         * modules/modechange: Likewise.
1972         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
1973         (configure.ac): Remove gl_STAT_MACROS.
1974         * modules/sys_stat (Depends-on): Remove stat-macros.
1975
1976 2006-10-27  Bruno Haible  <bruno@clisp.org>
1977
1978         * m4/signed.m4: Remove file.
1979         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
1980         invocation.
1981         * modules/vasnprintf (Files): Remove m4/signed.m4.
1982
1983 2006-10-27  Bruno Haible  <bruno@clisp.org>
1984
1985         Update to GNU gettext 0.16.
1986         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
1987         m4/inttypes-h.m4, m4/signed.m4.
1988         * m4/gettext.m4: Update to GNU gettext 0.16.
1989         * m4/intl.m4: New file, from GNU gettext.
1990         * m4/intldir.m4: New file, from GNU gettext.
1991         * config/srclist.txt: Update
1992
1993 2006-10-27  Eric Blake  <ebb9@byu.net>
1994
1995         * MODULES.html.sh: Document tempname.
1996         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
1997         dependencies.
1998         (Files): Move lib/tempname.c...
1999         * modules/tempname: ...to this new module.
2000         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
2001         (gl_PREREQ_TEMPNAME): Move...
2002         * m4/tempname.m4: ...to this new file.
2003         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
2004         * modules/sys_stat (Depends-on): Add stat-macros.
2005         * lib/stat_.h (includes): Pick up stat macros.
2006         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
2007         if stat macros are broken.
2008         * lib/tempname.c (includes): No need to include "stat-macros.h".
2009         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
2010         (direxists, __path_search) [!_LIBC]: Don't compile these in
2011         gnulib; the tmpdir module covers that.
2012         * lib/tempname.h: New file.
2013
2014 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
2015
2016         * COPYING: Explain how gnulib-tool converts licence headers.
2017         Almost all wording by Eric Blake.
2018
2019 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2020
2021         * lib/mbchar.h (is_basic_table): Make read-only.
2022         * lib/mbchar.c (is_basic_table): Likewise.
2023         Reported by John Darrington.
2024
2025 2006-10-25  Bruno Haible  <bruno@clisp.org>
2026
2027         * lib/progname.h (set_program_name): Undefine before defining.
2028
2029 2006-10-25  Bruno Haible  <bruno@clisp.org>
2030
2031         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
2032         false for non-gcc C++ compilers.
2033         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
2034
2035 2006-10-24  Bruno Haible  <bruno@clisp.org>
2036
2037         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
2038         iconv implementations like Irix iconv.
2039
2040 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2041
2042         * modules/vararrays: New file.
2043         * m4/vararrays.m4: New file, taken from diffutils.
2044         * MODULES.html.sh: New module vararrays.
2045
2046 2006-10-24  Karl Berry  <karl@gnu.org>
2047
2048         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
2049         Don't call GNU Unix.
2050
2051 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2052
2053         * users.txt: Add Libtool.
2054
2055         Sync from Libtool:
2056
2057         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2058
2059         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
2060         to gnulib's policy of including config.h unconditionally.
2061
2062 2006-10-24  Bruno Haible  <bruno@clisp.org>
2063
2064         * modules/wcwidth (Files): Add m4/wint_t.m4.
2065         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
2066         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
2067
2068 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2069
2070         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
2071         to pacify GCC with some -W flags enabled.  Problem reported by
2072         Bruno Haible.
2073
2074 2006-10-24  Jim Meyering  <jim@meyering.net>
2075
2076         * MODULES.html.sh: Remove uinttostr.  It's not a module.
2077         Reported by Karl Berry.
2078
2079 2006-10-23  Bruno Haible  <bruno@clisp.org>
2080
2081         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
2082
2083 2006-10-24  Bruno Haible  <bruno@clisp.org>
2084
2085         * lib/gl_list.h: Use C comment style, not C++ comment style.
2086
2087 2006-10-23  Eric Blake  <ebb9@byu.net>
2088
2089         * lib/getaddrinfo.c (includes): Add missing include.
2090
2091 2006-10-23  Bruno Haible  <bruno@clisp.org>
2092             Paul Eggert  <eggert@cs.ucla.edu>
2093
2094         Ability to rename obstack_free.
2095         * lib/obstack.h (__obstack_free): New macro. Declare instead of
2096         obstack_free.
2097         (obstack_free): Invoke the __obstack_free macro.
2098         * lib/obstack.c (obstack_free): Use __obstack_free macro.
2099
2100 2006-10-23  Bruno Haible  <bruno@clisp.org>
2101             Paul Eggert  <eggert@cs.ucla.edu>
2102
2103         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
2104         __argc, __argv from the declaration. (They are defined as macros on
2105         mingw.)
2106
2107 2006-10-22  Bruno Haible  <bruno@clisp.org>
2108
2109         * doc/gnulib-intro.texi: New file.
2110         * doc/gnulib.texi: Include it.
2111
2112 2006-10-21  Bruno Haible  <bruno@clisp.org>
2113
2114         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
2115         "Introduction", "Miscellanous Notes", "Particular Modules".
2116
2117 2006-10-21  Bruno Haible  <bruno@clisp.org>
2118
2119         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2120         Change mostlyclean-local rule to avoid sh syntax error from bash
2121         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
2122
2123 2006-10-23  Jim Meyering  <jim@meyering.net>
2124
2125         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
2126         in place of snprintf.
2127
2128         * modules/inttostr (Files): Add lib/uinttostr.c.
2129         * lib/uinttostr.c (inttostr): New file/function.
2130         * lib/inttostr.h (uinttostr): Declare.
2131         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
2132         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
2133         Add uinttostr.
2134         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
2135
2136 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2137
2138         * lib/canonicalize.c (ELOOP): Define if not already defined.
2139         Problem reported by Bruno Haible in
2140         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
2141
2142 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2143
2144         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
2145         Problem reported by Perry Smith and Ville Laurikari.
2146
2147         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
2148         uses.
2149
2150 2006-10-19  Bruno Haible  <bruno@clisp.org>
2151
2152         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
2153         for mingw.
2154
2155 2006-10-19  Bruno Haible  <bruno@clisp.org>
2156
2157         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
2158         Needed for mingw.
2159
2160 2006-10-19  Bruno Haible  <bruno@clisp.org>
2161
2162         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
2163
2164 2006-10-19  Bruno Haible  <bruno@clisp.org>
2165
2166         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
2167         it.
2168
2169 2006-10-19  Bruno Haible  <bruno@clisp.org>
2170
2171         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
2172         invocation.
2173
2174 2006-10-19  Bruno Haible  <bruno@clisp.org>
2175
2176         * gnulib-tool (func_create_testdir): Don't include ftruncate and
2177         mountlist by default.
2178
2179 2006-10-16  Bruno Haible  <bruno@clisp.org>
2180
2181         * lib/c-strstr.c: Include c-strstr.h.
2182
2183 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2184
2185         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
2186         in a slash.
2187
2188 2006-10-18  Bruno Haible  <bruno@clisp.org>
2189
2190         * lib/lock.h [C++]: Wrap definitions in extern "C".
2191
2192 2006-10-18  Bruno Haible  <bruno@clisp.org>
2193
2194         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
2195         gl_LIBOBJS list.
2196
2197 2006-10-18  Bruno Haible  <bruno@clisp.org>
2198
2199         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
2200
2201 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
2202
2203         * lib/xstrtol.h: Include gettext.h.
2204         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
2205         Problem reported by Eric Blake.
2206         * modules/xstrtol (Depends-on): Add gettext-h.
2207
2208 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2209
2210         * lib/strftime.c (advance): New macro.
2211         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
2212         incomplete type, so you can't add 0 to it.  Problem and patch
2213         reported by Eelco Dolstra for dietlibc.
2214
2215 2006-10-18  Jim Meyering  <jim@meyering.net>
2216
2217         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
2218         type for a local, and rename it: s/up/user_proc/.
2219
2220 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2221
2222         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
2223         READ_UTMP_USER_PROCESS.
2224         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
2225
2226 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
2227
2228         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
2229         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
2230
2231 2006-10-17  Eric Blake  <ebb9@byu.net>
2232
2233         * lib/sigprocmask.c (sigprocmask): Fix typo.
2234
2235         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
2236
2237         * modules/clean-temp (Makefile.am): Don't add to make output...
2238         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
2239         config.h.
2240
2241 2006-10-17  Bruno Haible  <bruno@clisp.org>
2242
2243         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
2244         differently if DEFAULT_TEXT_DOMAIN is set.
2245
2246 2006-10-16  Bruno Haible  <bruno@clisp.org>
2247
2248         * lib/clean-temp.c: Include fwriteerror.h.
2249
2250 2006-10-16  Bruno Haible  <bruno@clisp.org>
2251
2252         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
2253
2254 2006-10-16  Bruno Haible  <bruno@clisp.org>
2255
2256         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
2257         * lib/sigprocmask.h: Include <sys/types.h>.
2258         (sigset_t): Use the system's definition if present.
2259
2260 2006-10-17  Eric Blake  <ebb9@byu.net>
2261
2262         * lib/xvasprintf.c (includes): Assume config.h.
2263         * lib/xasprintf.c (includes): Likewise.
2264
2265 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
2266
2267         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
2268         at least as wide as intmax_t.
2269
2270 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
2271
2272         (Imported from Automake.)
2273         * build-aux/gnupload: Update to version 1.1 of directive file.
2274
2275 2006-10-16  Eric Blake  <ebb9@byu.net>
2276
2277         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
2278         match Automake 1.10a.
2279
2280 2006-10-14  Bruno Haible  <bruno@clisp.org>
2281
2282         * modules/sigprocmask: New file.
2283         * lib/sigprocmask.h: New file.
2284         * lib/sigprocmask.c: New file.
2285         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
2286         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
2287         request sigprocmask.o.
2288         (gl_PREREQ_SIGPROCMASK): New macro.
2289         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
2290         (Depends-on): Add sigprocmask.
2291         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
2292         gt_SIGNALBLOCKING. Test for 'raise' only once.
2293         * lib/fatal-signal.c: Include sigprocmask.h.
2294         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
2295         unblock_fatal_signals): Define always.
2296         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2297         sigprocmask.
2298
2299 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
2300
2301         Sync from Automake.
2302         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
2303         which incorrectly sets the mode of an existing destination
2304         directory.  In some cases the unpatched install-sh could do the
2305         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
2306         system.  We hope this is rare in practice, but it's clearly worth
2307         fixing.  Problem reported by Alex Unleashed in
2308         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
2309         Also, don't bother to check for -m bugs unless we're using -m;
2310         suggested by Stepan Kasal.
2311
2312 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2313
2314         Sync from Automake.
2315         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
2316         `-c' flag, so they appear at the same position as in %FASTDEP%
2317         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
2318         which ignores unknown options only after the first non-option.
2319         Bug report against M4 by Nelson H. F. Beebe.
2320
2321 2006-10-13  Jim Meyering  <jim@meyering.net>
2322
2323         Fix a bug in yesterday's change.
2324         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
2325         p->fts_statp->st_dev would be used uninitialized.
2326         Ensures that we always call fts_stat on the very first entry.
2327         Miklos Szeredi reported that find -xdev stopped working.
2328
2329 2006-10-12  Bruno Haible  <bruno@clisp.org>
2330
2331         * gnulib-tool (func_get_automake_snippet): Append an automatically
2332         computed EXTRA_DIST augmentation.
2333         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
2334         * modules/alloca-opt (Makefile.am): Likewise.
2335         * modules/allocsa (Makefile.am): Likewise.
2336         * modules/arcfour (Makefile.am): Likewise.
2337         * modules/arctwo (Makefile.am): Likewise.
2338         * modules/argmatch (Makefile.am): Likewise.
2339         * modules/argz (Makefile.am): Likewise.
2340         * modules/atexit (Makefile.am): Likewise.
2341         * modules/backupfile (Makefile.am): Likewise.
2342         * modules/byteswap (Makefile.am): Likewise.
2343         * modules/c-strtod (Makefile.am): Likewise.
2344         * modules/c-strtold (Makefile.am): Likewise.
2345         * modules/calloc (Makefile.am): Likewise.
2346         * modules/canon-host (Makefile.am): Likewise.
2347         * modules/canonicalize (Makefile.am): Likewise.
2348         * modules/chdir-long (Makefile.am): Likewise.
2349         * modules/chdir-safer (Makefile.am): Likewise.
2350         * modules/check-version (Makefile.am): Likewise.
2351         * modules/chown (Makefile.am): Likewise.
2352         * modules/cloexec (Makefile.am): Likewise.
2353         * modules/close-stream (Makefile.am): Likewise.
2354         * modules/closeout (Makefile.am): Likewise.
2355         * modules/crc (Makefile.am): Likewise.
2356         * modules/csharpexec (Makefile.am): Likewise.
2357         * modules/cycle-check (Makefile.am): Likewise.
2358         * modules/des (Makefile.am): Likewise.
2359         * modules/dev-ino (Makefile.am): Likewise.
2360         * modules/dirfd (Makefile.am): Likewise.
2361         * modules/dirname (Makefile.am): Likewise.
2362         * modules/dup2 (Makefile.am): Likewise.
2363         * modules/eealloc (Makefile.am): Likewise.
2364         * modules/error (Makefile.am): Likewise.
2365         * modules/euidaccess (Makefile.am): Likewise.
2366         * modules/exclude (Makefile.am): Likewise.
2367         * modules/exitfail (Makefile.am): Likewise.
2368         * modules/fcntl-safer (Makefile.am): Likewise.
2369         * modules/fcntl (Makefile.am): Likewise.
2370         * modules/file-type (Makefile.am): Likewise.
2371         * modules/fileblocks (Makefile.am): Likewise.
2372         * modules/filemode (Makefile.am): Likewise.
2373         * modules/filenamecat (Makefile.am): Likewise.
2374         * modules/fnmatch (Makefile.am): Likewise.
2375         * modules/fopen-safer (Makefile.am): Likewise.
2376         * modules/fpending (Makefile.am): Likewise.
2377         * modules/fprintftime (Makefile.am): Likewise.
2378         * modules/free (Makefile.am): Likewise.
2379         * modules/fsusage (Makefile.am): Likewise.
2380         * modules/ftruncate (Makefile.am): Likewise.
2381         * modules/fts (Makefile.am): Likewise.
2382         * modules/gc-arcfour (Makefile.am): Likewise.
2383         * modules/gc-des (Makefile.am): Likewise.
2384         * modules/gc-hmac-md5 (Makefile.am): Likewise.
2385         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
2386         * modules/gc-md4 (Makefile.am): Likewise.
2387         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2388         * modules/gc-sha1 (Makefile.am): Likewise.
2389         * modules/gc (Makefile.am): Likewise.
2390         * modules/getaddrinfo (Makefile.am): Likewise.
2391         * modules/getcwd (Makefile.am): Likewise.
2392         * modules/getdelim (Makefile.am): Likewise.
2393         * modules/getdomainname (Makefile.am): Likewise.
2394         * modules/getgroups (Makefile.am): Likewise.
2395         * modules/gethostname (Makefile.am): Likewise.
2396         * modules/gethrxtime (Makefile.am): Likewise.
2397         * modules/getline (Makefile.am): Likewise.
2398         * modules/getloadavg (Makefile.am): Likewise.
2399         * modules/getlogin_r (Makefile.am): Likewise.
2400         * modules/getndelim2 (Makefile.am): Likewise.
2401         * modules/getopt (Makefile.am): Likewise.
2402         * modules/getpagesize (Makefile.am): Likewise.
2403         * modules/getpass-gnu (Makefile.am): Likewise.
2404         * modules/getpass (Makefile.am): Likewise.
2405         * modules/getsubopt (Makefile.am): Likewise.
2406         * modules/gettime (Makefile.am): Likewise.
2407         * modules/gettimeofday (Makefile.am): Likewise.
2408         * modules/getugroups (Makefile.am): Likewise.
2409         * modules/getusershell (Makefile.am): Likewise.
2410         * modules/glob (Makefile.am): Likewise.
2411         * modules/group-member (Makefile.am): Likewise.
2412         * modules/hard-locale (Makefile.am): Likewise.
2413         * modules/hash (Makefile.am): Likewise.
2414         * modules/hmac-md5 (Makefile.am): Likewise.
2415         * modules/hmac-sha1 (Makefile.am): Likewise.
2416         * modules/human (Makefile.am): Likewise.
2417         * modules/idcache (Makefile.am): Likewise.
2418         * modules/imaxabs (Makefile.am): Likewise.
2419         * modules/imaxdiv (Makefile.am): Likewise.
2420         * modules/inet_ntop (Makefile.am): Likewise.
2421         * modules/inet_pton (Makefile.am): Likewise.
2422         * modules/intprops (Makefile.am): Likewise.
2423         * modules/inttostr (Makefile.am): Likewise.
2424         * modules/inttypes (Makefile.am): Likewise.
2425         * modules/isapipe (Makefile.am): Likewise.
2426         * modules/javaversion (Makefile.am): Likewise.
2427         * modules/lchmod (Makefile.am): Likewise.
2428         * modules/lchown (Makefile.am): Likewise.
2429         * modules/localcharset (Makefile.am): Likewise.
2430         * modules/long-options (Makefile.am): Likewise.
2431         * modules/lstat (Makefile.am): Likewise.
2432         * modules/malloc (Makefile.am): Likewise.
2433         * modules/mathl (Makefile.am): Likewise.
2434         * modules/mbchar (Makefile.am): Likewise.
2435         * modules/md2 (Makefile.am): Likewise.
2436         * modules/md4 (Makefile.am): Likewise.
2437         * modules/md5 (Makefile.am): Likewise.
2438         * modules/memcasecmp (Makefile.am): Likewise.
2439         * modules/memchr (Makefile.am): Likewise.
2440         * modules/memcmp (Makefile.am): Likewise.
2441         * modules/memcoll (Makefile.am): Likewise.
2442         * modules/memcpy (Makefile.am): Likewise.
2443         * modules/memmem (Makefile.am): Likewise.
2444         * modules/memmove (Makefile.am): Likewise.
2445         * modules/mempcpy (Makefile.am): Likewise.
2446         * modules/memrchr (Makefile.am): Likewise.
2447         * modules/memset (Makefile.am): Likewise.
2448         * modules/memxor (Makefile.am): Likewise.
2449         * modules/mkancesdirs (Makefile.am): Likewise.
2450         * modules/mkdir-p (Makefile.am): Likewise.
2451         * modules/mkdir (Makefile.am): Likewise.
2452         * modules/mkdtemp (Makefile.am): Likewise.
2453         * modules/mkstemp (Makefile.am): Likewise.
2454         * modules/mktime (Makefile.am): Likewise.
2455         * modules/modechange (Makefile.am): Likewise.
2456         * modules/mountlist (Makefile.am): Likewise.
2457         * modules/nanosleep (Makefile.am): Likewise.
2458         * modules/obstack (Makefile.am): Likewise.
2459         * modules/openat (Makefile.am): Likewise.
2460         * modules/pagealign_alloc (Makefile.am): Likewise.
2461         * modules/pathmax (Makefile.am): Likewise.
2462         * modules/physmem (Makefile.am): Likewise.
2463         * modules/poll (Makefile.am): Likewise.
2464         * modules/posixtm (Makefile.am): Likewise.
2465         * modules/posixver (Makefile.am): Likewise.
2466         * modules/putenv (Makefile.am): Likewise.
2467         * modules/quote (Makefile.am): Likewise.
2468         * modules/quotearg (Makefile.am): Likewise.
2469         * modules/raise (Makefile.am): Likewise.
2470         * modules/read-file (Makefile.am): Likewise.
2471         * modules/readline (Makefile.am): Likewise.
2472         * modules/readlink (Makefile.am): Likewise.
2473         * modules/readtokens (Makefile.am): Likewise.
2474         * modules/readutmp (Makefile.am): Likewise.
2475         * modules/realloc (Makefile.am): Likewise.
2476         * modules/regex (Makefile.am): Likewise.
2477         * modules/rename-dest-slash (Makefile.am): Likewise.
2478         * modules/rename (Makefile.am): Likewise.
2479         * modules/rijndael (Makefile.am): Likewise.
2480         * modules/rmdir (Makefile.am): Likewise.
2481         * modules/rpmatch (Makefile.am): Likewise.
2482         * modules/safe-read (Makefile.am): Likewise.
2483         * modules/safe-write (Makefile.am): Likewise.
2484         * modules/same-inode (Makefile.am): Likewise.
2485         * modules/same (Makefile.am): Likewise.
2486         * modules/save-cwd (Makefile.am): Likewise.
2487         * modules/savedir (Makefile.am): Likewise.
2488         * modules/setenv (Makefile.am): Likewise.
2489         * modules/settime (Makefile.am): Likewise.
2490         * modules/sha1 (Makefile.am): Likewise.
2491         * modules/sig2str (Makefile.am): Likewise.
2492         * modules/snprintf (Makefile.am): Likewise.
2493         * modules/stat-macros (Makefile.am): Likewise.
2494         * modules/stat-time (Makefile.am): Likewise.
2495         * modules/stdbool (Makefile.am): Likewise.
2496         * modules/stdint (Makefile.am): Likewise.
2497         * modules/stdlib-safer (Makefile.am): Likewise.
2498         * modules/stpcpy (Makefile.am): Likewise.
2499         * modules/stpncpy (Makefile.am): Likewise.
2500         * modules/strcase (Makefile.am): Likewise.
2501         * modules/strcasestr (Makefile.am): Likewise.
2502         * modules/strchrnul (Makefile.am): Likewise.
2503         * modules/strcspn (Makefile.am): Likewise.
2504         * modules/strdup (Makefile.am): Likewise.
2505         * modules/strerror (Makefile.am): Likewise.
2506         * modules/strftime (Makefile.am): Likewise.
2507         * modules/strndup (Makefile.am): Likewise.
2508         * modules/strnlen (Makefile.am): Likewise.
2509         * modules/strpbrk (Makefile.am): Likewise.
2510         * modules/strsep (Makefile.am): Likewise.
2511         * modules/strstr (Makefile.am): Likewise.
2512         * modules/strtod (Makefile.am): Likewise.
2513         * modules/strtoimax (Makefile.am): Likewise.
2514         * modules/strtok_r (Makefile.am): Likewise.
2515         * modules/strtol (Makefile.am): Likewise.
2516         * modules/strtoll (Makefile.am): Likewise.
2517         * modules/strtoul (Makefile.am): Likewise.
2518         * modules/strtoull (Makefile.am): Likewise.
2519         * modules/strtoumax (Makefile.am): Likewise.
2520         * modules/strverscmp (Makefile.am): Likewise.
2521         * modules/sys_socket (Makefile.am): Likewise.
2522         * modules/sys_stat (Makefile.am): Likewise.
2523         * modules/sysexits (Makefile.am): Likewise.
2524         * modules/time_r (Makefile.am): Likewise.
2525         * modules/timegm (Makefile.am): Likewise.
2526         * modules/timespec (Makefile.am): Likewise.
2527         * modules/tmpfile-safer (Makefile.am): Likewise.
2528         * modules/trim (Makefile.am): Likewise.
2529         * modules/unistd-safer (Makefile.am): Likewise.
2530         * modules/unlinkdir (Makefile.am): Likewise.
2531         * modules/unlocked-io (Makefile.am): Likewise.
2532         * modules/userspec (Makefile.am): Likewise.
2533         * modules/utime (Makefile.am): Likewise.
2534         * modules/utimecmp (Makefile.am): Likewise.
2535         * modules/utimens (Makefile.am): Likewise.
2536         * modules/vasnprintf (Makefile.am): Likewise.
2537         * modules/vasprintf (Makefile.am): Likewise.
2538         * modules/vsnprintf (Makefile.am): Likewise.
2539         * modules/xalloc (Makefile.am): Likewise.
2540         * modules/xgetcwd (Makefile.am): Likewise.
2541         * modules/xnanosleep (Makefile.am): Likewise.
2542         * modules/xreadlink (Makefile.am): Likewise.
2543         * modules/xstrtod (Makefile.am): Likewise.
2544         * modules/xstrtol (Makefile.am): Likewise.
2545         * modules/xstrtold (Makefile.am): Likewise.
2546         * modules/yesno (Makefile.am): Likewise.
2547         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
2548
2549 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
2550
2551         * modules/error (Makefile.am): Distribute files through
2552         EXTRA_DIST, not lib_SOURCES.
2553
2554 2006-10-12  Eric Blake  <ebb9@byu.net>
2555
2556         * modules/error (Makefile.am): Distribute files in /lib.
2557         * modules/obstack (Makefile.am): Likewise.
2558
2559 2006-10-12  Bruno Haible  <bruno@clisp.org>
2560
2561         * modules/acl (Makefile.am): Distribute all files in lib/ through
2562         EXTRA_DIST.
2563         * modules/arcfour (Makefile.am): Likewise.
2564         * modules/arctwo (Makefile.am): Likewise.
2565         * modules/argmatch (Makefile.am): Likewise.
2566         * modules/argz (Makefile.am): Likewise.
2567         * modules/atexit (Makefile.am): Likewise.
2568         * modules/backupfile (Makefile.am): Likewise.
2569         * modules/c-strtod (Makefile.am): Likewise.
2570         * modules/c-strtold (Makefile.am): Likewise.
2571         * modules/calloc (Makefile.am): Likewise.
2572         * modules/canon-host (Makefile.am): Likewise.
2573         * modules/canonicalize (Makefile.am): Likewise.
2574         * modules/chdir-long (Makefile.am): Likewise.
2575         * modules/chdir-safer (Makefile.am): Likewise.
2576         * modules/check-version (Makefile.am): Likewise.
2577         * modules/chown (Makefile.am): Likewise.
2578         * modules/cloexec (Makefile.am): Likewise.
2579         * modules/close-stream (Makefile.am): Likewise.
2580         * modules/closeout (Makefile.am): Likewise.
2581         * modules/crc (Makefile.am): Likewise.
2582         * modules/cycle-check (Makefile.am): Likewise.
2583         * modules/des (Makefile.am): Likewise.
2584         * modules/dirfd (Makefile.am): Likewise.
2585         * modules/dirname (Makefile.am): Likewise.
2586         * modules/dup2 (Makefile.am): Likewise.
2587         * modules/euidaccess (Makefile.am): Likewise.
2588         * modules/exclude (Makefile.am): Likewise.
2589         * modules/exitfail (Makefile.am): Likewise.
2590         * modules/fcntl-safer (Makefile.am): Likewise.
2591         * modules/file-type (Makefile.am): Likewise.
2592         * modules/fileblocks (Makefile.am): Likewise.
2593         * modules/filemode (Makefile.am): Likewise.
2594         * modules/filenamecat (Makefile.am): Likewise.
2595         * modules/fnmatch (Makefile.am): Likewise.
2596         * modules/fopen-safer (Makefile.am): Likewise.
2597         * modules/fpending (Makefile.am): Likewise.
2598         * modules/fprintftime (Makefile.am): Likewise.
2599         * modules/free (Makefile.am): Likewise.
2600         * modules/fsusage (Makefile.am): Likewise.
2601         * modules/ftruncate (Makefile.am): Likewise.
2602         * modules/fts (Makefile.am): Likewise.
2603         * modules/gc (Makefile.am): Likewise.
2604         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2605         * modules/getaddrinfo (Makefile.am): Likewise.
2606         * modules/getcwd (Makefile.am): Likewise.
2607         * modules/getdelim (Makefile.am): Likewise.
2608         * modules/getdomainname (Makefile.am): Likewise.
2609         * modules/getgroups (Makefile.am): Likewise.
2610         * modules/gethostname (Makefile.am): Likewise.
2611         * modules/gethrxtime (Makefile.am): Likewise.
2612         * modules/getline (Makefile.am): Likewise.
2613         * modules/getloadavg (Makefile.am): Likewise.
2614         * modules/getlogin_r (Makefile.am): Likewise.
2615         * modules/getopt (Makefile.am): Likewise.
2616         * modules/getpass (Makefile.am): Likewise.
2617         * modules/getpass-gnu (Makefile.am): Likewise.
2618         * modules/getsubopt (Makefile.am): Likewise.
2619         * modules/gettime (Makefile.am): Likewise.
2620         * modules/gettimeofday (Makefile.am): Likewise.
2621         * modules/getugroups (Makefile.am): Likewise.
2622         * modules/getusershell (Makefile.am): Likewise.
2623         * modules/glob (Makefile.am): Likewise.
2624         * modules/group-member (Makefile.am): Likewise.
2625         * modules/hard-locale (Makefile.am): Likewise.
2626         * modules/hash (Makefile.am): Likewise.
2627         * modules/hmac-md5 (Makefile.am): Likewise.
2628         * modules/hmac-sha1 (Makefile.am): Likewise.
2629         * modules/human (Makefile.am): Likewise.
2630         * modules/idcache (Makefile.am): Likewise.
2631         * modules/imaxabs (Makefile.am): Likewise.
2632         * modules/imaxdiv (Makefile.am): Likewise.
2633         * modules/inet_ntop (Makefile.am): Likewise.
2634         * modules/inet_pton (Makefile.am): Likewise.
2635         * modules/inttostr (Makefile.am): Likewise.
2636         * modules/isapipe (Makefile.am): Likewise.
2637         * modules/lchown (Makefile.am): Likewise.
2638         * modules/long-options (Makefile.am): Likewise.
2639         * modules/lstat (Makefile.am): Likewise.
2640         * modules/malloc (Makefile.am): Likewise.
2641         * modules/mathl (Makefile.am): Likewise.
2642         * modules/mbchar (Makefile.am): Likewise.
2643         * modules/md2 (Makefile.am): Likewise.
2644         * modules/md4 (Makefile.am): Likewise.
2645         * modules/md5 (Makefile.am): Likewise.
2646         * modules/memcasecmp (Makefile.am): Likewise.
2647         * modules/memchr (Makefile.am): Likewise.
2648         * modules/memcmp (Makefile.am): Likewise.
2649         * modules/memcoll (Makefile.am): Likewise.
2650         * modules/memcpy (Makefile.am): Likewise.
2651         * modules/memmem (Makefile.am): Likewise.
2652         * modules/memmove (Makefile.am): Likewise.
2653         * modules/mempcpy (Makefile.am): Likewise.
2654         * modules/memrchr (Makefile.am): Likewise.
2655         * modules/memset (Makefile.am): Likewise.
2656         * modules/memxor (Makefile.am): Likewise.
2657         * modules/mkancesdirs (Makefile.am): Likewise.
2658         * modules/mkdir (Makefile.am): Likewise.
2659         * modules/mkdir-p (Makefile.am): Likewise.
2660         * modules/mkdtemp (Makefile.am): Likewise.
2661         * modules/mkstemp (Makefile.am): Likewise.
2662         * modules/mktime (Makefile.am): Likewise.
2663         * modules/modechange (Makefile.am): Likewise.
2664         * modules/mountlist (Makefile.am): Likewise.
2665         * modules/nanosleep (Makefile.am): Likewise.
2666         * modules/openat (Makefile.am): Likewise.
2667         * modules/pagealign_alloc (Makefile.am): Likewise.
2668         * modules/physmem (Makefile.am): Likewise.
2669         * modules/poll (Makefile.am): Likewise.
2670         * modules/posixtm (Makefile.am): Likewise.
2671         * modules/posixver (Makefile.am): Likewise.
2672         * modules/putenv (Makefile.am): Likewise.
2673         * modules/quote (Makefile.am): Likewise.
2674         * modules/quotearg (Makefile.am): Likewise.
2675         * modules/raise (Makefile.am): Likewise.
2676         * modules/read-file (Makefile.am): Likewise.
2677         * modules/readline (Makefile.am): Likewise.
2678         * modules/readlink (Makefile.am): Likewise.
2679         * modules/readtokens (Makefile.am): Likewise.
2680         * modules/readutmp (Makefile.am): Likewise.
2681         * modules/realloc (Makefile.am): Likewise.
2682         * modules/regex (Makefile.am): Likewise.
2683         * modules/rename (Makefile.am): Likewise.
2684         * modules/rename-dest-slash (Makefile.am): Likewise.
2685         * modules/rijndael (Makefile.am): Likewise.
2686         * modules/rmdir (Makefile.am): Likewise.
2687         * modules/rpmatch (Makefile.am): Likewise.
2688         * modules/safe-read (Makefile.am): Likewise.
2689         * modules/safe-write (Makefile.am): Likewise.
2690         * modules/same (Makefile.am): Likewise.
2691         * modules/save-cwd (Makefile.am): Likewise.
2692         * modules/savedir (Makefile.am): Likewise.
2693         * modules/setenv (Makefile.am): Likewise.
2694         * modules/settime (Makefile.am): Likewise.
2695         * modules/sha1 (Makefile.am): Likewise.
2696         * modules/sig2str (Makefile.am): Likewise.
2697         * modules/snprintf (Makefile.am): Likewise.
2698         * modules/stdlib-safer (Makefile.am): Likewise.
2699         * modules/stpcpy (Makefile.am): Likewise.
2700         * modules/stpncpy (Makefile.am): Likewise.
2701         * modules/strcase (Makefile.am): Likewise.
2702         * modules/strcasestr (Makefile.am): Likewise.
2703         * modules/strchrnul (Makefile.am): Likewise.
2704         * modules/strcspn (Makefile.am): Likewise.
2705         * modules/strdup (Makefile.am): Likewise.
2706         * modules/strerror (Makefile.am): Likewise.
2707         * modules/strftime (Makefile.am): Likewise.
2708         * modules/strndup (Makefile.am): Likewise.
2709         * modules/strnlen (Makefile.am): Likewise.
2710         * modules/strpbrk (Makefile.am): Likewise.
2711         * modules/strsep (Makefile.am): Likewise.
2712         * modules/strstr (Makefile.am): Likewise.
2713         * modules/strtod (Makefile.am): Likewise.
2714         * modules/strtoimax (Makefile.am): Likewise.
2715         * modules/strtok_r (Makefile.am): Likewise.
2716         * modules/strtol (Makefile.am): Likewise.
2717         * modules/strtoll (Makefile.am): Likewise.
2718         * modules/strtoul (Makefile.am): Likewise.
2719         * modules/strtoull (Makefile.am): Likewise.
2720         * modules/strtoumax (Makefile.am): Likewise.
2721         * modules/strverscmp (Makefile.am): Likewise.
2722         * modules/time_r (Makefile.am): Likewise.
2723         * modules/timegm (Makefile.am): Likewise.
2724         * modules/tmpfile-safer (Makefile.am): Likewise.
2725         * modules/unistd-safer (Makefile.am): Likewise.
2726         * modules/unlinkdir (Makefile.am): Likewise.
2727         * modules/userspec (Makefile.am): Likewise.
2728         * modules/utime (Makefile.am): Likewise.
2729         * modules/utimecmp (Makefile.am): Likewise.
2730         * modules/utimens (Makefile.am): Likewise.
2731         * modules/vasnprintf (Makefile.am): Likewise.
2732         * modules/vasprintf (Makefile.am): Likewise.
2733         * modules/vsnprintf (Makefile.am): Likewise.
2734         * modules/xalloc (Makefile.am): Likewise.
2735         * modules/xgetcwd (Makefile.am): Likewise.
2736         * modules/xnanosleep (Makefile.am): Likewise.
2737         * modules/xreadlink (Makefile.am): Likewise.
2738         * modules/xstrtod (Makefile.am): Likewise.
2739         * modules/xstrtol (Makefile.am): Likewise.
2740         * modules/xstrtold (Makefile.am): Likewise.
2741         * modules/yesno (Makefile.am): Likewise.
2742
2743 2006-10-12  Jim Meyering  <jim@meyering.net>
2744
2745         * m4/getloadavg.m4: Revert the change below.
2746
2747         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
2748         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
2749         fail with a symlink, which is what coreutils' ./bootstrap now
2750         creates by default.
2751
2752 2006-10-12  Bruno Haible  <bruno@clisp.org>
2753
2754         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
2755         mingw.
2756         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
2757         MSVC and mingw explicitly.
2758
2759 2006-10-11  Simon Josefsson  <jas@extundo.com>
2760             Bruno Haible  <bruno@clisp.org>
2761
2762         Add support for multiple gnulib-tool invocations in the scope of a
2763         single configure.ac file.
2764         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
2765         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
2766         with the same contents as the _LIBADD variable.
2767         (func_emit_initmacro_start, func_emit_initmacro_end,
2768         func_emit_initmacro_done): New functions.
2769         (func_import, func_create_testdir): Invoke them. Allow the identifiers
2770         gl_LIBOBJS and gl_LTLIBOBJS.
2771
2772 2006-10-11  Bruno Haible  <bruno@clisp.org>
2773
2774         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
2775         (func_create_testdir): Don't create po/Makefile.am, don't invoke
2776         autoreconf. Instead, invoke autopoint explicitly but move back the
2777         *.m4 files from gnulib.
2778
2779 2006-10-11  Bruno Haible  <bruno@clisp.org>
2780
2781         * gnulib-tool (func_usage): Make module names after --create-testdir
2782         optional.
2783         (func_create_testdir): If no module was specified, use nearly all
2784         modules.
2785
2786 2006-10-12  Jim Meyering  <jim@meyering.net>
2787
2788         Big performance improvement for fts-based tools that use FTS_NOSTAT.
2789         Avoid spurious inode-mismatch problems on non-POSIX file systems.
2790         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
2791         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
2792         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
2793         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
2794         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
2795         (fts_set_stat_required): New function.
2796         (fts_open): Defer the calls to fts_stat, if possible or requested.
2797         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
2798         into fts_stat itself.
2799         (fts_read): Perform any required (deferred) fts_stat call.
2800         (fts_build): Likewise, for the directory we're about to open and read.
2801         In the readdir loop, carefully decide whether each entry will require
2802         an eventual call to fts_stat, using dirent.d_type info if available.
2803         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
2804         a command line argument into this function.  Update all callers.
2805         Map a return value of FTS_DOT to FTS_D for a command line argument.
2806         * modules/fts (Depends-on): Add d-type.  Alphabetize.
2807         Thanks to Miklos Szeredi for his tenacity and for the initial
2808         bug report about "find" failing on a FUSE-based file system.
2809
2810         * lib/fts.c (fts_open): Use consistent indentation.
2811
2812 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
2813
2814         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
2815         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
2816         reported by Jim Meyering.  All uses of cache variables renamed
2817         to match Autoconf's.
2818         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
2819         the other one.
2820
2821         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
2822         Fix misspelling in diagnostic.
2823
2824 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2825
2826         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
2827         defined.  Problem reported by Matthew Woehlke.
2828
2829         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
2830         Add support for Tandem NonStop R series.
2831         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
2832         Use new macro.
2833
2834         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
2835         (has_trailing_slash): Omit size arg; all callers changed.
2836         Omit 'inline', since it doesn't help performance and we'd
2837         need to configure it.
2838         Don't count //, ///, etc. as having a trailing slash.
2839         As a side effect, this removes a C99ism reported by Matthew Woehlke.
2840         (rpl_rename_dest_slash): On failure, use rename's errno rather
2841         than (in some cases) an incorrect or junk errno.
2842         Simplify code by removing need to compute length; this does
2843         cause it to make two passes instead of one over the file name,
2844         but it's worth it.
2845
2846         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
2847         change, since Autoconf's version may no longer be appropriate now
2848         that we are using CVS Autoconf's version.  Add support for Tandem.
2849
2850 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2851             Bruno Haible  <bruno@clisp.org>
2852
2853         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
2854         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
2855         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
2856         gl_AC_TYPE_LONG_LONG.
2857
2858         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
2859         instead of HAVE_LONG_LONG.
2860         * lib/printf-args.c (printf_fetchargs): Likewise.
2861         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
2862         * lib/vasnprintf.c (VASNPRINTF): Likewise.
2863         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
2864         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
2865         gl_AC_TYPE_LONG_LONG.
2866
2867 2006-10-11  Bruno Haible  <bruno@clisp.org>
2868
2869         * m4/longlong.m4: Add comments.
2870         * m4/ulonglong.m4: Likewise.
2871
2872 2006-10-10  Bruno Haible  <bruno@clisp.org>
2873
2874         Make it possible to #define stpcpy, strdup to aliases.
2875         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
2876         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
2877
2878 2006-10-10  Bruno Haible  <bruno@clisp.org>
2879
2880         Make it possible to #define gcd to an alias.
2881         * lib/gcd.c: Include config.h.
2882
2883 2006-10-10  Bruno Haible  <bruno@clisp.org>
2884
2885         Make it possible to #define c_isascii to an alias.
2886         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
2887         defined. Undefine the macros before defining them, to avoid gcc
2888         warnings.
2889         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
2890         define NO_C_CTYPE_MACROS early.
2891
2892 2006-10-10  Bruno Haible  <bruno@clisp.org>
2893
2894         Make it possible to #define set_program_name to an alias.
2895         * lib/progname.c: Don't undefine set_program_name; instead, undefine
2896         ENABLE_RELOCATABLE early.
2897
2898 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
2899
2900         Port to Tandem NSK OSS, which has 64-bit signed int but at most
2901         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
2902         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
2903         More generally, don't assume that 64-bit signed int is available
2904         if unsigned int is, and vice versa.
2905         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
2906         unsigned symbols, not on their signed counterparts.
2907         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
2908         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
2909         (UINT64_C, UINTMAX_C):
2910         Likewise.
2911         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
2912         unsigned counterparts.
2913         (Have_long_long, Unsigned): New macros.
2914         (Int): Renamed from INT.
2915         (strtoimax): Use the new macros.
2916         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
2917         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
2918         * modules/inttypes (inttypes.h): Substitute
2919         HAVE_UNSIGNED_LONG_LONG_INT.
2920         * modules/stdint (stdint.h): Likewise.
2921         (Files): Add m4/ulonglong.m4.
2922
2923 2006-10-10  Bruno Haible  <bruno@clisp.org>
2924
2925         Fix a gcc -Wshadow warning.
2926         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
2927         to 'bucket'.
2928         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
2929         gl_linked_indexof_from_to): Likewise.
2930         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
2931         Likewise.
2932         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
2933         Likewise.
2934         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
2935         Reported by Eric Blake.
2936
2937 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
2938
2939         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
2940         for NetBSD.  Problem reported by Bruno Haible.
2941
2942 2006-10-09  Jim Meyering  <jim@meyering.net>
2943
2944         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
2945         Patch from Bruno Haible.
2946
2947 2006-10-09  Jim Meyering  <jim@meyering.net>
2948
2949         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
2950         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
2951         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
2952
2953 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
2954
2955         Don't include <config.h> twice; this doesn't work in some cases,
2956         e.g., when config.h has "#define intmax_t long long int" and
2957         we include <config.h>, <inttypes.h>, <config.h> in that order.
2958         Problem reported by Matthew Woehlke in:
2959         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
2960         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
2961         * lib/fts-cycle.c: Don't include config.h.
2962         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
2963         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
2964         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
2965         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
2966         inttypes.h.
2967         * lib/xstrtoumax.c: Likewise.
2968         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
2969         __strtol and the like, so that this module is more like its siblings.
2970         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
2971         Remove; no longer needed now that we assume gnulib inttypes.h.
2972
2973 2006-10-08  Bruno Haible  <bruno@clisp.org>
2974
2975         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
2976         option.
2977
2978 2006-10-07  Jim Meyering  <jim@meyering.net>
2979
2980         * modules/inttypes (inttypes.h): Revert what seems to have been
2981         an inadvertent part of today's change: use "|", not "/" in the
2982         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
2983
2984 2006-10-07  Bruno Haible  <bruno@clisp.org>
2985
2986         * modules/sublist: New file.
2987
2988 2006-10-07  Bruno Haible  <bruno@clisp.org>
2989
2990         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
2991         * modules/argz (argz.h): Likewise.
2992         * modules/arpa_inet (arpa/inet.h): Likewise.
2993         * modules/byteswap (byteswap.h): Likewise.
2994         * modules/configmake (configmake.h): Likewise.
2995         * modules/fcntl (fcntl.h): Likewise.
2996         * modules/fnmatch (fnmatch.h): Likewise.
2997         * modules/getopt (getopt.h): Likewise.
2998         * modules/glob (glob.h): Likewise.
2999         * modules/inttypes (inttypes.h): Likewise.
3000         * modules/netinet_in (netinet/in.h): Likewise.
3001         * modules/poll (poll.h): Likewise.
3002         * modules/stdbool (stdbool.h): Likewise.
3003         * modules/stdint (stdint.h): Likewise.
3004         * modules/sys_select (sys/select.h): Likewise.
3005         * modules/sys_socket (sys/socket.h): Likewise.
3006         * modules/sys_stat (sys/stat.h): Likewise.
3007         * modules/sysexits (sysexits.h): Likewise.
3008         * modules/unistd (unistd.h): Likewise.
3009         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3010         Add a "DO NOT EDIT" comment to the generated file.
3011         (func_import): Likewise for gnulib-comp.m4.
3012
3013 2006-10-07  Bruno Haible  <bruno@clisp.org>
3014
3015         * lib/gl_sublist.h: New file.
3016         * lib/gl_sublist.c: New file.
3017
3018 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3019
3020         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
3021         name (relative to the original working directory) and the file
3022         name component (relative to the temporary working directory).  All
3023         callers changed.
3024         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
3025         * lib/mkdir-p.c (make_dir_parents): Likewise.
3026         * lib/mkdir-p.h (make_dir_parents): Likewise.
3027
3028 2006-10-06  Eric Blake  <ebb9@byu.net>
3029
3030         Define several macros for use by the clean-temp module.
3031         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
3032         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
3033         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
3034
3035         * lib/clean-temp.h (close_stream_temp): New declaration.
3036         * lib/clean-temp.c (includes): Pull in headers according to what
3037         other modules are in use.
3038         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
3039
3040 2006-10-06  Bruno Haible  <bruno@clisp.org>
3041
3042         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
3043         instead of fopen, fwriteerror.
3044
3045 2006-10-06  Bruno Haible  <bruno@clisp.org>
3046
3047         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
3048         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
3049         int.
3050         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
3051         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
3052         Return an error indicator.
3053         Suggested by Eric Blake.
3054
3055 2006-10-06  Bruno Haible  <bruno@clisp.org>
3056
3057         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
3058         Reported by Eric Blake.
3059
3060 2006-10-06  Bruno Haible  <bruno@clisp.org>
3061
3062         * modules/closeout (Description): Mention stderr too.
3063
3064 2006-10-06  Bruno Haible  <bruno@clisp.org>
3065         and Paul Eggert  <eggert@cs.ucla.edu>
3066
3067         * lib/closeout.c (close_stdout): Also close stderr.
3068         * lib/closeout.h: Update comment.
3069
3070 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3071
3072         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
3073         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
3074         * lib/dirchownmod.c: Include lchown.h.
3075         * lib/lchown.c: Don't include files that lchown.h now includes.
3076         Don't declare chown, since lchown.h now does that.
3077         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
3078         (lchown): Define to rpl_chown if lchown is declared but
3079         does not exist.  Declare using a prototype if lchown is not
3080         declared.  Add a copyright notice.
3081         * lib/mkstemp.h: Include <unistd.h>.
3082         * lib/openat.c: Include lchown.h.
3083
3084         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
3085         we now test for that separately.
3086         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
3087         rather than O_NOFOLLOW, when testing whether it's possible to
3088         avoid a race condition reliably.
3089         * lib/savewd.c (savewd_chdir): Likewise.
3090
3091         Remove macros that are no longer needed now that stdint.h is
3092         reliable.
3093         * lib/fsusage.c (UINTMAX_MAX): Remove.
3094         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
3095         * lib/utimecmp.c (SIZE_MAX): Remove.
3096
3097         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
3098
3099         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
3100         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
3101         O_NOATIME works.
3102
3103 2006-10-05  Bruno Haible  <bruno@clisp.org>
3104
3105         * lib/gl_list.h (gl_sortedlist_search_from_to,
3106         gl_sortedlist_indexof_from_to): New declarations.
3107         (gl_list_implementation): New fields sortedlist_search_from_to,
3108         sortedlist_indexof_from_to.
3109         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
3110         inline functions.
3111         * lib/gl_list.c (gl_sortedlist_search_from_to,
3112         gl_sortedlist_indexof_from_to): New functions.
3113         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
3114         function.
3115         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
3116         (gl_array_sortedlist_search_from_to): New function.
3117         (gl_array_list_implementation): Update.
3118         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
3119         function.
3120         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
3121         (gl_carray_sortedlist_search_from_to): New function.
3122         (gl_carray_list_implementation): Update.
3123         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
3124         gl_linked_sortedlist_indexof_from_to): New functions.
3125         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3126         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3127         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
3128         gl_tree_sortedlist_indexof_from_to): New functions.
3129         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3130         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3131         Update.
3132         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3133         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
3134         Update.
3135
3136 2006-10-05  Bruno Haible  <bruno@clisp.org>
3137
3138         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
3139         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
3140         (struct gl_list_implementation): Add fields search_from_to,
3141         indexof_from_to. Remove fields search, indexof.
3142         (gl_list_search): Use the search_from_to method.
3143         (gl_list_search_from, gl_list_search_from_to): New functions.
3144         (gl_list_indexof): Use the indexof_from_to method.
3145         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3146         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
3147         (gl_list_search_from, gl_list_search_from_to): New functions.
3148         (gl_list_indexof): Use the indexof_from_to method.
3149         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3150         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
3151         gl_array_indexof. Add start_index, end_index arguments.
3152         (gl_array_search_from_to): Renamed from gl_array_search. Add
3153         start_index, end_index arguments.
3154         (gl_array_remove, gl_array_list_implementation): Update.
3155         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
3156         gl_carray_indexof. Add start_index, end_index arguments.
3157         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
3158         start_index, end_index arguments.
3159         (gl_carray_remove, gl_carray_list_implementation): Update.
3160         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
3161         gl_linked_search. Add start_index, end_index arguments.
3162         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
3163         start_index, end_index arguments.
3164         (gl_linked_remove): Update.
3165         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3166         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3167         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
3168         field to 'size_t'.
3169         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
3170         gl_tree_search. Add start_index, end_index arguments.
3171         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3172         start_index, end_index arguments.
3173         (gl_tree_remove): Update.
3174         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3175         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3176         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
3177         function.
3178         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
3179         gl_tree_search. Add start_index, end_index arguments.
3180         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3181         start_index, end_index arguments.
3182         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3183         Update.
3184         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
3185
3186 2006-10-05  Bruno Haible  <bruno@clisp.org>
3187
3188         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
3189
3190         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
3191         fwriteerror_temp): New declarations.
3192         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
3193         (descriptors): New variable.
3194         (cleanup): First, close the descriptors.
3195         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
3196         fclose_temp, fwriteerror_temp): New functions.
3197
3198 2006-10-04  Jim Meyering  <jim@meyering.net>
3199
3200         * lib/fts.c (fts_open): Tiny comment change.
3201
3202 2006-10-04  Bruno Haible  <bruno@clisp.org>
3203
3204         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
3205         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
3206         gl_LOCK_BODY.
3207         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
3208         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
3209         gl_LOCK_EARLY_BODY.
3210         (gl_LOCK): Require gl_LOCK_BODY.
3211
3212 2006-10-04  Bruno Haible  <bruno@clisp.org>
3213
3214         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
3215         (gl_oset_search_atleast): New declaration.
3216         (struct gl_oset_implementation): Add field 'search_atleast'.
3217         (gl_oset_search_atleast): New inline function.
3218         * lib/gl_oset.c (gl_oset_search_atleast): New function.
3219         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
3220         (gl_array_oset_implementation): Update.
3221         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
3222         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
3223         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
3224
3225 2006-10-04  Bruno Haible  <bruno@clisp.org>
3226
3227         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
3228
3229 2006-10-03  Bruno Haible  <bruno@clisp.org>
3230
3231         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
3232         from gl_avltreehash_list_implementation.
3233
3234 2006-10-03  Bruno Haible  <bruno@clisp.org>
3235
3236         * lib/gl_oset.c (gl_oset_add): Fix return type.
3237
3238 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
3239
3240         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
3241
3242 2006-10-02  Eric Blake  <ebb9@byu.net>
3243
3244         * modules/strnlen (Depends-on): Add extensions.
3245
3246 2006-10-02  Eric Blake  <ebb9@byu.net>
3247
3248         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
3249         definition in 2.60+.
3250
3251 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
3252
3253         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
3254         checks.
3255
3256 2006-10-02  Bruno Haible  <bruno@clisp.org>
3257
3258         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
3259         to the AUTOMAKE_OPTIONS.
3260         Reported by Jim Meyering.
3261
3262 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
3263
3264         Work around bug in Solaris 10 /proc file system:
3265         /proc/self/fd/NNN/.. isn't the parent directory of
3266         the directory whose file descriptor is NNN.  This needs to
3267         be worked around at run time, not compile time, since a
3268         program might be built on Solaris 8, where things work, and
3269         run on Solaris 10.
3270         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
3271         to use the following interface instead:
3272         (OPENAT_BUFFER_SIZE): New macro.
3273         (openat_proc_name): New function.
3274         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
3275         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
3276         Likewise.
3277         * lib/openat-proc.c: New file.
3278         * modules/openat (Files): Add lib/openat-proc.c.
3279         (Depends-on): Add same-inode, stdbool.
3280         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
3281
3282 2006-09-29  Bruno Haible  <bruno@clisp.org>
3283
3284         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
3285         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
3286         argument. Set stdout_closed before testing for ferror, not after.
3287         (fwriteerror, fwriteerror_no_ebadf): New functions.
3288
3289 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3290
3291         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
3292
3293 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
3294
3295         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
3296         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
3297
3298 2006-09-28  Jim Meyering  <jim@meyering.net>
3299
3300         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
3301         Include <unistd.h>.
3302
3303 2006-09-28  Bruno Haible  <bruno@clisp.org>
3304
3305         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
3306         * modules/linkedhash-list (Depends-on): Likewise.
3307         * modules/rbtreehash-list (Depends-on): Likewise.
3308
3309 2006-09-28  Bruno Haible  <bruno@clisp.org>
3310
3311         * lib/strndup.h: Simplify the redefinition of strndup.
3312         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
3313         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
3314
3315 2006-09-28  Bruno Haible  <bruno@clisp.org>
3316
3317         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
3318         * lib/gl_linkedhash_list.c: Likewise.
3319         * lib/gl_rbtreehash_list.c: Likewise.
3320
3321 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
3322
3323         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
3324         getaddrinfo.
3325
3326         * lib/__fpending.h: Don't include <stdio_ext.h> unless
3327         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
3328         it causes <stdio_ext.h> to cause a compile-time error.
3329         Problem reported by Nelson H. F. Beebe.
3330         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
3331         of HAVE_DECL___PENDING.
3332
3333         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
3334         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
3335         declaration.
3336
3337 2006-09-27  Jim Meyering  <jim@meyering.net>
3338
3339         This file could end up with a definition for a function
3340         named __strndup, rather than rpl_strndup on a system with
3341         incomplete weak_alias support.
3342         * lib/strndup.c (strndup): Rename from __strndup.
3343         Remove #defines that used to map __strndup to strndup.
3344         Don't use K&R prototypes.
3345         Remove LIBC-related code, since this file is not sync'd with glibc.
3346         * lib/strndup.h: Revamp, accordingly.
3347         * m4/strndup.m4: Modernize.
3348
3349 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
3350
3351         * modules/savewd (Depends-on): Add 'raise'.
3352         * lib/savewd.c: Include <signal.h>, for 'raise'.
3353
3354 2006-09-26  Jim Meyering  <jim@meyering.net>
3355
3356         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
3357         when we detect Darwin 8.7.0's acl_get_file bug.
3358         Rearrange to perform the new (below) run-test while $LIBS
3359         contains any acl-related library.  Set USE_ACL at the end.
3360         (gl_ACL_GET_FILE): New function.
3361
3362 2006-09-26  Eric Blake  <ebb9@byu.net>
3363
3364         * lib/verror.c: Include <config.h> unconditionally.
3365
3366 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
3367
3368         * modules/clock-time (Maintainer): Add self.
3369         * modules/getlogin_r (Depends-on): Add extensions.
3370
3371 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3372
3373         * modules/clock-time: New module.
3374         * modules/nanosleep (Depends-on): Add clock-time.
3375         * modules/gethrxtime (Depends-on): Likewise.
3376         * modules/gettime (Depends-on): Likewise.
3377         * modules/settime (Depends-on): Likewise.
3378
3379         * modules/fts-lgpl: Depend on openat.
3380         * modules/mkancesdirs: Depend on savewd.
3381         * modules/mkdir-p: Likewise.
3382
3383 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3384
3385         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
3386
3387         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
3388         `gl_have_arbitrary_file_name_length_limit' to
3389         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
3390         actually works between configure runs.
3391
3392 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3393             Bruno Haible  <bruno@clisp.org>
3394
3395         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
3396
3397 2006-09-25  Jim Meyering  <jim@meyering.net>
3398
3399         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
3400         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
3401
3402 2006-09-25  Eric Blake  <ebb9@byu.net>
3403
3404         * gnulib-tool (func_import, func_create_testdir): Fix typos in
3405         exec's in 2006-09-18 patch when shuffling fds.
3406
3407 2006-09-25  Bruno Haible  <bruno@clisp.org>
3408
3409         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
3410         Reported by Jim Meyering.
3411
3412 2006-09-24  Jim Meyering  <jim@meyering.net>
3413
3414         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
3415         compare a pointer against a literal "0".  That caused failures with
3416         at least HP-UX's hpcc.
3417
3418 2006-09-22  Simon Josefsson  <jas@extundo.com>
3419
3420         * modules/gc-sha1:
3421         * modules/gc-md4:
3422         * modules/gc-hmac-sha1:
3423         * modules/gc-hmac-md5:
3424         * modules/gc-des:
3425         * modules/gc-arcfour: Distribute more files.
3426
3427 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3428
3429         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
3430         (gl_linked_iterator_from_to): Initialize struct completely.
3431         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
3432         (gl_tree_iterator_from_to): Likewise
3433         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
3434         * lib/gl_array_list.c [lint] (gl_array_iterator)
3435         (gl_array_iterator_from_to): Likewise.
3436         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
3437         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
3438         (gl_carray_iterator_from_to): Likewise.
3439
3440         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
3441         * lib/md4.c (md4_process_block): Remove unused variable.
3442         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
3443         parentheses for clarity.
3444
3445 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3446
3447         * modules/bison-i18n (Depends-on): Add gettext.
3448
3449 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3450
3451         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
3452         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
3453         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
3454         also add missing comma that caused broken test.
3455         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
3456         stdlib.h, for `abort'.
3457         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
3458         variables.
3459         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
3460         include unistd.h if present, for `rmdir'.
3461         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
3462         variables.
3463         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
3464         in the process include standard headers for prototypes.
3465         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
3466         gets declared on GNU/Linux.
3467         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
3468         unistd.h, for `rmdir'.
3469         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
3470
3471         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
3472         always true.
3473         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
3474
3475         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
3476
3477 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3478
3479         * gnulib-tool (func_version): Create output all at once.  This
3480         may help avoid triggering unnecessary SIGPIPEs, and at any
3481         rate it doesn't hurt.
3482
3483 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3484             Bruno Haible  <bruno@clisp.org>
3485
3486         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
3487         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3488         * m4/signed.m4 (bh_C_SIGNED): Likewise.
3489
3490         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
3491         (gl_FUNC_VASPRINTF): Invoke it.
3492
3493 2006-09-22  Bruno Haible  <bruno@clisp.org>
3494
3495         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
3496         getloadavg.c as first argument.
3497
3498 2006-09-22  Bruno Haible  <bruno@clisp.org>
3499
3500         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
3501         at the beginning of the gl_INIT macro.
3502         * modules/getloadavg (configure.ac): Pass $gl_source_base to
3503         gl_GETLOADAVG.
3504
3505 2006-09-22  Bruno Haible  <bruno@clisp.org>
3506
3507         * gnulib-tool (func_create_megatestdir): Don't include the config-h
3508         module.
3509         Suggested by Ralf Wildenhues.
3510
3511 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
3512
3513         Import this patch from libc:
3514
3515         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
3516
3517         * lib/regex_internal.c (re_string_reconstruct): Handle
3518         offset < pstr->valid_raw_len && pstr->offsets_needed case.
3519         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
3520         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
3521         re_string_context_at.
3522
3523         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
3524         now requires it.
3525         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
3526         gl_REGEX now does it for us.
3527         (gl_REGEX): Add test taken from
3528         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
3529
3530         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
3531         Check that large offsets work.  Modernize Autoconf usages.
3532         Prefer "yes" to mean a good thing rather than a bad.
3533         Don't put "#define mkstemp" in config.h, as this might interfere
3534         with standard system headers that "#define mkstemp mkstemp64".
3535
3536         * modules/mkstemp (Depends-on): Add extensions, so that
3537         mkstemp is visible on some platforms.
3538         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
3539         (Include): Change to "mkstemp.h" from <stdlib.h>.
3540         (Files): Add mkstemp.h.
3541
3542         * lib/mkstemp.h: New file, since some standard headers
3543         #define mkstemp.
3544         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
3545         Include "mkstemp.h".
3546         Make the _LIBC code resemble glibc original more,
3547         e.g., use K&R style.
3548         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
3549         (mkstemp): Remove, since mkstemp.h does this for us.
3550         * lib/stdlib--.h: Include mkstemp.h.
3551
3552         Import this patch from libc:
3553
3554         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3555
3556         * lib/tempname.c (__gen_tempname): Change attempts_min
3557         into a macro.  Use preprocessor to decide how to initialize
3558         attempts [Coverity CID 67].
3559
3560 2006-09-20  Bruno Haible  <bruno@clisp.org>
3561
3562         * lib/mkdtemp.c: Import from libc.
3563         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3564                 * sysdeps/posix/tempname.c (__gen_tempname): Change
3565                 attempts_min into a macro.  Use preprocessor to decide how to
3566                 initialize attempts [Coverity CID 67].
3567         2001-11-27  Paul Eggert  <eggert@twinsun.com>
3568                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
3569                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
3570
3571 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3572
3573         * gnulib-tool (func_exit): New function, to allow to pass the
3574         exit status portably through the trap.  Use everywhere.
3575         (--help, --version): Signal a write error.
3576         (trap): catch SIGPIPE, for write errors.
3577         Exit at the end of the trap, with the correct exit status.
3578
3579 2006-09-19  Karl Berry  <karl@gnu.org>
3580
3581         * doc/gnulib.texi: note about the license texinfo files.
3582
3583 2006-09-19  Eric Blake  <ebb9@byu.net>
3584
3585         * gnulib-tool: Avoid space-tab.
3586
3587 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3588
3589         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
3590         that prevented coreutils 6.1 from building.  Problem reported
3591         by Petter Reinholdtsen.
3592
3593 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3594
3595         * gnulib-tool (avoidlist): Fix typo that broke options like
3596         --avoid=lock that are used by coreutils bootstrap.
3597
3598 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
3599
3600         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
3601         more systematically.
3602
3603 2006-09-18  Jim Meyering  <jim@meyering.net>
3604
3605         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
3606
3607 2006-09-18  Bruno Haible  <bruno@clisp.org>
3608
3609         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
3610
3611 2006-09-18  Bruno Haible  <bruno@clisp.org>
3612
3613         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
3614         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
3615         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
3616         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
3617         * m4/gettext.m4: Require autoconf >= 2.52.
3618         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
3619         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
3620         of gl_cv_header_inttypes_h.
3621
3622 2006-09-18  Bruno Haible  <bruno@clisp.org>
3623
3624         * lib/javaversion.c: Include configmake.h.
3625
3626 2006-09-18  Bruno Haible  <bruno@clisp.org>
3627
3628         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
3629         avoid that the while loops be executed in a subshell.
3630
3631 2006-09-18  Bruno Haible  <bruno@clisp.org>
3632
3633         * MODULES.html.sh (func_module): Break long lines.
3634         Suggested by Bruce Korb <bkorb@gnu.org>.
3635
3636 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3637
3638         Speed up by a factor of 1.12.
3639         * gnulib-tool (nl): New variable.
3640         (func_import): Rewrite include directive extraction to only read each
3641         directive once.
3642
3643 2006-09-17  Bruno Haible  <bruno@clisp.org>
3644
3645         * modules/javaversion (Makefile.am): Remove DEFS setting.
3646         (Depends-on): Add configmake, for PKGDATADIR definition.
3647
3648 2006-09-17  Bruno Haible  <bruno@clisp.org>
3649
3650         * gnulib-tool (func_create_testdir): Rewrite all files at once.
3651
3652 2006-09-17  Bruno Haible  <bruno@clisp.org>
3653
3654         * gnulib-tool (func_append): New function, stolen from libtool.m4.
3655         (func_modules_transitive_closure, func_modules_add_dummy,
3656         func_modules_to_filelist, func_import, func_create_testdir,
3657         func_create_megatestdir, ...): Use it wherever possible.
3658         Suggested by Ralf Wildenhues.
3659
3660 2006-09-16  Karl Berry  <karl@gnu.org>
3661
3662         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
3663         to avoid sectioning errors.
3664         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
3665         [ifinfo]: blank line after @center-ed titles.
3666         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
3667         Spell FSF address consistently with others.
3668         (These changes approved by rms.)
3669
3670 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3671
3672         Speed up by a factor of 1.61.
3673         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
3674         already checked module names again.
3675
3676 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3677
3678         Speed up by a factor of 1.13.
3679         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
3680         for new_files, and the input to func_add_or_update.
3681
3682 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3683
3684         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
3685         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
3686
3687 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3688
3689         * modules/mkancesdirs (Depends-on): Add fcntl.
3690         * modules/savewd: New file.
3691         * MODULES.html.sh (File system functions): Add savewd.
3692
3693         * modules/configmake (Makefile.am): Add support for the
3694         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
3695
3696 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3697
3698         * m4/savewd.m4: New file.
3699
3700 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3701
3702         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
3703         (dirchownmod): New arg FD.  All callers changed.
3704         Use FD rather than opening the directory ourself, as opening is
3705         now the caller's responsibility.
3706         * lib/dirchownmod.h: Likewise.
3707         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
3708         hosts that require <sys/types.h> before <sys/stat.h>.  Include
3709         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
3710         (test_dir): Remove.
3711         (mkancesdirs): Return length of prefix of FILE that has already
3712         been made, or -2 if there is a child doing the work.  Redo
3713         algorithm so that it is O(N) rather than O(N**2).  Optimize away
3714         ".", and treat ".." specially since it might stray back into
3715         already-created areas.  Use a subprocess if necessary.  New arg
3716         WD; all users changed.  MAKE_DIR function should now return 1
3717         if it creates a directory that is not readable.  Return -2 if
3718         a child process is spun off.
3719         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
3720         Adjust signature to match code.
3721         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
3722         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
3723         all users changed.
3724         * lib/savewd.c, lib/savewd.h: New files.
3725
3726 2006-09-15  Jim Meyering  <jim@meyering.net>
3727
3728         * modules/rename-dest-slash: New module.
3729         * MODULES.html.sh (posix_compat): Add it here.
3730
3731         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
3732
3733 2006-09-15  Jim Meyering  <jim@meyering.net>
3734
3735         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
3736         file.
3737
3738         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
3739
3740 2006-09-15  Jim Meyering  <jim@meyering.net>
3741
3742         * lib/rename-dest-slash.c (has_trailing_slash): Use
3743         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
3744         (rpl_rename_dest_slash): Perform the cheaper trailing slash
3745         test before testing whether SRC is a directory.
3746         Suggestions from Bruno Haible.
3747
3748         Avoid a warning about an unused variable.
3749         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
3750         into the #ifdef block where it's used.
3751
3752         * lib/rename-dest-slash.c: New file.
3753
3754 2006-09-14  Bruno Haible  <bruno@clisp.org>
3755
3756         * lib/allocsa.c: Include <config.h> unconditionally.
3757         * lib/asnprintf.c: Likewise.
3758         * lib/asprintf.c: Likewise.
3759         * lib/c-strcasecmp.c: Likewise.
3760         * lib/c-strcasestr.c: Likewise.
3761         * lib/c-strncasecmp.c: Likewise.
3762         * lib/c-strstr.c: Likewise.
3763         * lib/classpath.c: Likewise.
3764         * lib/clean-temp.c: Likewise.
3765         * lib/concatpath.c: Likewise.
3766         * lib/copy-file.c: Likewise.
3767         * lib/csharpcomp.c: Likewise.
3768         * lib/csharpexec.c: Likewise.
3769         * lib/execute.c: Likewise.
3770         * lib/fatal-signal.c: Likewise.
3771         * lib/findprog.c: Likewise.
3772         * lib/fwriteerror.c: Likewise.
3773         * lib/gl_array_list.c: Likewise.
3774         * lib/gl_array_oset.c: Likewise.
3775         * lib/gl_avltree_list.c: Likewise.
3776         * lib/gl_avltree_oset.c: Likewise.
3777         * lib/gl_avltreehash_list.c: Likewise.
3778         * lib/gl_carray_list.c: Likewise.
3779         * lib/gl_linked_list.c: Likewise.
3780         * lib/gl_linkedhash_list.c: Likewise.
3781         * lib/gl_list.c: Likewise.
3782         * lib/gl_oset.c: Likewise.
3783         * lib/gl_rbtree_list.c: Likewise.
3784         * lib/gl_rbtree_oset.c: Likewise.
3785         * lib/gl_rbtreehash_list.c: Likewise.
3786         * lib/imaxabs.c: Likewise.
3787         * lib/imaxdiv.c: Likewise.
3788         * lib/javacomp.c: Likewise.
3789         * lib/javaexec.c: Likewise.
3790         * lib/javaversion.c: Likewise.
3791         * lib/linebreak.c: Likewise.
3792         * lib/localcharset.c: Likewise.
3793         * lib/lock.c: Likewise.
3794         * lib/mbchar.c: Likewise.
3795         * lib/mbswidth.c: Likewise.
3796         * lib/mkdtemp.c: Likewise.
3797         * lib/pipe.c: Likewise.
3798         * lib/printf-args.c: Likewise.
3799         * lib/printf-parse.c: Likewise.
3800         * lib/progname.c: Likewise.
3801         * lib/progreloc.c: Likewise.
3802         * lib/readlink.c: Likewise.
3803         * lib/sh-quote.c: Likewise.
3804         * lib/stpcpy.c: Likewise.
3805         * lib/stpncpy.c: Likewise.
3806         * lib/strcasecmp.c: Likewise.
3807         * lib/strcasestr.c: Likewise.
3808         * lib/strcspn.c: Likewise.
3809         * lib/striconv.c: Likewise.
3810         * lib/strncasecmp.c: Likewise.
3811         * lib/strnlen1.c: Likewise.
3812         * lib/strstr.c: Likewise.
3813         * lib/strtok_r.c: Likewise.
3814         * lib/tls.c: Likewise.
3815         * lib/tmpdir.c: Likewise.
3816         * lib/unicodeio.c: Likewise.
3817         * lib/unsetenv.c: Likewise.
3818         * lib/vasnprintf.c: Likewise.
3819         * lib/vasprintf.c: Likewise.
3820         * lib/wait-process.c: Likewise.
3821         * lib/xallocsa.c: Likewise.
3822         * lib/xsetenv.c: Likewise.
3823         * lib/xstriconv.c: Likewise.
3824
3825 2006-09-13  Simon Josefsson  <jas@extundo.com>
3826
3827         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
3828         that internally, suggested by Ralf Wildenhues
3829         <Ralf.Wildenhues@gmx.de>.
3830
3831 2006-09-13  Simon Josefsson  <jas@extundo.com>
3832
3833         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
3834         @LIBOBJS@.
3835         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3836
3837 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
3838
3839         * lib/_fpending.c: Include <config.h> unconditionally, since we no
3840         longer worry about uses that don't define HAVE_CONFIG_H.
3841         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
3842         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
3843         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
3844         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
3845         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
3846         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
3847         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
3848         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
3849         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
3850         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
3851         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
3852         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
3853         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
3854         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
3855         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
3856         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
3857         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
3858         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
3859         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
3860         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
3861         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
3862         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
3863         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
3864         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
3865         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
3866         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
3867         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
3868         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
3869         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
3870         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
3871         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
3872         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
3873         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
3874         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
3875         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
3876         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
3877         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
3878         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
3879         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
3880         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
3881         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
3882         Likewise.
3883
3884 2006-09-13  Eric Blake  <ebb9@byu.net>
3885
3886         * lib/getopt.c: Fix typo in last commit.
3887
3888 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
3889
3890         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
3891         dgettext.
3892
3893 2006-09-12  Jim Meyering  <jim@meyering.net>
3894
3895         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
3896         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
3897         Reported by Nelson H. F. Beebe.
3898
3899 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
3900
3901         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
3902         program_invocation_name and program_invocation_short_name are
3903         initialized.
3904         * lib/argp-namefrob.h: Move declarations of program_invocation_name
3905         and program_invocation_short_name to argp.h, so they are visible
3906         to user programs.
3907         * lib/argp.h: Likewise
3908
3909 2006-09-10  Bruno Haible  <bruno@clisp.org>
3910
3911         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
3912         m4/inttypes_h.m4, m4/uintmax_t.m4.
3913
3914 2006-09-10  Bruno Haible  <bruno@clisp.org>
3915
3916         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
3917         gl_AC_TYPE_UINTMAX_T.
3918
3919 2006-09-10  Bruno Haible  <bruno@clisp.org>
3920
3921         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
3922
3923 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
3924
3925         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
3926         convention.  Text proposed by Bruno Haible.
3927         (struct argp_option): Document the use of N_() wrappers.
3928
3929         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
3930         '\v', and translate the two parts separately, instead of feeding
3931         the whole string to gettext.  This allows to exclude
3932         '\v' from the strings visible to the translator by writing doc
3933         strings as N_("..") "\v" N_("..").
3934
3935 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
3936
3937         * config/srclist.txt: Undo latest change; the bug was fixed.
3938
3939 2006-09-09  Bruno Haible  <bruno@clisp.org>
3940
3941         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
3942         assignments if building a library without libtool.
3943         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
3944         in func_emit_lib_Makefile_am.
3945         (func_import): When building a static library libfoo.a, arrange to
3946         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
3947         (func_create_testdir): Likewise.
3948         * modules/gc (configure.ac, Makefile.am): If building statically,
3949         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
3950         * modules/iconvme (configure.ac, Makefile.am): Likewise.
3951         * modules/striconv (configure.ac, Makefile.am): Likewise.
3952         Based on a suggestion by Ralf Wildenhues.
3953
3954 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3955
3956         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
3957         Check for unistd.h too, since Autoconf doesn't assume POSIX.
3958         Also:
3959
3960         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3961         Add year_2050_test to catch glibc bug 2821
3962         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3963
3964         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3965         Prefer #ifdef to #if.
3966
3967         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
3968         Return from 'main' instead of calling 'exit'.
3969
3970 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3971
3972         * lib/mktime.c (guess_time_tm): Fix bug where mktime
3973         returned the maximum time_t value rather than (time_t) -1.
3974         Problem originally reported by William Bardwell
3975         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3976
3977         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3978         Moved to here ...
3979         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3980         ... from here.
3981
3982 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3983
3984         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
3985         2821 is fixed.
3986
3987 2006-09-08  Jim Meyering  <jim@meyering.net>
3988
3989         Don't make generated files read-only.  That would bother too many
3990         people.  However, do retain the ability to work when targets are
3991         read-only: remove the destination and temporary files before writing
3992         them (when generated via sed or echo), or by using the -f option for
3993         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
3994         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3995         * modules/byteswap, modules/configmake, modules/fcntl:
3996         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3997         * modules/localcharset, modules/netinet_in, modules/poll:
3998         * modules/stdbool, modules/stdint, modules/sys_select:
3999         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4000
4001 2006-09-08  Jim Meyering  <jim@meyering.net>
4002
4003         Avoid new build failure on FreeBSD 6.0.
4004         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
4005         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
4006         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
4007
4008 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4009
4010         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
4011
4012 2006-09-07  Jim Meyering  <jim@meyering.net>
4013
4014         Fix global typo in last change: use chmod u-w, not chmod u-x.
4015         Spotted by Paul Eggert and Bruce Korb.
4016         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4017         * modules/byteswap, modules/configmake, modules/fcntl:
4018         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4019         * modules/localcharset, modules/netinet_in, modules/poll:
4020         * modules/stdbool, modules/stdint, modules/sys_select:
4021         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4022
4023 2006-09-06  Jim Meyering  <jim@meyering.net>
4024
4025         Make generated files be read-only.
4026         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
4027         Ensure that each generated file is now read-only.
4028         * modules/argz: Likewise.
4029         * modules/arpa_inet: Likewise.
4030         * modules/byteswap: Likewise.
4031         * modules/configmake: Likewise.
4032         * modules/fcntl: Likewise.
4033         * modules/fnmatch: Likewise.
4034         * modules/getopt: Likewise.
4035         * modules/glob: Likewise.
4036         * modules/inttypes: Likewise.
4037         * modules/netinet_in: Likewise.
4038         * modules/poll: Likewise.
4039         * modules/stdbool: Likewise.
4040         * modules/stdint: Likewise.
4041         * modules/sys_select: Likewise.
4042         * modules/sys_socket: Likewise.
4043         * modules/sys_stat: Likewise.
4044         * modules/sysexits: Likewise.
4045         * modules/localcharset: Same as above, but continue using temporary
4046         file named "t-$@" (why different?) rather than the "$@-t" used
4047         everywhere else.
4048
4049         * modules/sysexits (Makefile.am): Replace literal occurrences
4050         of "sysexit.h" more readable, and more consistent, "$@".
4051
4052 2006-09-06  Bruno Haible  <bruno@clisp.org>
4053
4054         * modules/striconv: New file.
4055         * modules/xstriconv: New file.
4056         * MODULES.html.sh (Internationalization functions): Add striconv,
4057         xstriconv.
4058
4059 2006-09-06  Bruno Haible  <bruno@clisp.org>
4060
4061         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
4062         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
4063         not using libtool correctly.
4064
4065 2006-09-06  Bruno Haible  <bruno@clisp.org>
4066
4067         * lib/striconv.h: New file.
4068         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
4069         iconvstring.c.
4070         * lib/xstriconv.h: New file.
4071         * lib/xstriconv.c: New file.
4072
4073 2006-09-06  Bruno Haible  <bruno@clisp.org>
4074
4075         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4076         lib_..._LDFLAGS.
4077
4078 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4079
4080         * lib/argz_.h: Sync from Libtool.
4081
4082         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
4083                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4084
4085         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
4086
4087 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4088
4089         * modules/trim: New file.
4090
4091 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4092
4093         * lib/trim.h: New file.
4094         * lib/trim.c: New file.
4095
4096 2006-09-05  Bruno Haible  <bruno@clisp.org>
4097
4098         * MODULES.html.sh (String handling): Add trim.
4099
4100 2006-09-04  Karl Berry  <karl@gnu.org>
4101
4102         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
4103         until next release.
4104
4105 2006-09-03  Bruno Haible  <bruno@clisp.org>
4106
4107         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
4108         correctly.
4109
4110 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4111
4112         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
4113         not gl_GETLOADAVG.  Omit unneeded semicolons.
4114         Problems reported by Ralf Wildenhues in
4115         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4116         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
4117         at the end, which is the usual gnulib style.
4118
4119         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
4120         of doing all the work ourselves.
4121         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
4122         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
4123
4124 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4125
4126         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
4127         Problem reported by Ralf Wildenhues in
4128         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4129
4130         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
4131         HAVE_STRUCT_STATFS_F_FSTYPENAME.
4132
4133 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4134
4135         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
4136         yesterday's patch by changing test -n to test -z.
4137
4138 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4139
4140         * modules/getloadavg (Files): Add m4/getloadavg.m4.
4141         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
4142         the former is now obsolescent.
4143
4144         * modules/chdir-long (Depends-on): Add fcntl.
4145
4146 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4147
4148         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
4149         obsolescent, and programs should use gnulib instead.
4150         * m4/getloadavg.m4: New file, with contents taken from Autoconf
4151         but with prefixes changed.
4152
4153 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4154
4155         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
4156         or stdbool.h, because they might not exist while configuring.
4157
4158         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
4159         Don't include unistd.h or limits.h; not needed, since chdir-long.h
4160         does that for us.
4161         (O_DIRECTORY): Remove.
4162
4163 2006-08-31  Eric Blake  <ebb9@byu.net>
4164
4165         * gnulib-tool: Don't let emacs change spaces to TAB.
4166
4167 2006-08-31  Bruno Haible  <bruno@clisp.org>
4168
4169         * gnulib-tool: When calling func_import more than once, do it in a
4170         subshell.
4171         Reported by Eric Blake <ebb9@byu.net>.
4172
4173 2006-08-31  Bruno Haible  <bruno@clisp.org>
4174
4175         * gnulib-tool (nl): Remove variable.
4176         (sed_transform_lib_file): Use more robust test for config-h module.
4177         (func_import): Fix typo in 2006-08-25 patch.
4178
4179 2006-08-31  Bruno Haible  <bruno@clisp.org>
4180
4181         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
4182         specified, augment Makefile.am variables instead of assigning them.
4183
4184 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4185
4186         Work around a bug in both the Linux and SunOS 64-bit kernels:
4187         nanosleep mishandles sleeps for longer than 2**31 seconds.
4188         Problem reported by Frank v Waveren in
4189         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4190         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
4191         Check for nanosleep bug.
4192         (LIB_NANOSLEEP): Append clock_gettime library if needed.
4193
4194 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4195
4196         Work around a bug in both the Linux and SunOS 64-bit kernels:
4197         nanosleep mishandles sleeps for longer than 2**31 seconds.
4198         Problem reported by Frank v Waveren in
4199         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4200         * lib/nanosleep.c (BILLION): New constant.
4201         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
4202         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
4203         implementation.
4204
4205 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4206
4207         * modules/nanosleep (Depends-on): Add gettime.
4208
4209 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4210         and Simon Josefsson  <jas@extundo.com>
4211         and Oskar Liljeblad  <oskar@osk.mine.nu>
4212
4213         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
4214         * gnulib-tool (func_import): New license type 'unmodifiable license
4215         text'.
4216         * modules/fdl: Use it.  Longer description.
4217         * module/gpl, module/lgpl: New files.
4218
4219 2006-08-30  Jim Meyering  <jim@meyering.net>
4220
4221         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
4222         shadowing the parameter.
4223
4224 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4225
4226         Sync from Libtool:
4227
4228         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4229
4230         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
4231         sharing with gnulib.  Report by Eric Blake.
4232
4233 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4234
4235         * modules/isapipe: New file.
4236         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
4237
4238 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4239
4240         * modules/configmake (Makefile.am): Add a comment, and omit
4241         the CONFIGMAKE_ prefix from generated macro names.  Suggested
4242         by Bruno Haible.
4243
4244 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4245
4246         * m4/isapipe.m4: New file.
4247
4248 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4249
4250         * lib/isapipe.c, lib/isapipe.h: New files.
4251
4252 2006-08-29  Jim Meyering  <jim@meyering.net>
4253
4254         * modules/configmake (Makefile.am): Make configmake.h depend on
4255         Makefile.  Otherwise, a stale configmake.h could hang around.
4256
4257 2006-08-29  Eric Blake  <ebb9@byu.net>
4258
4259         * lib/error.c (error_at_line, print_errno_message): Match libc, after
4260         resolution of upstream bug 3044.
4261
4262 2006-08-29  Bruno Haible  <bruno@clisp.org>
4263
4264         * modules/localcharset (Depends-on): Add configmake.
4265         (Makefile.am): Remove setting of LIBDIR through DEFS.
4266
4267 2006-08-29  Bruno Haible  <bruno@clisp.org>
4268
4269         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
4270         defined.
4271
4272 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4273
4274         * modules/fcntl: New file.
4275         * modules/chdir-safer (Depends-on): Add fcntl.
4276         * modules/fts: Likewise.
4277         * modules/mkdir-p: Likewise.
4278
4279         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
4280         This undoes the most recent change, since we're now addressing the
4281         problem in a different way.
4282
4283         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
4284         into output, since the output might be called Makefile.am even
4285         if $makefile_name is something different.
4286         (func_import): Use $makefile_am rather than
4287         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
4288         empty.
4289
4290         * modules/inttypes (Files): Add m4/inttypes-h.m4.
4291
4292 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4293
4294         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
4295         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
4296         recent change to stdint.m4, since we're now addressing the problem in a
4297         different way.
4298
4299 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4300
4301         * m4/fcntl_h.m4: New file.
4302
4303 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4304
4305         * lib/fcntl_.h: New file.
4306         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
4307         the fcntl module.
4308         * lib/dirchownmod.c: Likewise.
4309         * lib/fts.c: Likewise.
4310
4311         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
4312         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
4313         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
4314         just before including <inttypes.h>, to avoid circular inclusion.
4315
4316 2006-08-28  Jim Meyering  <jim@meyering.net>
4317
4318         * doc/visibility.texi: Actually read and correct the grammar of the
4319         sentence affected by yesterday's change.
4320
4321 2006-08-28  Eric Blake  <ebb9@byu.net>
4322
4323         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
4324         needs wrapper.
4325
4326 2006-08-28  Eric Blake  <ebb9@byu.net>
4327
4328         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
4329
4330 2006-08-28  Eric Blake  <ebb9@byu.net>
4331
4332         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
4333
4334 2006-08-28  Bruno Haible  <bruno@clisp.org>
4335
4336         * modules/c-strstr: New file, from GNU gettext.
4337         * MODULES.html.sh (String handling): Add c-strstr.
4338
4339 2006-08-28  Bruno Haible  <bruno@clisp.org>
4340
4341         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
4342         macros.
4343         Reported by Eric Blake.
4344
4345 2006-08-28  Bruno Haible  <bruno@clisp.org>
4346
4347         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
4348         (VASNPRINTF): Return a string of length > INT_MAX without failing.
4349         * lib/vasprintf.c: Include errno.h, limits.h.
4350         (EOVERFLOW): New fallback definition.
4351         (vasprintf): Test here whether the string length is > INT_MAX.
4352         * lib/vsnprintf.c: Include errno.h, limits.h.
4353         (EOVERFLOW): New fallback definition.
4354         (vsnprintf): Fix bug when generated string was too long for the buffer.
4355         Test here whether the string length is > INT_MAX.
4356
4357 2006-08-28  Bruno Haible  <bruno@clisp.org>
4358
4359         * lib/inttypes_.h (SCNX*): Remove definitions.
4360         Reported by Eric Blake.
4361
4362 2006-08-28  Bruno Haible  <bruno@clisp.org>
4363
4364         * lib/c-strstr.h: New file, from GNU gettext.
4365         * lib/c-strstr.c: New file, from GNU gettext.
4366
4367 2006-08-28  Bruno Haible  <bruno@clisp.org>
4368
4369         * gnulib-tool: Reorder some statements.
4370
4371 2006-08-28  Bruno Haible  <bruno@clisp.org>
4372
4373         * gnulib-tool: New option --makefile-name.
4374         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
4375         $makefile_name.
4376         (func_import): Write $makefile_name to the cache file, and read it from
4377         there unless explicitly specified. Use $makefile_name as file name
4378         instead of Makefile.am. Adjust the recommendations accordingly.
4379
4380 2006-08-28  Bruno Haible  <bruno@clisp.org>
4381
4382         * gnulib-tool (func_verify_module): Check against misapplying patch.
4383
4384 2006-08-28  Bruno Haible  <bruno@clisp.org>
4385
4386         * gnulib-tool (func_relativize, func_relconcat): New functions.
4387         Give an error if --local-dir is given with --update.
4388         Remove trailing slashes from $local_gnulib_dir.
4389         (func_import): Store the relativized $local_gnulib_dir in
4390         gnulib-cache.m4, and read it from there if not specified explicitly.
4391
4392 2006-08-28  Bruno Haible  <bruno@clisp.org>
4393
4394         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
4395         is the current directory. Respect also $local_gnulib_dir.
4396
4397 2006-08-28  Bruno Haible  <bruno@clisp.org>
4398             Simon Josefsson  <jas@extundo.com>
4399
4400         BeOS portability.
4401         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
4402
4403 2006-08-27  Jim Meyering  <jim@meyering.net>
4404
4405         * doc/visibility.texi: Remove duplicate word: "pointer".
4406
4407 2006-08-26  Bruno Haible  <bruno@clisp.org>
4408
4409         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
4410         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
4411         (Makefile.am): Create inttypes.h from inttypes_.h.
4412         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
4413
4414         * modules/imaxabs: New file.
4415
4416         * modules/imaxdiv: New file.
4417
4418 2006-08-26  Bruno Haible  <bruno@clisp.org>
4419
4420         * m4/inttypes.m4: New file.
4421         * m4/_inttypes_h.m4: Remove file.
4422         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
4423         PRI_MACROS_BROKEN.
4424         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
4425
4426         * m4/imaxabs.m4: New file.
4427
4428         * m4/imaxdiv.m4: New file.
4429
4430 2006-08-26  Bruno Haible  <bruno@clisp.org>
4431
4432         * lib/inttypes_.h: New file.
4433         * lib/inttypes.h: Remove file.
4434         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
4435
4436         * lib/imaxabs.c: New file.
4437
4438         * lib/imaxdiv.c: New file.
4439
4440 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4441
4442         New config-h module, so that "make" output needn't be cluttered
4443         by -DHAVE_CONFIG_H.
4444         * MODULES.html.sh (Support for building libraries and executables):
4445         Add config-h.
4446         * modules/config-h: New file.
4447         * gnulib-tool (nl, sed_transform_lib_file): New vars.
4448         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
4449         the config-h module is used.
4450
4451         New configmake module, so that "make" output needn't be cluttered
4452         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
4453         * MODULES.html.sh (Support for building libraries and executables):
4454         Add configmake.
4455         * modules/configmake: New file.
4456
4457 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4458
4459         * m4/config-h.m4: New file.
4460
4461 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4462
4463         * config/srclist.txt: Add elisp-comp.
4464
4465 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4466
4467         * MODULES.html.sh (Support for building libraries and executables):
4468         Add elisp-comp.
4469         * build-aux/elisp-comp: New file.
4470         * modules/elisp-comp: New file.
4471
4472 2006-08-24  Bruno Haible  <bruno@clisp.org>
4473
4474         * gnulib-tool (func_create_testdir): Use non-default values of
4475         sourcebase and m4base.
4476
4477 2006-08-24  Bruno Haible  <bruno@clisp.org>
4478
4479         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
4480         HTML structure.
4481
4482 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
4483
4484         * modules/openat (Depends-on): Add lchown.
4485
4486 2006-08-23  Bruno Haible  <bruno@clisp.org>
4487
4488         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
4489         of gl_LOCK_EARLY instead of gl_LOCK.
4490
4491 2006-08-23  Bruno Haible  <bruno@clisp.org>
4492
4493         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
4494         on OSF/1 to no.
4495         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
4496
4497 2006-08-23  Bruno Haible  <bruno@clisp.org>
4498
4499         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
4500         as unusable.
4501
4502         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
4503         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
4504         (gl_LOCK): New macro.
4505
4506 2006-08-22  Simon Josefsson  <jas@extundo.com>
4507
4508         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
4509         to md5 module.
4510
4511 2006-08-22  Simon Josefsson  <jas@extundo.com>
4512
4513         * MODULES.html.sh: Add "Support for maintaining and release
4514         projects".
4515
4516         * build-aux/gnupload: New file, from coreutils.
4517
4518 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4519
4520         Avoid the need for AC_LIBSOURCES in m4 macros.
4521         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
4522         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
4523         * modules/check-version (EXTRA_DIST): Add check-version.h.
4524         * modules/crc (EXTRA_DIST): Add crc.h.
4525         * modules/des (EXTRA_DIST): Add des.h.
4526         * modules/gc (EXTRA_DIST): Add gc.h.
4527         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
4528         * modules/getline (EXTRA_DIST): Add getline.h.
4529         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
4530         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
4531         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
4532         * modules/md2 (EXTRA_DIST): Add md2.h.
4533         * modules/md4 (EXTRA_DIST): Add md4.h.
4534         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
4535         * modules/read-file (EXTRA_DIST): Add read-file.h.
4536         * modules/readline (EXTRA_DIST): Add readline.h.
4537         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
4538         rijndael-api-fst.h.
4539
4540 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4541
4542         * m4/rijndael.m4 (gl_ARCFOUR):
4543         * m4/arctwo.m4 (gl_ARCTWO):
4544         * m4/check-version.m4 (gl_CHECK_VERSION):
4545         * m4/crc.m4 (gl_CRC):
4546         * m4/des.m4 (gl_DES):
4547         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
4548         * m4/gc.m4 (gl_GC):
4549         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
4550         * m4/getline.m4 (gl_FUNC_GETLINE):
4551         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
4552         * m4/hmac-md5.m4 (gl_HMAC_MD5):
4553         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
4554         * m4/md2.m4 (gl_MD2):
4555         * m4/md4.m4 (gl_MD4):
4556         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
4557         * m4/read-file.m4 (gl_FUNC_READ_FILE):
4558         * m4/readline.m4 (gl_FUNC_READLINE):
4559         * m4/rijndael.m4 (gl_RIJNDAEL):
4560         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
4561         to get the necessary .h files and whatnot.
4562
4563 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4564
4565         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
4566         gnulib rather than the other way around.
4567         * config/srclistvars.sh (COREUTILS): Remove.
4568
4569 2006-08-22  Jim Meyering  <jim@meyering.net>
4570
4571         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
4572
4573         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
4574
4575 2006-08-22  Eric Blake  <ebb9@byu.net>
4576
4577         * modules/regexprops-generic: New file.
4578         * MODULES.html.sh (Support for building documentation): List it.
4579
4580 2006-08-22  Eric Blake  <ebb9@byu.net>
4581
4582         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
4583         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
4584         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
4585         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
4586
4587 2006-08-22  Bruno Haible  <bruno@clisp.org>
4588
4589         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
4590         and lib_LTLIBRARIES like the other lib_* variables.
4591
4592 2006-08-22  Bruno Haible  <bruno@clisp.org>
4593
4594         * build-aux/x-to-1.in: New file, from GNU gettext.
4595
4596 2006-08-22  Bruno Haible  <bruno@clisp.org>
4597
4598         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
4599         <utmpx.h> exists.
4600
4601 2006-08-22  Bruno Haible  <bruno@clisp.org>
4602
4603         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
4604         <utmpx.h> exists.
4605
4606 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4607
4608         BeOS portability.
4609         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
4610         exist.
4611         Problem reported by Bruno Haible.
4612
4613 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4614
4615         Avoid the need for AC_LIBSOURCES in m4 macros.
4616         * modules/acl (EXTRA_DIST): Add acl.h.
4617         * modules/argmatch (Files): Add m4/argmatch.m4.
4618         (configure.ac): Add gl_ARGMATCH.
4619         (EXTRA_DIST): Renamed from lib_SOURCES, for
4620         consistency with the other modules.  Remove argmatch.c.
4621         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
4622         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
4623         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
4624         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
4625         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
4626         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
4627         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
4628         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
4629         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
4630         * modules/closeout (EXTRA_DIST): Add closeout.h.
4631         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
4632         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
4633         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
4634         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
4635         dirname.h; remove basename.c and stripslash.c.
4636         * modules/exclude (EXTRA_DIST): Add exclude.h.
4637         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
4638         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
4639         * modules/file-type (EXTRA_DIST): Add file-type.h.
4640         * modules/filemode (EXTRA_DIST): Add filemode.h.
4641         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
4642         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4643         * modules/fpending (EXTRA_DIST): Add __fpending.h.
4644         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
4645         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
4646         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
4647         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
4648         * modules/getdate (EXTRA_DIST): Add getdate.c.
4649         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
4650         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
4651         * modules/getpass (EXTRA_DIST): Add getpass.h.
4652         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
4653         * modules/group-member (EXTRA_DIST): Add group-member.h.
4654         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
4655         * modules/hash (EXTRA_DIST): Add hash.h.
4656         * modules/human (EXTRA_DIST): Add human.h.
4657         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
4658         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
4659         * modules/lchown (EXTRA_DIST): Add lchown.h.
4660         * modules/long-options (EXTRA_DIST): Add long-options.h.
4661         * modules/lstat (EXTRA_DIST): Add lstat.h.
4662         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
4663         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
4664         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
4665         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
4666         * modules/memxor (EXTRA_DIST): Add memxor.h.
4667         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
4668         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
4669         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
4670         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
4671         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
4672         * modules/physmem (EXTRA_DIST): Add physmem.h.
4673         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
4674         * modules/posixver (EXTRA_DIST): Add posixver.h.
4675         * modules/quote (EXTRA_DIST): Add quote.h.
4676         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
4677         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
4678         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
4679         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
4680         regex_internal.h regexec.c.
4681         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
4682         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
4683         * modules/same (EXTRA_DIST): Add same.h.
4684         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
4685         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
4686         * modules/savedir (EXTRA_DIST): Add savedir.h.
4687         * modules/sha1 (EXTRA_DIST): Add sha1.h.
4688         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
4689         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
4690         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
4691         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
4692         * modules/strdup (EXTRA_DIST): Add strdup.h.
4693         * modules/strftime (EXTRA_DIST): Add strftime.h.
4694         * modules/strndup (EXTRA_DIST): Add strndup.h.
4695         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
4696         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
4697         * modules/time_r (EXTRA_DIST): Add time_r.h.
4698         * modules/timespec (EXTRA_DIST): Add timespec.h.
4699         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4700         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
4701         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
4702         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
4703         * modules/userspec (EXTRA_DIST): Add userspec.h.
4704         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
4705         * modules/utimens (EXTRA_DIST): Add utimens.h.
4706         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
4707         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
4708         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
4709         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
4710         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
4711         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
4712         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
4713         * modules/yesno (EXTRA_DIST): Add yesno.h.
4714
4715 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4716
4717         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
4718
4719         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
4720         * m4/dev-ino.m4, same-inode.m4: Remove.
4721
4722         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
4723         * m4/acl.m4 (AC_FUNC_ACL):
4724         * m4/backupfile.m4 (gl_BACKUPFILE):
4725         * m4/c-strtod.m4 (gl_C99_STRTOLD):
4726         * m4/canon-host.m4 (gl_CANON_HOST):
4727         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
4728         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
4729         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
4730         * m4/cloexec.m4 (gl_CLOEXEC):
4731         * m4/close-stream.m4 (gl_CLOSE_STREAM):
4732         * m4/closeout.m4 (gl_CLOSEOUT):
4733         * m4/dirfd.m4 (gl_FUNC_DIRFD):
4734         * m4/dirname.m4 (gl_DIRNAME):
4735         * m4/exclude.m4 (gl_EXCLUDE):
4736         * m4/exitfail.m4 (gl_EXITFAIL):
4737         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
4738         * m4/file-type.m4 (gl_FILE_TYPE):
4739         * m4/filemode.m4 (gl_FILEMODE):
4740         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
4741         * m4/fpending.m4 (gl_FUNC_FPENDING):
4742         * m4/fprintftime.m4 (gl_FPRINTFTIME):
4743         * m4/fts.m4 (gl_FUNC_FTS):
4744         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
4745         * m4/getdate.m4 (gl_GETDATE):
4746         * m4/gethrxtime.m4 (gl_GETHRXTIME):
4747         * m4/getpagesize.m4 (gl_GETPAGESIZE):
4748         * m4/getpass.m4 (gl_FUNC_GETPASS):
4749         * m4/gettime.m4 (gl_GETTIME):
4750         * m4/getugroups.m4 (gl_GETUGROUPS):
4751         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
4752         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
4753         * m4/hard-locale.m4 (gl_HARD_LOCALE):
4754         * m4/hash.m4 (gl_HASH):
4755         * m4/idcache.m4 (gl_IDCACHE):
4756         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
4757         * m4/lchown.m4 (gl_FUNC_LCHOWN):
4758         * m4/long-options.m4 (gl_LONG_OPTIONS):
4759         * m4/lstat.m4 (gl_FUNC_LSTAT):
4760         * m4/md5.m4 (gl_MD5):
4761         * m4/memcasecmp.m4 (gl_MEMCASECMP):
4762         * m4/memcoll.m4 (gl_MEMCOLL):
4763         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
4764         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
4765         * m4/memxor.m4 (gl_MEMXOR):
4766         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
4767         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
4768         * m4/modechange.m4 (gl_MODECHANGE):
4769         * m4/mountlist.m4 (gl_MOUNTLIST):
4770         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4771         * m4/openat.m4 (gl_FUNC_OPENAT):
4772         * m4/pathmax.m4 (gl_PATHMAX):
4773         * m4/physmem.m4 (gl_PHYSMEM):
4774         * m4/posixtm.m4 (gl_POSIXTM):
4775         * m4/posixver.m4 (gl_POSIXVER):
4776         * m4/quote.m4 (gl_QUOTE):
4777         * m4/quotearg.m4 (gl_QUOTEARG):
4778         * m4/readtokens.m4 (gl_READTOKENS):
4779         * m4/readutmp.m4 (gl_READUTMP):
4780         * m4/regex.m4 (gl_REGEX):
4781         * m4/safe-read.m4 (gl_SAFE_READ):
4782         * m4/safe-write.m4 (gl_SAFE_WRITE):
4783         * m4/same.m4 (gl_SAME):
4784         * m4/save-cwd.m4 (gl_SAVE_CWD):
4785         * m4/savedir.m4 (gl_SAVEDIR):
4786         * m4/settime.m4 (gl_SETTIME):
4787         * m4/sha1.m4 (gl_SHA1):
4788         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
4789         * m4/stat-macros.m4 (gl_STAT_MACROS):
4790         * m4/stat-time.m4 (gl_STAT_TIME):
4791         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
4792         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
4793         * m4/strdup.m4 (gl_FUNC_STRDUP):
4794         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
4795         * m4/strndup.m4 (gl_FUNC_STRNDUP):
4796         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
4797         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
4798         * m4/time_r.m4 (gl_TIME_R):
4799         * m4/timespec.m4 (gl_TIMESPEC):
4800         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
4801         * m4/unlinkdir.m4 (gl_UNLINKDIR):
4802         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
4803         * m4/userspec.m4 (gl_USERSPEC):
4804         * m4/utimecmp.m4 (gl_UTIMECMP):
4805         * m4/utimens.m4 (gl_UTIMENS):
4806         * m4/xalloc.m4 (gl_XALLOC):
4807         * m4/xgetcwd.m4 (gl_XGETCWD):
4808         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
4809         * m4/xreadlink.m4 (gl_XREADLINK):
4810         * m4/xstrtod.m4 (gl_XSTRTOD):
4811         * m4/yesno.m4 (gl_YESNO):
4812         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
4813         to get the necessary .h files and whatnot.
4814
4815 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
4816             Bruno Haible  <bruno@clisp.org>
4817
4818         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
4819         /bin/sh understanding of '!' conditional negation.
4820
4821 2006-08-21  Jim Meyering  <jim@meyering.net>
4822
4823         * modules/openat (Depends-on): Really alphabetize.
4824
4825         * modules/acl (Depends-on): Add error and quote.
4826
4827         * check-module (find_included_lib_files): Add at-func.c to the
4828         ok-to-include-more-than-once white list.
4829
4830         * modules/openat (Depends-on): Add lstat.  Alphabetize.
4831
4832 2006-08-21  Bruno Haible  <bruno@clisp.org>
4833
4834         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4835         Emit a pkgdata_DATA variable only if some snippets add contents to it.
4836         Reported by Martin Lambers <marlam@marlam.de>.
4837
4838 2006-08-21  Bruno Haible  <bruno@clisp.org>
4839
4840         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
4841         specify an installation location, don't emit a noinst_LIBRARIES or
4842         noinst_LTLIBRARIES assignment.
4843
4844 2006-08-21  Bruno Haible  <bruno@clisp.org>
4845
4846         BeOS portability.
4847         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
4848         BeOS has mbrtowc() but no <wctype.h>.
4849
4850 2006-08-21  Bruno Haible  <bruno@clisp.org>
4851
4852         BeOS portability.
4853         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
4854         exist.
4855
4856 2006-08-21  Bruno Haible  <bruno@clisp.org>
4857
4858         BeOS portability.
4859         * lib/mbchar.h: Include <wctype.h> only if it exists.
4860
4861 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4862
4863         Remove files that are no longer needed by their respective modules.
4864         * m4/obstack.m4: Remove.
4865         * m4/strerror_r.m4: Remove.
4866         * m4/uint32_t.m4: Remove.
4867         * m4/uintptr_t.m4: Remove.
4868         * m4/ullong_max.m4: Remove.
4869         * m4/xstrtoimax.m4: Remove.
4870         * m4/xstrtoumax.m4: Remove.
4871
4872         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
4873         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
4874         dependencies now capture this.
4875
4876         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
4877         Do not use AC_LIBSOURCES, since gnulib modules now do this.
4878         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
4879         * m4/human.m4 (gl_HUMAN): Likewise.
4880         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
4881         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
4882
4883         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
4884
4885         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
4886         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
4887         stdint.
4888         * m4/human.m4 (gl_HUMAN): Likewise.
4889         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
4890         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
4891         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
4892         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
4893         * m4/xstrtol (gl_XSTRTOL): Likewise.
4894
4895         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
4896         AC_TYPE_LONG_LONG_INT.
4897         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
4898         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
4899         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
4900         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
4901
4902         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
4903         on stdbool.
4904
4905         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
4906         (gl_PREREQ_XSTRTOUL): Remove.
4907
4908         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
4909
4910         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
4911         mode.
4912
4913 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4914
4915         Add and change modules to make it easier for coreutils to use
4916         gnulib-tool.
4917         * modules/backupfile (Files): Remove m4/d-ino.m4.
4918         (Depends-on): Add d-ino.
4919         * modules/cycle-check (Depends-on): Add stdint.
4920         (lib_SOURCES): Add cycle-check.h.
4921         * modules/d-ino: New module.
4922         * modules/d-type: New module.
4923         * modules/error (Files): Remove m4/strerror_r.m4.
4924         * modules/filemode (Files): Add m4/st_dm_mode.m4.
4925         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4926         m4/inttypes_h.m4, m4/uintmax_t.m4.
4927         (Depends-on): Add stdint.
4928         (lib_SOURCES): Add fsusage.h.
4929         * modules/getcwd (Files): Remove d-ino.m4.
4930         (Depends-on): Add d-ino.
4931         * modules/getndelim2 (Depends-on): Add stdint.
4932         * modules/glob (Files): Remove m4/d-type.m4.
4933         (Depends-on): Add d-type.
4934         * modules/host-os: New module.
4935         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
4936         m4/inttypes_h.m4, m4/uintmax_t.m4.
4937         * Depends-on: Add stdint.
4938         (lib_SOURCES): Add human.h.
4939         * modules/inttostr (Files): Remove m4/intmax_t.m4,
4940         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
4941         m4/uintmax_t.m4, m4/ulonglong.m4.
4942         (Depends-on): Add stdint.
4943         (EXTRA_DIST): Add inttostr.h.
4944         * modules/lchmod: New module.
4945         * modules/link-follow: New module.
4946         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
4947         (Depends-on): Add lchmod.
4948         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
4949         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
4950         (Depends-on): Add stdint.
4951         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
4952         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
4953         (Depends-on): Add stdint.
4954         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
4955         * modules/perl: New module.
4956         * modules/regex (Depends-on): Add stdint.
4957         * modules/rmdir-errno: New module.
4958         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4959         m4/intmax_t.m4.
4960         (Depends-on): Add stdint.
4961         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4962         m4/uintmax_t.m4.
4963         (Depends-on): Add stdint.
4964         * modules/unlink-busy: New module.
4965         * modules/utimecmp (Depends-on): Add stdint.
4966         * modules/uptime: New module.
4967         * modules/winsz-ioctl: New module.
4968         * modules/winsz-termios: New module.
4969         * modules/xnanosleep (Depends-on): Add nanosleep.
4970         * modules/ullong_max: Remove.
4971         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
4972         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
4973         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
4974         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
4975         (Depends-on): Add inttypes.
4976         (lib_SOURCES): Add xstrtol.h.
4977         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
4978         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
4979         * MODULES.html.sh: Move 'assert' into the assert section.
4980         Move 'dummy' into the linking section.
4981         Remove ullong_max.
4982         Add section for compatibility checks for POSIX:2001 functions,
4983         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
4984         winsz-ioctl, and winsz-termios into it.
4985         Add lchmod.
4986         Add top-level Misc section and put host-os, perl, and uptime
4987         into it.
4988
4989 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4990
4991         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
4992         now assume the stdint module.  Do not include inttypes.h.
4993         * lib/fsusage.h: Likewise.
4994         * lib/getndelim2.c: Likewise.
4995         * lib/human.h: Likewise.
4996         * lib/inttostr.h: Likewise.
4997         * lib/obstack.c: Likewise.
4998         * lib/regex_internal.h: Likewise.
4999         * lib/tempname.c: Likewise.
5000         * lib/utimecmp.c: Likewise.
5001         * lib/xstrtol.h: Likewise.
5002
5003         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
5004
5005         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
5006         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
5007         * lib/xtime.h: Likewise.
5008
5009 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5010
5011         * modules/openat (Files): Add lib/fchmodat.c.
5012         Fixes problem reported by Jay Youngman.
5013
5014 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5015
5016         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
5017         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
5018
5019 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
5020             Bruno Haible  <bruno@clisp.org>
5021
5022         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5023         and is a script that invokes bison. Tighten the code. Add comments.
5024
5025 2006-08-18  Jim Meyering  <jim@meyering.net>
5026
5027         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
5028         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
5029         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
5030         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
5031
5032 2006-08-18  Bruno Haible  <bruno@clisp.org>
5033
5034         * modules/bison-i18n: New file.
5035         * MODULES.html.sh (Internationalization functions): Add it.
5036
5037 2006-08-18  Bruno Haible  <bruno@clisp.org>
5038
5039         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
5040         sys/statvfs.h. When getmntinfo was found, check its declaration and
5041         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
5042
5043 2006-08-18  Bruno Haible  <bruno@clisp.org>
5044
5045         * m4/bison-i18n.m4: New file, from bison.
5046
5047 2006-08-18  Bruno Haible  <bruno@clisp.org>
5048
5049         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
5050         (ME_DUMMY): Treat "kernfs" as a dummy.
5051         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
5052
5053 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5054
5055         Update from coreutils.
5056
5057         2006-08-15  Jim Meyering  <jim@meyering.net>
5058
5059         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
5060
5061         2006-01-17  Jim Meyering  <jim@meyering.net>
5062
5063         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
5064
5065         2006-01-11  Jim Meyering  <jim@meyering.net>
5066
5067         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
5068         Check for the lchmod function.
5069
5070 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5071
5072         Update from coreutils.
5073
5074         * lib/__fpending.h: Add copyright notice.
5075         * lib/fprintftime.h: Likewise.
5076         * lib/savedir.c: Use (C) in copyright notice.
5077         * lib/savedir.h: Likewise.
5078
5079         2006-08-15  Jim Meyering  <jim@meyering.net>
5080
5081         * lib/at-func.c: New file, with the logic of all emulated at-functions.
5082         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
5083         in support of the EXPECTED_ERRNO macro.
5084         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
5085         definitions.  Instead, define the appropriate symbols and include
5086         "at-func.c".
5087         * lib/mkdirat.c (mkdirat): Likewise.
5088         * lib/fchmodat.c (fchmodat): Likewise.
5089         (ENOSYS): Remove definition.
5090         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
5091         it.  Don't include "unistd--.h" -- it wasn't ever used.
5092
5093         2006-01-17  Jim Meyering  <jim@meyering.net>
5094
5095         Rewrite fts.c not to change the current working directory,
5096         by using openat, fstatat, fdopendir, etc..
5097
5098         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
5099         (HAVE_OPENAT_SUPPORT): Define.
5100         [_LIBC] (fchdir): Don't undef or define; no longer used.
5101         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
5102         Now, this `function' always succeeds, and consumes its file descriptor
5103         parameter -- so callers must not close such FDs.  Update callers.
5104         (diropen_fd, opendirat, cwd_advance_fd): New functions.
5105         (diropen): Add parameter, SP.  Adjust all callers.
5106         Implement using diropen_fd, rather than open.
5107         (fts_open): Initialize new member, fts_cwd_fd.
5108         Remove fts_rft-setting code.
5109         (fts_close): Close fts_cwd_fd, if necessary.
5110         (__opendir2): Define in terms of opendir or opendirat,
5111         depending on whether the FST_NOCHDIR flag is set.
5112         (fts_build): Since fts_safe_changedir consumes its FD, and since
5113         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
5114         and close the dup'd file descriptor upon failure.
5115         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
5116         (fts_safe_changedir): Tweak semantics to reflect that this function
5117         now calls cwd_advance_fd and hence consumes its FD argument.
5118         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
5119         [struct FTS] (fts_rft): Remove now-unused member.
5120         [struct FTS] (fts_cycle.state): Improve comment.
5121
5122         * lib/openat.c (openat_needs_fchdir): New function.
5123         * lib/openat.h (openat_needs_fchdir): Declare it.
5124
5125 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5126
5127         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
5128         Problem and fix reported by Pádraig Brady in
5129         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
5130
5131 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5132
5133         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
5134
5135 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5136
5137         * lib/memcoll.c (memcoll): Optimize for the common case where the
5138         arguments are bytewise equal.
5139
5140 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5141
5142         * doc/regexprops-generic.texi: Add a copyright notice.
5143
5144 2006-08-15  Bruno Haible  <bruno@clisp.org>
5145
5146         * modules/tmpdir (License): Change to LGPL.
5147
5148 2006-08-15  Bruno Haible  <bruno@clisp.org>
5149
5150         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
5151         module.
5152
5153 2006-08-14  Simon Josefsson  <jas@extundo.com>
5154
5155         * config/srclist.txt: Add gnupload.
5156
5157 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5158
5159         Change copyright notice from LGPL 2 to GPL 2, since that's the
5160         standard form used in the gnulib repository.
5161         * tests/test-lock.c: Likewise.
5162         * tests/test-stdint.c: Likewise.
5163         * tests/test-tls.c: Likewise.
5164
5165         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
5166         prelude-manager.  User shorter URLs for GNU projects, without '?'.
5167         Add copyright notice.
5168
5169         * check-module: Add copyright notice.  Output a copyright
5170         notice if "--version" is specified.
5171         * modules/COPYING: New file.
5172         * tests/test-getaddrinfo.c: Add copyright notice.
5173         * tests/test-verify.c: Likewise.
5174
5175 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5176
5177         Change copyright notice from LGPL 2 to GPL 2, since that's the
5178         standard form used in the gnulib repository.
5179         * lib/lock.c: LGPL -> GPL.
5180         * lib/lock.h: Likewise.
5181         * lib/strnlen1.c: Likewise.
5182         * lib/strnlen1.h: Likewise.
5183         * lib/tls.c: Likewise.
5184         * lib/tls.h: Likewise.
5185         * lib/tmpdir.c: Likewise.
5186
5187         * lib/TODO: Remove; this belongs only in coreutils.
5188
5189 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5190
5191         Add copyright notices to long-enough files that lack them, since
5192         otherwise the files aren't clearly free.  Use the same notice that
5193         getdate.texi already uses.
5194         * doc/alloca-opt.texi: Add copyright notice.
5195         * doc/alloca.texi: Likewise.
5196         * doc/ctime.texi: Likewise.
5197         * doc/functions.texi: Likewise.
5198         * doc/gcd.texi: Likewise.
5199         * doc/gnulib-tool.texi: Likewise.
5200         * doc/inet_ntoa.texi: Likewise.
5201         * doc/visibility.texi: Likewise.
5202
5203         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
5204         * doc/quote.texi: Add copyright notice.
5205
5206         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
5207         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
5208         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
5209         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
5210         is now obsolete, and give a pointer to the Sun list.
5211         Add copyright notice.
5212
5213 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5214
5215         * config/srclistvars.sh: Add copyright notice.
5216
5217 2006-08-14  Eric Blake  <ebb9@byu.net>
5218
5219         Import the following change from libc:
5220
5221         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
5222
5223         Upstream bug 2997.
5224         * lib/misc/error.c: Add space between program name and message if file
5225         name is missing.
5226
5227 2006-08-12  Karl Berry  <karl@gnu.org>
5228
5229         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
5230         remove, these originate in gnulib now.
5231
5232 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5233
5234         * doc/Makefile (standards.info standards.html standards.dvi):
5235         Also depend on make-stds.texi.
5236
5237 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
5238
5239         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
5240         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
5241
5242         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
5243         in wchar_t.  Problem reported by Eric Blake.
5244
5245         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
5246         LEN is smaller than SIZE.  Suggested by Bruno Haible.
5247         Also, help the compiler to keep LEN in a register.
5248
5249 2006-08-11  Eric Blake  <ebb9@byu.net>
5250
5251         * users.txt: Sort.  Add tar.
5252
5253 2006-08-11  Bruno Haible  <bruno@clisp.org>
5254
5255         * users.txt: New file.
5256
5257 2006-08-11  Bruno Haible  <bruno@clisp.org>
5258
5259         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
5260         before <wchar.h>. Needed for OSF/1 and BSD/OS.
5261
5262 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5263
5264         * modules/snprintf (Depends-on): Remove minmax.
5265         (Maintainer): Add self and Bruno.
5266
5267 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5268
5269         * lib/.cppi-disable: Add snprintf.h, socket_.h.
5270         * lib/snprintf.c: Include <errno.h> and <limits.h>.
5271         (EOVERFLOW): Define if the system does not.
5272         Do not include "minmax.h"; it wasn't used.
5273         (snprintf): Don't assume size_t promotes to an unsigned type.
5274         Fix bug when generated string was too long for the buffer: the
5275         buffer's contents are supposed to be the initial prefix of the
5276         output.  Don't assume vasnprintf returns EOVERFLOW if the size
5277         exceeds INT_MAX; do the check ourselves.
5278
5279         Import the following changes from libc:
5280
5281         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
5282
5283         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
5284         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
5285         set wc to the byte which couldn't be converted.
5286         (re_string_reconstruct): Don't clear valid_raw_len before calling
5287         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
5288         tip_context using re_string_context_at.
5289
5290         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
5291
5292         * lib/posix/regex.h: g++ still cannot handled [restrict].
5293
5294         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
5295
5296         * lib/posix/regex.h: Remove special handling for VMS.
5297
5298 2006-08-10  Jim Meyering  <jim@meyering.net>
5299
5300         * modules/same-inode: New module.
5301         * modules/dev-ino: New module.
5302         * modules/cycle-check: Depend on these modules, rather than simply
5303         including their .h files.
5304         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
5305         required via m4/cycle-check.m4.
5306         * modules/same: Depend on new same-inode module, rather than
5307         including same-inode.h.
5308         * modules/chdir-safer: New file.
5309
5310         * modules/chown (Depends-on): Add stat-macros.
5311
5312 2006-08-10  Jim Meyering  <jim@meyering.net>
5313
5314         * m4/cycle-check.m4: New file.
5315         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
5316         * m4/dev-ino.m4, m4/same-inode.m4: New files.
5317
5318 2006-08-10  Eric Blake  <ebb9@byu.net>
5319
5320         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
5321         in from original proposal.
5322
5323 2006-08-10  Eric Blake  <ebb9@byu.net>
5324         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5325
5326         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
5327         namespace.
5328
5329 2006-08-10  Bruno Haible  <bruno@clisp.org>
5330
5331         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
5332         as well.
5333
5334 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5335
5336         Sync from coreutils.
5337
5338         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
5339
5340         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
5341         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
5342
5343 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5344
5345         * modules/restrict: Remove; no longer needed now that we assume
5346         Autoconf 2.59 or later.
5347         * MODULES.html.sh: Remove 'restrict'.
5348         * modules/argp (Depends-on): Remove 'restrict'.
5349         * modules/base64 (Depends-on): Likewise.
5350         * modules/gc (Depends-on): Likewise.
5351         * modules/getaddrinfo (Depends-on): Likewise.
5352         * modules/glob (Depends-on): Likewise.
5353         * modules/inet_ntop (Depends-on): Likewise.
5354         * modules/inet_pton (Depends-on): Likewise.
5355         * modules/memxor (Depends-on): Likewise.
5356         * modules/regex (Depends-on): Likewise.
5357         * modules/strtok_r (Depends-on): Likewise.
5358         * modules/time_r (Depends-on): Likewise.
5359
5360 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5361
5362         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
5363         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
5364         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5365         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
5366         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
5367         * m4/memxor.m4 (gl_MEMXOR): Likewise.
5368         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
5369         gl_C_RESTRICT replaced by AC_C_RESTRICT.
5370
5371         Merge from coreutils.
5372         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
5373         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
5374         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
5375         * m4/time_r.m4 (gl_TIME_R): Likewise.
5376
5377 2006-08-09  Karl Berry  <karl@gnu.org>
5378
5379         * config/srclist.txt: no more gettext-tools, per Bruno.
5380
5381 2006-08-08  Eric Blake  <ebb9@byu.net>
5382
5383         * modules/verror: New module.
5384         * MODULES.html.sh: Document it.
5385
5386 2006-08-08  Eric Blake  <ebb9@byu.net>
5387
5388         * lib/verror.h, lib/verror.c: New files.
5389
5390 2006-08-08  Eric Blake  <ebb9@byu.net>
5391
5392         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
5393         verror_at_line output complies with GNU Coding Standards even when
5394         file is NULL.
5395
5396 2006-08-07  Bruno Haible  <bruno@clisp.org>
5397
5398         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
5399         versions of AIX.
5400         Reported by Ralf Wildenhues.
5401
5402 2006-08-07  Bruno Haible  <bruno@clisp.org>
5403
5404         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
5405         in an AC_DEFUN. Needed so that the autoconf snippets can use
5406         AC_REQUIRE.
5407
5408 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5409
5410         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5411         Initialize pkgdata_DATA.
5412         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
5413         overriding it.
5414
5415 2006-08-06  Eric Blake  <ebb9@byu.net>
5416
5417         * lib/error.h: Fold in some upstream changes from glibc.
5418         * lib/error.c: Likewise.
5419
5420 2006-08-04  Bruno Haible  <bruno@clisp.org>
5421
5422         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5423         Make the mostlyclean-local rule depend on mostlyclean-generic.
5424         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
5425
5426 2006-07-31  Bruno Haible  <bruno@clisp.org>
5427
5428         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
5429         <stdlib.h>, <string.h>.
5430
5431 2006-07-30  Bruno Haible  <bruno@clisp.org>
5432
5433         * modules/readlink (License): Change to LGPL.
5434
5435 2006-07-30  Bruno Haible  <bruno@clisp.org>
5436
5437         * modules/javaversion (Makefile.am): Distribute javaversion.java and
5438         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
5439         set PKGDATADIR to point to it.
5440
5441 2006-07-30  Bruno Haible  <bruno@clisp.org>
5442
5443         * modules/csharpexec (configure.ac): Comment out macro invocation.
5444         * modules/javaexec (configure.ac): Likewise.
5445         * modules/javacomp-script (configure.ac): Likewise.
5446
5447         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
5448
5449 2006-07-30  Bruno Haible  <bruno@clisp.org>
5450
5451         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
5452         linked-list.
5453
5454 2006-07-30  Bruno Haible  <bruno@clisp.org>
5455
5456         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
5457
5458 2006-07-30  Bruno Haible  <bruno@clisp.org>
5459
5460         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5461         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
5462         get removed.
5463
5464 2006-07-29  Bruno Haible  <bruno@clisp.org>
5465
5466         Make it possible for gnulib-tool to work with locally modified or
5467         augmented gnulib repositories.
5468         * gnulib-tool (func_usage): Document --local-dir option.
5469         (local_gnulib_dir): New variable.
5470         Handle --local-dir option.
5471         (func_lookup_file): New function.
5472         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
5473         (func_get_description, func_get_filelist, func_get_description,
5474         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
5475         func_get_automake_snippet, func_get_include_directive,
5476         func_get_license, func_get_maintainer): Use func_lookup_file.
5477         (func_import, func_create_testdir): Use func_lookup_file.
5478
5479 2006-07-29  Bruno Haible  <bruno@clisp.org>
5480
5481         * modules/setenv (Depends-on): Add unistd.
5482
5483 2006-07-29  Bruno Haible  <bruno@clisp.org>
5484
5485         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
5486
5487 2006-07-29  Bruno Haible  <bruno@clisp.org>
5488
5489         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
5490
5491 2006-07-29  Bruno Haible  <bruno@clisp.org>
5492
5493         * gnulib-tool (import, update): If there is no Makefile.am, look at
5494         aclocal.m4, instead of bailing out.
5495
5496 2006-07-29  Bruno Haible  <bruno@clisp.org>
5497
5498         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
5499         Categorize the options by when they are useful.
5500
5501 2006-07-29  Bruno Haible  <bruno@clisp.org>
5502
5503         * gnulib-tool (func_usage): Document option --no-libtool.
5504         Handle option --no-libtool.
5505         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
5506         for changed semantics of $libtool variable.
5507         (func_import): Likewise. If libtool is not used, show this through
5508         an option --no-libtool.
5509         (func_create_testdir): Update.
5510
5511 2006-07-29  Bruno Haible  <bruno@clisp.org>
5512
5513         * gnulib-tool (func_import): Extend error message about missing
5514         --doc-base.
5515
5516 2006-07-29  Bruno Haible  <bruno@clisp.org>
5517
5518         * gnulib-tool (func_import): Don't create the $docbase directory if
5519         there is no file to store there.
5520
5521 2006-07-29  Bruno Haible  <bruno@clisp.org>
5522
5523         * gnulib-tool (autoconf_minversion): If a --dir option is given and
5524         relevant, look for configure.ac there, not in the current directory.
5525         Also use a simple search for AC_PREREQ, not "autoconf --trace".
5526
5527 2006-07-29  Bruno Haible  <bruno@clisp.org>
5528
5529         * gnulib-tool (SORT): New variable.
5530         (func_usage): Undocument --assume-autoconf option.
5531         Remove --assume-autoconf option handling.
5532         (autoconf_minversion): Determine from the contents of configure.ac.
5533         (func_import): Remove autoconf_minversion handling.
5534         Suggested by Eric Blake.
5535
5536 2006-07-29  Bruno Haible  <bruno@clisp.org>
5537
5538         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
5539
5540 2006-07-29  Bruno Haible  <bruno@clisp.org>
5541
5542         * config/srclist.txt (*setenv.[ch]): Remove rules.
5543
5544 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5545
5546         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
5547
5548 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5549
5550         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
5551         arpa/inet.h.
5552
5553 2006-07-28  Simon Josefsson  <jas@extundo.com>
5554
5555         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
5556         * modules/inet_pton (Depends-on): Likewise.
5557
5558 2006-07-28  Simon Josefsson  <jas@extundo.com>
5559
5560         * m4/netinet_in_h.m4: New file.
5561
5562 2006-07-28  Simon Josefsson  <jas@extundo.com>
5563
5564         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
5565         #include's.
5566
5567 2006-07-28  Simon Josefsson  <jas@extundo.com>
5568
5569         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
5570         #include's.
5571
5572 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
5573
5574         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
5575         setgid on directories only if they set these bits.
5576         * lib/modechange.h: Remove obsolete comment about masks.
5577
5578 2006-07-28  Eric Blake  <ebb9@byu.net>
5579
5580         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
5581         macro expansion.
5582
5583 2006-07-28  Bruno Haible  <bruno@clisp.org>
5584
5585         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
5586
5587 2006-07-28  Bruno Haible  <bruno@clisp.org>
5588
5589         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
5590
5591 2006-07-28  Bruno Haible  <bruno@clisp.org>
5592
5593         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
5594         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
5595         Define fallbacks.
5596         Avoids link error on FreeBSD 4.x.
5597         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
5598
5599         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
5600         encoding.
5601         * lib/mbswidth.c (iswcntrl): Likewise.
5602
5603 2006-07-27  Bruno Haible  <bruno@clisp.org>
5604
5605         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
5606         test.
5607
5608 2006-07-27  Bruno Haible  <bruno@clisp.org>
5609
5610         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
5611         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
5612         defined.
5613
5614 2006-07-26  Eric Blake  <ebb9@byu.net>
5615
5616         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
5617
5618 2006-07-26  Eric Blake  <ebb9@byu.net>
5619
5620         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
5621         like mingw that lack mkstemp.
5622         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
5623         avoid compilation warning on mingw.
5624
5625 2006-07-26  Bruno Haible  <bruno@clisp.org>
5626
5627         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
5628         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
5629         INT_FAST*_MIN, INTPTR_MIN.
5630
5631 2006-07-25  Bruno Haible  <bruno@clisp.org>
5632
5633         * modules/version-etc (Depends-on): Add stdarg.
5634
5635 2006-07-25  Bruno Haible  <bruno@clisp.org>
5636
5637         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
5638         complex commands.
5639
5640 2006-07-25  Bruno Haible  <bruno@clisp.org>
5641
5642         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
5643         defined in <stdarg.h> or config.h.
5644
5645 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5646
5647         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
5648         (gl_STDIO_SAFER): Remove.
5649
5650 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5651
5652         * MODULES.html.sh (File stream based Input/Output):
5653         Add fopen-safer, tmpfile-safer; remove stdio-safer.
5654         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
5655         * modules/fopen-safer, modules/tmpfile-safer: New files.
5656         * modules/stdio-safer: Remove.
5657
5658 2006-07-24  Bruno Haible  <bruno@clisp.org>
5659
5660         * modules/tmpdir: New file.
5661         * MODULES.html.sh (File system functions): Add it.
5662
5663 2006-07-24  Bruno Haible  <bruno@clisp.org>
5664
5665         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
5666         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
5667
5668 2006-07-24  Bruno Haible  <bruno@clisp.org>
5669
5670         * modules/clean-temp: New file.
5671
5672 2006-07-24  Bruno Haible  <bruno@clisp.org>
5673
5674         * m4/tmpdir.m4: New file, from GNU gettext.
5675
5676 2006-07-24  Bruno Haible  <bruno@clisp.org>
5677
5678         * lib/tmpdir.h: New file, from GNU gettext.
5679         * lib/tmpdir.c: New file, from GNU gettext.
5680
5681 2006-07-24  Bruno Haible  <bruno@clisp.org>
5682
5683         * lib/clean-temp.h: New file, from GNU gettext.
5684         * lib/clean-temp.c: New file, from GNU gettext.
5685
5686 2006-07-23  Eric Blake  <ebb9@byu.net>
5687
5688         * modules/stdio-safer (Files): Add tmpfile-safer.c.
5689         (Depends-on): Add binary-io.
5690
5691 2006-07-23  Eric Blake  <ebb9@byu.net>
5692
5693         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
5694
5695 2006-07-23  Eric Blake  <ebb9@byu.net>
5696
5697         * lib/tmpfile-safer.c: New file.
5698         * lib/stdio-safer.h (fopen_safer): Add prototype.
5699         * lib/stdio--.h (tmpfile): Make safer.
5700
5701 2006-07-23  Bruno Haible  <bruno@clisp.org>
5702
5703         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
5704         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
5705         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
5706         gl_linked_remove_at): Use it.
5707
5708 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5709         and Simon Josefsson <jas@extundo.com>
5710
5711         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
5712
5713         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
5714
5715 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5716
5717         * modules/close-stream: New file.
5718         * modules/closeout (Description): Make it clear that it exits
5719         with a diagnostic on error.
5720         (Depends-on): Add close-stream.  Remove fpending, stdbool.
5721         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
5722
5723 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5724
5725         * m4/close-stream.m4: New file.
5726
5727 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5728
5729         * lib/close-stream.c, lib/close-stream.h: New files.
5730
5731 2006-07-22  Bruno Haible  <bruno@clisp.org>
5732
5733         Merge from GNU gettext 0.15.
5734
5735         2006-05-01  Bruno Haible  <bruno@clisp.org>
5736
5737                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
5738
5739         2006-07-22  Bruno Haible  <bruno@clisp.org>
5740
5741                 * modules/javaversion: New file.
5742                 * MODULES.html.sh (Java): Add javaversion.
5743
5744         2006-03-12  Bruno Haible  <bruno@clisp.org>
5745
5746                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
5747
5748         2005-12-04  Bruno Haible  <bruno@clisp.org>
5749
5750                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
5751                 (untested).
5752
5753         2006-06-21  Bruno Haible  <bruno@clisp.org>
5754
5755                 Avoid warnings from recent versions of mcs.
5756                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
5757                 -o, -L, -r any more. Use options documented since mcs-1.0
5758                 instead. Similarly for -g.
5759
5760         2005-12-04  Bruno Haible  <bruno@clisp.org>
5761
5762                 * build-aux/csharpcomp.sh.in: Suffix for resources is
5763                 .resources, not .resource.
5764
5765         2005-07-09  Bruno Haible  <bruno@clisp.org>
5766
5767                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
5768                 add a .dll suffix.
5769                 Reported by Mark Junker <mjscod@gmx.de>.
5770
5771         2006-07-22  Bruno Haible  <bruno@clisp.org>
5772
5773                 * modules/gettext: Upgrade to gettext-0.15.
5774                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
5775                 m4/visibility.m4.
5776                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
5777
5778 2006-07-22  Bruno Haible  <bruno@clisp.org>
5779
5780         Merge from GNU gettext 0.15.
5781
5782         2006-03-25  Bruno Haible  <bruno@clisp.org>
5783
5784                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
5785
5786         2006-07-21  Bruno Haible  <bruno@clisp.org>
5787
5788                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
5789                 "1.1".
5790
5791         2006-05-09  Bruno Haible  <bruno@clisp.org>
5792
5793                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
5794                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
5795                 for the conftestver execution.
5796
5797         2006-05-01  Bruno Haible  <bruno@clisp.org>
5798
5799                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
5800                 optional target-version argument. Verify that the compiler
5801                 groks source of the specified source-version, or add -source
5802                 option as necessary. Verify that the compiler produces
5803                 bytecode in the specified target-version, or add -target and
5804                 -source options as necessary. Make the result of the test
5805                 available as variable CONF_JAVAC. Also log error output in
5806                 config.log.
5807
5808         2006-03-11  Bruno Haible  <bruno@clisp.org>
5809
5810                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
5811
5812         2006-05-09  Bruno Haible  <bruno@clisp.org>
5813
5814                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
5815                 CLASSPATH_SEPARATOR to a semicolon.
5816
5817         2006-03-12  Bruno Haible  <bruno@clisp.org>
5818
5819                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
5820                 available as variable CONF_JAVA, for subsequent autoconf
5821                 tests. Also log error output in config.log.
5822
5823         2006-07-19  Bruno Haible  <bruno@clisp.org>
5824
5825                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
5826                 that getline works on glibc2 systems. Needed to avoid trouble
5827                 in relocatable.c.
5828                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
5829
5830         2005-12-04  Bruno Haible  <bruno@clisp.org>
5831
5832                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
5833                 launcher (untested).
5834
5835         2005-12-04  Bruno Haible  <bruno@clisp.org>
5836
5837                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
5838
5839         2006-07-22  Bruno Haible  <bruno@clisp.org>
5840
5841                 * gettext.m4: Update from GNU gettext-0.15.
5842                 * nls.m4: Likewise.
5843                 * po.m4: Likewise.
5844                 * inttypes-pri.m4: Likewise.
5845                 * inttypes-h.m4: Renamed from inttypes.m4.
5846                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
5847
5848 2006-07-22  Bruno Haible  <bruno@clisp.org>
5849
5850         Merge from GNU gettext 0.15.
5851
5852         2005-07-05  Bruno Haible  <bruno@clisp.org>
5853
5854                 * printf-args.c (printf_fetchargs): Work around broken
5855                 definition of wint_t on mingw.
5856
5857         2005-02-12  Bruno Haible  <bruno@clisp.org>
5858
5859                 * xallocsa.h: Add extern "C" for C++.
5860
5861         2006-05-17  Bruno Haible  <bruno@clisp.org>
5862
5863                 Cygwin portability.
5864                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
5865
5866         2006-04-30  Bruno Haible  <bruno@clisp.org>
5867
5868                 * progreloc.c: Include <mach-o/dyld.h> if available.
5869                 (find_executable): Use _NSGetExecutablePath when possible.
5870
5871         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5872
5873                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
5874                 function.
5875
5876         2005-12-29  Bruno Haible  <bruno@clisp.org>
5877
5878                 * progreloc.c (set_program_name_and_installdir): Fix
5879                 compilation error.
5880
5881         2005-12-04  Bruno Haible  <bruno@clisp.org>
5882
5883                 Cygwin portability.
5884                 * progreloc.c: Include <windows.h> also on Cygwin.
5885                 (find_executable): Add support for Cygwin.
5886                 (set_program_name_and_installdir): Handle also platforms with
5887                 nonempty EXEEXT.
5888
5889         2006-07-11  Bruno Haible  <bruno@clisp.org>
5890
5891                 * javacomp.c: Fix a comment.
5892                 Reported by Jim Meyering.
5893
5894         2006-04-30  Bruno Haible  <bruno@clisp.org>
5895
5896                 * javacomp.h (compile_java_class): Add source_version,
5897                 target_version arguments.
5898                 * javacomp.c: Rewritten to choose only a compiler that
5899                 respects the specified source_version and target_version.
5900
5901         2006-06-27  Bruno Haible  <bruno@clisp.org>
5902
5903                 Assume correct S_ISDIR macro.
5904                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
5905
5906         2006-07-22  Bruno Haible  <bruno@clisp.org>
5907
5908                 * javaversion.h: New file, from GNU gettext.
5909                 * javaversion.c: New file, from GNU gettext.
5910                 * javaversion.java: New file, from GNU gettext.
5911                 * javaversion.class: New file, from GNU gettext.
5912
5913         2006-05-17  Bruno Haible  <bruno@clisp.org>
5914
5915                 Cygwin portability.
5916                 * javaexec.c (execute_java_class): Test for jview program
5917                 also on Cygwin.
5918
5919         2006-04-09  Bruno Haible  <bruno@clisp.org>
5920
5921                 * fatal-signal.c: Don't include string.h.
5922                 (at_fatal_signal): Use a copying loop instead of memcpy.
5923
5924         2005-12-04  Bruno Haible  <bruno@clisp.org>
5925
5926                 * csharpexec.c: Add support for 'clix' launcher (untested).
5927                 (execute_csharp_using_sscli): New function.
5928                 (execute_csharp_program): Call it.
5929
5930         2006-06-21  Bruno Haible  <bruno@clisp.org>
5931
5932                 Avoid warnings from recent versions of mcs.
5933                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
5934                 -o, -L, -r any more. Use options documented since mcs-1.0
5935                 instead. Similarly for -g.
5936
5937         2005-07-09  Bruno Haible  <bruno@clisp.org>
5938
5939                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
5940                 add a .dll suffix.
5941                 Reported by Mark Junker <mjscod@gmx.de>.
5942
5943         2006-06-17  Bruno Haible  <bruno@clisp.org>
5944
5945                 * config.charset: Update for NetBSD 3.0.
5946
5947         2006-05-17  Bruno Haible  <bruno@clisp.org>
5948
5949                 Cygwin portability.
5950                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
5951
5952         2006-05-16  Bruno Haible  <bruno@clisp.org>
5953
5954                 * localcharset.c [CYGWIN]: Include <windows.h>.
5955                 (get_charset_aliases): For Cygwin, return the same CPxxx
5956                 aliases list as under WIN32.
5957                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
5958                 the environment variables. Fall back to GetACP().
5959
5960         2006-04-05  Bruno Haible  <bruno@clisp.org>
5961
5962                 * config.charset: Update Juan Manuel Guerrero's address.
5963
5964         2005-02-12  Bruno Haible  <bruno@clisp.org>
5965
5966                 * allocsa.h: Add extern "C" for C++.
5967
5968         2005-02-10  Bruno Haible  <bruno@clisp.org>
5969
5970                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
5971                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
5972
5973         2006-07-22  Bruno Haible  <bruno@clisp.org>
5974
5975                 * gettext.h: Update to GNU gettext-0.15.
5976
5977 2006-07-22  Bruno Haible  <bruno@clisp.org>
5978
5979         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
5980         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
5981         lib-prefix.m4, longdouble.m4, ssize_t.m4.
5982
5983 2006-07-21  Eric Blake  <ebb9@byu.net>
5984
5985         * modules/stdlib-safer: New file.
5986         * MODULES.html.sh (File stream based Input/Output): Add
5987         stdlib-safer.
5988
5989 2006-07-21  Eric Blake  <ebb9@byu.net>
5990
5991         * lib/stdlib-safer.h: New file from coreutils, required by
5992         stdlib--.h.
5993
5994 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
5995
5996         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
5997
5998 2006-07-20  Bruno Haible  <bruno@clisp.org>
5999
6000         * gnulib-tool: Recognize new option --assume-autoconf.
6001         (autoconf_minversion): New variable.
6002         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
6003
6004 2006-07-20  Bruno Haible  <bruno@clisp.org>
6005
6006         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
6007
6008 2006-07-19  Derek R. Price  <derek@ximbiot.com>
6009
6010         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
6011         Reindent and repaginate.
6012
6013 2006-07-19  Derek Price  <derek@ximbiot.com>
6014
6015         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
6016         Correct grammar.
6017
6018 2006-07-17  Bruno Haible  <bruno@clisp.org>
6019
6020         * modules/list: New file.
6021         * modules/array-list: New file.
6022         * modules/carray-list, modules/carray-list-tests: New files.
6023         * modules/linked-list, modules/linked-list-tests: New files.
6024         * modules/avltree-list, modules/avltree-list-tests: New files.
6025         * modules/rbtree-list, modules/rbtree-list-tests: New files.
6026         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
6027         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
6028         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
6029         * modules/oset: New file.
6030         * modules/array-oset: New file.
6031         * modules/avltree-oset, modules/avltree-oset-tests: New files.
6032         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
6033         * tests/test-carray_list.c: New file.
6034         * tests/test-linked_list.c: New file.
6035         * tests/test-avltree_list.c: New file.
6036         * tests/test-rbtree_list.c: New file.
6037         * tests/test-linkedhash_list.c: New file.
6038         * tests/test-avltreehash_list.c: New file.
6039         * tests/test-rbtreehash_list.c: New file.
6040         * tests/test-avltree_oset.c: New file.
6041         * tests/test-rbtree_oset.c: New file.
6042         * MODULES.html.sh (Container data structures): New section.
6043
6044 2006-07-17  Bruno Haible  <bruno@clisp.org>
6045
6046         * m4/gl_list.m4: New file.
6047
6048 2006-07-17  Bruno Haible  <bruno@clisp.org>
6049
6050         * lib/gl_list.h: New file.
6051         * lib/gl_list.c: New file.
6052         * lib/gl_array_list.h: New file.
6053         * lib/gl_array_list.c: New file.
6054         * lib/gl_carray_list.h: New file.
6055         * lib/gl_carray_list.c: New file.
6056         * lib/gl_linked_list.h: New file.
6057         * lib/gl_linked_list.c: New file.
6058         * lib/gl_anylinked_list1.h: New file.
6059         * lib/gl_anylinked_list2.h: New file.
6060         * lib/gl_avltree_list.h: New file.
6061         * lib/gl_avltree_list.c: New file.
6062         * lib/gl_anyavltree_list1.h: New file.
6063         * lib/gl_anyavltree_list2.h: New file.
6064         * lib/gl_rbtree_list.h: New file.
6065         * lib/gl_rbtree_list.c: New file.
6066         * lib/gl_anyrbtree_list1.h: New file.
6067         * lib/gl_anyrbtree_list2.h: New file.
6068         * lib/gl_anytree_list1.h: New file.
6069         * lib/gl_anytree_list2.h: New file.
6070         * lib/gl_linkedhash_list.h: New file.
6071         * lib/gl_linkedhash_list.c: New file.
6072         * lib/gl_anyhash_list1.h: New file.
6073         * lib/gl_anyhash_list2.h: New file.
6074         * lib/gl_avltreehash_list.h: New file.
6075         * lib/gl_avltreehash_list.c: New file.
6076         * lib/gl_rbtreehash_list.h: New file.
6077         * lib/gl_rbtreehash_list.c: New file.
6078         * lib/gl_anytreehash_list1.h: New file.
6079         * lib/gl_anytreehash_list2.h: New file.
6080
6081         * lib/gl_oset.h: New file.
6082         * lib/gl_oset.c: New file.
6083         * lib/gl_array_oset.h: New file.
6084         * lib/gl_array_oset.c: New file.
6085         * lib/gl_avltree_oset.h: New file.
6086         * lib/gl_avltree_oset.c: New file.
6087         * lib/gl_rbtree_oset.h: New file.
6088         * lib/gl_rbtree_oset.c: New file.
6089         * lib/gl_anytree_oset.h: New file.
6090
6091 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6092
6093         * m4/mkancesdirs.m4: New file.
6094         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
6095         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
6096         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
6097         it.
6098
6099 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6100
6101         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
6102         * lib/mkancesdirs.h: New files.
6103         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
6104         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
6105         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
6106         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
6107         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
6108         callers changed.  Revamp internals significantly, by not
6109         attempting to create directories that are temporarily more
6110         permissive than the final results.  Do not attempt to use
6111         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
6112         This removes some race conditions, fixes some bugs, and simplifies
6113         things.  Use new dirchownmod function to do owner and mode changes.
6114         * lib/mkdir-p.h: Likewise.
6115         * lib/modechange.c (octal_to_mode): New function.
6116         (struct mode_change): New member mentioned.
6117         (make_node_op_equals): New arg mentioned.  All callers changed.
6118         (mode_compile): Keep track of which mode bits the user has explicitly
6119         mentioned.
6120         (mode_adjust): New arg DIR, so that we implement the X op correctly.
6121         New arg PMODE_BITS, to keep track of which mode bits the user
6122         mentioned; it treats S_ISUID and S_ISGID speciall.
6123         All callers changed.
6124         * lib/modechange.h: Likewise.
6125
6126 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6127
6128         * MODULES.html.sh: Add mkancestors.
6129         * modules/mkancesdirs: New module.
6130         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
6131         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
6132         The chdir-safer and afs files are now orphans; I'll remove them
6133         unless someone speaks up.
6134         Add lib/dirchownmod.c, lib/dirchownmod.h.
6135         (Depends-on): Remove alloca, chown, save-cwd, dirname.
6136         Add lchown, mkancesdirs.
6137         (Maintainer): Add self.
6138
6139 2006-07-15  Karl Berry  <karl@gnu.org>
6140
6141         * gnulib-tool: help message wording/arrangement.
6142
6143 2006-07-14  Simon Josefsson  <jas@extundo.com>
6144
6145         * doc/gnulib.texi (Libtool and Windows): New section.
6146
6147 2006-07-12  Simon Josefsson  <jas@extundo.com>
6148
6149         * modules/gendocs (License): Fix license, approved by Karl.
6150
6151 2006-07-12  Eric Blake  <ebb9@byu.net>
6152
6153         * MODULES.html.sh: Add gendocs.
6154
6155 2006-07-11  Eric Blake  <ebb9@byu.net>
6156
6157         * modules/fdl: New module, to install doc/fdl.texi.
6158         * MODULES.html.sh: Add new section for documentation modules.
6159         * gnulib-tool: Avoid space-tab.
6160         (--doc-base): New option, to manage files from doc.
6161
6162 2006-07-11  Eric Blake  <ebb9@byu.net>
6163
6164         * m4/absolute-header.m4: Fix comments to match recent change.
6165
6166 2006-07-11  Eric Blake  <ebb9@byu.net>
6167
6168         * gnulib-tool: List --doc-base before --tests-base.
6169
6170 2006-07-11  Derek R. Price  <derek@ximbiot.com>
6171
6172         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
6173
6174 2006-07-11  Bruno Haible  <bruno@clisp.org>
6175
6176         * README: Mention where to put documentation.
6177
6178 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6179
6180         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
6181
6182 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6183
6184         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
6185         to stdint.m4.
6186
6187 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6188
6189         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
6190         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
6191         "no/such/file/stdint.h" when there is no such file, so that
6192         the resulting C code can be parsed by dodgy compilers.
6193         Problems reported by Bob Proulx.
6194
6195 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6196
6197         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
6198         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6199         macros into the GNU _D_EXACT_NAMLEN.
6200         * lib/savedir.c:  Likewise.
6201         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
6202
6203 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6204         and Paul Eggert  <eggert@cs.ucla.edu>
6205
6206         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
6207         * m4/savedir.m4:
6208         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6209         macros into the GNU _D_EXACT_NAMLEN.
6210
6211 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6212
6213         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
6214         around the absolute name, to work around a problem with the HP-UX
6215         11.23 native C compiler, reported by Bob Proulx.
6216
6217 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6218
6219         * doc/maintain.texi, make-stds.texi: Sync from
6220         <http://savannah.gnu.org/projects/gnustandards>.
6221
6222 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6223
6224         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
6225
6226 2006-07-09  Jim Meyering  <jim@meyering.net>
6227
6228         * m4/glob.m4: Remove a doubled word in a comment.
6229
6230 2006-07-09  Jim Meyering  <jim@meyering.net>
6231
6232         * lib/argp-pv.c: Remove a doubled word in a comment.
6233         * lib/check-version.c (check_version): Likewise.
6234         * lib/javacomp.c (compile_java_class): Likewise.
6235
6236 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
6237
6238         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
6239         for the benefit of people using Autoconf 2.60.  If you want to
6240         support older Autoconf versions you can copy m4/onceonly_2_57.m4
6241         (or m4/onceonly.m4, if pre-2.57) manually.
6242
6243 2006-07-08  Jim Meyering  <jim@meyering.net>
6244
6245         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
6246         comment.
6247         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
6248         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
6249         comment.
6250
6251 2006-07-08  Jim Meyering  <jim@meyering.net>
6252
6253         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
6254
6255 2006-07-07  Simon Josefsson  <jas@extundo.com>
6256
6257         * tests/test-crc.c: Change expected crc value, the test vector
6258         were probably computed using the old broken crc.c?
6259
6260 2006-07-06  Simon Josefsson  <jas@extundo.com>
6261
6262         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
6263         now the canonical place for the M4 file).
6264
6265         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
6266         from the sys_socket dependency now.
6267
6268         * modules/inet_pton (Files): Ditto.
6269
6270         * modules/inet_ntop (Files): Ditto.
6271
6272 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6273
6274         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
6275         not gl_PREREQ_GETUSERSHELL.
6276
6277 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6278
6279         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
6280         with only one argument, for Autoconf 2.60.
6281         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
6282         expand to nothing, so add a shell command to avoid syntax error.
6283         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6284
6285 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6286
6287         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
6288
6289 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6290
6291         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
6292         no longer needed.  Check for isblank decl.
6293         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
6294         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
6295         of existence.
6296
6297 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6298
6299         * lib/getloadavg.c: Use __VMS, not VMS.
6300         * lib/getopt.c: Likewise.
6301         * lib/getpagesize.h: Likewise.
6302         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
6303         and probably does not work.
6304
6305 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6306
6307         * lib/.cppi-disable: Add wcwidth.
6308         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
6309         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
6310         (ISGRAPH): Remove.  All uses changed to isgraph.
6311         (FOLD) [!defined _LIBC]: Remove special case.
6312         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
6313         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
6314         HAVE_ISBLANK.
6315         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
6316         case.
6317
6318 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6319
6320         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
6321         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
6322         brackets.  Other minor changes to suppress some compiler
6323         warnings.
6324
6325 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6326         and Paul Eggert  <eggert@cs.ucla.edu>
6327
6328         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
6329         of invoking obsolescent AC_HEADER_DIRENT macro.
6330         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
6331         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
6332         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
6333         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
6334         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
6335         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6336         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
6337         * m4/readdir.m4: Remove; no longer needed.
6338
6339 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6340         and Paul Eggert  <eggert@cs.ucla.edu>
6341
6342         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
6343         Don't worry about this obsolete case any more.
6344         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
6345         directories.
6346         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
6347         worry about this obsolete case any more.
6348         * lib/fts.c: Likewise.
6349         * lib/getcwd.c: Likewise.
6350         * lib/glob.h: Likewise.
6351         * lib/savedir.c: Likewise.
6352
6353 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6354
6355         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
6356         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
6357         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
6358         needed.
6359         All uses removed.
6360         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6361         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6362         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
6363         needed.
6364         * m4/getdate.m4 (gl_GETDATE): Likewise.
6365         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6366         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6367         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6368         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6369         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6370         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6371         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
6372         needed.
6373
6374 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6375
6376         * lib/memcasecmp.c: Include <limits.h>.
6377         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
6378         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
6379         Don't assume isdigit succeeds only on '0' through '9'.
6380
6381 2006-07-05  Eric Blake  <ebb9@byu.net>
6382
6383         * modules/getaddrinfo (Depends-on): Add snprintf.
6384
6385 2006-07-05  Eric Blake  <ebb9@byu.net>
6386
6387         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
6388         to avoid 'header present but could not be compiled' on cygwin.
6389
6390 2006-07-05  Eric Blake  <ebb9@byu.net>
6391
6392         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
6393         missing from netdb.h.
6394         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
6395
6396 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6397
6398         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
6399         no longer needed.
6400         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
6401         * m4/getdate.m4 (gl_GETDATE): Likewise.
6402         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6403         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6404         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6405         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6406         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6407
6408 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6409
6410         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
6411         All uses of is_space replaced by isspace.
6412         * lib/exit.h: Don't talk about STDC_HEADERS.
6413         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
6414         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
6415         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
6416         replaced by isprint etc.
6417         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
6418         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6419         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
6420         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
6421         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
6422         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6423
6424 2006-07-05  Bruno Haible  <bruno@clisp.org>
6425
6426         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
6427         the function exists, before testing against AIX.
6428         Reported by Martin Lambers <marlam@marlam.de>.
6429
6430 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6431
6432         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
6433         From Mark D. Baushke.
6434
6435 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6436
6437         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
6438         to the absolute name, not just one, to bypass Sun C 5.8's
6439         "warning: #include of /usr/include/... may be non-portable".
6440
6441 2006-07-04  Eric Blake  <ebb9@byu.net>
6442
6443         * modules/dirname-tests: New test module.
6444         * tests/test-dirname.c: New file, replacing dirname.c
6445         TEST_DIRNAME section that was recently deleted.
6446
6447 2006-07-04  Bruno Haible  <bruno@clisp.org>
6448
6449         Assume ANSI C header files and <ctype.h> functions.
6450         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
6451         (mbsnwidth): Use isprint, iscntrl instead.
6452
6453 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6454
6455         Merge from coreutils.
6456         * MODULES.html.sh: Add xstrtold.
6457         * modules/xstrtold: New file.
6458         * modules/cycle-check (Files): Add lib/same-inode.h.
6459         * modules/dirname (Files): Add m4/double-slash-root.m4.
6460         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
6461         * modules/mkdir-p (Files): Add lib/same-inode.h.
6462         * modules/same (Files): Add lib/same-inode.h.
6463
6464 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6465
6466         * m4/absolute-header.m4: Renamed from full-header-path.m4.
6467         This is to keep the terminology clean; POSIX talks about
6468         "absolute pathnames", not "full pathnames", but the GNU
6469         Coding Standards say to use "path" for something else;
6470         so use "absolute" to keep both sides happy.
6471         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
6472         Set gl_absolute_header, not gl_full_header_path.
6473         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
6474         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
6475         All uses changed.
6476
6477         Merge from coreutils.
6478
6479         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6480
6481         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
6482         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
6483         want to require the building of c-strtod.o.
6484         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
6485         needs -lm directly.
6486         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
6487
6488         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6489
6490         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
6491         --as-needed option if available.  Problem reported by Albert Chin in
6492         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
6493         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
6494         cc merely issues a bunch of annoying warnings for --as-needed
6495         (this problem was reported by Bob Proulx).  Also, try linking with
6496         -lm to detect a bug in binutils 2.16 (this problem was reported
6497         by Ralf Wildenhues).
6498
6499         2006-06-18  Jim Meyering  <jim@meyering.net>
6500
6501         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
6502         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
6503         macro.
6504         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
6505         also check for glibc-2.4's abort-inducing bug.
6506
6507         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
6508         Low-probability clean-up should be to use rmdir to get rid of
6509         the just-created directory, not unlink.
6510
6511         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
6512         configure fail, and request a bug report to inform us about it.
6513         Add a comment that, barring reports to the contrary, in 2007 we'll
6514         assume ftruncate is universally available.
6515
6516         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6517
6518         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
6519
6520         2006-03-12  Jim Meyering  <jim@meyering.net>
6521
6522         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
6523         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
6524         * m4/same.m4 (gl_SAME): Likewise.
6525         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
6526
6527         2006-03-11  Eric Blake  <ebb9@byu.net>
6528
6529         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
6530         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
6531         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
6532         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
6533
6534 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6535
6536         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
6537         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
6538         reported by Mark D. Baushke, one in
6539         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
6540
6541         Merge from coreutils.
6542
6543         * lib/.cppi-disable: Add stdint_.h.
6544         * lib/.cvsignore: Add stdint.h.
6545
6546         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6547
6548         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
6549         both double and long double versions.
6550         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
6551         * lib/xstrtold.c: New file.
6552         * lib/xstrtod.h (xstrtold): New decl.
6553
6554         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
6555
6556         * lib/filemode.c (setst): Remove.
6557         (strmode): Rewrite to avoid setst.  This makes the code shorter,
6558         (arguably) clearer, and the generated code is a bit smaller on my
6559         Debian GNU/Linux stable x86 host.
6560
6561         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6562
6563         * lib/filemode.c: Include "filemode.h" first, to test the interface.
6564         Assume that filemode.h includes sys/types.h and sys/stat.h.
6565         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
6566         (ftypelet): Reorder to put common cases first, for efficiency.
6567         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
6568         to do 'M'.
6569         (strmode): Renamed from mode_string, and now stores 12 bytes instead
6570         of 10, for compatibility with FreeBSD.  All callers changed.
6571         (filemodestring): Now stores 12 bytes instead of 10, and sets file
6572         types that can't be deduced solely from st_mode.  First arg is now a
6573         const pointer.
6574         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
6575         (strmode): Renamed from mode_string.
6576         (filemodestring): New decl.
6577         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
6578         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
6579         needed.
6580         (S_ISPORT, S_ISWHT): New macros, if not already defined.
6581
6582         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
6583
6584         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
6585         fsusage.h now does that.  Include fsusage.h first, to test interface.
6586         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
6587         at most one method (the old code could have generated decls that
6588         didn't conform to C89, not that this was ever exercised).
6589         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
6590
6591         2006-03-19  Jim Meyering  <jim@meyering.net>
6592
6593         Work even in a chroot where d_ino values for entries in "/"
6594         don't match the stat.st_ino values for the same names.
6595         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
6596         number, iterate through all entries again, using lstat instead.
6597         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
6598         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
6599
6600         * lib/getcwd.c (__getcwd): Clarify a comment.
6601         Use memcpy in place of a call to strcpy.
6602
6603         2006-03-12  Jim Meyering  <jim@meyering.net>
6604
6605         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
6606         matches that of the current directory (which we're about to chdir ".."
6607         out of), then save the dev-ino of the parent, instead.
6608
6609         * lib/same-inode.h (SAME_INODE): New file/macro.
6610         * lib/chdir-safer.c (SAME_INODE): Remove definition.
6611         Include "same-inode.h", instead.
6612         * lib/same.c: Likewise.
6613         * lib/cycle-check.h: Include "same-inode.h".
6614         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
6615         * lib/cycle-check.c (SAME_INODE): Remove definition.
6616         * lib/root-dev-ino.h: Include "same-inode.h".
6617
6618         2006-03-11  Eric Blake  <ebb9@byu.net>
6619
6620         * lib/same.c (same_name): s/base_name/last_component/
6621         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
6622         * lib/filenamecat.c (file_name_concat): Likewise.
6623
6624         2006-03-11  Eric Blake  <ebb9@byu.net>,
6625                     Paul Eggert  <eggert@cs.ucla.edu>
6626
6627         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
6628         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
6629         drive prefix.
6630         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
6631         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
6632         (last_component): New method.
6633         * lib/dirname.c (dir_len): Determine when drive letters need a
6634         subsequent slash.  Preserve // when it is special.
6635         (dir_name): Don't append dot when drive letter is absolute.
6636         [TEST_DIRNAME]: Move into a full-blown gnulib test.
6637         * lib/basename.c (base_name): New semantics - malloc the result.
6638         Preserve // when it is special.  Preserve relative files that look
6639         like drive letters.
6640         (base_len): Preserve // when it is special.
6641         (last_component): New method, similar to old base_name semantics.
6642         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
6643         base_name.  Strip redundant slashes from ///.
6644
6645 2006-07-03  Jim Meyering  <jim@meyering.net>
6646
6647         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
6648         macro is used before the first cycle_check call.
6649
6650 2006-07-03  Eric Blake  <ebb9@byu.net>
6651
6652         * modules/dirname (Depends-on): Add xstrndup.
6653
6654 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6655
6656         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
6657         test cases, so that config.log is a bit easier to follow.
6658
6659 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6660
6661         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
6662         both are 64 bits, since this seems to be the tradition, and this
6663         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
6664         we ever run into a host that prefers long long to long in this
6665         case, we'll need another configure-time test.  Problem reported by
6666         Jim Meyering.
6667
6668 2006-07-02  Eric Blake  <ebb9@byu.net>
6669
6670         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
6671
6672 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6673
6674         * modules/inttypes (Depends-on): No longer depends on stdint.
6675         * modules/stdint (Description): Say more about assumptions.
6676         Say that the fast types might differ.  Say macros are used.
6677         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
6678         (Makefile.am): Revise list of substituted symbols to match
6679         new stdint.m4.
6680         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
6681         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
6682         * tests/test-stdint.c (verify_same_types)
6683         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
6684         the code conforms to C99/C89.
6685         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
6686         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
6687
6688 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6689
6690         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
6691         but fix a bug, by requiring at least 64 bits.
6692         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
6693         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
6694         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
6695         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
6696
6697         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
6698         changes.  Make 2.59 a prerequisite.  Check and substitute for
6699         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
6700         inttypes.h.  Do not use special include files; just use the
6701         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
6702         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
6703         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
6704         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
6705         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
6706         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
6707         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
6708         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
6709         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
6710         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
6711         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
6712         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
6713         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
6714         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
6715         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
6716         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
6717         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
6718         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
6719         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
6720         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
6721         WINT_MAX.  Check for C99 conformance more strictly, by detecting
6722         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
6723         not check for things that C99 does not require, e.g., int8_t.  If
6724         a test isn't needed unless <stdint.h> isn't working, and is
6725         unlikely to be needed for any other reason, then don't do it
6726         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
6727         size_t, since we assume C89 freestanding at least.  Do not check
6728         for sig_atomic_t, wchar_t, or wint_t, since the code now does
6729         the right thing even if the types are not defined.  Instead use:
6730         (gl_STDINT_TYPE_PROPERTIES): New macro.
6731         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
6732         testing whether <sys/types.h> clashes, as Autoconf does this for
6733         us now.  All uses removed.
6734         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
6735         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
6736         (gl_CHECK_TYPE_SAME):
6737         Remove; no longer needed.
6738         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
6739         exists, since we'll return 0 anyway in that case.
6740         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
6741
6742 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6743
6744         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
6745         possible collision with system files.
6746         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
6747         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
6748         WCHAR_MIN and WCHAR_MAX in this case.
6749         (<stddef.h>): Do not include; no longer needed.
6750         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
6751         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
6752         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
6753         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
6754         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
6755         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
6756         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
6757         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
6758         !defined(__c99))]: Include in this case too, since it's harmless
6759         now.
6760         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
6761         dangerous to do so.
6762         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
6763         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
6764         (_STDINT_MIN, _STDINT_MAX): New macros.
6765         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
6766         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
6767         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
6768         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
6769         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
6770         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
6771         macros, not typedefs; this simplifies things quite a bit.
6772         Use long int for all types narrower than int64_t.
6773         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
6774         Define in terms of long long int or int64_t or long int,
6775         not int64_t or int32_t.  This saves some compile-time testing.
6776         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
6777         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
6778         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
6779         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
6780         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
6781         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
6782         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
6783         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
6784         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
6785         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
6786         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
6787         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
6788         undef any previous version and define our own version, for
6789         simplicity and consistency with the new macros for types.
6790         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
6791         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
6792         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
6793         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
6794         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
6795         @WINT_T_SUFFIX@ to keep things simple here.
6796         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
6797         Simplify by assuming typical 8/16/32/64 host, since we're
6798         already doing that elsewhere anyway.
6799         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
6800         and assume long long int is 64 bits if available.  This
6801         speeds up 'configure'.
6802
6803 2006-07-01  Eric Blake  <ebb9@byu.net>
6804
6805         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
6806         Reported by Andreas Buening.
6807
6808 2006-07-01  Eric Blake  <ebb9@byu.net>
6809
6810         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
6811
6812 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6813
6814         * lib/getaddrinfo.c: fixed typo
6815
6816 2006-06-29  Jim Meyering  <jim@meyering.net>
6817
6818         * modules/strftime (Maintainer): Add my name, since with the
6819         FPRINTFTIME changes strftime.c has forked from glibc.
6820
6821 2006-06-29  Eric Blake  <ebb9@byu.net>
6822
6823         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
6824
6825 2006-06-29  Eric Blake  <ebb9@byu.net>
6826
6827         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
6828
6829 2006-06-29  Eric Blake  <ebb9@byu.net>
6830
6831         * lib/stat_.h: New file.
6832
6833 2006-06-29  Eric Blake  <ebb9@byu.net>
6834
6835         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
6836         unused static function.
6837
6838 2006-06-29  Eric Blake  <ebb9@byu.net>
6839
6840         * doc/functions.texi (Function Portability): Document missing lstat
6841         on mingw.
6842
6843 2006-06-29  Eric Blake  <ebb9@byu.net>
6844
6845         * MODULES.html.sh: Add sys_stat.
6846         * modules/sys_stat: New module.
6847         * modules/mkstemp (Depends-on): Add sys_stat.
6848
6849 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6850
6851         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
6852
6853 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6854
6855         * m4/c-bs-a.m4: Removed.
6856
6857 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6858
6859         * lib/strftime.c: Assume strftime() exists.
6860
6861 2006-06-29  Derek Price  <derek@ximbiot.com>
6862
6863         * modules/c-bs-a: Removed - \a is C89.
6864         * MODULES.html.sh: Remove c-bs-a.
6865
6866 2006-06-29  Bruno Haible  <bruno@clisp.org>
6867
6868         * modules/wcwidth (License): Change to LGPL.
6869
6870 2006-06-28  Simon Josefsson  <jas@extundo.com>
6871
6872         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
6873         on _WIN32.
6874
6875         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
6876         getnameinfo.
6877
6878 2006-06-28  Simon Josefsson  <jas@extundo.com>
6879
6880         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
6881
6882 2006-06-28  Simon Josefsson  <jas@extundo.com>
6883
6884         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
6885         functions there.  It will succeed on Windows XP, but on Windows
6886         2000 and (presumably) earlier, it will fail, and use the internal
6887         re-implementation.
6888         (use_win32_p): New function.
6889         (getaddrinfo): Use strtoul on servname, to support numeric ports.
6890         Support AI_NUMERICSERV to disable getservbyname.
6891         (getnameinfo): New function, only supports
6892         NI_NUMERICHOST|NI_NUMERICSERV for now.
6893
6894         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
6895         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
6896         getnameinfo.
6897
6898 2006-06-28  Eric Blake  <ebb9@byu.net>
6899
6900         * modules/wcwidth: New file.
6901         * modules/mbchar (Depends-on): Add wcwidth.
6902         * modules/mbswidth (Depends-on): Add wcwidth.
6903         * MODULES.html.sh: Add wcwidth.
6904
6905 2006-06-28  Eric Blake  <ebb9@byu.net>
6906
6907         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
6908         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
6909
6910 2006-06-28  Eric Blake  <ebb9@byu.net>
6911
6912         * lib/xvasprintf.h: Fix comments.
6913
6914 2006-06-28  Eric Blake  <ebb9@byu.net>
6915
6916         * lib/mbchar.h (wcwidth): Include wcwidth.h.
6917         * lib/mbswidth.c (wcwidth): Move from here...
6918         * lib/wcwidth.h: ...to this new file.
6919
6920 2006-06-28  Derek R. Price  <derek@ximbiot.com>
6921
6922         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
6923
6924         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
6925         it's obsolete.
6926         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
6927
6928 2006-06-28  Derek R. Price  <derek@ximbiot.com>
6929
6930         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
6931         Autoconf 2.60 says this stuff was obsolete.
6932
6933 2006-06-28  Bruno Haible  <bruno@clisp.org>
6934
6935         * modules/wcwidth (Files): Add m4/wchar_t.m4.
6936
6937 2006-06-28  Bruno Haible  <bruno@clisp.org>
6938
6939         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
6940         gt_TYPE_WCHAR_T.
6941
6942 2006-06-28  Bruno Haible  <bruno@clisp.org>
6943
6944         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
6945         declaration for wcwidth.
6946         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
6947
6948 2006-06-28  Bruno Haible  <bruno@clisp.org>
6949
6950         * lib/mkdtemp.c [MINGW]: Include <io.h>.
6951         (mkdir): Define using _mkdir.
6952
6953 2006-06-28  Bruno Haible  <bruno@clisp.org>
6954
6955         * lib/getaddrinfo.h: Fix POSIX URL.
6956         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
6957         _WIN32.
6958         (use_win32_p): Make static.
6959         (getaddrinfo): Reject service name if it is empty or does not consist
6960         solely of decimal digits, or if its value is > 65535.
6961         (getnameinfo): Remove useless casts.
6962
6963 2006-06-27  Simon Josefsson  <jas@extundo.com>
6964
6965         * modules/sys_select: New file, suggested by Bruno Haible, Paul
6966         Eggert and Martin Lambers.
6967
6968 2006-06-27  Simon Josefsson  <jas@extundo.com>
6969
6970         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
6971         Eggert and Martin Lambers.
6972
6973 2006-06-27  Bruno Haible  <bruno@clisp.org>
6974
6975         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
6976         result to 0, not to empty.
6977         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
6978
6979 2006-06-27  Bruno Haible  <bruno@clisp.org>
6980
6981         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
6982
6983 2006-06-26  Simon Josefsson  <jas@extundo.com>
6984
6985         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
6986         present.
6987
6988 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
6989
6990         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
6991         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
6992         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
6993
6994 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
6995
6996         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
6997
6998 2006-06-26  Bruno Haible  <bruno@clisp.org>
6999
7000         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
7001
7002 2006-06-26  Bruno Haible  <bruno@clisp.org>
7003
7004         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
7005
7006 2006-06-26  Bruno Haible  <bruno@clisp.org>
7007
7008         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
7009         SGI C compiler in pre-C99 mode.
7010         Suggested by Mark D. Baushke and Larry Jones.
7011
7012 2006-06-26  Bruno Haible  <bruno@clisp.org>
7013
7014         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
7015         WCHAR_MAX.
7016         Reported by Mark D. Baushke and Larry Jones.
7017
7018 2006-06-26  Bruno Haible  <bruno@clisp.org>
7019
7020         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
7021         in pre-C99 mode.
7022         Suggested by Mark D. Baushke and Larry Jones.
7023
7024 2006-06-23  Simon Josefsson  <jas@extundo.com>
7025             Bruno Haible  <bruno@clisp.org>
7026
7027         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
7028         Emit mostlyclean-local rule.
7029         (func_emit_tests_Makefile_am): Likewise.
7030         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
7031
7032 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
7033
7034         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
7035
7036 2006-06-23  Bruno Haible  <bruno@clisp.org>
7037
7038         * tests/test-stdint.c: Update to match ISO C 99 Technical
7039         Corrigendum 1.
7040
7041 2006-06-23  Bruno Haible  <bruno@clisp.org>
7042
7043         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
7044
7045 2006-06-23  Bruno Haible  <bruno@clisp.org>
7046
7047         * lib/stdint_.h: Treat IRIX like OpenBSD.
7048
7049 2006-06-23  Bruno Haible  <bruno@clisp.org>
7050
7051         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
7052         ISO C 99 Technical Corrigendum 1.
7053
7054 2006-06-22  Simon Josefsson  <jas@extundo.com>
7055
7056         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
7057         MinGW.
7058
7059 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
7060
7061         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
7062         needed.  Some compiler complained about some of them.  Problem reported
7063         by Larry Jones in
7064         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
7065
7066 2006-06-21  Simon Josefsson  <jas@extundo.com>
7067
7068         * tests/test-getaddrinfo.c: New file.
7069
7070         * modules/getaddrinfo-tests: New file.
7071
7072         * MODULES.html.sh: Add inet_pton.
7073
7074         * modules/inet_pton: New file.
7075
7076 2006-06-21  Simon Josefsson  <jas@extundo.com>
7077
7078         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
7079         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
7080         of using the (limited) gnulib implementation on Windows XP.
7081
7082         * m4/inet_pton.m4: New file.
7083
7084 2006-06-21  Simon Josefsson  <jas@extundo.com>
7085
7086         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
7087         variable.
7088
7089         * lib/socket_.h: Don't define WINVER.
7090
7091         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
7092         slightly modified to work in gnulib.
7093
7094 2006-06-21  Simon Josefsson  <jas@extundo.com>
7095
7096         * doc/gnulib.texi (Windows sockets): Add.
7097
7098 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
7099
7100         * lib/read-file.c (fread_file): Start with buffer allocation of
7101         0 bytes rather than 1 byte; this simplifies the code.
7102         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
7103         code to free buffer and save/restore errno.
7104         (internal_read_file): Remove unused local.
7105
7106 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
7107
7108         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
7109         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
7110         Problem reported by Denis Excoffier in
7111         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
7112
7113 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7114
7115         * modules/sys_socket, modules/socklen: Include sys/types since
7116         FreeBSD 4.x's sys/socket.h needs it.
7117
7118 2006-06-19  Simon Josefsson  <jas@extundo.com>
7119
7120         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
7121
7122 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7123
7124         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
7125
7126 2006-06-19  Bruno Haible  <bruno@clisp.org>
7127
7128         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
7129         and FULL_PATH_INTTYPES_H in angle brackets.
7130         Reported by Mark D. Baushke <mdb@gnu.org>.
7131
7132 2006-06-17  Eric Blake  <ebb9@byu.net>
7133
7134         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
7135         errno.
7136
7137 2006-06-17  Bruno Haible  <bruno@clisp.org>
7138
7139         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
7140         <sys/inttypes.h>.
7141
7142 2006-06-17  Bruno Haible  <bruno@clisp.org>
7143
7144         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
7145         whether errno is declared. Assume <errno.h> declares errno.
7146
7147 2006-06-17  Bruno Haible  <bruno@clisp.org>
7148
7149         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
7150
7151 2006-06-17  Bruno Haible  <bruno@clisp.org>
7152
7153         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
7154         problem on Solaris 2.5.1.
7155
7156 2006-06-16  Eric Blake  <ebb9@byu.net>
7157
7158         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
7159         * lib/unicodeio.c [!defined errno]: Likewise.
7160         * lib/strtol.c [!defined errno]: Likewise.
7161         * lib/strtod.c [!defined errno]: Likewise.
7162
7163 2006-06-15  Eric Blake  <ebb9@byu.net>
7164
7165         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
7166
7167 2006-06-15  Eric Blake  <ebb9@byu.net>
7168
7169         * config/srclist.txt (ssize_t.m4): Lose sync.
7170
7171 2006-06-15  Bruno Haible  <bruno@clisp.org>
7172
7173         * modules/stdint (Files): Include m4/full-header-path.m4,
7174         m4/size_max.m4, m4/wchar_t.m4.
7175         (Makefile.am): Many more substitutions.
7176         * modules/stdint-tests: New file.
7177         * tests/test-stdint.c: New file.
7178
7179 2006-06-15  Bruno Haible  <bruno@clisp.org>
7180
7181         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
7182         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
7183         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
7184         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
7185         gl_CHECK_TYPE_SAME): New macros.
7186
7187 2006-06-15  Bruno Haible  <bruno@clisp.org>
7188
7189         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
7190
7191 2006-06-15  Bruno Haible  <bruno@clisp.org>
7192
7193         * lib/stdint_.h: Rewritten to be fully auto-configured.
7194         Fixes bug on HP-UX/IA64.
7195
7196 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
7197
7198         * lib/getdate.y (__attribute__): Don't define if already defined.
7199         Problem reported by Larry Jones.
7200         * lib/utimens.c (__attribute__): Likewise.
7201
7202 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
7203
7204         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
7205         reported by Andreas Schwab.
7206
7207 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7208             Bruno Haible  <bruno@clisp.org>
7209
7210         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
7211         check for the declaration of strnlen and a run test that exposes the
7212         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
7213         rpl_strndup.
7214
7215 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7216             Bruno Haible  <bruno@clisp.org>
7217
7218         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
7219
7220 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7221
7222         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
7223         compile test, for Tru64 4.0D.
7224
7225 2006-05-28  Karl Berry  <karl@gnu.org>
7226
7227         * config/srclist.txt (printf-args.c): lose sync.
7228
7229 2006-05-26  Martin Lambers  <marlam@marlam.de>
7230
7231         * lib/getpass.c: Updates the test for the native W32 API, and adds
7232         missing includes, thus fixing compilation warnings.
7233
7234 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7235
7236         * lib/exclude.c (exclude_fnmatch): New function.
7237         (excluded_file_name): Call exclude_fnmatch.
7238         * lib/exclude.h (excluded_file_name): New prototype
7239
7240 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
7241
7242         * lib/tempname.c (small_open, large_open): New macros.
7243         (__open, __open64) [!_LIBC]: Remove.
7244         (__gen_tempname): Use small_open and large_open instead of __open
7245         and __open64.  This fixes a portability bug on HP-UX 11.11i
7246         reported by Simon Wing-Tang in
7247         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
7248
7249 2006-05-24  Bruno Haible  <bruno@clisp.org>
7250
7251         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
7252         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
7253         Reported by Thorsten Maerz <torte@netztorte.de> via
7254         Aaron Stone <aaron@serendipity.cx>.
7255
7256 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7257
7258         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
7259         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
7260         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
7261         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
7262         not really conditional on the cache.
7263         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
7264
7265 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7266
7267         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
7268         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
7269         (my_usleep): Don't mishandle maximum value.
7270
7271 2006-05-19  Jim Meyering  <jim@meyering.net>
7272
7273         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
7274
7275 2006-05-17  Bruno Haible  <bruno@clisp.org>
7276
7277         Cygwin portability.
7278         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
7279
7280 2006-05-17  Bruno Haible  <bruno@clisp.org>
7281
7282         * lib/stdint_.h: Fix recognition of Cygwin.
7283
7284 2006-05-15  Bruno Haible  <bruno@clisp.org>
7285
7286         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
7287         on libtool patch by Ralf Wildenhues.
7288
7289 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
7290
7291         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
7292         test for C99 conformance; (bool) 0.5 is an integer constant
7293         expression, but (bool) -0.5 is not.  Problem reported by Fedor
7294         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
7295
7296 2006-05-11  Simon Josefsson  <jas@extundo.com>
7297
7298         * m4/xvasprintf.m4: Fix obvious typo.
7299
7300 2006-05-11  Jim Meyering  <jim@meyering.net>
7301
7302         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
7303         James Lemley.
7304
7305 2006-05-10  Simon Josefsson  <jas@extundo.com>
7306
7307         * lib/md4.c: Typo fix, update copyright years.
7308         (K1, K2): Don't use L because it turn computations into 64-bit on
7309         64-bit platforms.
7310
7311 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
7312
7313         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
7314         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
7315         unwanted sign propagation, e.g., on hosts with 64-bit int.
7316         There still are some problems with reeelly weird theoretical hosts
7317         (e.g., 33-bit int) but it's not worth worrying about now.
7318         * lib/sha1.c (rol): Likewise.
7319         (K1, K2, K3, K4): Remove unnecessary L suffix.
7320
7321 2006-05-10  Bruno Haible  <bruno@clisp.org>
7322
7323         * lib/des.c: Cast to avoid warnings.
7324
7325 2006-05-09  Bruno Haible  <bruno@clisp.org>
7326
7327         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
7328         (Depends-on): Depend also on xsize, stdarg.
7329         (configure.ac): Add gl_XVASPRINTF.
7330
7331 2006-05-09  Bruno Haible  <bruno@clisp.org>
7332
7333         * m4/xvasprintf.m4: New file.
7334
7335 2006-05-09  Bruno Haible  <bruno@clisp.org>
7336
7337         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
7338         (EOVERFLOW): Define fallback value.
7339         (xstrcat): New function.
7340         (xvasprintf): Recognize the special case of a string concatenation.
7341
7342 2006-05-08  Eric Blake  <ebb9@byu.net>
7343
7344         * gnulib-tool (func_version): Base copyright year on CVS date.
7345         (func_emit_copyright_notice): New function.
7346         (func_emit_lib_Makefile_am): Use it.
7347         (func_emit_tests_Makefile_am): Likewise.
7348         (func_import): Likewise.
7349
7350 2006-05-08  Bruno Haible  <bruno@clisp.org>
7351
7352         * modules/stdarg: New file.
7353         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
7354
7355 2006-05-08  Bruno Haible  <bruno@clisp.org>
7356
7357         * m4/stdarg.m4: New file, from GNU gettext.
7358
7359 2006-05-08  Bruno Haible  <bruno@clisp.org>
7360
7361         * config/srclist.txt (build-aux/config.rpath): different from latest
7362         release.
7363
7364 2006-05-08  Bruno Haible  <bruno@clisp.org>
7365
7366         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
7367
7368 2006-05-05  Jim Meyering  <jim@meyering.net>
7369
7370         * m4/warning.m4: New file, derived from bison's file by the same name.
7371
7372 2006-05-03  Bruno Haible  <bruno@clisp.org>
7373
7374         * lib/stdint_.h: Shorter URL.
7375         * lib/inttypes.h: Likewise.
7376
7377 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7378
7379         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
7380
7381 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7382
7383         * lib/verify.h: Document the internals better.  Most of this change
7384         was written by Bruno Haible.
7385
7386 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7387
7388         * doc/verify.texi: New file, partly based on a proposal by
7389         Bruno Haible.
7390
7391 2006-05-02  Bruno Haible  <bruno@clisp.org>
7392
7393         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
7394         test from here...
7395         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
7396
7397 2006-04-29  Bruno Haible  <bruno@clisp.org>
7398
7399         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
7400         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
7401
7402 2006-04-29  Bruno Haible  <bruno@clisp.org>
7403
7404         * gnulib-tool: Make --update option actually work.
7405
7406 2006-04-29  Bruno Haible  <bruno@clisp.org>
7407
7408         * doc/gcd.texi: New file.
7409         * doc/gnulib.texi: Include it.
7410
7411 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
7412
7413         * lib/getdate.y (get_date): When adding relative date, start with the
7414         initial time, not with the result of the first mktime call.
7415
7416 2006-04-25  Bruno Haible  <bruno@clisp.org>
7417
7418         * gnulib-tool (func_import): Output the include directives in three
7419         blocks, sorted separately.
7420         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7421
7422 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7423
7424         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
7425         to define main with arguments, for C++.  Reported by Eric Blake.
7426         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
7427         Prefer 'int main ()' to 'int main (void)', for C++.
7428         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
7429         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
7430         for 'main', for C99 and C++.
7431
7432 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7433
7434         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
7435         Don't assume that exit status -1 is valid.
7436         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7437         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
7438         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
7439         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
7440         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
7441         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
7442         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
7443         functions can be used without declaring them, or that you can
7444         exit with status -1.
7445         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
7446
7447 2006-04-24  Karl Berry  <karl@gnu.org>
7448
7449         * config/srclist.txt (longdouble.m4): sync lost.
7450
7451 2006-04-24  Eric Blake  <ebb9@byu.net>
7452
7453         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
7454
7455 2006-04-24  Bruno Haible  <bruno@clisp.org>
7456
7457         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
7458         poll() implementation in AIX.
7459         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7460
7461 2006-04-24  Bruno Haible  <bruno@clisp.org>
7462
7463         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
7464         assigned exactly once.
7465
7466 2006-04-23  Claudio Fontana  <claudio@gnu.org>
7467             Bruno Haible  <bruno@clisp.org>
7468
7469         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
7470         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
7471         for AM_CPPFLAGS.
7472
7473 2006-04-23  Bruno Haible  <bruno@clisp.org>
7474
7475         * modules/copy-file: Depend on unistd.
7476         * modules/execute: Likewise.
7477         * modules/fatal-signal: Likewise.
7478         * modules/findprog: Likewise.
7479         * modules/mkdtemp : Likewise.
7480         * modules/pipe: Likewise.
7481         * modules/wait-process: Likewise.
7482
7483 2006-04-23  Bruno Haible  <bruno@clisp.org>
7484
7485         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
7486         condition was already detected.
7487         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7488
7489 2006-04-23  Bruno Haible  <bruno@clisp.org>
7490
7491         * lib/copy-file.c: Include <unistd.h> unconditionally.
7492         * lib/execute.c: Likewise.
7493         * lib/fatal-signal.c: Likewise.
7494         * lib/findprog.c: Likewise.
7495         * lib/mkdtemp.c: Likewise.
7496         * lib/pipe.h: Likewise.
7497         * lib/pipe.c: Likewise.
7498         * lib/wait-process.h: Likewise.
7499
7500 2006-04-23  Bruno Haible  <bruno@clisp.org>
7501
7502         * gnulib-tool (func_usage): Fix --import description. Document
7503         --update.
7504         (func_import): Create temporary file in a temporary directory, if
7505         --dry-run is specified. Silence errors from 'grep' when there are no
7506         m4 files in $m4dir.
7507         (func_create_testdir): Silence errors from 'grep' when there are no
7508         m4 files in $m4dir.
7509         Reported by Karl Berry <karl@freefriends.org>.
7510
7511 2006-04-20  Bruno Haible  <bruno@clisp.org>
7512
7513         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
7514         one argument, so that the code will be portable to Autoconf 2.60.
7515         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
7516         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7517         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
7518
7519 2006-04-19  Derek Price  <derek@ximbiot.com>
7520             Eric Blake  <ebb9@byu.net>
7521
7522         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
7523         rather than "/full/path.h".  Update comment to match.  Shorten &
7524         generalize m4_translit call via AS_TR_CPP.
7525
7526 2006-04-19  Derek Price  <derek@ximbiot.com>
7527             Eric Blake  <ebb9@byu.net>
7528
7529         * lib/inttypes.h: Correct grammar in comment.
7530
7531 2006-04-18  Derek Price  <derek@ximbiot.com>
7532             Paul Eggert  <eggert@cs.ucla.edu>
7533
7534         * modules/inttypes: New file.
7535         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
7536
7537 2006-04-18  Derek Price  <derek@ximbiot.com>
7538             Paul Eggert  <eggert@cs.ucla.edu>
7539
7540         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
7541         New files.
7542
7543 2006-04-18  Derek Price  <derek@ximbiot.com>
7544             Paul Eggert  <eggert@cs.ucla.edu>
7545
7546         * lib/inttypes.h: New file.
7547         * lib/strtoimax.c: Assume <inttypes.h>.
7548
7549 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
7550
7551         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
7552         isn't mounted.  Problem reported by Kir Kolyshkin.
7553
7554 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
7555
7556         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
7557         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
7558         Derek R. Price.
7559         * lib/regex.h (RE_DUP_MAX): Update comment to match current
7560         implementation.
7561
7562 2006-04-12  Eric Blake  <ebb9@byu.net>
7563
7564         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
7565         is now done automatically by the corresponding Autoconf macro.
7566
7567 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
7568
7569         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
7570         time_r.h.
7571
7572 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7573
7574         Merge regex changes from libc, removing some of our
7575         POSIX-conformance changes that were rejected and redoing them in a
7576         less-intrusive way.
7577
7578         * lib/regcomp.c (re_compile_internal, init_dfa):
7579         Length arg is now size_t, not Idx.  All uses changed.
7580         (peek_token): Forward decl now says internal_function.
7581         (__re_error_msgid, __re_error_msgid_idx):
7582         Now static rather than extern with attribute_hidden.
7583         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
7584         For some reason libc prefers K&R style defns for external functions.
7585         (regerror) [!defined _LIBC]: Likewise.
7586         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
7587         (seek_collating_symbol_entry, lookup_collation_sequence_value):
7588         (build_range_exp, build_collating_symbol):
7589         Use K&R-style defn.
7590         (re_compile_fastmap): Use '\0' to memset, not 0.
7591         (utf8_sb_map): Make the calculations more obvious.
7592         (init_dfa, parse_bracket_exp, build_charclass_op):
7593         Call calloc and cast result, as glibc does.
7594         (init_word_char, fetch_token, peek_token, peek_token_bracket):
7595         (build_range_exp, build_collating_symbol):
7596         Now internal functions.
7597
7598         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
7599
7600         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
7601         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
7602         Don't depend on VMS; depend on __VMS instead, for POSIX
7603         namespace cleanness.
7604         (regoff_t): Define to ssize_t, not long int.
7605
7606         Remove the REG_ macros named below.  Instead, make the old names
7607         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
7608         __USE_GNU_REGEX.
7609         (REG_BACKSLASH_ESCAPE_IN_LISTS):
7610         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
7611         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
7612         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
7613         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
7614         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
7615         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
7616         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
7617         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
7618         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
7619         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
7620         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
7621         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
7622         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
7623         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
7624         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
7625         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
7626         (REG_NREGS):
7627         Remove.  All uses replaced by the old RE_* names.
7628         (RE_BACKSLASH_ESCAPE_IN_LISTS):
7629         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
7630         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
7631         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
7632         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
7633         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
7634         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
7635         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
7636         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
7637         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
7638         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
7639         Don't bother having these macros be independent of each others'
7640         values, since they no longer exist in the POSIX name space.
7641
7642         Rename the following member names back to their old names,
7643         unless !__USE_GNU_REGEX.  All uses changed back.
7644         (buffer): Renamed from re_buffer.
7645         (allocated): Renamed from re_allocated.
7646         (used): Renamed from re_used.
7647         (syntax): Renamed from re_syntax.
7648         (fastmap): Renamed from re_fastmap.
7649         (translate): Renamed from re_translate.
7650         (can_be_null): Renamed from re_can_be_null.
7651         (regs_allocated): Renamed from re_regs_allocated.
7652         (fastmap_accurate): Renamed from re_fastmap_accurate.
7653         (no_sub): Renamed from re_no_sub.
7654         (not_bol): Renamed from re_not_bol.
7655         (not_eol): Renamed from re_not_eol.
7656         (newline_anchor): Renamed from re_newline_anchor.
7657         (num_regs): Renamed from rm_num_regs.
7658         (start): Renamed from rm_start.
7659         (end): Renamed from rm_end.
7660
7661         (free_state): Move up a bit.
7662
7663         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
7664         #define to be empty.
7665         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
7666         when that is what is intended.
7667         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
7668         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
7669         (MAX): New macro.
7670         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
7671         All uses changed back to re_malloc, etc.  It's now the caller's
7672         responsibility to check for overflow; all callers changed.
7673         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
7674         (re_x2nrealloc): Remove.
7675         (free_state): Remove decl.
7676
7677         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
7678         (re_set_registers, re_exec):
7679         Use K&R-style defn.
7680
7681         2006-01-31  Roland McGrath  <roland@redhat.com>
7682
7683         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
7684         Reported by Mike Frysinger <vapier@gentoo.org>.
7685
7686         2006-01-15  Andreas Jaeger  <aj@suse.de>
7687
7688         [BZ #1950]
7689         * lib/regex_internal.c (re_string_reconstruct): Adjust for
7690         build_wcs_upper_buffer change.
7691         (build_wcs_upper_buffer): Change return type.
7692
7693         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
7694
7695         * lib/regex_internal.h: Include <stdint.h> if available.
7696
7697         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
7698
7699         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
7700
7701         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7702
7703         * lib/regcomp.c: Adjust for changed secondary hash function.
7704
7705         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
7706
7707         * lib/regex.h: Pretty printing.
7708         Clean up namespace a bit.
7709
7710         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
7711
7712         * lib/regexec.c (update_cur_sifted_state, check_arrival,
7713         check_arrival_add_next_nodes): Avoid using uninitialized variable.
7714
7715         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
7716                     Ulrich Drepper  <drepper@redhat.com>
7717
7718         [BZ #1302]
7719         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
7720         changed.
7721         (bitset_word_t): Renamed from bitset_word.  All uses changed.
7722
7723         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
7724
7725         [BZ #281]
7726         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
7727         * lib/regcomp.c: Remove unnecessary uses of
7728         unsigned RE_TRANSLATE_TYPE.
7729         * lib/regex_internal.h: Likewise.
7730         * lib/regex_internal.c: Likewise.
7731         * lib/regexec.c: Likewise.
7732         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
7733
7734         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
7735
7736         * lib/regexec.c (find_recover_state): Remove unnecessary
7737         initialization.
7738         (transit_state_bkref): Make DFA a const pointer.
7739         (get_subexp): Likewise.
7740         (check_arrival): Likewise.
7741         (update_cur_sifted_state): Likewise.
7742         (re_search_internal): Likewise.
7743         (prune_impossible_nodes): Likewise.
7744         (acquire_init_state_context): Likewise.
7745         (proceed_next_node): Likewise.
7746         (set_regs): Likewise.
7747         (free_fail_stack_return): Likewise.
7748         (check_arrival_expand_ecl): Mark DFA parameter as const.
7749         (check_arrival_expand_ecl_sub): Likewise.
7750         (check_subexp_limits): Likewise.
7751         (sub_epsilon_src_nodes):  Likewise.
7752         (add_epsilon_src_nodes):  Likewise.
7753         (merge_state_array): Likewise.
7754         (update_regs): Likewise.
7755         (build_trtable): Likewise.
7756         (sift_states_backward): Mark MCTX parameter as const.
7757         (build_sifted_states): Likewise.
7758         (update_cur_sifted_state): Likewise.
7759         (sift_states_mkref): Likewise.
7760         (check_arrival_expand_ecl): Mark eclosure as const.
7761         (check_dst_limits_calc_pos_1): Likewise.
7762         * lib/regex_internal.h (re_match_context_t): Make dfa a const
7763         pointer.
7764
7765         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
7766
7767         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
7768         (transit_state_sb): Likewise.
7769         (transit_state_mb): Likewise.
7770         (sift_states_iter_mb): Likewise.
7771         (check_arrival_add_next_nodes): Likewise.
7772         (check_node_accept_bytes): Change first parameter to pointer-to-const.
7773         [_LIBC] (re_search_2_stub): Use mempcpy.
7774
7775         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
7776         mbrtowc for very simple UTF-8 case.
7777
7778         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
7779         a pointer-to-const.
7780         (re_acquire_state_context): Likewise.
7781         * lib/regex_internal.h: Adjust prototypes.
7782
7783         * lib/regex.c: Prevent using C++ compilers.
7784
7785         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
7786         (re_acquire_state_context): Likewise.
7787
7788 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7789
7790         * modules/regex (Depends-on): Add ssize_t.
7791
7792 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7793
7794         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
7795         translation table.
7796
7797 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7798
7799         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
7800
7801 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
7802             Bruno Haible  <bruno@clisp.org>
7803
7804         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
7805         <sys/types.h> and <inttypes.h>.
7806
7807 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7808
7809         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
7810         `__error_t_defined', so argp.h will not typedef the former.
7811
7812 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
7813
7814         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
7815         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
7816         glibc names.  Even if glibc is changed to conform to POSIX, the
7817         traditional names will be available anyway, since regex depends on
7818         the extensions module.  Also, fix a longstanding typo in the
7819         implementation of Spencer ERE test #75 from grep 2.3.  Problems
7820         reported by Emanuele Giaquinta.  Also, change sense of cached
7821         variable, so that the message makes sense.
7822
7823 2006-03-24  Simon Josefsson  <jas@extundo.com>
7824
7825         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
7826         including some doc fixes.
7827         (base64_encode_alloc): Fix +1 bug on allocation failures.
7828
7829 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7830
7831         * lib/base64.c (base64_encode): Do not read past end of array with
7832         unsanitized input on systems with CHAR_BIT > 8.
7833
7834 2006-03-24  Eric Blake  <ebb9@byu.net>
7835
7836         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
7837
7838 2006-03-22  Karl Berry  <karl@gnu.org>
7839
7840         * config/srclist.txt (*setenv.[ch]): get from coreutils.
7841         * config/srclistvars.sh (COREUTILS): new var.
7842
7843 2006-03-17  Jim Meyering  <jim@meyering.net>
7844
7845         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
7846         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
7847
7848 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
7849
7850         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
7851         no longer needs it.  Instead, check that regoff_t is as least
7852         as wide as ptrdiff_t.
7853
7854         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
7855         so that our regex.h stays compatible with the installed regex.
7856         This is helpful for installers who configure --without-included-regex.
7857         Problem reported by Emanuele Giaquinta.
7858
7859 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
7860
7861         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
7862         Typedef to long int, not to off_, as POSIX will likely change
7863         in that direction.
7864
7865 2006-03-15  Eric Blake  <ebb9@byu.net>
7866
7867         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
7868
7869 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7870
7871         * lib/argp-help.c (validate_uparams): Fix typo
7872         * lib/argp-parse.c (argp_default_options): Consistently begin help
7873         messages with a lowercase letter.
7874
7875 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
7876
7877         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
7878         overrun buffers and shouldn't be used (much as gets shouldn't be
7879         used).
7880         * lib/time_r.c (asctime_r, ctime_r): Likewise.
7881
7882 2006-03-08  Simon Josefsson  <jas@extundo.com>
7883
7884         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
7885         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7886
7887 2006-03-08  Simon Josefsson  <jas@extundo.com>
7888
7889         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
7890         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7891
7892 2006-03-08  Simon Josefsson  <jas@extundo.com>
7893
7894         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
7895         signal that configure disabled the device.
7896
7897 2006-03-08  Simon Josefsson  <jas@extundo.com>
7898
7899         * build-aux/maint.mk: Fix refresh-po, to handle no translated
7900         languages.
7901
7902 2006-03-07  Simon Josefsson  <jas@extundo.com>
7903
7904         * modules/getopt (Depends-on): Add unistd.
7905
7906         * modules/unistd: New file.
7907
7908 2006-03-07  Simon Josefsson  <jas@extundo.com>
7909
7910         * modules/gc-random: New file.
7911
7912 2006-03-07  Simon Josefsson  <jas@extundo.com>
7913
7914         * m4/unistd_h.m4: New file.
7915
7916 2006-03-07  Simon Josefsson  <jas@extundo.com>
7917
7918         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
7919         test to be side-effect free by storing the result in the cache
7920         variable gl_cv_lib_readline, and moving the assignment of
7921         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
7922         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7923
7924 2006-03-07  Simon Josefsson  <jas@extundo.com>
7925
7926         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
7927         error on missing devices (the functions will return an error).
7928
7929         * m4/gc.m4: Move random stuff to gc-random.m4
7930
7931 2006-03-07  Simon Josefsson  <jas@extundo.com>
7932
7933         * lib/unistd_.h: New file.
7934
7935 2006-03-07  Simon Josefsson  <jas@extundo.com>
7936
7937         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
7938
7939 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7940
7941         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
7942         Problem reported by Juan Manuel Guerrero.
7943
7944 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7945
7946         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
7947         the unistd module.
7948         * lib/getlogin_r.c: Likewise.
7949         * lib/getlogin_r.h: Likewise.
7950         * lib/glob.c: Likewise.
7951         * lib/pagealign_alloc.c: Likewise.
7952         * lib/unistd_.h: Remove; no longer needed.
7953
7954 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7955
7956         * MODULES.html.sh (Support for systems lacking POSIX:2001):
7957         Add unistd.
7958         * modules/c-stack (Depends-on): Add unistd.
7959         * modules/getlogin_r: Likewise.
7960         * modules/glob: Likewise.
7961         * modules/pagealign_alloc: Likewise.
7962         * modules/unistd (Files): Remove lib/unistd_.h.
7963         (EXTRA_DIST): Remove.
7964         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
7965         need unistd_.h.
7966         (MOSTLYCLEANFILES): Remove unistd.h-t.
7967
7968 2006-03-03  Simon Josefsson  <jas@extundo.com>
7969
7970         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
7971
7972 2006-03-03  Simon Josefsson  <jas@extundo.com>
7973
7974         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
7975         libidn and bison.
7976
7977 2006-03-03  Simon Josefsson  <jas@extundo.com>
7978
7979         * build-aux/maint.mk: Add indent target.
7980
7981 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
7982
7983         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
7984         our replacement poll.h in any case, to avoid a differing
7985         declaration from a system header.  Seen on AIX.
7986
7987 2006-03-01  Simon Josefsson  <jas@extundo.com>
7988
7989         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
7990         <kasal@ucw.cz>.
7991
7992 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7993
7994         * modules/gettime (Depends-on): Add extensions module.
7995         * modules/nanosleep (Depends-on): Likewise.
7996         * modules/settime (Depends-on): Likewise.
7997
7998 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7999
8000         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
8001         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
8002         pedantically.
8003         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8004         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
8005
8006         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
8007         not "==".  Reported by Ralf Wildenhues.
8008
8009 2006-03-01  Karl Berry  <karl@gnu.org>
8010
8011         * doc/Copyright/request-*: new files, synced from gnuorg.
8012
8013 2006-03-01  Karl Berry  <karl@gnu.org>
8014
8015         * config/srclist.txt (Copyright/*): new entries.
8016
8017 2006-02-28  Simon Josefsson  <jas@extundo.com>
8018
8019         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
8020
8021 2006-02-27  Simon Josefsson  <jas@extundo.com>
8022
8023         * lib/base64.h: Indent #define's.  From Jim Meyering
8024         <jim@meyering.net>.
8025
8026 2006-02-27  Jim Meyering  <jim@meyering.net>
8027
8028         Revert the change of 2006-02-24, so these files can continue
8029         to be sync'd from gettext.
8030         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
8031         of `config.h'.
8032
8033 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
8034
8035         * modules/intprops: New file.
8036         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8037         Add intprops.
8038         * modules/getloadavg (Files): Remove lib/intprops.h.
8039         (Depends-on): Add intprops.
8040         * modules/human: Likewise.
8041         * modules/inttostr: Likewise.
8042         * modules/openat: Likewise.
8043         * modules/sig2str: Likewise.
8044         * modules/userspec: Likewise.
8045         * modules/utimecmp: Likewise.
8046         * modules/xnanosleep: Likewise.
8047         * modules/xstrtol: Likewise.
8048
8049 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
8050
8051         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
8052         * modules/lock-tests (TESTS): Use $(EXEEXT).
8053         * modules/tls-tests: Likewise.
8054         * modules/argp-tests: Likewise.
8055         (check_PROGRAMS): New var, replacing...
8056         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
8057
8058 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8059
8060         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
8061         `config.h'.
8062
8063 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
8064
8065         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
8066
8067 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8068
8069         Sync from coreutils.
8070         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
8071         gl_CHDIR_SAFER.
8072
8073 2006-02-22  Jim Meyering  <jim@meyering.net>
8074
8075         Sync from coreutils.
8076         * m4/chdir-safer.m4: New file.
8077
8078 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
8079
8080         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
8081         AT_FDCWD exceeds INT_MAX.
8082         * lib/openat.h (AT_FDCWD): Likewise.
8083
8084 2006-02-17  Eric Blake  <address@hidden>
8085
8086         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
8087
8088 2006-02-16  Simon Josefsson  <jas@extundo.com>
8089
8090         * modules/getaddrinfo (Depends-on): Add sys_socket.
8091
8092 2006-02-15  Simon Josefsson  <jas@extundo.com>
8093
8094         * build-aux/maint.mk: Add dsyntax-check rule.
8095
8096 2006-02-15  Eric Blake  <ebb9@byu.net>
8097
8098         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
8099         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
8100         'present but cannot compile' warnings on cygwin.
8101         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
8102         use ws2tcpip.h if sys/socket.h works.
8103         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
8104         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
8105
8106 2006-02-14  Simon Josefsson  <jas@extundo.com>
8107
8108         * modules/maintainer-makefile (Files): Rename.
8109
8110         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
8111         and (the local) Makefile.cfg to maint-cfg.mk.
8112
8113         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
8114         to the latter.
8115
8116         * modules/maintainer-makefile: New module.
8117
8118         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
8119         severaly stripped to make it possible to build it up from scratch
8120         with reliable tests.
8121
8122         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
8123         fixes to permit overriding the default actions when configure and
8124         makefile are not available.
8125
8126 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
8127
8128         Sync from coreutils.
8129         * modules/lstat (Depends-on): Don't depend on xalloc.
8130         (License): Change from GPL to LGPL, since this is now simply a
8131         replacement for a libc function.
8132
8133 2006-02-14  Jim Meyering  <jim@meyering.net>
8134
8135         Sync from coreutils.
8136
8137         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
8138         failure on deficient systems, and simplify gnulib lgpl dependencies.
8139         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
8140         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
8141
8142         * lib/xalloc-die.c: Remove unused definition of N_.
8143
8144 2006-02-14  Jim Meyering  <jim@meyering.net>
8145
8146         Sync from coreutils.
8147         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
8148         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
8149         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
8150         double-quote uses of that variable, to accommodate the rare case in
8151         which getmntent is available in none of the libraries checked.  This
8152         happens at least on FreeBSD 5.0.
8153
8154 2006-02-13  Simon Josefsson  <jas@extundo.com>
8155
8156         * gnulib-tool (Usage): Fix --import, from
8157         karl@freefriends.org (Karl Berry).
8158
8159 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8160
8161         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
8162
8163 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8164
8165         * lib/argp-namefrob.h: Restore changes accidentally lost during the
8166         "autoupdate" on 2005-12-12.
8167
8168 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8169
8170         * modules/closeout (Depends-on): Remove atexit.
8171
8172 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8173
8174         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
8175         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
8176
8177 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
8178
8179         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
8180         __EXTENSIONS__ if this causes compilation to fail.  Problem
8181         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
8182         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
8183
8184 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
8185
8186         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
8187         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
8188         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
8189         All uses changed.
8190
8191 2006-01-26  Simon Josefsson  <jas@extundo.com>
8192
8193         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
8194         prototype is visible on mingw32.
8195
8196         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
8197         for mingw32.
8198
8199         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
8200         mingw32).
8201
8202 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
8203
8204         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
8205         attempt to open for write; this always fails, at least on POSIX
8206         hosts.  This reinstates the 2006-01-09 change, which was
8207         inadvertently removed.
8208
8209 2006-01-26  Bruno Haible  <bruno@clisp.org>
8210
8211         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
8212         Reported by Paul Eggert.
8213
8214 2006-01-26  Bruno Haible  <bruno@clisp.org>
8215             Paul Eggert  <eggert@cs.ucla.edu>
8216
8217         * lib/stdbool_.h (_Bool)
8218         [(! (defined __cplusplus || defined __BEOS__)
8219           && !defined __GNUC__
8220           && !(defined __HP_cc || defined __xlc__
8221                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
8222                || defined __sgi))]:
8223         #define to signed char in these cases too; this simplifies
8224         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
8225         etc., separately) and makes it more conservative.
8226
8227 2006-01-25  Simon Josefsson  <jas@extundo.com>
8228
8229         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
8230         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
8231         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
8232
8233 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8234
8235         * lib/argp-namefrob.h: Bugfix. Remove stray #
8236
8237 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
8238
8239         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
8240         so that we test the test.
8241         Check for yet another HP-UX cc bug involving *bool |= bool.
8242
8243 2006-01-25  Karl Berry  <karl@gnu.org>
8244
8245         * config/srclist.txt (vasnprintf.c): sync lost.
8246
8247 2006-01-25  Jim Meyering  <jim@meyering.net>
8248
8249         Sync from the stable (b5) branch of coreutils:
8250
8251         * lib/fts.c (fts_children): Don't let close() clobber errno from
8252         failed fchdir().
8253
8254         * lib/fts.c (fts_stat): When following a symlink-to-directory,
8255         don't necessarily interpret stat-fails+lstat-succeeds as indicating
8256         a dangling symlink.  That can also happen at least for ELOOP.
8257         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
8258         FYI, this bug predates the inclusion of fts.c in coreutils.
8259
8260         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
8261         in their own block, so pre-c99 compilers don't object.
8262
8263         Avoid the double-free (first in fts_read, second in fts_close) that
8264         would occur when an `active' directory is made inaccessible (e.g.,
8265         via chmod a-x) during a traversal.
8266         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8267         before returning.  Reproduce this failure by
8268         mkdir -p a/b; cd a; chmod a-x . b
8269         Reported by Stavros Passas.
8270
8271 2006-01-25  Jim Meyering  <jim@meyering.net>
8272
8273         * lib/fileblocks.c: Remove more useless parentheses.
8274         * lib/readutmp.h: Likewise.
8275
8276 2006-01-25  Bruno Haible  <bruno@clisp.org>
8277
8278         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
8279         warnings.
8280         Reported by Paul Eggert.
8281
8282 2006-01-25  Bruno Haible  <bruno@clisp.org>
8283
8284         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
8285         rid of a trap command. For Solaris sh.
8286         Reported by Mark D. Baushke <mdb@gnu.org>.
8287
8288 2006-01-24  Simon Josefsson  <jas@extundo.com>
8289
8290         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
8291         Bruno.
8292
8293 2006-01-24  Karl Berry  <karl@gnu.org>
8294
8295         * config/srclist.txt (argp-namefrob.h): sync lost.
8296
8297 2006-01-24  Jim Meyering  <jim@meyering.net>
8298
8299         * modules/openat (Files): Add lib/intprops.h.
8300         From Mark D. Baushke.
8301
8302 2006-01-24  Jim Meyering  <jim@meyering.net>
8303
8304         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
8305         Reported by Mark D. Baushke.
8306
8307 2006-01-24  Jim Meyering  <jim@meyering.net>
8308
8309         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
8310
8311 2006-01-24  Bruno Haible  <bruno@clisp.org>
8312
8313         * modules/strnlen (Maintainer): Change from glibc to all.
8314
8315 2006-01-24  Bruno Haible  <bruno@clisp.org>
8316
8317         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
8318         Patch by Paul Eggert.
8319
8320 2006-01-24  Bruno Haible  <bruno@clisp.org>
8321
8322         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
8323         already has it.
8324         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
8325         2005-11-26.
8326
8327         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
8328         'signed char' to avoid problems with the built-in _Bool type.
8329         Reported by Paul Eggert on 2005-11-26.
8330
8331 2006-01-24  Bruno Haible  <bruno@clisp.org>
8332
8333         * gnulib-tool (func_import): Avoid constructing complicated sed
8334         expressions inside backquote.
8335         Report and solution by Mark D. Baushke <mdb@gnu.org>.
8336
8337 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
8338
8339         These changes imported from libc.
8340         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
8341         test and two separate function calls.
8342         * lib/strndup.c (__strndup): Add libc_hidden_def.
8343
8344 2006-01-23  Simon Josefsson  <jas@extundo.com>
8345
8346         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
8347         Remove the test_*_SOURCES variable: automake infers it by default.
8348         * modules/tls-tests: Likewise.
8349
8350 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8351
8352         Work around porting bugs reported by Dieter in
8353         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
8354         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
8355         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
8356         Include "getopt.h" first, to check interface.
8357         (getenv): Declare only if defined HAVE_DECL_GETENV &&
8358         !HAVE_DECL_GETENV.
8359         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
8360         (__strndup): Revert to K&R-style function dfns, the glibc style.
8361         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
8362         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
8363         Include strnlen.h first, to get prototype properly.
8364         (strnlen): Renamed from __strnlen.
8365         Remove weak alias.
8366
8367 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8368
8369         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
8370
8371 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8372
8373         * config/srclist.txt: Adjust to reflect glibc reorganization.
8374         This affects only comments.
8375
8376 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8377
8378          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
8379          Reported by Bruce Korb <bkorb@gnu.org>.
8380
8381 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
8382
8383         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
8384         to pacify gcc -Wswitch-default.
8385
8386 2006-01-22  Bruno Haible  <bruno@clisp.org>
8387
8388         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
8389         temporary buffer for sprintf, take into account the precision also
8390         for 'd', 'i', 'u', 'o', 'x', 'X'.
8391
8392 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8393
8394         * modules/argp-tests: New module
8395         * tests/test-argp.c: New file
8396         * tests/test-argp-2.sh: New file
8397
8398 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8399
8400         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
8401         (__argp_base_name): Removed
8402         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
8403         typo.
8404         (__argp_base_name): Provide macro definition or extern declaration
8405         depending on the configuration
8406
8407 2006-01-20  Simon Josefsson  <jas@extundo.com>
8408
8409         * modules/inet_ntop (Depends-on): Depend on sys_socket.
8410
8411 2006-01-20  Simon Josefsson  <jas@extundo.com>
8412
8413         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
8414
8415 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
8416
8417         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
8418         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
8419         Suggested by Bruno Haible.
8420
8421 2006-01-20  Karl Berry  <karl@gnu.org>
8422
8423         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
8424         until changes propagate, I guess.
8425
8426 2006-01-19  Simon Josefsson  <jas@extundo.com>
8427
8428         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
8429
8430 2006-01-19  Simon Josefsson  <jas@extundo.com>
8431
8432         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
8433
8434 2006-01-19  Simon Josefsson  <jas@extundo.com>
8435
8436         * gnulib-tool: Set check_PROGRAMS.
8437
8438         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8439         modules/des-tests, modules/gc-arcfour-tests,
8440         modules/gc-arctwo-tests, modules/gc-des-tests,
8441         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8442         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8443         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8444         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8445         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8446         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
8447         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
8448         test_*_SOURCES.
8449
8450 2006-01-18  Simon Josefsson  <jas@extundo.com>
8451
8452         * modules/socklen (Depends-on): Depend on sys_socket.
8453
8454 2006-01-18  Simon Josefsson  <jas@extundo.com>
8455
8456         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8457         modules/des-tests, modules/gc-arcfour-tests,
8458         modules/gc-arctwo-tests, modules/gc-des-tests,
8459         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8460         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8461         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8462         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8463         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8464         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
8465         $(EXEEXT) to automake TESTS variable, for mingw32.
8466
8467 2006-01-17  Simon Josefsson  <jas@extundo.com>
8468
8469         * modules/socklen (Include): Need sys/socket.h.
8470
8471 2006-01-17  Bruno Haible  <bruno@clisp.org>
8472
8473         * modules/ssize_t (Include): Add <sys/types.h>.
8474
8475 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
8476
8477         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
8478         it's not portable and it doesn't work with cross-compiles.
8479         Problem reported by Bruno Haible.  Fix missing-$ typo in
8480         'test "gl_cv_ignore_unused_libraries" ...' that prevented
8481         -zignore from being used with Sun's C compiler.
8482
8483 2006-01-12  Simon Josefsson  <jas@extundo.com>
8484
8485         * lib/base64.c: Fix warning, reported by Bruno Haible
8486         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
8487
8488 2006-01-12  Bruno Haible  <bruno@clisp.org>
8489
8490         * modules/ldd: New file.
8491         * build-aux/ldd.sh.in: New file.
8492         * MODULES.html.sh (Support for building libraries and executables): Add
8493         ldd.
8494
8495 2006-01-12  Bruno Haible  <bruno@clisp.org>
8496
8497         * m4/ldd.m4: New file.
8498
8499 2006-01-12  Bruno Haible  <bruno@clisp.org>
8500
8501         * gnulib-tool (func_import, func_create_testdir): Don't go into an
8502         endless loop while replacing $auxdir with build-aux.
8503
8504 2006-01-11  Simon Josefsson  <jas@extundo.com>
8505
8506         * lib/stdint_.h (SIZE_MAX): Add missing (.
8507
8508 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
8509
8510         Sync from coreutils.
8511         * lib/md5.c: Fix commentary typos.
8512         (alignof, UNALIGNED_P): No need for a GCC-specific version.
8513         * lib/md5.h (__attribute__): Remove; unused.
8514         * lib/sha1.c: Fix commentary to match md5 better.
8515         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
8516         so that we don't need to worry about alignment.  All uses changed.
8517         This merges the 2005-10-28 md5 change into sha1.
8518
8519 2006-01-11  Jim Meyering  <jim@meyering.net>
8520
8521         Sync from coreutils.
8522         * lib/md5.c (OP): Fix spacing.
8523
8524 2006-01-11  Bruno Haible  <bruno@clisp.org>
8525
8526         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8527         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
8528         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
8529
8530 2006-01-11  Bruno Haible  <bruno@clisp.org>
8531
8532         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8533         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
8534         the "early" section as well.
8535
8536 2006-01-11  Bruno Haible  <bruno@clisp.org>
8537
8538         Avoid "ar: no archive members specified" error on MacOS X.
8539         * gnulib-tool (func_modules_add_dummy): New function.
8540         (func_import, func_create_testdir): Invoke it.
8541
8542 2006-01-11  Bruno Haible  <bruno@clisp.org>
8543
8544         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
8545         with $auxdir in AC_CONFIG_FILES statements.
8546
8547 2006-01-11  Bruno Haible  <bruno@clisp.org>
8548
8549         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8550         Initialize also noinst_HEADERS to empty.
8551
8552 2006-01-11  Bruno Haible  <bruno@clisp.org>
8553
8554         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
8555         variables.
8556         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
8557         autoreconf.
8558
8559 2006-01-11  Bruno Haible  <bruno@clisp.org>
8560
8561         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
8562         overridable by the user.
8563         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8564
8565 2006-01-10  Simon Josefsson  <jas@extundo.com>
8566
8567         * modules/sys_socket: New file.
8568
8569 2006-01-10  Simon Josefsson  <jas@extundo.com>
8570
8571         * m4/sys_socket_h.m4: New file.
8572
8573 2006-01-10  Simon Josefsson  <jas@extundo.com>
8574
8575         * lib/socket_.h: New file.
8576
8577 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8578
8579         * modules/readutmp (Maintainer): Add myself.
8580
8581 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8582
8583         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
8584         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
8585         People who are still concerned with buggy memcmp implementations
8586         can invoke gl_FUNC_MEMCMP themselves.
8587
8588 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8589
8590         * lib/regex_internal.h (BITSET_WORD_BITS):
8591         Work around a bug in 64-bit PGC (before version 6.1-2), where the
8592         preprocessor mishandles large unsigned values as if they were signed.
8593         Problem reported by Claudio Fontana in
8594         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
8595
8596 2006-01-10  Jim Meyering  <jim@meyering.net>
8597
8598         Avoid the double-free (first in fts_read, second in fts_close) that
8599         would occur when an `active' directory is made inaccessible (e.g.,
8600         via chmod a-x) during a traversal.
8601         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8602         before returning.  Reproduce this failure by
8603         mkdir -p a/b; cd a; chmod a-x . b
8604         Reported by Stavros Passas.
8605
8606         Sync from coreutils.
8607         * lib/sha1.c: Tweak grammar in a comment.
8608
8609 2006-01-10  Jim Meyering  <jim@meyering.net>
8610
8611         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
8612         Patch by Joerg Sonnenberger.
8613
8614 2006-01-10  Bruno Haible  <bruno@clisp.org>
8615
8616         * modules/readutmp: Depend on module free.
8617         * modules/strtok_r: Depend on module restrict.
8618
8619 2006-01-10  Bruno Haible  <bruno@clisp.org>
8620
8621         * modules/gettext (configure.ac): Add an invocation of
8622         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
8623
8624 2006-01-10  Bruno Haible  <bruno@clisp.org>
8625
8626         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
8627         Reported by Werner Lemberg <wl@gnu.org>.
8628
8629 2006-01-10  Bruno Haible  <bruno@clisp.org>
8630
8631         * lib/localcharset.c: Update from GNU gettext.
8632
8633 2006-01-10  Bruno Haible  <bruno@clisp.org>
8634
8635         * lib/argp.h (__const): Remove macro. Use const instead.
8636         * lib/argp-fmtstream.h (__const): Likewise.
8637         * lib/glob_.h (__const): Remove macro.
8638         * lib/glob-libc.h: Use const instead of __const.
8639
8640 2006-01-10  Bruno Haible  <bruno@clisp.org>
8641
8642         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
8643         variable.
8644         Needed to avoid an automake error regarding the 'gettext' module.
8645
8646 2006-01-09  Simon Josefsson  <jas@extundo.com>
8647
8648         * modules/inet_ntop (Depends-on): Add restrict.
8649
8650 2006-01-09  Simon Josefsson  <jas@extundo.com>
8651
8652         * modules/gc-rijndael-tests (License): Put under LGPL.
8653
8654         * modules/gc-des-tests (License): Likewise.
8655
8656         * modules/gc-arcfour-tests (License): Likewise.
8657
8658         * modules/gc-arctwo-tests (License): Likewise.
8659
8660         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
8661
8662         * modules/gc-hmac-sha1-tests (Files): Likewise.
8663
8664         * modules/gc-hmac-md5-tests (License): Likewise.
8665
8666         * modules/gc-sha1-tests (License): Likewise.
8667
8668         * modules/gc-md5-tests (License): Likewise.
8669
8670         * modules/gc-md4-tests (License): Likewise.
8671
8672         * modules/gc-md2-tests (License): Likewise.
8673
8674         * modules/gc-tests (License): Likewise.
8675
8676         * modules/des-tests (License): Likewise.
8677
8678         * modules/md4-tests (License): Likewise.
8679
8680         * modules/md2-tests (License): Likewise.
8681
8682 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8683
8684         Sync from coreutils:
8685
8686         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
8687         * modules/lib-ignore: New file.
8688         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
8689         chdir-safer.m4, lchmod.m4.
8690         * modules/openat: Add mkdirat.c, openat-priv.h.
8691
8692 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8693
8694         Sync from coreutils.
8695         * m4/lib-ignore.m4: New file.
8696         * m4/lchmod.m4: New file.
8697
8698 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8699
8700         Sync from coreutils.
8701         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
8702         for write access: POSIX says that must fail.
8703         * lib/fts.c (diropen): Likewise.
8704         * lib/save-cwd.c (save_cwd): Likewise.
8705         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
8706         well, for minor improvements on hosts that lack O_DIRECTORY.
8707         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
8708         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
8709         Fall back on chown if open failed with EACCES.
8710
8711         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
8712         Report an error at compile-time if only a 1-second nominal clock
8713         resolution is found.
8714
8715         * lib/lchmod.h: New file.
8716         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
8717         (make_dir_parents): Use lchown rather than chown, and
8718         lchmod rather than chmod.
8719
8720         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
8721         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
8722         "proc" reported by n0dalus.
8723
8724         * lib/mountlist.c: Include <limits.h>.
8725         (dev_from_mount_options)
8726         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
8727         New function.  It no longer assumes "dev=" has the System V meaning
8728         on Linux (since it doesn't).  It also parses "dev=" more carefully.
8729         (read_file_system_list)
8730         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
8731         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
8732         dev= in that case.
8733
8734         * lib/posixtm.h (PDS_PRE_2000): New macro.
8735         * lib/posixtm.c (year): Arg is now syntax_bits rather than
8736         allow_century.  All usages changed.  Reject dates outside the range
8737         1969-1999 if PDS_PRE_2000 is used.
8738
8739 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8740
8741         Sync from coreutils.
8742         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
8743         (Time of day items): Mention the possibility of leap seconds.
8744         Problem reported by Dr. David Alan Gilbert.
8745
8746 2006-01-09  Jim Meyering  <jim@meyering.net>
8747
8748         Sync from coreutils.
8749
8750         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
8751
8752         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
8753
8754         * lib/modechange.c (mode_compile): Reject an invalid mode string
8755         that starts with an octal digit.  From Andreas Gruenbacher.
8756
8757         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
8758         and dup to open_safer and dup_safer, respectively.
8759         (openat_permissive): Fix typo in comment.
8760
8761         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
8762         "gettext.h"; either no longer needed or are guaranteed by openat.h.
8763         (_): Remove; no longer needed.
8764         (openat): Renamed from rpl_openat; no need for rpl_openat
8765         since openat.h renames openat for us.
8766         Replace most of the body with a call to openat_permissive,
8767         to avoid duplicate code.
8768         Port to (probably hypothetical) environments were mode_t is
8769         wider than int.
8770         (openat_permissive): Require mode arg, so that we can check
8771         types better.  Put it just after flags.  Change cwd failure
8772         indicator from pointer-to-bool to pointer-to-errno-value.
8773         All callers changed.
8774         Invoke openat_save_fail and/or openat_restore_fail if
8775         cwd_errno is null, so that openat can call us.
8776         (openat_permissive, fdopendir, fstatat, unlinkat):
8777         Simplify errno handling to avoid some duplicate code,
8778         as it's OK to set errno on success.
8779         * lib/openat.h: Revamp code so that function macros depend on
8780         __OPENAT_PREFIX only, not also on AT_FDCWD.
8781         (openat_ro): Remove.  Caller changed to use openat_permissive.
8782         (openat_permissive): Now a macro, if not a function.
8783         (openat_restore_fail, openat_save_fail): Now always functions,
8784         since mkdirat needs them even if __OPENAT_PREFIX is defined.
8785
8786         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
8787         and openat.c.
8788         * lib/mkdirat.c: Include openat-priv.h.
8789         Remove definitions of macros defined therein.
8790         * lib/openat.c: Likewise.
8791
8792         * lib/mkdirat.c (mkdirat): New file and function.
8793         * lib/openat.h (mkdirat): Declare.
8794
8795         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
8796
8797         * lib/openat.h (openat_permissive): Declare.
8798         (openat_ro): Define.
8799
8800         * lib/openat.c (EXPECTED_ERRNO): New macro.
8801         (openat_permissive): New function -- used in remove.c rewrite.
8802         (all functions): Set errno just before returning, only if there
8803         was an actual failure.
8804         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
8805
8806         Emulate openat-family functions using Linux's procfs, if possible.
8807         Idea and some code based on Ulrich Drepper's glibc changes.
8808
8809         * lib/openat.c: (BUILD_PROC_NAME): New macro.
8810         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
8811         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
8812         before falling back on save_cwd and restore_cwd.
8813         (fdopendir, fstatat, unlinkat): Likewise.
8814
8815         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
8816         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
8817
8818         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
8819         as second argument to va_arg.  Otherwise, some versions of gcc
8820         warn that `if this code is reached, the program will abort'.
8821
8822 2006-01-09  Jim Meyering  <jim@meyering.net>
8823
8824         Sync from coreutils.
8825         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
8826         Require openat-priv.h.
8827
8828 2006-01-09  Bruno Haible  <bruno@clisp.org>
8829
8830         * modules/strnlen (Include): Use strnlen.h.
8831
8832 2006-01-09  Bruno Haible  <bruno@clisp.org>
8833
8834         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
8835
8836 2006-01-09  Bruno Haible  <bruno@clisp.org>
8837
8838         * lib/sysexit_.h (EX_OK): New macro.
8839         Suggested by Martin Lambers <marlam@marlam.de>.
8840
8841 2006-01-09  Bruno Haible  <bruno@clisp.org>
8842
8843         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
8844         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
8845
8846 2006-01-09  Bruno Haible  <bruno@clisp.org>
8847
8848         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
8849         numbers.
8850
8851 2006-01-09  Bruno Haible  <bruno@clisp.org>
8852
8853         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
8854         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
8855         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
8856         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
8857
8858 2006-01-09  Bruno Haible  <bruno@clisp.org>
8859
8860         * build-aux/javacomp.sh.in: New file, moved from lib/.
8861         * modules/javacomp-script (Files): Update.
8862         (configure.ac): Add AC_CONFIG_FILES invocation.
8863         (EXTRA_DIST): Remove variable.
8864
8865         * build-aux/javaexec.sh.in: New file, moved from lib/.
8866         * modules/javaexec (Files): Update.
8867         (configure.ac): Add AC_CONFIG_FILES invocation.
8868         (EXTRA_DIST): Remove javaexec.sh.in.
8869
8870         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
8871         * modules/csharpcomp-script (Files): Update.
8872         (configure.ac): Add AC_CONFIG_FILES invocation.
8873         (EXTRA_DIST): Remove variable.
8874
8875         * build-aux/csharpexec.sh.in: New file, moved from lib/.
8876         * modules/csharpexec (Files): Update.
8877         (configure.ac): Add AC_CONFIG_FILES invocation.
8878         (EXTRA_DIST): Remove csharpexec.sh.in.
8879
8880 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
8881
8882         Sync from coreutils.
8883
8884         Add POSIX ACL support
8885         * lib/acl.h (copy_acl, set_acl): Add declarations.
8886         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
8887         systems other than Linux.
8888         (chmod_or_fchmod): New function: use fchmod when possible,
8889         and chmod otherwise.
8890         (file_has_acl): Add a POSIX ACL implementation, with a
8891         Linux-specific subcase.
8892         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
8893         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
8894         acls are unsupported.
8895         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
8896         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
8897         are unsupported.
8898
8899 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
8900
8901         Sync from coreutils.
8902         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
8903
8904 2006-01-07  Bruno Haible  <bruno@clisp.org>
8905
8906         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
8907         gl_EARLY.
8908
8909 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8910
8911         * lib/strftime.c (tzname): Don't declare if it is already #defined.
8912         Problem reported for Mingw by Mark Junker.
8913
8914 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8915
8916         * README: Gnulib normally doesn't generate a tarball.
8917
8918 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
8919
8920         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
8921         long int, not int, for nanosecond counts, so that people who are
8922         used to POSIX struct timespec won't be surprised.  Reported by Jim
8923         Meyering.
8924
8925 2005-12-28  Bruno Haible  <bruno@clisp.org>
8926
8927         * build-aux/config.rpath: Update from GNU gettext.
8928
8929 2005-12-16  Jim Meyering  <jim@meyering.net>
8930
8931         * modules/fprintftime: New module.
8932         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
8933
8934 2005-12-16  Jim Meyering  <jim@meyering.net>
8935
8936         * m4/fprintftime.m4: New file.
8937
8938 2005-12-16  Jim Meyering  <jim@meyering.net>
8939
8940         * lib/fprintftime.c, lib/fprintftime.h: New files.
8941
8942 2005-12-15  Simon Josefsson  <jas@extundo.com>
8943
8944         * modules/socklen (configure.ac): Fix M4 macro name, to align with
8945         new m4/socklen.m4.
8946
8947 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8948
8949         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
8950         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
8951
8952 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8953
8954         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
8955         * lib/argp-help.c (fill_in_uparams): Check if the constructed
8956         struct uparams is valid. Fall back to the default values if it is
8957         not.
8958
8959 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8960
8961         * modules/argp (Files): Add argp-pin.c
8962         (Depends-on): dirname
8963         (lib_SOURCES): Add argp-pin.c
8964
8965 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8966
8967         * m4/argp.m4:  Check if program_invocation_name and
8968         program_invocation_short_name are declared and define appropriate
8969         macros if they are not.
8970
8971 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8972
8973         * lib/argp-help.c (__argp_base_name): New function
8974         (__argp_short_program_name): Rewrite using __argp_base_name
8975         * lib/argp-namefrob.h: Define program_invocation_name and
8976         program_invocation_short_name if requested
8977         (__argp_base_name): Add prototype
8978         * lib/argp-parse.c (argp_def): Use gettext wrappers
8979         (argp_default_parser): Use __argp_base_name
8980         * lib/argp-pin.c: New file. Defines program_invocation_name and
8981         program_invocation_short_name on systems that lack them.
8982
8983 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8984
8985         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
8986         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8987         porting problem reported by Georg Schwarz in
8988         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8989
8990 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8991
8992         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
8993         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8994         porting problem reported by Georg Schwarz in
8995         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8996
8997 2005-12-05  Bruno Haible  <bruno@clisp.org>
8998
8999         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
9000         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
9001         Reported by Mark Junker <mjscod@gmx.de>.
9002
9003 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
9004
9005         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
9006         Use implementation from Albert Chin, with some
9007         comments/corrections by Stepan Kasal and myself.
9008
9009 2005-12-02  Bruno Haible  <bruno@clisp.org>
9010
9011         * gnulib-tool (func_import): Accept GPLed build tool modules when
9012         --lgpl is given.
9013         * modules/csharpcomp-script: New file.
9014         * modules/csharpcomp: Depend on it.
9015         * modules/javacomp-script: New file.
9016         * modules/javacomp: Depend on it.
9017         Suggested by Simon Josefsson.
9018
9019 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
9020
9021         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
9022         statement, to work around an HP-UX 10.20 compiler bug reported by
9023         Peter O'Gorman.
9024
9025 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9026
9027         * modules/savedir (Depends-on): Add openat.
9028
9029 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9030
9031         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
9032         (uintmax_t) [defined uintmax_t]: Do not declare.
9033         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
9034         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
9035         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
9036         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
9037         sake of portability to weird hosts that C allows (though we don't
9038         know of any practical examples).
9039
9040         * lib/savedir.h (fdsavedir): New decl.
9041         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
9042         contains most of the former guts of savedir.
9043         (savedir): Use savedirstream.
9044         Include "openat.h".
9045
9046 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
9047
9048         * modules/obstack (Files): Add m4/ulonglong.m4.
9049         Problem reported by Davide Angelocola.
9050
9051 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
9052
9053         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
9054         coreutils no longer futzes with rounding modes.
9055
9056 2005-11-14  Jim Meyering  <jim@meyering.net>
9057
9058         * lib/mkstemp-safer.c: Include <config.h>, required for possible
9059         replacement of mkstemp.
9060
9061 2005-11-10  Simon Josefsson  <jas@extundo.com>
9062
9063         * lib/readline.c: Remove EOL.
9064
9065 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9066
9067         * modules/gethrxtime (Depends-on): Add gettime.
9068
9069 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9070
9071         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
9072         or gettimeofday; no longer needed.
9073
9074 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9075
9076         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
9077         time business.
9078         (gethrxtime) [! (HAVE_NANOUPTIME
9079         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
9080         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
9081         our own approximation.
9082
9083 2005-11-08  Eric Blake  <ebb9@byu.net>
9084
9085         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9086
9087 2005-11-08  Eric Blake  <ebb9@byu.net>
9088
9089         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9090
9091 2005-11-04  Bruno Haible  <bruno@clisp.org>
9092
9093         * gnulib-tool: Implement --update mode.
9094
9095 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9096
9097         Fix porting problem reported by Theodoros V. Kalamatianos.
9098         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
9099         Don't assume that futimes failing means we must fail.
9100
9101 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9102
9103         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
9104         variables to suggest the intended function of the PATH_MAX check.
9105
9106 2005-10-30  Kean Johnston  <jkj@sco.com>
9107
9108         Trivial changes to support SCO systems.
9109         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
9110         as PATH_MAX.
9111         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
9112         where __ptr is null when no I/O is pending.
9113
9114 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
9115
9116         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
9117         leave errno alone.  Problem reported by Dmitry V. Levin.
9118
9119 2005-10-28  Simon Josefsson  <jas@extundo.com>
9120
9121         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
9122         Test more.
9123
9124         * tests/test-gc-md2.c, tests/test-md2.c: New files.
9125
9126         * modules/md2, modules/md2-tests: New files.
9127
9128 2005-10-28  Simon Josefsson  <jas@extundo.com>
9129
9130         * m4/inet_ntop.m4: More tests.
9131
9132         * m4/gc-md2.m4, md2.m4: New file.
9133
9134 2005-10-28  Simon Josefsson  <jas@extundo.com>
9135
9136         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
9137         "restrict" keywords, as per POSIX.  Protect the function
9138         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
9139         Don't use K&R prototypes.  Check the sprintf return values.
9140         Re-define EAFNOSUPPORT if not present.  Indent.
9141
9142         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
9143         suggested by Bruno Haible <bruno@clisp.org>.
9144
9145         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
9146
9147         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
9148
9149         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
9150         libgcrypt).
9151
9152         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
9153
9154         * lib/md2.h, lib/md2.c: New files.
9155
9156 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
9157
9158         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
9159         errno alone.  Problem reported by Frederic Jolliton.
9160
9161 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9162
9163         * modules/verify (License): Change from GPL to LGPL.  This is a
9164         tiny module and there are apparently near-equivalents that are
9165         under the BSD license.
9166
9167 2005-10-24  Simon Josefsson  <jas@extundo.com>
9168
9169         * modules/sha1: Relicense to LGPL.
9170
9171 2005-10-24  Simon Josefsson  <jas@extundo.com>
9172
9173         * lib/md4.h: Shrink buffer size, now that we changed the type.
9174
9175 2005-10-23  Simon Josefsson  <jas@extundo.com>
9176
9177         * gnulib-tool (func_import): Fix --tests-base.
9178
9179 2005-10-22  Simon Josefsson  <jas@extundo.com>
9180
9181         * modules/arcfour (Depends-on): Need stdint.
9182
9183 2005-10-22  Simon Josefsson  <jas@extundo.com>
9184
9185         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
9186         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
9187
9188 2005-10-22  Simon Josefsson  <jas@extundo.com>
9189
9190         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
9191         suggested by Bruno Haible <bruno@clisp.org>.
9192
9193 2005-10-22  Simon Josefsson  <jas@extundo.com>
9194
9195         * lib/crc.h: Include stddef.h, for size_t.
9196
9197 2005-10-22  Simon Josefsson  <jas@extundo.com>
9198
9199         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
9200         arcfour_context struct (simplify test vector testing in GNU
9201         Shishi).
9202
9203 2005-10-21  Simon Josefsson  <jas@extundo.com>
9204
9205         * modules/des, modules/des-tests: New files.
9206
9207         * modules/gc-des, modules/gc-des-tests: New files.
9208
9209         * tests/test-des.c, tests/test-gc-des.c: New file.
9210
9211 2005-10-21  Simon Josefsson  <jas@extundo.com>
9212
9213         * modules/arctwo, modules/arctwo-tests: New files.
9214
9215         * tests/test-arctwo.c: New file.
9216
9217         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
9218
9219         * tests/test-gc-arctwo.c: New file.
9220
9221 2005-10-21  Simon Josefsson  <jas@extundo.com>
9222
9223         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
9224         Bruno Haible <bruno@clisp.org>.
9225
9226         * m4/gc-des.m4: New file.
9227
9228 2005-10-21  Simon Josefsson  <jas@extundo.com>
9229
9230         * m4/arctwo.m4: New file.
9231
9232         * m4/gc-arctwo.m4: New file.
9233
9234 2005-10-21  Simon Josefsson  <jas@extundo.com>
9235
9236         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
9237         block.
9238
9239 2005-10-21  Simon Josefsson  <jas@extundo.com>
9240
9241         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
9242         <bruno@clisp.org>.
9243
9244         * lib/hmac-sha1.c (hmac_sha1): Likewise.
9245
9246         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
9247         Bruno Haible <bruno@clisp.org>.
9248
9249         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
9250         <bruno@clisp.org>.
9251
9252 2005-10-21  Simon Josefsson  <jas@extundo.com>
9253
9254         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
9255
9256 2005-10-21  Simon Josefsson  <jas@extundo.com>
9257
9258         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
9259
9260 2005-10-21  Simon Josefsson  <jas@extundo.com>
9261
9262         * lib/des.h, lib/des.c: New files.
9263
9264         * lib/gc-gnulib.c: Support DES.c
9265
9266 2005-10-21  Simon Josefsson  <jas@extundo.com>
9267
9268         * lib/arctwo.h, lib/arctwo.c: New files.
9269
9270         * lib/gc-gnulib.c: Support ARCTWO.
9271
9272 2005-10-21  Simon Josefsson  <jas@extundo.com>
9273
9274         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
9275         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9276
9277 2005-10-21  Simon Josefsson  <jas@extundo.com>
9278
9279         * gnulib-tool (func_import, func_create_testdir): Define automake
9280         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
9281         Makefile.am snippet),
9282         suggested by Bruno Haible <bruno@clisp.org>.
9283
9284         * modules/gc (Makefile.am): Use it.
9285
9286 2005-10-21  Bruno Haible  <bruno@clisp.org>
9287
9288         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
9289         patch.
9290
9291 2005-10-19  Simon Josefsson  <jas@extundo.com>
9292
9293         * tests/test-gc-rijndael.c: New file.
9294
9295         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
9296
9297 2005-10-19  Simon Josefsson  <jas@extundo.com>
9298
9299         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
9300         interface too.
9301
9302 2005-10-19  Simon Josefsson  <jas@extundo.com>
9303
9304         * tests/test-gc-arcfour.c: New file.
9305
9306         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
9307
9308 2005-10-19  Simon Josefsson  <jas@extundo.com>
9309
9310         * modules/gc-md4, modules/gc-md4-tests: New file.
9311
9312         * tests/test-gc-md4.c: New file.
9313
9314 2005-10-19  Simon Josefsson  <jas@extundo.com>
9315
9316         * m4/gc-md4.m4: New file.
9317
9318 2005-10-19  Simon Josefsson  <jas@extundo.com>
9319
9320         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
9321         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
9322         <kasal@ucw.cz>.
9323
9324 2005-10-19  Simon Josefsson  <jas@extundo.com>
9325
9326         * m4/gc-arcfour.m4: New file.
9327
9328         * m4/gc-rijndael.m4: New file.
9329
9330 2005-10-19  Simon Josefsson  <jas@extundo.com>
9331
9332         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
9333
9334 2005-10-19  Simon Josefsson  <jas@extundo.com>
9335
9336         * lib/gc-gnulib.c: Support ARCFOUR.
9337
9338 2005-10-19  Simon Josefsson  <jas@extundo.com>
9339
9340         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
9341         support.
9342
9343         * lib/gc.h: Add ECB enum type.
9344
9345         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
9346
9347 2005-10-18  Simon Josefsson  <jas@extundo.com>
9348
9349         * tests/test-md5.c: New file.
9350
9351         * modules/md5-tests: New file.
9352
9353 2005-10-18  Simon Josefsson  <jas@extundo.com>
9354
9355         * tests/test-md4.c: New file.
9356
9357         * modules/md4, modules/md4-tests: New files.
9358
9359 2005-10-18  Simon Josefsson  <jas@extundo.com>
9360
9361         * m4/md4.m4: New file.
9362
9363 2005-10-18  Simon Josefsson  <jas@extundo.com>
9364
9365         * lib/md4.h, lib/md4.c: New files, based on md5.?.
9366
9367 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
9368
9369         * gnulib-tool (func_create_testdir): Omit the second check whether
9370         BUILT_SOURCES in nonempty.
9371
9372 2005-10-17  Simon Josefsson  <jas@extundo.com>
9373
9374         * tests/test-rijndael.c: New file.
9375
9376 2005-10-17  Simon Josefsson  <jas@extundo.com>
9377
9378         * modules/sha1: Depend on stdint instead of md5.
9379
9380         * modules/md5: Depend on stdint, remove uint32_t.
9381
9382 2005-10-17  Simon Josefsson  <jas@extundo.com>
9383
9384         * modules/gc-sha1-tests: New file.
9385
9386         * tests/test-gc-sha1.c: New file.
9387
9388 2005-10-17  Simon Josefsson  <jas@extundo.com>
9389
9390         * m4/md5.m4: Remove call to uint32_t.m4.
9391
9392 2005-10-17  Simon Josefsson  <jas@extundo.com>
9393
9394         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
9395
9396         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
9397         md5.h.
9398
9399         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
9400
9401         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
9402
9403 2005-10-17  Simon Josefsson  <jas@extundo.com>
9404
9405         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
9406
9407 2005-10-17  Simon Josefsson  <jas@extundo.com>
9408
9409         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
9410
9411 2005-10-17  Simon Josefsson  <jas@extundo.com>
9412
9413         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
9414
9415         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
9416
9417 2005-10-17  Bruno Haible  <bruno@clisp.org>
9418
9419         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
9420         that it can also be used in a test.
9421
9422 2005-10-16  Bruno Haible  <bruno@clisp.org>
9423
9424         * gnulib-tool (func_emit_tests_Makefile_am): Also define
9425         TESTS_ENVIRONMENT, so that individual tests can augment it.
9426
9427         * gnulib-tool (func_create_testdir): Use an intermediate target for
9428         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
9429         macros, like $(ALLOCA_H), which cannot be passed through the command
9430         line.
9431
9432 2005-10-15  Simon Josefsson  <jas@extundo.com>
9433
9434         * modules/rijndael-tests: New file.
9435
9436         * modules/rijndael: New file.
9437
9438 2005-10-15  Simon Josefsson  <jas@extundo.com>
9439
9440         * m4/rijndael.m4: New file.
9441
9442 2005-10-15  Simon Josefsson  <jas@extundo.com>
9443
9444         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
9445
9446         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
9447
9448 2005-10-14  Simon Josefsson  <jas@extundo.com>
9449
9450         * tests/test-arcfour.c: New file.
9451
9452         * modules/arcfour, modules/arcfour-tests: New files.
9453
9454 2005-10-14  Simon Josefsson  <jas@extundo.com>
9455
9456         * m4/arcfour.m4: New file.
9457
9458 2005-10-14  Simon Josefsson  <jas@extundo.com>
9459
9460         * lib/arcfour.h, lib/arcfour.c: New files.
9461
9462 2005-10-14  Roland McGrath  <roland@redhat.com>
9463
9464         Import from libc.  [BZ #1331]
9465         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
9466         macro argument.
9467         Reported by Matej Vela <vela@debian.org>.
9468
9469 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9470
9471         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
9472         include <wchar.h>; no longer needed.
9473
9474 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9475
9476         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
9477
9478 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
9479         and  Ulrich Drepper  <drepper@redhat.com>
9480
9481         Import from libc.
9482         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
9483         instead of inline stream orientation test and two separate
9484         function calls.  Pay no attention to USE_IN_LIBIO.
9485
9486 2005-10-13  Simon Josefsson  <jas@extundo.com>
9487
9488         * modules/gc-hmac-md5-tests: New file.
9489
9490         * tests/test-gc-hmac-sha1.c: New file.
9491
9492         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
9493
9494         * modules/gc-hmac-md5-tests: New file.
9495
9496         * tests/test-gc-md5.c: New file.
9497
9498         * modules/gc-md5-tests: New file.
9499
9500 2005-10-13  Simon Josefsson  <jas@extundo.com>
9501
9502         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
9503         Move memory allocation outside of loop.
9504
9505 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
9506
9507         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
9508         intermediate directory is in a read-only file system.  Problem
9509         reported by Eric Blake.
9510
9511 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
9512
9513         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
9514
9515 2005-10-12  Simon Josefsson  <jas@extundo.com>
9516
9517         * tests/test-hmac-sha1.c: New file.
9518
9519         * modules/hmac-sha1-tests: New file.
9520
9521         * modules/hmac-sha1: New file.
9522
9523 2005-10-12  Simon Josefsson  <jas@extundo.com>
9524
9525         * modules/gc-sha1: New file.
9526
9527 2005-10-12  Simon Josefsson  <jas@extundo.com>
9528
9529         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
9530
9531         * tests/test-gc-pbkdf2-sha1.c: New file.
9532
9533 2005-10-12  Simon Josefsson  <jas@extundo.com>
9534
9535         * modules/gc-md5, modules/gc-hmac-md5: New files.
9536
9537         * modules/gc (Files): Remove md5, memxor and hmac files.
9538
9539 2005-10-12  Simon Josefsson  <jas@extundo.com>
9540
9541         * m4/gc-pbkdf2-sha1.m4: New file.
9542
9543         * m4/gc-hmac-sha1.m4: New file.
9544
9545         * m4/gc-sha1: New file.
9546
9547         * m4/hmac-sha1.m4: New file.
9548
9549 2005-10-12  Simon Josefsson  <jas@extundo.com>
9550
9551         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
9552
9553         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
9554
9555 2005-10-12  Simon Josefsson  <jas@extundo.com>
9556
9557         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
9558         suggested by Bruno Haible <bruno@clisp.org>.
9559
9560 2005-10-12  Simon Josefsson  <jas@extundo.com>
9561
9562         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
9563
9564 2005-10-12  Simon Josefsson  <jas@extundo.com>
9565
9566         * lib/gc-pbkdf2-sha1.c: New file.
9567
9568         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
9569
9570 2005-10-12  Simon Josefsson  <jas@extundo.com>
9571
9572         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
9573
9574         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
9575
9576 2005-10-12  Simon Josefsson  <jas@extundo.com>
9577
9578         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
9579         GC_USE_HMAC_MD5, respectively.
9580
9581         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
9582         (gc_md5): Fix typo.
9583
9584         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
9585
9586         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
9587
9588         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
9589
9590 2005-10-12  Bruno Haible  <bruno@clisp.org>
9591
9592         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
9593         Reported by Stepan Kasal <kasal@ucw.cz>.
9594
9595 2005-10-11  Simon Josefsson  <jas@extundo.com>
9596
9597         * tests/test-crc.c: New file.
9598
9599         * modules/crc, modules/crc-tests: New files.
9600
9601 2005-10-11  Simon Josefsson  <jas@extundo.com>
9602
9603         * m4/crc.m4: New file.
9604
9605 2005-10-11  Simon Josefsson  <jas@extundo.com>
9606
9607         * lib/gc.h: Add gc_hash and gc_hash_buffer.
9608
9609         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
9610
9611         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
9612
9613 2005-10-11  Simon Josefsson  <jas@extundo.com>
9614
9615         * lib/crc.h, lib/crc.c: New files.
9616
9617         * lib/gc.h (gc_hash_buffer): Add doc.
9618
9619 2005-10-11  Bruno Haible  <bruno@clisp.org>
9620
9621         * modules/c-strcasestr: New file.
9622         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
9623
9624 2005-10-11  Bruno Haible  <bruno@clisp.org>
9625
9626         * modules/c-strcase: New file.
9627         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
9628
9629 2005-10-11  Bruno Haible  <bruno@clisp.org>
9630
9631         * lib/strcasecmp.c: Include limits.h.
9632         (strcasecmp): Avoid integer overflow on exotic platforms.
9633         * lib/strncasecmp.c: Include limits.h.
9634         (strncasecmp): Avoid integer overflow on exotic platforms.
9635         Reported by Paul Eggert.
9636
9637 2005-10-11  Bruno Haible  <bruno@clisp.org>
9638
9639         * lib/c-strcasestr.h: New file, from GNU gettext.
9640         * lib/c-strcasestr.c: New file, from GNU gettext.
9641
9642 2005-10-11  Bruno Haible  <bruno@clisp.org>
9643
9644         * lib/c-strcase.h: New file, from GNU gettext.
9645         * lib/c-strcasecmp.c: New file, from GNU gettext.
9646         * lib/c-strncasecmp.c: New file, from GNU gettext.
9647
9648 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9649
9650         * modules/mempcpy (License): GPL -> LGPL.
9651         * modules/strchrnul (License): Likewise.
9652         * modules/sysexits (License): Likewise.
9653
9654 2005-10-08  Simon Josefsson  <jas@extundo.com>
9655
9656         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
9657
9658 2005-10-07  Simon Josefsson  <jas@extundo.com>
9659
9660         * m4/memxor.m4: Remove gl_C_RESTRICT call.
9661
9662 2005-10-06  Simon Josefsson  <jas@extundo.com>
9663
9664         * tests/test-hmac-md5.c: New file.
9665
9666         * modules/hmac-md5-tests: New file.
9667
9668         * modules/hmac-md5: New file.
9669
9670 2005-10-06  Simon Josefsson  <jas@extundo.com>
9671
9672         * m4/hmac-md5.m4: New file.
9673
9674         * m4/memxor.m4: Require gl_C_RESTRICT.
9675
9676 2005-10-06  Simon Josefsson  <jas@extundo.com>
9677
9678         * lib/memxor.c (memxor): Avoid casts and warnings.
9679
9680 2005-10-06  Simon Josefsson  <jas@extundo.com>
9681
9682         * lib/hmac-md5.c: New file.
9683
9684         * lib/hmac.h: New file.
9685
9686 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9687
9688         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
9689         promotes to int, not unsigned int, to catch the AIX 5.3
9690         compiler bug.
9691
9692 2005-10-05  Simon Josefsson  <jas@extundo.com>
9693
9694         * modules/memxor: New file.
9695
9696         * modules/iconv (Files): Move config.rpath to havelib, it is used
9697         there.
9698
9699         * modules/havelib (Files): Add config.rpath.
9700
9701 2005-10-05  Simon Josefsson  <jas@extundo.com>
9702
9703         * m4/memxor.m4: New file.
9704
9705 2005-10-05  Simon Josefsson  <jas@extundo.com>
9706
9707         * lib/memxor.c (memxor): Fix compiler error.
9708
9709         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
9710         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
9711
9712         * lib/memxor.h, lib/memxor.c: New files.
9713
9714         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
9715         we assume all systems have it, suggested by Jim Meyering
9716         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
9717         any systems lack sys/socket.h; mingw32 is known to lack it, but we
9718         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
9719         same reasons.
9720
9721 2005-10-05  Simon Josefsson  <jas@extundo.com>
9722
9723         * config/srclist.txt: Add glibc bug 1423 for md5.h.
9724
9725 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9726
9727         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
9728         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
9729         needed, since the source code now assumes these .h files.
9730
9731 2005-10-05  Derek Price  <derek@ximbiot.com>
9732
9733         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
9734
9735 2005-10-05  Bruno Haible  <bruno@clisp.org>
9736
9737         * modules/stdint (License): Change to LGPL.
9738
9739 2005-10-04  Simon Josefsson  <jas@extundo.com>
9740
9741         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
9742         D. Baushke" <mdb@gnu.org>.
9743
9744 2005-10-04  Bruno Haible  <bruno@clisp.org>
9745
9746         * lib/verify.h (verify_true): Provide alternative definition for C++.
9747
9748 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
9749
9750         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
9751         (SSIZE_MAX): New macro, if not already defined.
9752         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
9753         than 2 GiB.
9754
9755 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9756
9757         Sync from coreutils.
9758         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
9759         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
9760         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
9761         ULLONG_MAX doesn't work with 2.7.2.1.
9762
9763 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9764
9765         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
9766         From Ben Pfaff.
9767
9768         * modules/exclude (Depends-on): Depend on verify.
9769         * modules/strtoimax (Depends-on): Likewise.
9770         * modules/utimecmp (Depends-on): Likewise.
9771
9772 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9773
9774         * lib/exclude.c: Include verify.h.
9775         (verify): Remove.  All callers changed to use verify.h's version.
9776         * lib/strtoimax.c: Likewise.
9777         * lib/utimecmp.c: Likewis.e
9778
9779         Sync from coreutils.
9780         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
9781         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
9782         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
9783         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
9784         bother returning ENOSYS if settimeofday or stime fails; just let
9785         them return whatever errno they want to return.
9786         * lib/utimens.c: Include unistd.h, for dup2.
9787         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
9788         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
9789
9790 2005-10-02  Jim Meyering  <jim@meyering.net>
9791
9792         Sync from coreutils.
9793         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
9794         from glibc-2.2.5 that fails for read-only files.
9795
9796 2005-10-02  Jim Meyering  <jim@meyering.net>
9797
9798         Sync from coreutils.
9799         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
9800         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
9801         `#if HAVE_CONFIG_H'.
9802         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
9803         Remove AT_FDCWD test.
9804         Do not consume the fd unless successful.
9805         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
9806         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
9807         block, so that we don't even try to compile it if settimeofday is
9808         available.  This works around a compilation failure on OSF1 V5.1,
9809         due to stime requiring a `long int*' while tv_sec is `int'.
9810
9811 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
9812
9813         Sync from coreutils.
9814         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
9815         against `yes', rather than just testing for nonempty.
9816
9817 2005-10-01  Simon Josefsson  <jas@extundo.com>
9818
9819         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
9820         and Darwin.
9821
9822         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
9823         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
9824         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
9825         freeaddrinfo and gai_strerror are declared by the POSIX headers.
9826         Check if struct addrinfo is declared.
9827
9828 2005-10-01  Simon Josefsson  <jas@extundo.com>
9829
9830         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
9831         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
9832         AI_* and EAI_* definitions.  Protect function declarations.
9833
9834 2005-10-01  Jim Meyering  <jim@meyering.net>
9835
9836         Sync from coreutils.
9837
9838         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
9839         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
9840         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
9841         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
9842         in the inet and nsl libraries.  Required on Solaris 5.7.
9843
9844 2005-10-01  Jim Meyering  <jim@meyering.net>
9845
9846         Sync from coreutils.
9847         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
9848         in the inet and nsl libraries.  Required on Solaris 5.7.
9849
9850 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
9851
9852         * lib/getdelim.c (getdelim): Remove unused variables.
9853
9854 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
9855
9856         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
9857         so that the code works even with ancient cpp.  Portability problem
9858         with GCC 2.7.2.1 reported by Thomas M.Ott.
9859
9860 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
9861
9862         * modules/regex (Depends-on): Add strcase.
9863
9864         * modules/gethostname (Licence): Change from GPL to LGPL, since
9865         gethostname.c is a trivial implementation of a standard library
9866         function.
9867         * modules/poll (License): Change from GPL to LGPL, since it's
9868         derived from LGPL code.
9869
9870 2005-09-27  Jim Meyering  <jim@meyering.net>
9871
9872         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
9873         HAVE_CONFIG_H.
9874
9875         * lib/intprops.h (signed_type_or_expr__): Define.
9876         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
9877         for unsigned types.
9878
9879 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
9880
9881         * lib/verify.h (verify_expr): Remove, replacing with:
9882         (verify_true): New macro that returns true instead of void.
9883         (verify_type__): Remove.
9884         (verify): Use verify_true rather than verify_type__.
9885
9886 2005-09-26  Bruno Haible  <bruno@clisp.org>
9887
9888         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
9889         is necessary.
9890         (lib_SOURCES): Remove mbchar.c.
9891         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
9892         (Files): Add m4/mbrtowc.m4.
9893         * modules/mbiter: Likewise.
9894         * modules/mbuiter: Likewise.
9895
9896 2005-09-26  Bruno Haible  <bruno@clisp.org>
9897
9898         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
9899         compile mbchar.c if they are not both present.
9900         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
9901         * m4/mbiter.m4 (gl_MBITER): Likewise.
9902         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
9903         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
9904         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
9905
9906 2005-09-25  Jim Meyering  <jim@meyering.net>
9907
9908         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
9909         also uses socklen_t.
9910
9911 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
9912
9913         * lib/utimens.c (ENOSYS): Define if not already defined.
9914         (futimens): Support having a null PATH if the file descriptor
9915         is nonnegative.
9916
9917         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
9918         Remove.
9919         (__attribute): Define to empty unless GCC 3.1 or later.
9920         This works around a core dump on OpenBSD 3.4, which has GCC
9921         2.95.3, which dumps core when given __attribute__(()).  It also
9922         simplifies other tests, since we really don't want to bother with
9923         worrying about which ancient version of GCC supported what.
9924         Original problem reported by Yoann Vandoorselaere, with part of
9925         the fix suggested by Derek Price.
9926
9927 2005-09-24  Jim Meyering  <jim@meyering.net>
9928
9929         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
9930         so we can once again use a positive bitfield width of 1 -- now we
9931         don't have to explain why we were using a bitfield width of 2.
9932
9933 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
9934
9935         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
9936         and similarly for the other external symbols.  Problem reported
9937         by James Gallager.
9938
9939         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
9940         bug reported by Jim Meyering.
9941
9942         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
9943         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
9944         not needed, since socklen is a prerequisite module.
9945
9946 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
9947
9948         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
9949         Problem reported by Eric Blake.
9950         (getaddrinfo): Initialize se so that it's not garbage.
9951         Redo internal storage allocation so that it doesn't make unportable
9952         assumptions about alignment.
9953         Fix a memory leak.
9954
9955         * lib/utimens.c (futimens): Use futimesat if available.
9956         Prefer it to futimes since it doesn't have the futimes bug.
9957
9958         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
9959         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
9960         Instead, declare a function that returns a pointer to an array,
9961         and use verify_type__ to declare the size of the array.
9962         Problem and germ of a solution reported by Bruno Haible.
9963         (verify_type__): Use 2, not 1, for bitfield size, to avoid
9964         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
9965
9966 2005-09-23  Jim Meyering  <jim@meyering.net>
9967
9968         Sync from coreutils.
9969         Correct build failure (socklen_t not defined) on at least
9970         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
9971         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
9972
9973 2005-09-23  Jim Meyering  <jim@meyering.net>
9974
9975         * modules/getaddrinfo (Depends-on): Add socklen.
9976
9977 2005-09-23  Bruno Haible  <bruno@clisp.org>
9978
9979         * tests/test-verify.c: New file.
9980
9981 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9982
9983         Sync from coreutils.
9984
9985         * modules/argmatch (Depends-on): Add verify.
9986         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
9987         unistd-safer.
9988         * modules/save-cwd (Depends-on): Likewise.
9989
9990         * modules/openat (Files): Add lib/openat-die.c.
9991         (Depends-on): Remove error, exitfail.
9992         Add dirname.
9993
9994         * modules/verify: New file.
9995         * MODULES.html.sh (Diagnostics <assert.h>): New section,
9996         with "verify" module.
9997
9998 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9999
10000         Sync from coreutils.
10001
10002         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
10003         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
10004         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
10005         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
10006         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
10007         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
10008         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
10009         Don't bother checking for string.h, stdlib.h, unistd.h.
10010         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
10011         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
10012         module's job.
10013         * m4/jm-macros.m4 (gl_MACROS): Likewise.
10014         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
10015
10016         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
10017         (gl_GETDATE): Use it.
10018
10019         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
10020
10021 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10022
10023         Sync from coreutils.
10024
10025         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
10026         stat-time.h.
10027         * lib/argmatch.h: Include verify.h
10028         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
10029         (ARGMATCH_ASSERT): Remove; unused.
10030         * lib/canonicalize.c: Assume STDC_HEADERS.
10031         * lib/exclude.c: Include "strcase.h".
10032         * lib/regex_internal.h [!defined _LIBC]: Likewise.
10033         * lib/getusershell.c: Include stdio--.h rather than stdio.h
10034         and stdio-safer.h.
10035         (getusershell): Call fopen, not fopen_safer.
10036         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
10037         Do not include unistd-safer.h.
10038         (save_cwd): Don't call fd_safer; no longer needed
10039         now that we include fcntl--.h.
10040
10041         * lib/getdate.y (relative_time): New type.
10042         (RELATIVE_TIME_0): New constant.
10043         (parser_control): Use relative_time instead of doing it ourselves.
10044         (%union): Add new relative_time rel member.
10045         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
10046         Now typeless.
10047         (relunit, relunit_snumber): Now of type rel.
10048         (zone, rel, relunit, get_date): Adjust to above changes.
10049
10050         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
10051         Do not include unistd-safer.h.
10052         (getloadavg): Don't call fd_safer; no longer needed
10053         now that we include fcntl--.h.
10054
10055         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
10056         (make_dir_parents): Treat ENOSYS like EEXIST.
10057
10058         Improve quality of diagnostics on restore_cwd failure.
10059         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
10060         (make_dir_parents): Last arg is now int * (for errno), not bool *.
10061         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
10062         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
10063         each time through the loop.  Do not diagnose restore_cwd failure;
10064         that is the caller's job (and perhaps the caller does not care).
10065
10066         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
10067         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
10068         If the file already exists but is not a directory, don't bother
10069         to try to make its parents.
10070         Close potential file descriptor leak if we can't chdir("/") (!).
10071         Don't always return true if chdir($PWD) fails; return true only
10072         if the requested action was done successfully (except for the
10073         chdir($PWD)).
10074         Don't log final directory unless we actually made it.
10075         Refactor to avoid duplicate code to fix up permissions.
10076         Don't attempt to fix up parent permissions if chdir($PWD) fails.
10077
10078         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
10079         to make it a bit faster and (I hope) clearer.
10080         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
10081         Fix bug in formats like %2N.
10082
10083         * lib/verify.h: New file.
10084
10085 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10086
10087         Sync from coreutils.
10088         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
10089
10090 2005-09-22  Jim Meyering  <jim@meyering.net>
10091
10092         Sync from coreutils.
10093
10094         * m4/lstat.m4 (gl_FUNC_LSTAT):
10095         Use AC_LIBSOURCES to require lstat.c and lstat.h.
10096         Remove obsolete comment.
10097         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
10098         * m4/xstrtod.m4: Likewise.
10099
10100         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
10101
10102 2005-09-22  Jim Meyering  <jim@meyering.net>
10103
10104         Sync from coreutils.
10105
10106         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
10107
10108         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
10109         the .tm_year member, since otherwise gcc-4.0 would now warn about
10110         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
10111
10112         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
10113         order to avoid an unsuppressible warning from gcc on 64-bit systems.
10114
10115         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
10116         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
10117         when run in a time zone for which daylight savings time is in effect
10118         for the starting date.
10119
10120         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
10121         stop us from restricting permissions of just-created absolute-named
10122         directories.
10123         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
10124         to restore initial working directory.
10125         * lib/mkdir-p.c (make_dir_parents): New parameter:
10126         different_working_dir, to tell caller if/when we change the working
10127         directory and are unable to return to the initial one.
10128         * lib/mkdir-p.h (make_dir_parents): Update prototype.
10129         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
10130         `return false'.  This fixes a bug introduced on 2004-07-30.
10131
10132         * lib/openat.c (fdopendir): Be sure to close the supplied
10133         file descriptor before returning.  This makes our replacement
10134         implementation a little closer to Solaris's, where fdopendir
10135         ties the file descriptor to the returned DIR* pointer.
10136         * lib/openat.c (unlinkat): New function.
10137         * lib/openat.h (unlinkat): Add prototype.
10138         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
10139         (openat_restore_fail): Rename from openat_restore_die.
10140         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
10141
10142         Provide an alternative to exiting immediately upon save_cwd or
10143         restore_cwd failure.  Now, an application can arrange e.g.,
10144         to perform a longjump in that case.
10145         * lib/openat.c: Include dirname.h.
10146         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
10147         (rpl_openat, fdopendir, fstatat): Call openat_save_die
10148         and openat_restore_die rather than calling error directly.
10149         Don't include "error.h" or "exitfail.h"; they're no longer needed.
10150
10151         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
10152         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
10153         define.
10154
10155         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
10156         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
10157                             int utc, int nanoseconds);
10158         Background:
10159         date should not have to allocate a megabyte of virtual memory to
10160         handle a format argument like +%1048575T.  When implemented with
10161         strftime, it must allocate such a buffer, use strftime to fill it
10162         in, print it, then free it.
10163         With fprintftime, it simply prints everything and exits.
10164         With no need for memory allocation, that's one fewer way to fail.
10165         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
10166         optional field width, not before, so we accept %9:z, not %:9z.
10167         (my_strftime): Be sure to use L_('x') for literals.
10168
10169         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
10170         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
10171         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
10172         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
10173         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
10174         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
10175         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
10176         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
10177         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
10178         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
10179         * lib/xgethostname.c, lib/xreadlink.c:
10180         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
10181
10182         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
10183         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
10184         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
10185         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10186         and don't include <sys/file.h>).
10187
10188 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
10189
10190         Sync from coreutils.
10191
10192         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
10193         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
10194         [!LDAV_DONE]: Avoid unused variable warning.
10195
10196 2005-09-21  Bruno Haible  <bruno@clisp.org>
10197
10198         * lib/unicodeio.h (unicode_to_mb): New declaration.
10199
10200 2005-09-20  Derek Price  <derek@ximbiot.com>
10201
10202         * lib/getaddrinfo.c: Don't include <netdb.h> included from
10203         getaddrinfo.h.
10204
10205 2005-09-20  Bruno Haible  <bruno@clisp.org>
10206
10207         * gnulib-tool: Remove trailing slashes from the values specified for
10208         --source-base, --m4-base, --tests-base, --aux-dir.
10209         Suggested by Simon Josefsson <jas@extundo.com>.
10210
10211 2005-09-20  Bruno Haible  <bruno@clisp.org>
10212
10213         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
10214         func_modules_to_filelist, func_import, func_create_testdir): Make all
10215         sorting results locale-independent, so that gnulib-cache.m4 doesn't
10216         change when gnulib-tool is invoked in a different locale.
10217
10218 2005-09-19  Simon Josefsson  <jas@extundo.com>
10219
10220         * m4/socklen.m4: Fix typo.
10221
10222 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10223
10224         Use a consistent style for including <config.h>.
10225         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
10226         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
10227         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
10228         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
10229         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
10230         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
10231         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
10232         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
10233         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
10234         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
10235         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
10236         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
10237         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
10238         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
10239         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
10240         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
10241         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
10242         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
10243         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
10244         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
10245         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
10246         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
10247         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
10248         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
10249         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
10250         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
10251         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
10252         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
10253         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
10254         lib/xstrtoumax.c, lib/yesno.c:
10255         Standardize inclusion of config.h.
10256         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
10257         lib/inttostr.h:  Removed inclusion of config.h from header files.
10258         * lib/inttostr.c:  Adjusted in-tree users.
10259         * lib/timespec.h: Remove superfluous warning to include config.h.
10260         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
10261         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
10262         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
10263         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
10264         config.h with HAVE_CONFIG_H.
10265
10266 2005-09-19  Jim Meyering  <jim@meyering.net>
10267
10268         * modules/pathmax (License): Change to LGPL.
10269
10270 2005-09-19  Derek Price  <derek@ximbiot.com>
10271
10272         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
10273
10274 2005-09-19  Bruno Haible  <bruno@clisp.org>
10275
10276         * gnulib-tool (import): Provide default for --tests-base.
10277
10278 2005-09-19  Bruno Haible  <bruno@clisp.org>
10279
10280         * doc/quote.texi: New file, extracted from gnulib.texi.
10281         * doc/ctime.texi: New file, extracted from gnulib.texi.
10282         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
10283         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
10284         * doc/gnulib.texi: Include them.
10285
10286 2005-09-18  Bruno Haible  <bruno@clisp.org>
10287
10288         Portability fix.
10289         * gnulib-tool (func_readlink): New function.
10290         (func_ln_if_changed): Use it.
10291
10292 2005-09-18  Bruno Haible  <bruno@clisp.org>
10293
10294         * gnulib-tool: Support --with-tests also with --import.
10295         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
10296         (func_import): Use variables $testsbase and $inctests. Emit a
10297         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
10298         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
10299         SUBDIRS += $testsdir.
10300         (func_create_testdir): Update.
10301
10302 2005-09-18  Bruno Haible  <bruno@clisp.org>
10303
10304         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
10305         instead of $dry_run.
10306         (func_cp_if_changed, func_mv_if_changed): Remove functions.
10307         (func_ln_if_changed): Don't handle dry-run here.
10308         (func_import): In dry-run mode, detect more precisely which actions
10309         would be performed, and don't use "...ing" verbs.
10310
10311 2005-09-18  Bruno Haible  <bruno@clisp.org>
10312
10313         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
10314         (func_import): Use join on two temporary files instead of three nested
10315         loops, in order to determine which files are new or old.
10316
10317 2005-09-18  Bruno Haible  <bruno@clisp.org>
10318
10319         * gnulib-tool (func_import): Comment out code that spits out the
10320         new files with --dry-run.
10321
10322 2005-09-18  Bruno Haible  <bruno@clisp.org>
10323
10324         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
10325
10326 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10327
10328         * lib/stat-time.h: New file.
10329         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
10330         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
10331         in a different way.
10332         (timespec_cmp): New function.
10333         * lib/utimecmp.c: Include stat-time.h.
10334         (SYSCALL_RESOLUTION): Depend on whether various struct stat
10335         members exist, not on the obsolescent ST_MTIM_NSEC.
10336         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
10337
10338 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10339
10340         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
10341
10342 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10343
10344         * MODULES.html.sh (File system functions): Add stat-time.
10345         * modules/stat-time: New file.
10346         * modules/timespec (Files): Remove m4/st_mtim.m4; this
10347         is now done in a different way, by the stat-time module.
10348         * modules/utimecmp (Depends-on): Add stat-time.
10349
10350 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10351
10352         * m4/st_mtim.m4: Remove.  Superseded by...
10353         * m4/stat-time.m4: New file.
10354         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
10355         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
10356
10357 2005-09-15  Derek Price  <derek@ximbiot.com>
10358
10359         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
10360
10361 2005-09-15  Derek Price  <derek@ximbiot.com>
10362
10363         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
10364         * lib/regex_internal.c: Ditto, using this...
10365         (__GNUC_PREREQ): ...new macro.
10366         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
10367         using...
10368         (__GNUC_PREREQ): ...this new macro.
10369
10370         * lib/strstr.h: Include string.h. Define strstr as a macro here.
10371
10372 2005-09-15  Derek Price  <derek@ximbiot.com>
10373             Paul Eggert  <eggert@cs.ucla.edu>
10374
10375         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
10376         changes, consolidating in...
10377         * lib/regex_internal.h: ...this file.
10378
10379 2005-09-13  Jim Meyering  <jim@meyering.net>
10380
10381         * lib/canon-host.c: Filter through gnu indent and reword comments
10382         slightly.
10383         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
10384
10385 2005-09-13  Derek Price  <derek@ximbiot.com>
10386
10387         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
10388         failure.
10389         Reported by Jim Meyering  <jim@meyering.net>.
10390
10391 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10392
10393         * lib/base64.c: Typo.
10394         (base64_encode): Put b64str in initialized data section.
10395
10396 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
10397
10398         Merge glibc and coreutils changes into gnulib, plus a few
10399         extra fixes.
10400         * lib/md5.c: Use #error rather than a string.
10401         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
10402         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
10403         (__attribute__): Define to empty for non recent-GCC.
10404         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
10405         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
10406         Renamed from their non-__ counterparts, with new macros replacing
10407         them if not _LIBC.  Add __THROW attribute.
10408         (rol): Remove.
10409         (struct md5_ctx): Align buffer if using GCC.
10410         * lib/sha1.h (struct sha1_ctx): Likewise.
10411         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
10412         The old name was backwards.
10413         (NOTSWAP): Remove; not used.
10414         (rol): New macro, moved here from md5.h.
10415         (sha1_process_block): Remove a FIXME that doesn't make sense.
10416
10417 2005-09-12  Derek Price  <derek@ximbiot.com>
10418
10419         Return usable errors from canon-host.
10420         * lib/canon-host.h: New file.
10421         * lib/canon-host.c (canon_host): Wrap...
10422         (canon_host_r): ...this new function, which now relies exclusively on
10423         getaddrinfo.
10424         (ch_strerror): New function.
10425         (last_cherror): New global.
10426         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
10427         interface.
10428         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
10429         void *.
10430         (freeaddrinfo): Free ai->ai_canonname when set.
10431
10432 2005-09-12  Derek Price  <derek@ximbiot.com>
10433
10434         Make canon-host require getaddrinfo.
10435         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
10436         AC_LIBSOURCE canon-host.h.  Call...
10437         (gl_PREREQ_CANON_HOST): ...this new function, which requires
10438         gl_GETADDRINFO.
10439         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
10440
10441 2005-09-12  Derek Price  <derek@ximbiot.com>
10442
10443         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
10444         LGPL.
10445         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
10446
10447 2005-09-12  Derek Price  <derek@ximbiot.com>
10448
10449         * lib/gai_strerror.c: Include config.h when available.  Include
10450         getaddrinfo.h before other headers to test interface.
10451         Reported by Larry Jones <lawrence.jones@ugs.com>.
10452
10453 2005-09-12  Derek Price  <derek@ximbiot.com>
10454             Paul Eggert  <eggert@cs.ucla.edu>
10455
10456         * modules/glob (Files): Add glob-libc.h.
10457
10458 2005-09-12  Derek Price  <derek@ximbiot.com>
10459             Paul Eggert  <eggert@cs.ucla.edu>
10460
10461         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
10462         glob_.h, glob-libc.h.
10463         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
10464
10465 2005-09-12  Derek Price  <derek@ximbiot.com>
10466             Paul Eggert  <eggert@cs.ucla.edu>
10467
10468         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
10469         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
10470         protecting things that should be done only in gnulib contexts.
10471         * lib/glob_.h: New file, containing only the glob things needed for
10472         gnulib.
10473         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
10474         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
10475         (glob, globfree, glob_pattern_p): Now defined simply in terms of
10476         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
10477         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
10478         and to respect the namespace rules better.
10479
10480 2005-09-08  Simon Josefsson  <jas@extundo.com>
10481
10482         * modules/socklen: New file.
10483
10484 2005-09-08  Simon Josefsson  <jas@extundo.com>
10485
10486         * m4/socklen.m4: New file.
10487
10488 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10489
10490         * modules/utimens (Files): Add m4/utimbuf.m4, since
10491         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
10492         Reported by Sergey Poznyakoff.
10493
10494 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10495
10496         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
10497         definitions, since that's the preferred style in glibc.
10498         Fix a minor spacing issue, and update copyright notice to match
10499         glibc's.
10500
10501 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10502
10503         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
10504
10505 2005-09-06  Simon Josefsson  <jas@extundo.com>
10506
10507         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
10508         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
10509
10510 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10511
10512         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
10513         warning.
10514
10515 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10516
10517         * config/srclist.txt: Add glibc bug 1302.
10518
10519 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
10520
10521         Change bitset word type from unsigned int to unsigned long int,
10522         as this has better performance on typical 64-bit hosts.
10523         Port bitset code to hosts with unusual word sizes.
10524         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
10525         (build_collating_symbol):
10526         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
10527         argument is a bitset.  This is merely a style issue, but it makes
10528         it clearer that an entire array is expected.
10529         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
10530         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
10531         Port to the case where bitset_word is not the same as unsigned int.
10532         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
10533         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
10534         Likewise.
10535         * lib/regexec.c (check_dst_limits_calc_pos_1,
10536         check_subexp_matching_top):
10537         (build_trtable, group_nodes_into_DFAstates):
10538         Likewise.
10539         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
10540         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
10541         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
10542         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
10543         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
10544         * lib/regcomp.c (optimize_subexps, lower_subexp):
10545         Work even if bitset_word has holes in its bitwise representation.
10546         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
10547         * lib/regexec.c (check_dst_limits_calc_pos_1,
10548         check_subexp_matching_top):
10549         Likewise.
10550         * lib/regex_internal.c (re_string_reconstruct):
10551         Don't assume UCHAR_MAX == 255.
10552         * lib/regex_internal.h (bitset_set_all): Likewise.
10553         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
10554         All uses changed.
10555         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
10556         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
10557         All uses changed.
10558         (BITSET_WORD_MAX): New macro.
10559         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
10560         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
10561         (bitset_empty, bitset_copy):
10562         Prefer sizeof (bitset) to multiplying it out ourselves.
10563         (bitset_not_merge): Remove; unused.
10564         (bitset_contain): Return bool, not unsigned int with one bit on.
10565         All callers changed.
10566         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
10567         alignment than re_node_set; do this by defining a new internal
10568         type struct dests_alloc and using it to allocate memory.
10569
10570 2005-09-05  Bruno Haible  <bruno@clisp.org>
10571
10572         * gnulib-tool (func_import): Fix comparison in handling of symbolic
10573         links.
10574
10575 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
10576
10577         * modules/size_max (Makefile.am): Add size_max.h
10578
10579 2005-09-04  Derek Price  <derek@ximbiot.com>
10580
10581         * gnulib-tool (func_import): Fix reversed $symbolic logic.
10582
10583 2005-09-03  Simon Josefsson  <jas@extundo.com>
10584
10585         * gnulib-tool: Fix typo.
10586
10587 2005-09-03  Simon Josefsson  <jas@extundo.com>
10588
10589         * config/srclist.txt: Add glibc bug 1293.
10590
10591 2005-09-03  Derek Price  <derek@ximbiot.com>
10592
10593         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
10594         From Larry Jones <lawrence.jones@ugs.com>.
10595
10596 2005-09-02  Simon Josefsson  <jas@extundo.com>
10597
10598         * modules/socklen: New file.
10599
10600 2005-09-02  Simon Josefsson  <jas@extundo.com>
10601
10602         * modules/havelib: New module.
10603
10604         * modules/gettext, modules/iconv, modules/lock, modules/readline:
10605         Use havelib.
10606
10607 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10608
10609         Check for arithmetic overflow when calculating sizes, to prevent
10610         some buffer-overflow issues.  These patches are conservative, in the
10611         sense that when I couldn't determine whether an overflow was possible,
10612         I inserted a run-time check.
10613         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
10614         macros.
10615         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
10616         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
10617         (re_xnrealloc, re_x2nrealloc): New inline functions.
10618         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
10619         parse_bracket_exp):
10620         (build_equiv_class, build_charclass): Check for arithmetic overflow
10621         in size expression calculations.
10622         * lib/regex_internal.c (re_string_realloc_buffers):
10623         (build_wcs_upper_buffer, re_node_set_add_intersect):
10624         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
10625         (re_dfa_add_node, register_state): Likewise.
10626         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
10627         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
10628         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
10629         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
10630
10631 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10632
10633         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
10634         m4/ulonglong.m4.  Problem reported by Martin Lambers.
10635
10636 2005-09-02  Bruno Haible  <bruno@clisp.org>
10637
10638         Support for lib vs. lib64 distinction on biarch platforms.
10639         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
10640         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
10641         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
10642
10643 2005-09-02  Bruno Haible  <bruno@clisp.org>
10644
10645         * gnulib-tool (import): In the other first-use case, provide defaults
10646         as well.
10647
10648 2005-09-02  Bruno Haible  <bruno@clisp.org>
10649
10650         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
10651         patches not yet found in the latest gettext release.
10652
10653 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10654
10655         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
10656         to avoid a collision with bits/local_lim.h in glibc.
10657         All uses changed.  Problem reported by Dmitry V. Levin in
10658         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
10659
10660         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
10661         bugs in int versus size_t comparisons.
10662         (re_string_context_at): Fix bug where the code assumed that
10663         Idx is signed.
10664
10665         Use bool where appropriate.
10666         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
10667         All callers changed.
10668         (calc_eclosure_iter): Likewise, for ROOT arg.
10669         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
10670         (build_charclass_op): Likewise, for NON_MATCH arg.
10671         * lib/regex_internal.c (re_string_allocate, re_string_construct):
10672         (re_string_construct_common): Likewise, for ICASE arg.
10673         * lib/regexec.c (re_search_2_stub, re_search_stub):
10674         Likewise, for RET_LEN arg.
10675         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
10676         (set_regs): Likewise, for FL_BACKTRACK arg.
10677         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
10678         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
10679         (calc_eclosure_iter, parse_bracket_exp):
10680         Use bool for internal variables that are booleans.
10681         * lib/regexec.c (re_search_internal, check_matching,
10682         proceed_next_node):
10683         (set_regs, build_sifted_states, sift_states_bkref):
10684         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
10685         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
10686         (find_collation_sequence_value):
10687         Likewise.
10688         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
10689         (re_node_set_compare):
10690         Return bool, not int. All callers changed.
10691         * lib/regexec.c (check_halt_node_context, check_dst_limits):
10692         (build_trtable, check_node_accept): Likewise.
10693         * lib/regex_internal.h: Include stdbool.h.
10694
10695         Fix bugs uncovered when converting to bool.
10696         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
10697         failure instead of charging ahead blindly.
10698         * lib/regex_internal.c (register_state): Likewise.
10699         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
10700         for freeing internal storage.
10701         (group_nodes_into_DFA_states): Use unsigned int, not int, for
10702         bitset pieces used as boolean, to avoid undefined behavior
10703         on hosts that do int overflow checking.
10704
10705 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10706
10707         * config/srclist.txt: Add glibc bugs 1285-1287.
10708
10709 2005-09-01  Jim Meyering  <jim@meyering.net>
10710
10711         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
10712         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
10713         Require gl_STAT_MACROS, too.
10714
10715 2005-09-01  Bruno Haible  <bruno@clisp.org>
10716
10717         * gnulib-tool (import): In the first-use case, provide defaults.
10718
10719 2005-09-01  Bruno Haible  <bruno@clisp.org>
10720
10721         * gnulib-tool (func_import): Remove the .tmp files.
10722
10723 2005-09-01  Bruno Haible  <bruno@clisp.org>
10724
10725         * gnulib-tool (func_import): Fix handling of symbolic links.
10726
10727 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10728
10729         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
10730         old glibc regex code mishandles strings longer than 2**31 bytes.
10731         This patch fixes this when the regex code is used in gnulib
10732         (i.e., outside glibc).
10733
10734         This patch should not affect the use of the regex code inside
10735         glibc.  No doubt this problem also needs to be handled for glibc
10736         as well, but the result will be an incompatible change to the
10737         glibc ABI, and the old ABI will have to be supported too.  That
10738         can be the the subject for another patch.
10739
10740         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
10741         governing whether the rest of this patch is active.  By default,
10742         the macro is disabled and the patch has no effect.
10743         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
10744         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
10745         (struct re_pattern_buffer, re_search, re_search_2, re_match):
10746         (re_match_2, re_set_registers): Use the new types.
10747         * lib/regex_internal.h (Idx, re_hashval_t): New types.
10748         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
10749         New macros.
10750         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
10751         (re_string_context_at, bin_tree_t, re_dfastate_t):
10752         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
10753         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
10754         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
10755         (re_string_char_size_at, re_string_wchar_at):
10756         (re_string_elem_size_at):
10757         Use the new types and macros to port to 64-bit hosts.
10758         Use unsigned types for internal values, so that the code
10759         mostly works even for arrays larger than SSIZE_MAX.
10760         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
10761         (search_duplicated_node, calc_eclosure_iter, fetch_number):
10762         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
10763         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
10764         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
10765         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
10766         (calc_inveclosure, parse_dup_op, build_range_exp):
10767         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
10768         (fetch_number, create_token_tree, mark_opt_subexp):
10769         Likewise.
10770         * lib/regex_internal.c (re_string_construct_common,
10771         create_ci_newstate):
10772         (create_cd_newstate, re_string_allocate, re_string_construct):
10773         (re_string_realloc_buffers, build_wcs_upper_buffer):
10774         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
10775         (re_string_reconstruct, re_string_peek_byte_case):
10776         (re_string_fetch_byte_case, re_string_context_at):
10777         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
10778         (re_node_set_init_copy, re_node_set_add_intersect):
10779         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10780         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10781         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
10782         (re_acquire_state, re_acquire_state_context, register_state):
10783         Likewise.
10784         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
10785         search_cur_bkref_entry):
10786         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
10787         (re_search_internal, re_search_2_stub, re_search_stub)
10788         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
10789         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
10790         (update_cur_sifted_state, check_dst_limits):
10791         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
10792         (check_subexp_limits, sift_states_bkref, merge_state_array):
10793         (check_subexp_matching_top, get_subexp, get_subexp_sub):
10794         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
10795         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
10796         (expand_bkref_cache, check_node_accept_bytes):
10797         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
10798         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
10799         (acquire_init_state_context, check_halt_node_context):
10800         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
10801         (sift_states_backward, clean_state_log_if_needed):
10802         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
10803         (find_recover_state, transit_state_sb, transit_state_mb):
10804         (transit_state_bkref, build_trtable, match_ctx_clean):
10805         Likewise.
10806         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
10807         to work around an assumption that REG_MISSING is negative.
10808
10809         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
10810         (seek_collating_symbol_entry) [defined _LIBC]:
10811         (lookup_collation_sequence_value) [defined _LIBC]:
10812         (build_range_exp, build_collating_symbol) [defined _LIBC]:
10813         Use prototypes rather than old-style function definitions.
10814         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
10815         (transit_state_sb) [0]:
10816         (find_collation_sequence_value) [defined _LIBC]: Likewise.
10817
10818         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
10819         rm_eo.
10820
10821         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
10822         (optimize_subexps, lower_subexp):
10823         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
10824         since the signed shift might overflow.  Use 1u<<31 instead.
10825         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
10826         Likewise.
10827         * lib/regexec.c (check_dst_limits_calc_pos_1,
10828         check_subexp_matching_top): Likewise.
10829
10830         * lib/regcomp.c (optimize_subexps, lower_subexp):
10831         Use CHAR_BIT rather than 8, for clarity.
10832         * lib/regexec.c (check_dst_limits_calc_pos_1):
10833         (check_subexp_matching_top): Likewise.
10834         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
10835         have to worry about portability issues when shifting it left.
10836         Remove no-longer-needed test for table_size > 0.
10837         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
10838         in a word, as the resulting behavior is undefined.
10839         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
10840         in one case, a <= should have been an <, and in another case the
10841         whole test was missing.
10842         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
10843         the standard name CHAR_BIT.
10844         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
10845         this is not true on one's complement and signed-magnitude hosts.
10846
10847         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
10848         next_last_offset.
10849         (struct re_dfa_t): Remove unused member states_alloc.
10850         * lib/regcomp.c (init_dfa): Don't initialize unused members.
10851
10852 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10853
10854         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
10855         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
10856         and large-file glibc and in 32-bit large-file Solaris.
10857
10858 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10859
10860         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
10861         lengths fit in regoff_t; this isn't true if regoff_t is the same
10862         width as size_t.
10863         * lib/regex.c (re_search_internal): 5th arg is LAST_START
10864         (= START + RANGE) instead of RANGE.  This avoids overflow
10865         problems when regoff_t is the same width as size_t.
10866         All callers changed.
10867         (re_search_2_stub): Check for overflow when adding the
10868         sizes of the two strings.
10869         (re_search_stub): Check for overflow when adding START
10870         to RANGE; if it occurs, substitute the extreme value.
10871
10872 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10873
10874         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
10875
10876 2005-08-31  Jim Meyering  <jim@meyering.net>
10877
10878         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
10879         a pointer-to-const.
10880         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
10881         (register_state): Likewise.
10882         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
10883         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
10884         (group_nodes_into_DFAstates): Likewise.
10885
10886 2005-08-31  Jim Meyering  <jim@meyering.net>
10887
10888         * check-module: Add a FIXME comment.
10889
10890 2005-08-31  Eric Blake  <ebb9@byu.net>
10891
10892         * modules/unistd-safer (Files): Add unistd--.h.
10893         * modules/stdio-safer (Files): Add stdio--.h.
10894
10895 2005-08-31  Derek Price  <derek@ximbiot.com>
10896
10897         * lib/getdelim.c (getdelim): Return EOF on EOF.
10898         Reported by Larry Jones <lawrence.jones@ugs.com>.
10899
10900 2005-08-31  Bruno Haible  <bruno@clisp.org>
10901
10902         Avoid unnecessary diffs in the generated lib/Makefile.am.
10903         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
10904         the generated files.
10905         (func_import): Don't set cmd.
10906
10907 2005-08-31  Bruno Haible  <bruno@clisp.org>
10908
10909         * lib/strstr.c: Include <stddef.h>, for NULL.
10910         * lib/strcasestr.c: Likewise.
10911         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
10912
10913 2005-08-31  Bruno Haible  <bruno@clisp.org>
10914
10915         * gnulib-tool: New option --macro-prefix.
10916         (func_import): Use macro_prefix.
10917         (import): Handle option --macro-prefix.
10918
10919 2005-08-31  Bruno Haible  <bruno@clisp.org>
10920
10921         * gnulib-tool (import): Rename most ac_* variables to cached_*.
10922         Also use new variables cached_lgpl, cached_libtool.
10923
10924 2005-08-31  Bruno Haible  <bruno@clisp.org>
10925
10926         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
10927         always instantiating them.
10928
10929 2005-08-31  Bruno Haible  <bruno@clisp.org>
10930
10931         * gnulib-tool (func_import): Read the previous cached settings
10932         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
10933         earlier added by gnulib but are now dropped. Warn when a gnulib file
10934         overwrites a non-gnulib file.
10935
10936 2005-08-31  Bruno Haible  <bruno@clisp.org>
10937
10938         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
10939         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
10940         projects that don't keep autogenerated files in CVS. Put into
10941         actioncmd only the specified modules, not the transitive closure.
10942
10943 2005-08-31  Bruno Haible  <bruno@clisp.org>
10944
10945         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
10946         Create directories that shall be filled.
10947         (import): Don't look for gl_* macros in configure.ac. Recurse across
10948         all directories containing a gnulib-cache.m4 files, if meaningful.
10949
10950 2005-08-31  Bruno Haible  <bruno@clisp.org>
10951
10952         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
10953         (import): Set seen_libtool when we see gl_LIBTOOL.
10954
10955 2005-08-31  Bruno Haible  <bruno@clisp.org>
10956
10957         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
10958         declaration macro definitions from generated gnulib.m4.
10959
10960 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
10961
10962         * lib/iconvme.h: Add prototype for iconv_alloc.
10963
10964 2005-08-29  Simon Josefsson  <jas@extundo.com>
10965
10966         * lib/iconvme.c: Fix errno.
10967
10968 2005-08-29  Bruno Haible  <bruno@clisp.org>
10969
10970         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
10971         that it works when the directory contains spaces.
10972
10973 2005-08-29  Bruno Haible  <bruno@clisp.org>
10974
10975         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
10976
10977 2005-08-29  Bruno Haible  <bruno@clisp.org>
10978
10979         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
10980         Emit more advice.
10981
10982 2005-08-29  Bruno Haible  <bruno@clisp.org>
10983         and Stepan Kasal  <kasal@ucw.cz>
10984
10985         * check-module: If more parameters are given, check each of them
10986         separately; add more exceptions, as noted by Jim Meyering.
10987         (check_module): New procedure.
10988         (%exempt_header): Now contains all exceptions.
10989
10990 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
10991
10992         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
10993
10994 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
10995
10996         * lib/iconvme.c: Split iconv_string into iconv_alloc.
10997
10998 2005-08-28  Bruno Haible  <bruno@clisp.org>
10999
11000         * m4/gnulib-tool.m4: New file.
11001
11002 2005-08-27  Jim Meyering  <jim@meyering.net>
11003
11004         * modules/unistd-safer (Files): Add pipe-safer.c.
11005         * modules/fcntl-safer (Files): Add creat-safer.c.
11006
11007 2005-08-27  Jim Meyering  <jim@meyering.net>
11008
11009         * m4/stdlib-safer.m4: New file.  From coreutils.
11010         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
11011         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
11012         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
11013         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
11014         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
11015
11016 2005-08-27  Jim Meyering  <jim@meyering.net>
11017
11018         * lib/fopen-safer.c: Merge minor changes from coreutils.
11019         * lib/dup-safer.c: Likewise.
11020         * lib/fd-safer.c: Likewise.
11021
11022         Merge from coreutils.
11023         * lib/stdio--.h: New file.
11024         * lib/stdlib--.h: New file.
11025         * lib/mkstemp-safer.c: New file.
11026
11027         GNU tar needs these.
11028         * lib/pipe-safer.c: New file.
11029         * lib/creat-safer.c: New file.
11030         * lib/fcntl--.h (creat): Define to creat_safer.
11031         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
11032         * lib/unistd--.h (pipe): Define to pipe_safer.
11033         * lib/unistd-safer.h: Declare pipe_safer.
11034
11035 2005-08-26  Simon Josefsson  <jas@extundo.com>
11036
11037         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
11038         Haible <bruno@clisp.org>.
11039
11040 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
11041
11042         * lib/regex_internal.h: Remove all references to
11043         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
11044         or better.
11045         (bitset_not, bitset_merge, bitset_not_merge):
11046         (bitset_mask, re_string_allocate, re_string_construct):
11047         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
11048         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
11049         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
11050         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
11051         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11052         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11053         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
11054         (re_acquire_state_context):
11055         Remove unnecessary forward decls.
11056         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
11057         Put __attribute at function definition,
11058         now that the function decl has been removed.
11059         * lib/regex_internal.c (re_string_peek_byte_case):
11060         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
11061         Likewise.
11062
11063 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
11064
11065         * m4/regex.m4: Add AC_PREREQ(2.50).
11066         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
11067
11068 2005-08-25  Simon Josefsson  <jas@extundo.com>
11069
11070         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
11071         __fsetlocking.
11072
11073 2005-08-25  Simon Josefsson  <jas@extundo.com>
11074
11075         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
11076         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
11077         GLIBC specific code.
11078
11079 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11080
11081         Make regex safe for g++.  This fixes one real bug (an "err"
11082         that should have been "*err").  g++ problem reported by
11083         Sam Steingold.
11084         * lib/regex_internal.h (re_calloc): New macro, consistent with
11085         re_malloc etc.  All callers of calloc changed to use re_calloc.
11086         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
11087         not int.  All callers changed.
11088         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
11089         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
11090         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
11091         (find_recover_state): Change "err" to "*err"; this fixes what
11092         appears to be a real bug.
11093         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
11094         versus int.
11095
11096 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11097
11098         * modules/regex (Depends-on): Add malloc, since the code
11099         assumes that !malloc(0) means failure.
11100
11101 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11102
11103         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
11104
11105         alloca modernization/simplification for regex.
11106         * lib/regex.c: Remove portability cruft for alloca.  This no longer
11107         needs to be at the start of the file, and can be moved into
11108         regex_internal.h and simplified.
11109         * lib/regex_internal.h: Include <alloca.h>.
11110         (__libc_use_alloca) [!defined _LIBC]: New macro.
11111         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
11112         now works outside glibc.
11113
11114 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11115
11116         * config/srclist.txt: Add glibc bugs 1241, 1245.
11117
11118 2005-08-25  Jim Meyering  <jim@meyering.net>
11119
11120         * lib/open-safer.c: Include <config.h>.
11121         Otherwise, we'd lose LARGEFILE support in any file using
11122         e.g. "fcntl--.h"
11123
11124 2005-08-25  Bruno Haible  <bruno@clisp.org>
11125
11126         * m4/minmax.m4: Require autoconf 2.52.
11127         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
11128         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
11129         alternatives of translit over the alphabet.
11130         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
11131
11132 2005-08-24  Simon Josefsson  <jas@extundo.com>
11133
11134         * tests/test-getpass.c: New file.
11135
11136 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11137
11138         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
11139         for GNU regex features.
11140
11141 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11142
11143         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
11144         * lib/regex.h (regerror): Likewise.
11145
11146         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
11147         requires this.  (The code never needed it.)
11148
11149         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
11150         All uses of recently-renamed identifiers changed to use the new,
11151         POSIX-compliant names.  The code will build and run just fine
11152         without these changes, but it's better to eat our own dog food
11153         and use the standard-conforming names.
11154
11155         * lib/regex.h: Fix a multitude of POSIX name space violations.
11156         These changes have an effect only for programs that define
11157         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
11158         do not change anything for programs compiled in the normal way.
11159         Also, there is no effect on the ABI.
11160
11161         (_REGEX_SOURCE): New macro.
11162         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
11163         defined and _GNU_SOURCE is not; this fixes a name space violation.
11164
11165         Rename the following macros to obey POSIX requirements.
11166         The old names are still visible as macros if _REGEX_SOURCE is defined.
11167         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
11168         RE_BACKSLASH_ESCAPE_IN_LISTS.
11169         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
11170         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
11171         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
11172         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
11173         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
11174         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
11175         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
11176         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
11177         (REG_INTERVALS): renamed from RE_INTERVALS.
11178         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
11179         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
11180         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
11181         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
11182         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
11183         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
11184         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
11185         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
11186         RE_UNMATCHED_RIGHT_PAREN_ORD.
11187         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
11188         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
11189         (REG_DEBUG): renamed from RE_DEBUG.
11190         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
11191         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
11192         unusual, since we can't clash with the POSIX REG_ICASE.
11193         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
11194         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
11195         (REG_NO_SUB): renamed from RE_NO_SUB.
11196         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
11197         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
11198         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
11199         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
11200         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
11201         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
11202         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
11203         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
11204         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
11205         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
11206         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
11207         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
11208         RE_SYNTAX_POSIX_MINIMAL_BASIC.
11209         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
11210         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
11211         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
11212         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
11213         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
11214         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
11215         (REG_FIXED): Renamed from REGS_FIXED.
11216         (REG_NREGS): Renamed from RE_NREGS.
11217
11218         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
11219         of other REG_* macros, since POSIX says the user is allowed to
11220         #undef these macros selectively.
11221
11222         (reg_errcode_t): Update comment stating what other tables need
11223         to be consistent.
11224
11225         Rename the following enum values to obey POSIX requirements.
11226         The old names are still visible as macros.
11227         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
11228         is not defined, since GNU is supposed to be a superset of POSIX as
11229         much as possible, and since we want reg_errcode_t to be a signed
11230         type for implementation consistency.
11231         (_REG_NOERROR): Renamed from REG_NOERROR.
11232         (_REG_NOMATCH): Renamed from REG_NOMATCH.
11233         (_REG_BADPAT): Renamed from REG_BADPAT.
11234         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
11235         (_REG_ECTYPE): Renamed from REG_ECTYPE.
11236         (_REG_EESCAPE): Renamed from REG_EESCAPE.
11237         (_REG_ESUBREG): Renamed from REG_ESUBREG.
11238         (_REG_EBRACK): Renamed from REG_EBRACK.
11239         (_REG_EPAREN): Renamed from REG_EPAREN.
11240         (_REG_EBRACE): Renamed from REG_EBRACE.
11241         (_REG_BADBR): Renamed from REG_BADBR.
11242         (_REG_ERANGE): Renamed from REG_ERANGE.
11243         (_REG_ESPACE): Renamed from REG_ESPACE.
11244         (_REG_BADRPT): Renamed from REG_BADRPT.
11245         (_REG_EEND): Renamed from REG_EEND.
11246         (_REG_ESIZE): Renamed from REG_ESIZE.
11247         (_REG_ERPAREN): Renamed from REG_ERPAREN.
11248         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
11249         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
11250         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
11251         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
11252
11253         (_REG_RE_NAME, _REG_RM_NAME): New macros.
11254         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
11255         changed.  But support the old name if the new one is not defined
11256         and if _REGEX_SOURCE.
11257
11258         Change the following member names in struct re_pattern_buffer.
11259         The old names are still supported if !_REGEX_SOURCE.
11260         The new names are always supported, regardless of _REGEX_SOURCE.
11261         (re_buffer): Renamed from buffer.
11262         (re_allocated): Renamed from allocated.
11263         (re_used): Renamed from used.
11264         (re_syntax): Renamed from syntax.
11265         (re_fastmap): Renamed from fastmap.
11266         (re_translate): Renamed from translate.
11267         (re_can_be_null): Renamed from can_be_null.
11268         (re_regs_allocated): Renamed from regs_allocated.
11269         (re_fastmap_accurate): Renamed from fastmap_accurate.
11270         (re_no_sub): Renamed from no_sub.
11271         (re_not_bol): Renamed from not_bol.
11272         (re_not_eol): Renamed from not_eol.
11273         (re_newline_anchor): Renamed from newline_anchor.
11274
11275         Change the following member names in struct re_registers.
11276         The old names are still supported if !_REGEX_SOURCE.
11277         The new names are always supported, regardless of _REGEX_SOURCE.
11278         (rm_num_regs): Renamed from num_regs.
11279         (rm_start): Renamed from start.
11280         (rm_end): Renamed from end.
11281
11282         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
11283         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
11284         Prepend __ to parameter names.
11285
11286         Undo yesterday's changes.
11287
11288 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11289
11290         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
11291         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
11292         lib/regex.c.
11293
11294 2005-08-24  Jim Meyering  <jim@meyering.net>
11295
11296         Sync from coreutils.
11297         * m4/fcntl-safer.m4: New file.
11298
11299         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
11300         and object files for this module.
11301
11302 2005-08-24  Jim Meyering  <jim@meyering.net>
11303
11304         Sync from coreutils.
11305         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
11306
11307 2005-08-24  Jim Meyering  <jim@meyering.net>
11308
11309         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
11310         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
11311
11312 2005-08-24  Jim Meyering  <jim@meyering.net>
11313
11314         * modules/fcntl-safer: New module.
11315         * modules/fts (Depends-on): Add fcntl-safer.
11316         * MODULES.html.sh (File descriptor based Input/Output):
11317         Add fcntl-safer.
11318
11319 2005-08-24  Bruno Haible  <bruno@clisp.org>
11320
11321         Support for unit test modules.
11322         * modules/README: Mention tests modules.
11323         * modules/TEMPLATE-TESTS: New file.
11324         * gnulib-tool: New options --extract-tests-module, --with-tests and
11325         --tests-base (unused for the moment).
11326         (testsbase, inctests): New variables.
11327         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
11328         (func_verify_module): Exclude TEMPLATE-TESTS.
11329         (func_verify_nontests_module, func_verify_tests_module): New functions.
11330         (func_get_dependencies): Add implicit dependency for tests modules.
11331         (func_get_tests_module): New function.
11332         (func_modules_transitive_closure): When --with-tests was specified,
11333         include the unit tests as well, unless explicitly avoided.
11334         (func_emit_lib_Makefile_am): Ignore the tests modules here.
11335         (func_emit_tests_Makefile_am): New function.
11336         (func_create_testdir): When --with-tests was specified, emit a
11337         tests/ directory.
11338         * MODULES.html.sh (Future developments): Update.
11339
11340 2005-08-24  Bruno Haible  <bruno@clisp.org>
11341
11342         * modules/tls-tests: New file.
11343         * tests/test-tls.c: New file, from GNU gettext.
11344
11345 2005-08-24  Bruno Haible  <bruno@clisp.org>
11346
11347         * modules/lock-tests: New file.
11348         * tests/test-lock.c: New file, from GNU gettext.
11349
11350 2005-08-24  Bruno Haible  <bruno@clisp.org>
11351
11352         * lib/lock.h: Add multiple inclusion guard.
11353         * lib/tls.h: Add multiple inclusion guard.
11354
11355 2005-08-24  Bruno Haible  <bruno@clisp.org>
11356
11357         * gnulib-tool: Add support for the --aux-dir option to
11358         --create-testdir, --create-megatestdir, --test, --megatest.
11359         (func_create_testdir, func_create_megatestdir): Optionally emit a
11360         AC_CONFIG_AUX_DIR directive.
11361         (create-testdir, create-megatestdir, test, megatest): Provide a
11362         default value for $auxdir.
11363
11364 2005-08-24  Bruno Haible  <bruno@clisp.org>
11365
11366         * gnulib-tool (import): Use compound statement instead of subshell
11367         where possible.
11368
11369 2005-08-24  Bruno Haible  <bruno@clisp.org>
11370
11371         * gnulib-tool (import): Change --aux-dir default to "build-aux".
11372
11373 2005-08-24  Bruno Haible  <bruno@clisp.org>
11374
11375         * gnulib-tool (func_version): Update.
11376
11377 2005-08-24  Bruno Haible  <bruno@clisp.org>
11378
11379         * gnulib-tool (func_import, func_create_testdir,
11380         func_create_megatestdir): Quote all autoconf macro arguments.
11381
11382 2005-08-24  Bruno Haible  <bruno@clisp.org>
11383
11384         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
11385         option --force, because --force causes the aclocal.m4 of each
11386         subdirectory to be newer than the corresponding config.h.in.
11387
11388 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11389
11390         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
11391         All contents moved to gl_REGEX.
11392         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
11393         assume that it does.
11394
11395 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11396
11397         * lib/regex.h (REG_NOSYS)
11398         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
11399         Define, since POSIX requires it as of 2001.
11400         (_REG_ENOSYS)
11401         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
11402         New private symbol, used to keep the enum signed in all cases.
11403         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
11404         Youngman in
11405         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
11406
11407         * lib/regex_internal.c (re_string_skip_chars, register_state):
11408         (calc_state_hash):
11409         Remove forward decls; no longer needed now that we use prototypes.
11410         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
11411         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
11412         (clean_state_log_if_needed): Likewise.
11413
11414 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11415
11416         * config/srclist.txt: Add glibc bugs 1231-1233.
11417
11418 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11419
11420         Fix problems reported by Sam Steingold in
11421         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
11422         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
11423         assumed that reg_errcode_t is a signed type, which is not
11424         necessarily true if _XOPEN_SOURCE is not defined.
11425         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
11426         since some compilers warn about it otherwise.
11427
11428 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11429
11430         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
11431         (init_word_char, create_initial_state, duplicate_node_closure):
11432         (fetch_token, peek_token_bracket, build_range_exp):
11433         (build_collating_symbol): Remove forward decls; no longer needed
11434         now that we use prototypes.
11435
11436         * lib/regcomp.c:
11437         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
11438         (re_compile_fastmap_iter, regcomp, regerror, regfree):
11439         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
11440         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
11441         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
11442         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
11443         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
11444         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
11445         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
11446         (build_range_exp, build_collating_symbol, parse_bracket_exp):
11447         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
11448         (build_charclass, build_charclass_op, fetch_number, create_tree):
11449         (create_token_tree, mark_opt_subexp, duplicate_tree):
11450         Use prototypes rather than old-style definitions.
11451
11452         * lib/regex_internal.c:
11453         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
11454         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
11455         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11456         (re_string_reconstruct, re_string_peek_byte_case):
11457         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
11458         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11459         (re_node_set_init_copy, re_node_set_add_intersect):
11460         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11461         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11462         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11463         (re_acquire_state, re_acquire_state_context, register_state):
11464         (create_ci_newstate, create_cd_newstate, free_state):
11465         Likewise.
11466         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
11467         re_search_2):
11468         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
11469         (re_search_internal, prune_impossible_nodes):
11470         (acquire_init_state_context, check_matching, static):
11471         (check_halt_node_context, check_halt_state_context, proceed_next_node):
11472         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
11473         (update_regs, sift_states_backward, build_sifted_states):
11474         (clean_state_log_if_needed, merge_state_array):
11475         (update_cur_sifted_state, add_epsilon_src_nodes):
11476         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
11477         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
11478         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
11479         (find_recover_state, check_subexp_matching_top, transit_state_mb):
11480         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
11481         (check_arrival, check_arrival_add_next_nodes):
11482         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11483         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11484         (check_node_accept_bytes, check_node_accept, extend_buffers):
11485         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
11486         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
11487         (sift_ctx_init):
11488         Likewise.
11489
11490         * lib/regex_internal.h:
11491         (re_string_allocate, re_string_construct, re_string_reconstruct):
11492         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
11493         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
11494         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
11495         (re_string_context_at, re_string_peek_byte_case):
11496         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
11497         is defined, since we now use prototypes always.
11498
11499         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
11500         C89 or better.  All uses removed.
11501
11502 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11503
11504         * config/srclist.txt: Add glibc bugs 1220-1227.
11505
11506 2005-08-20  Jim Meyering  <jim@meyering.net>
11507
11508         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
11509         of unused local, dfa.
11510
11511 2005-08-20  Bruno Haible  <bruno@clisp.org>
11512
11513         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
11514
11515 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11516
11517         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
11518         (re_node_set_insert_last, re_dfa_add_node):
11519         Rename local variables to avoid GCC shadowing warnings.
11520
11521 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11522
11523         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
11524         [defined lint]: Suppress bogus uninitialized-variable warnings.
11525
11526         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
11527         and let the caller return REG_ESPACE if out of space.  This
11528         removes an uninitialied-variable warning with GCC 4.0.1, and also
11529         avoids taking the address of a local variable.  All callers
11530         changed.
11531
11532 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11533
11534         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
11535         $LIBCSRC/posix/regexec.c.
11536         Add glibc bug 1217 for regcomp.c.
11537
11538 2005-08-19  Jim Meyering  <jim@meyering.net>
11539
11540         * lib/regexec.c (proceed_next_node): Redo local variables to
11541         avoid GCC shadowing warnings.
11542
11543 2005-08-18  Bruno Haible  <bruno@clisp.org>
11544
11545         * lib/strstr.c (strstr): Fix return value in multibyte case.
11546         * lib/strcasestr.c (strcasestr): Likewise.
11547
11548 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11549
11550         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
11551
11552 2005-08-17  Jim Meyering  <jim@meyering.net>
11553
11554         Make the %s format (seconds since the epoch) work for a negative
11555         number and when used with a zero-padded field width, e.g. %015s.
11556
11557         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
11558         label so that it precedes the code to set `digits'.  Otherwise,
11559         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
11560         print `00-22'.  Now, it prints `-0022', as it should.
11561
11562 2005-08-17  Bruno Haible  <bruno@clisp.org>
11563
11564         * modules/strstr (Files): Add m4/mbrtowc.m4.
11565         (Depends-on): Add mbuiter.
11566
11567 2005-08-17  Bruno Haible  <bruno@clisp.org>
11568
11569         * modules/strcasestr: New file.
11570         * MODULES.html.sh (String handling, based on ANSI C 89): Add
11571         strcasestr.
11572
11573 2005-08-17  Bruno Haible  <bruno@clisp.org>
11574
11575         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
11576
11577 2005-08-17  Bruno Haible  <bruno@clisp.org>
11578
11579         * modules/mbuiter: New file.
11580         * MODULES.html.sh (Extended multibyte and wide character utilities):
11581         Add mbuiter.
11582
11583 2005-08-17  Bruno Haible  <bruno@clisp.org>
11584
11585         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
11586         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
11587
11588 2005-08-17  Bruno Haible  <bruno@clisp.org>
11589
11590         * m4/strcasestr.m4: New file.
11591
11592 2005-08-17  Bruno Haible  <bruno@clisp.org>
11593
11594         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
11595         * lib/strstr.c: Completely rewritten, with multibyte locale support.
11596
11597 2005-08-17  Bruno Haible  <bruno@clisp.org>
11598
11599         * lib/strcasestr.h: New file.
11600         * lib/strcasestr.c: New file.
11601
11602 2005-08-17  Bruno Haible  <bruno@clisp.org>
11603
11604         * lib/strcasecmp.c: Use mbuiter.h.
11605
11606 2005-08-17  Bruno Haible  <bruno@clisp.org>
11607
11608         * lib/mbuiter.h: New file.
11609
11610 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
11611
11612         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
11613         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
11614         and gl_GETOPT are both invoked via different paths (as happens
11615         with GNU tar CVS because it uses both argp and getopt), the former
11616         wins.
11617
11618 2005-08-16  Bruno Haible  <bruno@clisp.org>
11619
11620         * modules/tls: New file.
11621         * MODULES.html.sh (Multithreading): Add tls.
11622
11623 2005-08-16  Bruno Haible  <bruno@clisp.org>
11624
11625         * modules/strnlen1: New file.
11626         * MODULES.html.sh (String handling): Add strnlen1.
11627
11628 2005-08-16  Bruno Haible  <bruno@clisp.org>
11629
11630         * modules/strcase (Files): Add m4/mbrtowc.m4.
11631         (Depends-on): Add strnlen1, mbchar.
11632
11633 2005-08-16  Bruno Haible  <bruno@clisp.org>
11634
11635         * modules/mbiter: New file.
11636         * MODULES.html.sh (Extended multibyte and wide character utilities):
11637         Add mbiter.
11638
11639 2005-08-16  Bruno Haible  <bruno@clisp.org>
11640
11641         * modules/mbfile: New file.
11642         * MODULES.html.sh (Extended multibyte and wide character utilities):
11643         Add mbfile.
11644
11645 2005-08-16  Bruno Haible  <bruno@clisp.org>
11646
11647         * modules/mbchar: New file.
11648         * MODULES.html.sh (Extended multibyte and wide character utilities):
11649         New section.
11650
11651 2005-08-16  Bruno Haible  <bruno@clisp.org>
11652
11653         * m4/tls.m4: New file, from GNU gettext.
11654
11655 2005-08-16  Bruno Haible  <bruno@clisp.org>
11656
11657         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
11658         always.
11659         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
11660
11661 2005-08-16  Bruno Haible  <bruno@clisp.org>
11662
11663         * m4/mbiter.m4: New file.
11664
11665 2005-08-16  Bruno Haible  <bruno@clisp.org>
11666
11667         * m4/mbfile.m4: New file.
11668
11669 2005-08-16  Bruno Haible  <bruno@clisp.org>
11670
11671         * m4/mbchar.m4: New file.
11672
11673 2005-08-16  Bruno Haible  <bruno@clisp.org>
11674
11675         * lib/tls.h: New file, from GNU gettext.
11676         * lib/tls.c: New file, from GNU gettext.
11677
11678 2005-08-16  Bruno Haible  <bruno@clisp.org>
11679
11680         * lib/strnlen1.h: New file.
11681         * lib/strnlen1.c: New file.
11682
11683 2005-08-16  Bruno Haible  <bruno@clisp.org>
11684
11685         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
11686         (mbi_init): Update.
11687         (mbi_avail, mbi_advance): Let the iteration end before the terminating
11688         NUL byte, not after it.
11689
11690 2005-08-16  Bruno Haible  <bruno@clisp.org>
11691
11692         * lib/strcase.h (strcasecmp): Add note in comments.
11693         * lib/strncasecmp.c: Use code from strcasecmp.c.
11694         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
11695         (strcasecmp): Work correctly in multibyte locales.
11696
11697 2005-08-16  Bruno Haible  <bruno@clisp.org>
11698
11699         * lib/mbiter.h: New file.
11700
11701 2005-08-16  Bruno Haible  <bruno@clisp.org>
11702
11703         * lib/mbfile.h: New file.
11704
11705 2005-08-16  Bruno Haible  <bruno@clisp.org>
11706
11707         * lib/mbchar.h: New file.
11708         * lib/mbchar.c: New file.
11709
11710 2005-08-16  Bruno Haible  <bruno@clisp.org>
11711
11712         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
11713         the valid ones. Makes the comparison operations transitive:
11714         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
11715         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
11716
11717 2005-08-15  Simon Josefsson  <jas@extundo.com>
11718
11719         * modules/ssize_t (License): Change to 'unlimited'.
11720
11721         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
11722
11723 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11724
11725         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
11726         Add comments for each pending glibc patch.
11727
11728 2005-08-15  Bruno Haible  <bruno@clisp.org>
11729
11730         * lib/regex.h (__restrict_arr): Don't define to __restrict if
11731         __cplusplus is defined.
11732
11733 2005-08-14  Jim Meyering  <jim@meyering.net>
11734
11735         Sync from coreutils.
11736
11737         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
11738         Use the hash-table-based cycle-detection code not just when
11739         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
11740         Reported by James Youngman in
11741         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
11742         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
11743         FTS_TIGHT_CYCLE_CHECK.
11744         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
11745         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
11746         once again.
11747         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
11748         * lib/fts.c (fd_safer): Remove decl.
11749         Include fcntl--.h rather than unistd-safer.h
11750         (fts_safe_changedir): Don't call fd_safer; no longer needed
11751         now that we include fcntl--.h.
11752
11753 2005-08-12  Simon Josefsson  <jas@extundo.com>
11754
11755         * modules/getndelim2: Use ssize_t module.
11756         * modules/getnline: Likewise.
11757         * modules/safe-read: Likewise.
11758         * modules/xreadlink: Likewise.
11759
11760         * modules/ssize_t: New file.
11761
11762 2005-08-12  Simon Josefsson  <jas@extundo.com>
11763
11764         * m4/readline.m4: Look for termcap, curses or ncurses if required.
11765
11766 2005-08-12  Simon Josefsson  <jas@extundo.com>
11767
11768         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11769         ssize_t.
11770
11771 2005-08-12  Simon Josefsson  <jas@extundo.com>
11772
11773         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
11774         readline, getdelim and check_version.
11775         (Support for systems lacking ISO C 99: Sizes of integer types):
11776         Add size_max.
11777
11778 2005-08-12  Bruno Haible  <bruno@clisp.org>
11779
11780         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
11781
11782 2005-08-11  Simon Josefsson  <jas@extundo.com>
11783
11784         * modules/readline: New file.
11785
11786         * modules/strnlen (Files): Add strnlen.h.
11787
11788 2005-08-11  Simon Josefsson  <jas@extundo.com>
11789
11790         * m4/readline.m4: New file.
11791
11792 2005-08-11  Simon Josefsson  <jas@extundo.com>
11793
11794         * lib/readline.h, readline.c: New file.
11795
11796 2005-08-11  Simon Josefsson  <jas@extundo.com>
11797
11798         * doc/gnulib.texi (Initial import, Finishing touches): Mention
11799         gl_AVOID.
11800
11801 2005-08-11  Bruno Haible  <bruno@clisp.org>
11802
11803         * lib/strnlen.h (strnlen): Change parameter name to match comment.
11804
11805 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
11806
11807         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
11808
11809 2005-08-10  Simon Josefsson  <jas@extundo.com>
11810
11811         * tests/test-iconvme.c: New file.
11812
11813 2005-08-10  Simon Josefsson  <jas@extundo.com>
11814
11815         * m4/strnlen.m4: New file.
11816
11817         * m4/strndup.m4: Don't check for strnlen declaration, done in
11818         strnlen.m4.
11819
11820 2005-08-10  Simon Josefsson  <jas@extundo.com>
11821
11822         * lib/strndup.c: Use strnlen.h.
11823
11824         * lib/strnlen.h: New file.
11825
11826 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11827
11828         * README: Typos.
11829
11830 2005-08-02  Simon Josefsson  <jas@extundo.com>
11831
11832         * modules/readline: New file.
11833
11834 2005-08-02  Simon Josefsson  <jas@extundo.com>
11835
11836         * modules/getdelim: New file.
11837
11838         * modules/getline: Rewrite, don't use getndelim2.
11839
11840 2005-08-02  Simon Josefsson  <jas@extundo.com>
11841
11842         * m4/getline.m4: Separate out getdelim stuff into separate module.
11843
11844         * m4/getdelim.m4: New file.
11845
11846 2005-08-02  Simon Josefsson  <jas@extundo.com>
11847
11848         * lib/getline.h, getline.c: Rewrite.
11849
11850         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
11851
11852 2005-07-31  Bruno Haible  <bruno@clisp.org>
11853
11854         * lib/lock.h (gl_lock_initializer): New macro.
11855         (gl_lock_define_initialized): Use it.
11856         (gl_rwlock_initializer): New macro.
11857         (gl_rwlock_define_initialized): Use it.
11858         (gl_recursive_lock_initializer): New macro.
11859         (gl_recursive_lock_define_initialized): Use it.
11860
11861 2005-07-30  Karl Berry  <karl@gnu.org>
11862
11863         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
11864         Report from Ben Pfaff, regarding getopt.
11865
11866 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
11867
11868         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
11869         normal way.
11870         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
11871         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
11872         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
11873         (gl_GETOPT): Use the new macros.  Most of the implementation
11874         is moved to the new macros.  This is for programs like Emacs
11875         that don't want all the functionality of gl_GETOPT.
11876
11877 2005-07-26  Bruno Haible  <bruno@clisp.org>
11878
11879         * m4/lock.m4: Update from GNU gettext.
11880
11881 2005-07-26  Bruno Haible  <bruno@clisp.org>
11882
11883         * lib/lock.h: Update from GNU gettext.
11884         * lib/lock.c: Update from GNU gettext.
11885
11886 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
11887
11888         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
11889         obsolescent AC_TRY_RUN.  Include the default includes files, for
11890         'exit'.
11891
11892 2005-07-24  Bruno Haible  <bruno@clisp.org>
11893
11894         * modules/visibility: New file.
11895         * MODULES.html.sh (Misc): Add visibility.
11896
11897 2005-07-24  Bruno Haible  <bruno@clisp.org>
11898
11899         * m4/visibility.m4: New file.
11900
11901 2005-07-24  Bruno Haible  <bruno@clisp.org>
11902
11903         * doc/visibility.texi: New file.
11904
11905 2005-07-22  Bruno Haible  <bruno@clisp.org>
11906
11907         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
11908         $(ALLOCA_H), redundant through BUILT_SOURCES.
11909         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
11910         redundant through BUILT_SOURCES.
11911         * modules/byteswap (Makefile.am): Remove explicit dependency on
11912         $(BYTESWAP_H), redundant through BUILT_SOURCES.
11913         * modules/fnmatch (Makefile.am): Remove explicit dependency on
11914         $(FNMATCH_H), redundant through BUILT_SOURCES.
11915         * modules/getopt (Makefile.am): Remove explicit dependency on
11916         $(GETOPT_H), redundant through BUILT_SOURCES.
11917         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
11918         redundant through BUILT_SOURCES.
11919         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
11920         redundant through BUILT_SOURCES.
11921         * modules/stdbool (Makefile.am): Remove explicit dependency on
11922         $(STDBOOL_H), redundant through BUILT_SOURCES.
11923         * modules/stdint (Makefile.am): Remove explicit dependency on
11924         $(STDINT_H), redundant through BUILT_SOURCES.
11925         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
11926         Remove explicit dependency on $(SYSEXITS_H).
11927         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
11928
11929 2005-07-18  Simon Josefsson  <jas@extundo.com>
11930
11931         * lib/check-version.c (check_version): Accept identical versions too.
11932
11933 2005-07-18  Bruno Haible  <bruno@clisp.org>
11934
11935         * modules/lock: New file.
11936         * MODULES.html.sh (Multithreading): New section.
11937
11938 2005-07-18  Bruno Haible  <bruno@clisp.org>
11939
11940         * m4/lock.m4: New file, from GNU gettext.
11941
11942 2005-07-18  Bruno Haible  <bruno@clisp.org>
11943
11944         * lib/lock.h: New file, from GNU gettext.
11945         * lib/lock.c: New file, from GNU gettext.
11946
11947 2005-07-18  Bruno Haible  <bruno@clisp.org>
11948
11949         * lib/lock.h (gl_once_t): New type.
11950         (gl_once_define, gl_once): New macros.
11951         * lib/lock.c (fresh_once): New variable.
11952         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
11953         functions.
11954
11955 2005-07-16  Simon Josefsson  <jas@extundo.com>
11956
11957         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
11958         workaround, suggested by Bruno.
11959
11960 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11961
11962         * modules/xalloc (Depends-on): Add xalloc-die.
11963         * modules/xvasprintf (Depends-on): Add xalloc-die.
11964
11965 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11966
11967         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
11968         with a minor change.
11969
11970 2005-07-15  Bruno Haible  <bruno@clisp.org>
11971
11972         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
11973         When using lib/poll.c, define poll as rpl_poll.
11974
11975 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
11976
11977         * modules/argp (Depends-on): Remove unlocked-io.
11978
11979 2005-07-14  Derek Price  <derek@ximbiot.com>
11980
11981         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
11982         for glob symlink bug.
11983
11984 2005-07-14  Bruno Haible  <bruno@clisp.org>
11985
11986         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
11987         Instead, test for *_unlocked function declarations directly.
11988
11989 2005-07-11  Simon Josefsson  <jas@extundo.com>
11990
11991         * modules/size_max: New file.
11992
11993         * modules/xsize: Depend on size_max module for size_max.m4.
11994
11995 2005-07-11  Simon Josefsson  <jas@extundo.com>
11996
11997         * lib/size_max.h: New file.
11998
11999 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
12000
12001         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
12002         copyright symbol and the year.
12003         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
12004         (version_etc_va): Use parameterized copyright notice.
12005         Reword to conform to the current GNU coding standards.
12006
12007 2005-07-11  Karl Berry  <karl@gnu.org>
12008
12009         * doc/gnulib.texi (Quoting): new node.
12010         (Initial import): more info, from Patrice.
12011
12012 2005-07-11  Bruno Haible  <bruno@clisp.org>
12013
12014         * gnulib-tool (func_usage): Document option --avoid.
12015         (Command line options): Handle --avoid.
12016         (func_acceptable): New function.
12017         (func_modules_transitive_closure): Use it.
12018
12019 2005-07-11  Bruno Haible  <bruno@clisp.org>
12020
12021         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
12022         Reported by Jim Meyering.
12023
12024 2005-07-10  Bruno Haible  <bruno@clisp.org>
12025
12026         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
12027         Needed when size_t is smaller than 'unsigned int'.
12028         Reported by Paul Eggert.
12029
12030 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12031
12032         * modules/argp (Depends-on): Add unlocked-io
12033
12034 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12035
12036         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
12037         block of defines.
12038
12039 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12040
12041         * config/srclist.txt: Comment out regcomp.c, since we have a porting
12042         fix now.
12043
12044 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
12045         and Paul Eggert  <eggert@cs.ucla.edu>
12046
12047         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
12048         in wint_t, not wchar_t.  Remove now-unnecessary cast.
12049
12050 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12051
12052         * modules/regex (Files): Add lib/regex_internal.c,
12053         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
12054         (Depends-on): Add extensions.
12055         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
12056
12057 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12058
12059         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
12060         pathconf.
12061         * m4/same.m4 (gl_SAME): Likewise.
12062         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
12063
12064         * m4/regex.m4: Adjust to new libc regex implementation.
12065         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
12066         all the .c and .h parts of (the new) regex.
12067         Quote the m4 stuff better.
12068         Check for RE_ICASE bug of old gnulib.
12069         Check for REG_STARTEND of recent libc.
12070         Rename local variables from jm_* to gl_*.
12071         Quote operand of "test -f".
12072         Say "recent enough" version of libc, not "version 2".
12073         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
12074         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
12075         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
12076         Remove check for btowc, isascii.
12077         Require AM_LANGINFO_CODESET.
12078
12079 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12080
12081         * lib/regex.c, regex.h: Sync from libc.
12082         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
12083         * lib/regexec.c:
12084         New files, synced from libc, except that regex_internal.h
12085         currently has a small porting fix.
12086
12087 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12088
12089         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
12090         regex_internal.c, regexec.c.
12091         Add regex_internal.h too, but as a comment, since the libc version
12092         is currently broken in gnulib mode.
12093
12094 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12095
12096         Support programs like Emacs that use gnulib but not gettext.
12097         * MODULES.html.sh (Internationalization functions): Add gettext-h.
12098         * modules/gettext-h: New file.
12099         * modules/gettext (Files): Remove lib/gettext.h.
12100         (Depends-on): Add gettext-h.
12101         (Makefile.am): Remove lib_SOURCES.
12102         * modules/argmatch, modules/c-stack, modules/closeout:
12103         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
12104         * modules/execute, modules/file-type, modules/getaddrinfo:
12105         * modules/getopt, modules/human, modules/javacomp:
12106         * modules/javaexec, modules/mkdir-p, modules/obstack:
12107         * modules/openat, modules/pagealign_alloc, modules/pipe:
12108         * modules/quotearg, modules/regex, modules/rpmatch:
12109         * modules/unicodeio, modules/userspec, modules/version-etc:
12110         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
12111         * modules/xsetenv:
12112         Depend on gettext-h, not gettext.
12113
12114 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12115
12116         * gnulib-tool (func_import): Add support for 'public domain' license.
12117         * modules/alloca, modules/atexit, modules/memmove:
12118         Now public domain, not GPL.
12119         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
12120         * modules/realloc, modules/strerror, modules/strtod:
12121         Now LGPL, not GPL.
12122
12123 2005-07-05  Bruno Haible  <bruno@clisp.org>
12124
12125         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
12126         autoconf CVS. Needed for mingw.
12127
12128 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12129
12130         Remove the dependency of the strftime module on the tzset module.
12131         * modules/strftime (Depends-on): Remove dependency on tzset.
12132
12133 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12134
12135         Remove the dependency of the strftime module on the tzset module.
12136         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
12137         gl_FUNC_TZSET_CLOBBER.
12138
12139 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12140
12141         Remove the dependency of the strftime module on the tzset module.
12142         * lib/strftime.c (my_strftime)
12143         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
12144         Copy the input structure, to work around some of the bug with
12145         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
12146         Solaris releases, you should also use the tzset module, but we won't
12147         require it as a dependency any more since we don't want LGPLed code
12148         to depend on GPLed code.
12149
12150 2005-07-02  Jim Meyering  <jim@meyering.net>
12151
12152         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
12153         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
12154         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
12155         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
12156
12157 2005-07-02  Jim Meyering  <jim@meyering.net>
12158
12159         * lib/backupfile.c (backup_args): Change a `0' to NULL.
12160
12161 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12162
12163         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
12164         declares only 'struct timespec;' (!).
12165
12166 2005-07-01  Jim Meyering  <jim@meyering.net>
12167
12168         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
12169         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
12170         * lib/save-cwd.c, tempname.c:
12171         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12172         and don't include <sys/file.h>).
12173
12174 2005-06-29  Jim Meyering  <jim@meyering.net>
12175
12176         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
12177         type name.  Use the variable name instead.
12178         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
12179         Likewise.
12180
12181 2005-06-28  Simon Josefsson  <jas@extundo.com>
12182
12183         * modules/check-version (Files): Add check-version.m4.
12184
12185 2005-06-28  Simon Josefsson  <jas@extundo.com>
12186
12187         * m4/check-version.m4: New file, suggested by Jim Meyering
12188         <jim@meyering.net>.
12189
12190 2005-06-28  Simon Josefsson  <jas@extundo.com>
12191
12192         * lib/check-version.h, lib/check-version.c: New files.
12193
12194 2005-06-28  Simon Josefsson  <jas@extundo.com>
12195
12196         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
12197         collision with global variable.  Better indentation.  Don't
12198         increment buffer pointer beyond buffer end.  Based on comments
12199         from Paul Eggert <eggert@cs.ucla.edu>.
12200
12201         * lib/base64.h: Indent.
12202
12203 2005-06-28  Simon Josefsson  <jas@extundo.com>
12204
12205         * doc/gnulib.texi (Library version handling): New section.
12206
12207 2005-06-28  Jim Meyering  <jim@meyering.net>
12208
12209         * check-module (find_included_lib_files): Hard-code another
12210         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
12211         but modules/fts-lgpl (correctly) does not list those files.
12212
12213         * modules/canonicalize (Files): Add lib/pathmax.h.
12214
12215 2005-06-25  Simon Josefsson  <jas@extundo.com>
12216
12217         * modules/check-version: New file.
12218
12219 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
12220
12221         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
12222         initializer of struct addrinfo, as an indication that we don't
12223         care how many members the structure has.
12224
12225 2005-06-24  Derek Price  <derek@ximbiot.com>
12226         and Bruno Haible  <bruno@clisp.org>
12227
12228         Remove stat module & update lstat.
12229         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
12230         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
12231         * m4/stat.m4: Remove this file.
12232
12233 2005-06-24  Derek Price  <derek@ximbiot.com>
12234         and Bruno Haible  <bruno@clisp.org>
12235
12236         Remove stat module & update lstat.
12237         * lib/stat.c: Remove this file...
12238         (slash_aware_lstat): ...moving this content and its support...
12239         * lib/lstat.c (rpl_lstat): ...into here.
12240         * lib/lstat.h: New file.
12241
12242 2005-06-24  Derek Price  <derek@ximbiot.com>
12243         and Bruno Haible  <bruno@clisp.org>
12244
12245         Remove stat module & update lstat.
12246         * config/srclist.txt (libc sources): Remove stat.
12247
12248 2005-06-24  Derek Price  <derek@ximbiot.com>
12249         and Bruno Haible  <bruno@clisp.org>
12250
12251         Remove stat module & update lstat.
12252         * MODULES.html.sh (stat): Remove.
12253         * MODULES.html: Regenerated.
12254         * modules/lstat (Description): Correct function name.
12255         (Files): Add "lstat.h".
12256         (Depends-on): Remove stat, add xalloc, stat-macros.
12257         * modules/stat: Remove this file.
12258         (Include): Add "lstat.h", remove <sys/stat.h>.
12259
12260 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
12261
12262         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
12263         (ranged_convert): Don't save conversion in a temporary struct.
12264         This causes a warning with GCC 4.0.0, and anyway in the typical
12265         case it's not worth the extra 100 bytes or so of code.
12266         (ranged_convert, __mktime_internal): When calling a function via a
12267         pointer P, use P () rather than (*P) (), as we now assume C89 or
12268         better.
12269
12270 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12271
12272         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
12273         "who -r" failed to give output.  Problem reported by Tim Waugh.
12274
12275         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
12276         (xcalloc): Use it to avoid needless tests.
12277         Problem reported by Jim Meyering.
12278
12279 2005-06-20  Derek Price  <derek@ximbiot.com>
12280
12281         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
12282         unnecessary for Autoconfs > 2.59c.
12283
12284 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12285
12286         * lib/argp.h (__option_is_short): Check upper limit of
12287         __key. Isprint() requires its argument to have the value
12288         of an unsigned char or EOF.
12289
12290 2005-06-16  Jim Meyering  <jim@meyering.net>
12291
12292         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
12293         when either N or S is zero.
12294
12295 2005-06-16  Derek Price  <derek@ximbiot.com>
12296
12297         * m4/bison.m4: Declare YACC & YFLAGS precious.
12298
12299 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
12300
12301         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
12302         multibyte string or pattern, fall back on unibyte matching.
12303         Problem reported by James Youngman.
12304
12305 2005-06-08  Bruno Haible  <bruno@clisp.org>
12306
12307         * modules/csharpcomp: New file.
12308         * MODULES.html.sh (C#): Add csharpcomp.
12309
12310 2005-06-08  Bruno Haible  <bruno@clisp.org>
12311
12312         * m4/csharpcomp.m4: New file, from GNU gettext.
12313
12314 2005-06-08  Bruno Haible  <bruno@clisp.org>
12315
12316         * lib/csharpcomp.h: New file, from GNU gettext.
12317         * lib/csharpcomp.c: New file, from GNU gettext.
12318         * lib/csharpcomp.sh.in: New file, from GNU gettext.
12319
12320 2005-06-08  Bruno Haible  <bruno@clisp.org>
12321
12322         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
12323         warning on mingw.
12324
12325 2005-06-07  Derek Price  <derek@ximbiot.com>
12326
12327         Sync from CVS.
12328         * lib/glob_.h: Indent nested #ifdef.
12329
12330 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12331
12332         Sync from coreutils.
12333         Use "file name" when talking about file names, instead of "filename"
12334         or "path", as per the GNU coding standards.
12335         * lib/mkdir-p.c: Renamed from makepath.c.
12336         (make_dir_parents): Renamed from make_path.  All callers changed.
12337         * lib/mkdir-p.h: Likewise.  All includers changed.
12338         * lib/filenamecat.c: Renamed from path-concat.c.
12339         (file_name_concat): Renamed from path_concat.  All callers changed.
12340         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
12341         * lib/filenamecat.h: Likewise.  All includers changed.
12342         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
12343         in comments or local variable names.
12344         * lib/basename.c: Likewise.
12345         * lib/canonicalize.c, canonicalize.h: Likewise.
12346         * lib/dirname.c, dirname.h: Likewise.
12347         * lib/euidaccess.c: Likewise.
12348         * lib/exclude.c: Likewise
12349         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
12350         * lib/fsusage.c, fsuage.h: Likewise.
12351         * lib/fts.c, fts_.h: Likewise.
12352         * lib/getcwd.c: Likewise.
12353         * lib/getloadavg.c: Likewise.
12354         * lib/mkstemp.c: Likewise.
12355         * lib/mountlist.c, mountlist.h: Likewise.
12356         * lib/openat.c, openat.h: Likewise.
12357         * lib/readlink-stub.c: Likewise.
12358         * lib/readutmp.c, readutmp.h: Likewise.
12359         * lib/rename.c: Likewise.
12360         * lib/rmdir.c: Likewise.
12361         * lib/same.c: Likewise.
12362         * lib/savedir.c: Likewise.
12363         * lib/stripslash.c: Likewise.
12364         * lib/tempname.c: Likewise.
12365         * lib/xreadlink.c: Likewise.
12366         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
12367         All uses changed.
12368         * lib/exclude.h: Likewise.
12369
12370         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
12371         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12372         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
12373         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12374         * lib/pathmax.h: Include <limits.h> unconditionally, since other
12375         files have been getting away with it for years (MORE/BSD 4.3
12376         is extinct now).
12377         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
12378         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12379
12380         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
12381         Define to 256, not 255, as per modern POSIX.
12382
12383 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12384
12385         Sync from coreutils.
12386         Use "file name" when talking about file names, instead of "filename"
12387         or "path", as per the GNU coding standards.
12388         * MODULES.html.sh: mkdir-p renamed from makepath.
12389         filenamecat renamed from path-concat.
12390         * modules/filenamecat: Renamed from modules/path-concat.
12391         (Files): filenamecat.h and filenamecat.c renamed from
12392         path-concat.h and path-concat.c.
12393         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
12394         (Include): filenamecat.h, not path-concat.h.
12395         * modules/mkdir-p: Renamed from modules/makepath.
12396         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
12397         makepath.c.
12398         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
12399         (Include): mkdir-p.h, not makepath.h.
12400
12401 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12402
12403         Sync from coreutils.
12404         * m4/mkdir-p.m4: Renamed from makepath.m4.
12405         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
12406         Rename files from makepath.c to mkdir-p.c, and from
12407         makepath.h to mkdir-p.h.
12408         * m4/filenamecat.m4: Renamed from path-concat.m4.
12409         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
12410         Rename files from path-concat.c to filenamecat.c,
12411         and from path-concat.h to filenamecat.h.
12412         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
12413         "file name" in local variables or comments.
12414         * m4/rename.m4: Likewise.
12415
12416 2005-06-01  Bruno Haible  <bruno@clisp.org>
12417
12418         * modules/csharpexec: New file.
12419         * MODULES.html.sh (C#): New section.
12420
12421 2005-06-01  Bruno Haible  <bruno@clisp.org>
12422
12423         * m4/csharp.m4: New file, from GNU gettext.
12424         * m4/csharpexec.m4: New file, from GNU gettext.
12425
12426 2005-06-01  Bruno Haible  <bruno@clisp.org>
12427
12428         * lib/csharpexec.h: New file, from GNU gettext.
12429         * lib/csharpexec.c: New file, from GNU gettext.
12430         * lib/csharpexec.sh.in: New file, from GNU gettext.
12431
12432 2005-05-31  Derek Price  <derek@ximbiot.com>
12433             Paul Eggert  <eggert@cs.ucla.edu>
12434
12435         Sync from cvs.
12436         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12437
12438 2005-05-31  Derek Price  <derek@ximbiot.com>
12439             Paul Eggert  <eggert@cs.ucla.edu>
12440
12441         Sync from cvs.
12442         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12443
12444 2005-05-29  Derek Price  <derek@ximbiot.com>
12445
12446         * config/srclist.txt (glob_.h, glob.c): Add these files.
12447
12448 2005-05-29  Derek Price  <derek@ximbiot.com>
12449
12450         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
12451         * modules/glob: New file.
12452         * modules/getlogin_r: Add link to POSIX spec in description.
12453
12454 2005-05-29  Derek Price  <derek@ximbiot.com>
12455             Paul Eggert  <eggert@cs.ucla.edu>
12456
12457         * m4/glob.m4: New file.
12458
12459 2005-05-29  Derek Price  <derek@ximbiot.com>
12460             Paul Eggert  <eggert@cs.ucla.edu>
12461
12462         * lib/glob_.h, lib/glob.c: New files.
12463
12464 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12465
12466         * modules/fts (Files): Remove m4/inttypes-pri.m4.
12467         * modules/fts-lgpl (Depends-on): Remove gettext.
12468
12469 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12470
12471         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
12472         and don't require gt_INTTYPES_PRI.
12473
12474 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12475
12476         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
12477
12478         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
12479         the configuration hassle isn't worth it.
12480         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
12481         (LONGEST_MODIFIER, PRIuMAX): Remove.
12482
12483 2005-05-27  Bruno Haible  <bruno@clisp.org>
12484
12485         * lib/getlogin_r.h: Remove second include of <stddef.h>.
12486
12487 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
12488
12489         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
12490         _POSIX_PTHREAD_SEMANTICS for Solaris.
12491
12492 2005-05-25  Derek Price  <derek@ximbiot.com>
12493
12494         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
12495
12496 2005-05-25  Derek Price  <derek@ximbiot.com>
12497             Paul Eggert  <eggert@cs.ucla.edu>
12498
12499         * modules/getlogin_r, m4/getlogin_r.m4: New files.
12500         * lib/getlogin_r.c, getlogin_r.h: New files.
12501
12502 2005-05-25  Bruno Haible  <bruno@clisp.org>
12503             Derek Price  <derek@ximbiot.com>
12504
12505         * lib/getlogin_r.h: Simplify API documentation.
12506
12507 2005-05-23  Derek Price  <derek@ximbiot.com>
12508
12509         * modules/minmax (Files): Add m4/minmax.m4.
12510         (configure.ac): Add gl_MINMAX.
12511
12512 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
12513
12514         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
12515         so that unistd-safer.h (GPL'ed code) need not be included.
12516
12517 2005-05-22  Bruno Haible  <bruno@clisp.org>
12518
12519         * m4/minmax.m4: New file.
12520         Based on a patch by Derek Price <derek@ximbiot.com>.
12521
12522 2005-05-22  Bruno Haible  <bruno@clisp.org>
12523
12524         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
12525         (INT64_MIN): Fix definition.
12526         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
12527
12528         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
12529         NEED_SIGNED_INT_TYPES.
12530
12531         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
12532         HAVE_SYSTEM_INTTYPES.
12533
12534 2005-05-22  Bruno Haible  <bruno@clisp.org>
12535
12536         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
12537         Also include <sys/param.h> if it defines MIN, MAX.
12538         Based on a patch by Derek Price <derek@ximbiot.com>.
12539
12540 2005-05-21  Jim Meyering  <jim@meyering.net>
12541
12542         * modules/fts (Files): Add m4/inttypes-pri.m4.
12543         (Depends-on): Add lstat and remove gettext.  Alphabetize.
12544
12545 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12546
12547         New fts module.
12548         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
12549         (setup_dir, free_dir): New functions.
12550         (enter_dir, leave_dir): Define trivial
12551         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
12552         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
12553         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
12554         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
12555         Move to fts-cycle.c.
12556         (fts_open): Use setup_dir.
12557         (fts_close): Use free_dir.
12558         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
12559         This adds a label and some gotos, but the alternatives were messier.
12560         Check for memory allocation failure when entering a dir.
12561         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
12562         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
12563         (FTS): New member fts_cycle, that is a union that contains the
12564         old active_dir_ht and cycle_state.  All uses changed to mention
12565         fts_cycle.ht and fts_cycle.state.
12566         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
12567         fts.c, with the following changes:
12568         (setup_dir, free_dir): New functions.
12569         (enter_dir): Now returns bool.  Return true if successful, false
12570         if memory exhausted.  All callers changed.
12571         Do not bother partly cleaning up on
12572         memory allocation failure; that is free_dir's job.
12573         However, free ad if hash_insert fails, to avoid memory leak.
12574         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
12575         fts->fts_options to see which union member to use.
12576
12577 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12578
12579         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
12580         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
12581
12582 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12583
12584         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
12585
12586 2005-05-20  Jim Meyering  <jim@meyering.net>
12587
12588         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
12589         Now a macro, to pacify GCC.
12590
12591 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12592
12593         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
12594         of -1.
12595
12596 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12597
12598         * lib/chown.c (rpl_chown): Return -1 on failure.
12599
12600 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12601
12602         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
12603         Don't check for stddef.h.
12604         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
12605         don't use its results.
12606         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
12607         since we include them unconditionally.  Don't require
12608         AM_STDBOOL_H, since stdbool is a prerequisite.
12609         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
12610         since we assume C89 or better.
12611         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
12612         as we don't use their results.
12613         Don't check for fchdir, memmove, memset, strrchr, as we use
12614         them unconditionally.
12615         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
12616         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
12617
12618 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12619
12620         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
12621         Include <stddef.h> unconditionally, since we assume C89 now.
12622         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
12623         * lib/fts.c: Include fts_.h first, to check interface.
12624         Do not include intprops.h; no longer needed.
12625         Include cycle-check.h and hash.h, since fts_.h no longer does.
12626         Remove unnecessary casts of closedir to void.
12627         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
12628         decide whether to decrement nlinks.
12629         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
12630         (FTS): Use struct hash_table * instead of Hash_table, so that
12631         we no longer need to include hash.h here.
12632
12633 2005-05-18  Jim Meyering  <jim@meyering.net>
12634
12635         * modules/dirfd (License): Change to LGPL.  Most of the code
12636         is already in the public domain.
12637
12638 2005-05-18  Jim Meyering  <jim@meyering.net>
12639
12640         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
12641         Reported by Yoann Vandoorselaere.
12642
12643 2005-05-17  Jim Meyering  <jim@meyering.net>
12644
12645         * m4/fts.m4: New file, from coreutils.
12646
12647 2005-05-17  Jim Meyering  <jim@meyering.net>
12648
12649         * lib/fts.c, lib/fts_.h: New files, from coreutils.
12650
12651 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12652
12653         Sync from coreutils.
12654         * m4/unlinkdir.m4: New file.
12655
12656 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12657
12658         Sync from coreutils.
12659         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
12660         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
12661         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
12662         White space changes only.
12663         * lib/makepath.c (make_path): Port to hosts where leading "//" is
12664         special.
12665         * lib/yesno.c: Include getline.h, not ctype.h.
12666         (yesno): Don't remove leading white space; POSIX doesn't allow it.
12667         Use getline to remove arbitrary restriction on response length.
12668
12669 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12670
12671         * config/srclist-update: Spell out "Street" in FSF postal
12672         mail address; this is the style the FSF seems to prefer.
12673
12674         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
12675         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
12676         this updates FSF postal mail address.
12677
12678         Sync from coreutils.
12679         * modules/unlinkdir: New file.
12680         * modules/yesno (Depends-on): Add getline.
12681         * MODULES.html.sh (File system functions): Add unlinkdir.
12682
12683 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
12684
12685         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
12686         lib/strsep.h:
12687         Change the initial comment to refer to GPL, not LGPL.
12688         gnulib-tool will change it to LGPL as needed.
12689
12690         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
12691         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
12692         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
12693         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
12694         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
12695         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
12696         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
12697         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
12698         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
12699         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
12700         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
12701         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
12702         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
12703         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
12704         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
12705         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
12706         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
12707         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
12708         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
12709         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
12710         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
12711         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
12712         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
12713         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
12714         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
12715         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
12716         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
12717         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
12718         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
12719         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
12720         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
12721         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
12722         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
12723         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
12724         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
12725         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
12726         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
12727         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
12728         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
12729         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
12730         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
12731         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
12732         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
12733         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
12734         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
12735         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
12736         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
12737         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
12738         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
12739         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
12740         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
12741         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
12742         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
12743         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
12744         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
12745         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
12746         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
12747         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
12748         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
12749         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
12750         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
12751         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
12752         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
12753         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
12754         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
12755         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
12756         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
12757         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
12758         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
12759         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
12760         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
12761         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
12762         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
12763         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
12764         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
12765         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
12766         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
12767         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
12768         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
12769         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
12770         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
12771         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
12772         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
12773         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
12774         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
12775         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
12776         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
12777         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
12778         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
12779         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
12780         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
12781         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
12782         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
12783         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
12784         lib/yesno.c, lib/yesno.h:
12785         Update FSF postal mail address.
12786
12787 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
12788
12789         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
12790         tests/test-memmem.c, tests/test-stpncpy.c:
12791         Update FSF postal mail address.
12792
12793 2005-05-13  Bruno Haible  <bruno@clisp.org>
12794
12795         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
12796         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
12797         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
12798         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
12799         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
12800         Add support for 64-bit integers in the MSVC compiler.
12801
12802 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12803
12804         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
12805
12806 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
12807
12808         * gnulib-tool (func_import): Sort and uniquify recommended includes.
12809
12810 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
12811
12812         * doc/getdate.texi (General date syntax): Don't say that date
12813         date --iso-8601=ns generates acceptable dates; it doesn't yet.
12814         Problem reported by Nic Ferrier.
12815
12816 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12817
12818         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
12819         specified in ai_socktype. Fix invalid ai_protocol
12820         check. ai_protocol is usually set to 0 or depending on
12821         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
12822         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
12823         ai_socktype / ai_protocol in the returned addrinfo structure.
12824
12825 2005-05-10  Simon Josefsson  <jas@extundo.com>
12826
12827         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
12828         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12829
12830 2005-05-10  Karl Berry  <karl@gnu.org>
12831
12832         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
12833         (from http://www.gnu.org/licenses).
12834         * doc/COPYING.LIB: also rename to COPYING.LESSER.
12835         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
12836         fdl.texi suffices.
12837
12838 2005-05-10  Karl Berry  <karl@gnu.org>
12839
12840         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
12841         (COPYING.DOC): remove.
12842
12843         * config/srclist-update: new FSF address.
12844
12845 2005-05-10  Derek Price  <derek@ximbiot.com>
12846
12847         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
12848         possible.
12849
12850 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12851             Bruno Haible  <bruno@clisp.org>
12852
12853         * modules/inet_ntop: New file.
12854         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12855         inet_ntop.
12856
12857 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12858             Bruno Haible  <bruno@clisp.org>
12859
12860         * m4/inet_ntop.m4: New file.
12861
12862 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12863             Bruno Haible  <bruno@clisp.org>
12864
12865         * lib/inet_ntop.h: New file.
12866         * lib/inet_ntop.c: New file, from glibc with modifications.
12867
12868 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
12869
12870         * modules/time_r (License): Change to LGPL.
12871         * modules/extensions (License): Change to LGPL.  Actually,
12872         the license is more permissive than that, but currently gnulib-tool
12873         doesn't know how to handle more-permissive licenses.
12874
12875         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
12876         Problem reported by Dave Love.
12877
12878 2005-05-08  Jim Meyering  <jim@meyering.net>
12879
12880         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
12881         blank.
12882
12883 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
12884
12885         * modules/argmatch (Depends-on): Add stdbool.
12886         * modules/backupfile (Depends-on): Likewise.
12887         * modules/chdir-long (Depends-on): Likewise.
12888         * modules/closeout (Depends-on): Likewise.
12889         * modules/cycle-check (Depends-on): Likewise.
12890         * modules/dirname (Depends-on): Likewise.
12891         * modules/fnmatch (Depends-on): Likewise.
12892         * modules/fsusage (Depends-on): Likewise.
12893         * modules/fwriteerror (Depends-on): Likewise.
12894         * modules/getcwd (Depends-on): Likewise.
12895         * modules/getloadavg (Depends-on): Likewise.
12896         * modules/hard-locale (Depends-on): Likewise.
12897         * modules/makepath (Depends-on): Likewise.
12898         * modules/mountlist (Depends-on): Likewise.
12899         * modules/nanosleep (Depends-on): Likewise.
12900         * modules/posixtm (Depends-on): Likewise.
12901         * modules/quotearg (Depends-on): Likewise.
12902         * modules/readtokens (Depends-on): Likewise.
12903         * modules/readtokens0 (Depends-on): Likewise.
12904         * modules/readutmp (Depends-on): Likewise.
12905         * modules/save-cwd (Depends-on): Likewise.
12906         * modules/strftime (Depends-on): Likewise.
12907         * modules/userspec (Depends-on): Likewise.
12908         * modules/utimecmp (Depends-on): Likewise.
12909         * modules/xgetcwd (Depends-on): Likewise.
12910         * modules/xnanosleep (Depends-on): Likewise.
12911         * modules/xstrtod (Depends-on): Likewise.
12912         * modules/yesno (Depends-on): Likewise.
12913
12914 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
12915
12916         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
12917         needless checks.
12918
12919 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12920
12921         Merge from coreutils.  Among other things,
12922         add bulletproofing for cases where stdin, stdout, or stderr are closed.
12923         * lib/fd-safer.c: New file.
12924         * lib/fcntl-safer.h, open-safer.c: Remove.
12925         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
12926         * lib/dup-safer.c: Include unistd-safer.h first.
12927         Don't include errno.h.
12928         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
12929         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
12930         * lib/file-type.c: Rely on file-type.h change.
12931         * lib/getloadavg.c: Include unistd-safer.h.
12932         (getloadavg): Use safer open.
12933         * lib/getusershell.c: Include "stdio-safer.h".
12934         (getusershell): Use safer fopen.
12935         * lib/long-options.c (long_options): Use NULL rather than 0.
12936         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
12937         'free'.
12938         * lib/modechange.c: Likewise.
12939         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
12940         (MODE_DONE): New constant.
12941         (struct mode_change): Remove 'next' member.
12942         (make_node_op_equals): New function; like the old one of the
12943         same name, except it allocates an array.
12944         (mode_compile, mode_create_from_ref): Use it.
12945         (mode_compile): Allocate result as an array, not a linked list.
12946         Parse octal string ourself, so that we catch mistakes like "+0".
12947         (mode_adjust): Arg is an array, not a linked list.
12948         * lib/modechange.c: Include stat-macros.h, xalloc.h.
12949         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
12950         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
12951         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
12952         Remove.  This is now stat-macros.h's job.
12953         (talloc): Remove.  All callers replaced by xalloc, so that
12954         our invokers don't have to worry about reporting memory failures.
12955         (make_node_op_equals): Remove.
12956         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12957         New constants.
12958         (struct mode_change): Moved here from modechange.h.
12959         (mode_append_entry): Remove.
12960         (mode_compile): Remove MASKED_OPS arg, since it encouraged
12961         apps to have incorrect behavior.  Use simpler algorithm for head
12962         and tail.  Don't futz with umask; that's now the job of mode_adjust.
12963         Detect more invalid usages rather than having somewhat-random behavior.
12964         Don't insert an "a=" action, as that leads to incorrect behavior.
12965         (mode_compile, mode_create_from_ref): Return NULL on error instead
12966         of an enum, since now there's only one way to have an error.  All
12967         callers changed.
12968         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
12969         at the correct time.  Simplify calculation of "+u" and its ilk.
12970         Don't mishandle "+X".
12971         (mode_free): Remove "register" and localize decls.
12972         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12973         (struct mode_change): Move to modechange.c; callers don't
12974         need to see this stuff.
12975         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
12976         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
12977         (mode_change, mode_adjust): Reflect the new signatures noted above.
12978         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
12979         that might redefine system include files.
12980         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
12981         (my_usleep): Use NULL rather than (void *) 0.
12982         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
12983         Use siginterrupt to specify that system calls should be interrupted.
12984         (rpl_nanosleep): Move initialization of suspended closer to call of
12985         my_usleep.
12986         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
12987         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
12988         (desirable_utmp_entry): New function.
12989         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
12990         using x2nrealloc, to simplify logic.
12991         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
12992         size calculation.  Do not assume utmp file is a regular file.
12993         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
12994         (READ_UTMP_CHECK_PIDS): New constant.
12995         * lib/save-cwd.c: Include unistd-safer.h.
12996         (save_cwd): Use fd_safer.
12997         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
12998         [!_LIBC] Include "stat-macros.h" instead.
12999         * lib/unistd-safer.h (fd_safer): New decl.
13000
13001 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13002
13003         * modules/getloadavg (Depends-on): Add unistd-safer.
13004         * modules/getusershell (Depends-on): Add stdio-safer.
13005         * modules/lstat (Depends-on): Remove xalloc.
13006         * modules/mkstemp (Depends-on): Add stat-macros.
13007         * modules/modechange (Depends-on): Remove xstrtol.
13008         Add stat-macros, xalloc.
13009         * modules/save-cwd (Depends-on): Add unistd-safer.
13010         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
13011         * modules/unistd-safer (Files): Add lib/fd-safer.c
13012         (Makefile.am): Remove lib_SOURCES.
13013
13014         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
13015         Remove fcntl-safer; unistd-safer supersedes it.
13016
13017 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13018
13019         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
13020         AC_HEADER_STAT.
13021         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
13022         (gl_PREREQ_CHOWN): Remove.
13023         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
13024         it.  Don't require AC_HEADER_STAT.
13025         (gl_PREREQ_LSTAT): Remove.
13026         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
13027         Don't require AC_HEADER_STAT.
13028         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
13029         (gl_PREREQ_RMDIR): Remove.
13030         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
13031         mention stat-macros.h or AC_HEADER_STAT, since we'll make
13032         the stat-macros module a prerequisite.
13033         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
13034         * m4/filemode.m4 (gl_FILEMODE): Likewise.
13035         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
13036         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
13037         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
13038         variable names.
13039         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
13040         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
13041         variable prefixes.
13042         * m4/fcntl-safer.m4: Remove.
13043         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
13044         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
13045         Invoke gl_PREREQ_FD_SAFER.
13046         (gl_PREREQ_FD_SAFER): New macro.
13047         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
13048         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
13049         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
13050         Remove duplicate call to AC_LIBOBJ(readutmp).
13051         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
13052
13053         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
13054         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
13055
13056 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13057
13058         * MODULES.html.sh (Misc): Add byteswap.
13059
13060 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13061
13062         * modules/getcwd (Depends-on): Add extensions.
13063         * modules/openat (Depends-on): Likewise.
13064
13065 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13066
13067         * modules/byteswap: New file.
13068
13069 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13070
13071         * m4/byteswap.m4: New file.
13072
13073 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13074
13075         * lib/byteswap_.h: New file.
13076
13077 2005-04-25  Karl Berry  <karl@gnu.org>
13078
13079         * m4/gettext.m4: Update from GNU gettext 0.14.4.
13080
13081 2005-04-25  Albert Chin  <china@thewrittenword.com>
13082
13083         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
13084         Toolkit C bug.
13085
13086 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
13087
13088         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
13089         (func_ln_if_changed) Remove forcibly for no error message
13090         in case file does not exist.
13091
13092 2005-04-19  Simon Josefsson  <jas@extundo.com>
13093
13094         * gnulib-tool (Options): Make --symlink mean --symbolic.
13095
13096 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
13097
13098         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
13099
13100 2005-04-16  Simon Josefsson  <jas@extundo.com>
13101
13102         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
13103
13104 2005-04-15  Simon Josefsson  <jas@extundo.com>
13105
13106         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
13107
13108 2005-04-15  Simon Josefsson  <jas@extundo.com>
13109
13110         * gnulib-tool: Rename --symlink to --symbolic.
13111
13112 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
13113
13114         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
13115         symbolic links to files instead of copying/moving.  Add --aux-dir,
13116         specifying directory relative --dir where auxiliary build tools
13117         are placed.
13118
13119 2005-04-14  Bruno Haible  <bruno@clisp.org>
13120
13121         * modules/allocsa (License): Change to LGPL.
13122         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
13123
13124 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13125
13126         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
13127         that "UTC +1 second" continues to work.  Problem reported
13128         by Dmitry V. Levin.
13129         (relunit_snumber): New rule.
13130         (relunit): Use it.
13131
13132 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13133
13134         * lib/getdate.y (universal_time_zone_table): New constant.
13135         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
13136         universal_time_zone_table.
13137         (lookup_zone): Prefer universal_time_zone_table to
13138         local_time_zone_table, so that "GMT" time stamps are allowed in
13139         London during the summer.  Problem reported by Ian Abbott.
13140
13141 2005-04-12  Jim Meyering  <jim@meyering.net>
13142
13143         * lib/human.c (humblock): Set *options even when returning due to
13144         xstrtoumax conversion failure.  Thanks to a used-uninitialized
13145         warning from gcc-4.
13146
13147 2005-04-09  Jim Meyering  <jim@meyering.net>
13148
13149         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
13150         -Wuninitialized: initialize tm0.tm_year.
13151
13152 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
13153
13154         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
13155         count, since there's no maximum.  All uses changed.
13156         Add member dsts_seen.
13157         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
13158         not being INT_MAX.
13159         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
13160         Use pc_rels_seen to decide whther a date is absolute.
13161
13162         * lib/getdate.y (number): Don't overwrite year.
13163         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
13164         check.
13165
13166 2005-04-02  Simon Josefsson  <jas@extundo.com>
13167
13168         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
13169         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
13170
13171 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
13172
13173         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
13174         where no absolute path name can be longer than PATH_MAX.
13175
13176 2005-03-27  Jim Meyering  <jim@meyering.net>
13177
13178         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
13179
13180 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
13181
13182         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
13183         "one's complement" -> "ones' complement" in comment, as per Knuth.
13184         "value of type" -> "type or expression" in comment.
13185         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
13186
13187 2005-03-26  Jim Meyering  <jim@meyering.net>
13188
13189         Comment nits.
13190         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
13191         Correct typos: s/or/of/.
13192
13193 2005-03-26  Jim Meyering  <jim@meyering.net>
13194
13195         * modules/check-include-files: Move to ../ and rename to...
13196         * check-module: ...this.
13197
13198 2005-03-25  Jim Meyering  <jim@meyering.net>
13199
13200         * modules/xvasprintf (Files): Add xalloc.h.
13201
13202 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
13203
13204         * modules/gettext (Files): config/config.rpath ->
13205         build-aux/config.rpath
13206         * modules/iconv (Files): Likewise.
13207         Problem reported by Oskar Liljeblad.
13208
13209 2005-03-23  Jim Meyering  <jim@meyering.net>
13210
13211         * modules/check-include-files: New script to check for
13212         missing dependencies, multiple includes, etc.
13213
13214         * modules/c-strtold (Depends-on): Add xalloc.
13215         * modules/c-strtod (Depends-on): Add xalloc.
13216         * modules/hash (Depends-on): Add xalloc.
13217         (Files): Remove lib/xalloc.h.
13218
13219         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
13220         * modules/userspec (Files): Add lib/inttostr.h.
13221
13222 2005-03-23  Jim Meyering  <jim@meyering.net>
13223
13224         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
13225
13226 2005-03-22  Jim Meyering  <jim@meyering.net>
13227
13228         * modules/stat-macros: New module.
13229         * modules/canonicalize, modules/euidaccess, modules/file-type,
13230         * modules/filemode, modules/lchown, modules/makepath,
13231         * modules/rmdir, modules/stat: Depend on new stat-macros module
13232         rather than listing lib/stat-macros.h manually.
13233         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
13234
13235 2005-03-22  Jim Meyering  <jim@meyering.net>
13236
13237         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
13238
13239 2005-03-22  Bruno Haible  <bruno@clisp.org>
13240
13241         * config/srclist.txt: Replace target directory 'config' with
13242         'build-aux'.
13243         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
13244         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
13245         ../build-aux/.
13246
13247 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
13248
13249         * modules/chdir-long (Depends-on): Add mempcpy.
13250
13251         * modules/acl, modules/backupfile, modules/c-strtod,
13252         modules/c-strtold, modules/canon-host, modules/canonicalize,
13253         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
13254         modules/exclude, modules/exitfail, modules/file-type,
13255         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
13256         modules/getdate, modules/getline, modules/getpagesize,
13257         modules/getpass, modules/getugroups, modules/group-member,
13258         modules/hard-locale, modules/hash, modules/human, modules/idcache,
13259         modules/inttostr, modules/long-options, modules/makepath,
13260         modules/md5, modules/memcasecmp, modules/memcoll,
13261         modules/modechange, modules/mountlist, modules/path-concat,
13262         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
13263         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
13264         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
13265         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
13266         modules/strftime, modules/strndup, modules/strverscmp,
13267         modules/timespec, modules/unlocked-io, modules/userspec,
13268         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
13269         modules/yesno:
13270         Remove lib_SOURCES line from Makefile.am section, as this is now
13271         done automatically by the corresponding Autoconf macro.
13272
13273 2005-03-21  Jim Meyering  <jim@meyering.net>
13274
13275         Changes imported from coreutils.
13276
13277         * lib/cycle-check.c: Don't include xalloc.h.
13278
13279         * lib/path-concat.c: Don't include assert.h.
13280         (path_concat): Remove assertion that would have triggered
13281         for ABASE starting with more than one slash.
13282         Reported by Andreas Schwab.
13283
13284         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
13285         properly when ABASE is an absolute file name.
13286         Correct the description of this function.
13287         Include <assert.h>.
13288         Add an assertion and a test driver.
13289         This fixes a bug introduced on 2004-07-02.
13290         Andreas Schwab reported the resulting failure of cp --parents:
13291         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
13292
13293 2005-03-21  Jim Meyering  <jim@meyering.net>
13294
13295         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
13296         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
13297
13298 2005-03-21  Jim Meyering  <jim@meyering.net>
13299         and  Paul Eggert  <eggert@cs.ucla.edu>
13300
13301         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
13302         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
13303         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
13304         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
13305         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
13306         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
13307         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
13308         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
13309         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
13310         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
13311         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
13312         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
13313         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
13314         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
13315         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
13316         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
13317         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
13318         for these modules.
13319
13320 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
13321
13322         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
13323         (which shouldn't happen), generate nothing instead of returning 0
13324         immediately, so that nstrftime (NULL, ...) doesn't return 0.
13325
13326 2005-03-16  Bruno Haible  <bruno@clisp.org>
13327
13328         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
13329         HAVE_LONGLONG_64BIT.
13330
13331 2005-03-16  Bruno Haible  <bruno@clisp.org>
13332
13333         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
13334         HAVE_LONGLONG_64BIT.
13335
13336 2005-03-16  Bruno Haible  <bruno@clisp.org>
13337
13338         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
13339         HAVE_LONGLONG_64BIT.
13340
13341 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13342
13343         * lib/strftime.c (my_strftime): Prepend space to format so that we can
13344         reliably distinguish strftime failure from empty output on POSIX
13345         hosts.
13346
13347 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13348
13349         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
13350         (iconv_string): Don't guess a size-zero buffer, as that might cause
13351         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
13352         result would be 'too large', where 'too large' is (heuristically)
13353         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
13354         overflow concerns.  This will prevent some unwanted malloc failures
13355         when the inputs are very large.
13356
13357 2005-03-15  Karl Berry  <karl@gnu.org>
13358
13359         * config/srclist.txt (config.rpath): from gettext.
13360         * config/config.rpath: update.
13361
13362 2005-03-15  Bruno Haible  <bruno@clisp.org>
13363
13364         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
13365         to 'negate'.
13366
13367         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
13368         variable.
13369
13370         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
13371         results.
13372
13373 2005-03-14  Simon Josefsson  <jas@extundo.com>
13374
13375         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
13376         <fx@gnu.org>.
13377
13378 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
13379
13380         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
13381         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
13382         intprops.h.
13383         * lib/strtol.c: Likewise.
13384
13385 2005-03-14  Jim Meyering  <jim@meyering.net>
13386
13387         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
13388         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
13389         to be nonzero so that we (and caller) can detect the difference
13390         between a valid zero-length expansion and an error return, even
13391         when the underlying strftime fails before writing anything into
13392         that location.
13393
13394 2005-03-14  Bruno Haible  <bruno@clisp.org>
13395
13396         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
13397         Update from GNU gettext 0.14.3.
13398
13399 2005-03-10  Jim Meyering  <jim@meyering.net>
13400
13401         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
13402
13403 2005-03-10  Jim Meyering  <jim@meyering.net>
13404
13405         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
13406         so that this module works on systems without fchdir.
13407
13408 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
13409
13410         Factor int-properties macros into a single file, except for
13411         glibc-related files.
13412         * lib/intprops.h: New file.
13413         * lib/getloadavg.c: Include it instead of limits.h.
13414         (INT_STRLEN_BOUND): Remove.
13415         * lib/human.c: Include intprops.h.
13416         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
13417         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
13418         302/1000.
13419         * lib/inttostr.h: Include intprops.h instead of limits.h.
13420         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
13421         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
13422         for consistency with intprops.h.
13423         (time_t_is_integer, twos_complement_arithmetic): Use them.
13424         * lib/sig2str.h: Include <signal.h>, intprops.h.
13425         (INT_STRLEN_BOUND): Remove.
13426         * lib/strftime.c (TYPE_SIGNED): Remove.
13427         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
13428         * lib/strtol.c: Adjust comments to match intprops.h.
13429         * lib/userspec.c: Include intprops.h.
13430         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
13431         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
13432         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
13433         instead of rolling our own expressions.
13434         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
13435
13436         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
13437         instead of int.
13438         (my_strftime): Do not mishandle years close to INT_MAX, by doing
13439         the right thing even if adding 1900 would overflow.  Similarly
13440         for tm_mon + 1 and tm_yday + 1.
13441         Make %Y always equivalent to %C%y, and similarly for %G and %g.
13442         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
13443         (DO_SIGNED_NUMBER): New macro.
13444         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
13445
13446 2005-03-07  Bruno Haible  <bruno@clisp.org>
13447
13448         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
13449
13450 2005-03-07  Bruno Haible  <bruno@clisp.org>
13451
13452         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
13453
13454 2005-03-04  Derek R. Price  <derek@ximbiot.com>
13455
13456         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
13457         (func_import): Only replace files via --import when they have actually
13458         changed.
13459
13460 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13461
13462         * m4/mmap-anon.m4: New file.
13463         * m4/pagealign_alloc.m4: New file.
13464
13465 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13466             Bruno Haible  <bruno@clisp.org>
13467
13468         * modules/pagealign_alloc: New file.
13469         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
13470
13471 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13472             Bruno Haible  <bruno@clisp.org>
13473
13474         * lib/pagealign_alloc.h: New file.
13475         * lib/pagealign_alloc.c: New file.
13476
13477 2005-03-03  Bruno Haible  <bruno@clisp.org>
13478
13479         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
13480         Use an all-permissive copyright notice, recommended by RMS.
13481
13482 2005-03-02  Bruno Haible  <bruno@clisp.org>
13483
13484         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
13485         of AIX, the replacement has to be done only after <string.h> is
13486         included, therefore not in config.h. stpncpy.h does the replacement,
13487         and stpncpy.c uses it.
13488
13489 2005-03-02  Bruno Haible  <bruno@clisp.org>
13490
13491         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
13492         stpncpy.c uses it.
13493
13494 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13495
13496         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
13497         The workaround isn't strictly needed for POSIX conformance, and
13498         it's too much of a pain to configure and maintain.  We'll ask
13499         people to fix their kernels instead.
13500         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
13501         (NANOSLEEP_BUG_WORKAROUND): Remove.
13502         (xnanosleep): Remove the workaround.
13503
13504 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13505
13506         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
13507         Reported by Derek Price.
13508         (Include): Add "timespec.h".
13509
13510         * modules/xnanosleep (Depends-on): Remove gethrxtime.
13511
13512 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13513
13514         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
13515         to detect nanosleep bug.
13516
13517 2005-03-01  Bruno Haible  <bruno@clisp.org>
13518
13519         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
13520
13521 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
13522
13523         * modules/gethrxtime: New file.
13524         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
13525         (Depends-on): Add gethrxtime.
13526         (configure.ac): Add gl_XNANOSLEEP.
13527         (Makefile.am): Remove lib_SOURCES line.
13528
13529 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13530
13531         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
13532         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
13533
13534 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13535
13536         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
13537         * lib/timespec.h (gettime): Return void, since it always
13538         succeeds now.  All uses changed.
13539         * lib/gettime.c (gettime) Likewise.
13540         [HAVE_NANOTIME]: Prefer nanotime.
13541         Assume gettimeofday succeeds, as POSIX requires.
13542         Assime time () succeeds, since other code already does.
13543         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
13544         (timespec_subtract): Remove.
13545         (NANOSLEEP_BUG_WORKAROUND): New constant.
13546         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
13547         things considerably.  Use it only on GNU/Linux hosts, since the
13548         workaround shouldn't be needed elsewhere.
13549
13550 2005-02-24  Bruno Haible  <bruno@clisp.org>
13551
13552         * modules/gettext (Files): Add m4/glibc2.m4.
13553
13554 2005-02-24  Bruno Haible  <bruno@clisp.org>
13555
13556         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
13557         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
13558         * m4/progtest.m4:
13559         Update from GNU gettext 0.14.2.
13560         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
13561
13562 2005-02-24  Bruno Haible  <bruno@clisp.org>
13563
13564         * lib/localcharset.c: Update from GNU gettext 0.14.2.
13565         * lib/config.charset: Update from GNU gettext 0.14.2.
13566
13567 2005-02-24  Bruno Haible  <bruno@clisp.org>
13568
13569         * lib/gettext.h: Update from GNU gettext 0.14.2.
13570
13571 2005-02-23  Simon Josefsson  <jas@extundo.com>
13572
13573         * m4/iconvme.m4: New file.
13574
13575 2005-02-23  Jim Meyering  <jim@meyering.net>
13576
13577         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
13578         change.
13579         Thanks to Bruno Haible for catching it.
13580
13581 2005-02-22  Simon Josefsson  <jas@extundo.com>
13582
13583         * modules/iconvme: New file.
13584
13585         * MODULES.html.sh: Add iconvme.
13586
13587 2005-02-22  Simon Josefsson  <jas@extundo.com>
13588
13589         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
13590
13591 2005-02-22  Simon Josefsson  <jas@extundo.com>
13592
13593         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
13594
13595 2005-02-22  Jim Meyering  <jim@meyering.net>
13596
13597         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
13598         s/ifndef/ifdef/.
13599
13600 2005-02-20  Neil Conway  <neilc@samurai.com>
13601
13602         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
13603         returned by OSX/Darwin if the specified buffer is not large
13604         enough for the hostname.
13605
13606 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13607
13608         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
13609         pass it to _help, otherwise the latter coredumps trying to
13610         dereference state.root_argp.
13611
13612 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13613
13614         * modules/chdir-long (Depends-on): Add memrchr.
13615         * modules/memrchr (Files): Add lib/memrchr.h.
13616         (Include): "memrchr.h".
13617
13618 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13619
13620         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
13621
13622 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13623
13624         * lib/memrchr.h: New file.
13625         * lib/chdir-long.c: Include it.
13626         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
13627         Don't bother including stddef.h.
13628
13629 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
13630
13631         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
13632         inclusion.
13633         Include <sys/types.h>, for dev_t.
13634         (ME_DUMMY, ME_REMOTE): Move from here....
13635         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
13636         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
13637         Dmitry V. Levin.
13638         Include mountlist.h first, to test the interface.
13639
13640 2005-01-29  Bruno Haible  <bruno@clisp.org>
13641
13642         * lib/progname.c (program_name): Initialize.
13643         Needed when linking statically on MacOS X.
13644
13645 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13646
13647         Sync from coreutils.
13648         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
13649         (Depends-on): Add c-strtod.
13650         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
13651
13652 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13653
13654         Sync from coreutils.
13655         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
13656
13657         Remove files that are specific to coreutils.
13658         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
13659
13660 2005-01-28  Bruno Haible  <bruno@clisp.org>
13661
13662         * modules/javacomp: New file.
13663         * MODULES.html.sh (Java): Add javacomp.
13664
13665 2005-01-28  Bruno Haible  <bruno@clisp.org>
13666
13667         * m4/javacomp.m4: New file, from GNU gettext.
13668
13669 2005-01-28  Bruno Haible  <bruno@clisp.org>
13670
13671         * lib/javacomp.sh.in: New file, from GNU gettext.
13672         * lib/javacomp.h: New file, from GNU gettext.
13673         * lib/javacomp.c: New file, from GNU gettext.
13674
13675 2005-01-26  Simon Josefsson  <jas@extundo.com>
13676
13677         * lib/gai_strerror.c: Use GPL in header.
13678
13679 2005-01-26  Bruno Haible  <bruno@clisp.org>
13680
13681         * modules/javaexec: New file.
13682         * MODULES.html.sh (Java): Add javaexec.
13683
13684 2005-01-26  Bruno Haible  <bruno@clisp.org>
13685
13686         * m4/javaexec.m4: New file, from GNU gettext.
13687
13688 2005-01-26  Bruno Haible  <bruno@clisp.org>
13689
13690         * lib/javaexec.sh.in: New file, from GNU gettext.
13691         * lib/javaexec.h: New file, from GNU gettext.
13692         * lib/javaexec.c: New file, from GNU gettext.
13693
13694 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13695
13696         * modules/lchown (Depends-on): Remove lchown.h
13697
13698 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13699
13700         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
13701         must be defined if the header file was not found, in order
13702         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
13703
13704 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13705
13706         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
13707         initializers for struct pentry_state.
13708         (__argp_error): Check return value of __asprintf
13709         (__argp_failure): Translate error message
13710
13711         * lib/argp-parse.c: Removed braces around the expansion of N_()
13712
13713 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
13714
13715         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
13716         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
13717         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
13718         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
13719         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
13720         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
13721         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
13722         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
13723         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
13724         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
13725         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
13726         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
13727         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
13728         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
13729         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
13730         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
13731         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
13732         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
13733         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
13734         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
13735         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
13736         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
13737         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
13738         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
13739         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
13740         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
13741         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
13742         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
13743         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
13744         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
13745         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
13746         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
13747         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
13748         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
13749         xstrtol.m4, xstrtoumax.m4, yesno.m4:
13750         Use an all-permissive copyright notice, recommended by RMS.
13751
13752 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
13753
13754         * modules/chdir-long (Depends-on): Remove mempcpy.
13755
13756 2005-01-21  Jim Meyering  <jim@meyering.net>
13757
13758         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
13759         same value as for Solaris 9.
13760
13761         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
13762         component length.  This included changing the parameter to be
13763         of type `char *' rather than `char const *'.
13764         * lib/chdir-long.h (chdir_long): Update prototype.
13765
13766         * lib/openat.c (fdopendir, fstatat): New functions.
13767         * lib/openat.h: Include headers required for use of DIR and struct
13768         stat.
13769         [AT_SYMLINK_NOFOLLOW]: Define.
13770         (fdopendir, fstatat): Add prototypes.
13771
13772 2005-01-21  Bruno Haible  <bruno@clisp.org>
13773
13774         * modules/classpath: New file.
13775         * MODULES.html.sh (Java): Add classpath.
13776
13777 2005-01-21  Bruno Haible  <bruno@clisp.org>
13778
13779         * lib/classpath.h: New file, from GNU gettext.
13780         * lib/classpath.c: New file, from GNU gettext.
13781
13782 2005-01-20  Simon Josefsson  <jas@extundo.com>
13783
13784         * modules/version-etc-fsf: New file.
13785
13786 2005-01-20  Simon Josefsson  <jas@extundo.com>
13787
13788         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
13789         * lib/version-etc.c: Remove version_etc_copyright.
13790         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
13791         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
13792
13793 2005-01-20  Simon Josefsson  <jas@extundo.com>
13794
13795         * lib/base64.h (isbase64): Add.
13796
13797         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
13798         using a unsigned prototype, don't inline.
13799         (base64_decode): Use it.
13800
13801 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13802
13803         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
13804         it.
13805
13806 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13807
13808         * lib/save-cwd.c (save_cwd): Remove code to support the case
13809         where fchdir is missing or flaky.
13810
13811 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13812
13813         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
13814
13815 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
13816
13817         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
13818         AC_LIBSOURCES now does this.
13819         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
13820         with new ullong_max module.
13821
13822 2005-01-19  Bruno Haible  <bruno@clisp.org>
13823
13824         * modules/sh-quote: New file.
13825         * MODULES.html.sh (Executing programs): Add sh-quote.
13826
13827 2005-01-19  Bruno Haible  <bruno@clisp.org>
13828
13829         * lib/sh-quote.h: New file, from GNU gettext.
13830         * lib/sh-quote.c: New file, from GNU gettext.
13831
13832 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13833
13834         Merge from coreutils.
13835         * m4/ullong_max.m4: New file.
13836         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
13837         (gl_MACROS): Assume localeconv exists.
13838
13839 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13840
13841         Merge changes from coreutils, as described below in several
13842         changelogs dated today.
13843
13844         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
13845         (O_DIRECTORY): Remove; not needed here, since "." must be
13846         a directory.  All uses removed.
13847         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
13848         universal on Suns, and we also need to test for IRIX.
13849         Revamp code to use 'if' rather than '#if'.
13850         Avoid unnecessary comparison of cwd->desc to 0.
13851
13852         * lib/utimens.c (futimens): Robustify the previous patch, by checking
13853         for known valid error numbers rather than observed invalid ones.
13854
13855 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13856
13857         * modules/ullong_max: New file.
13858
13859         * modules/chdir-long, modules/openat: New files.
13860         * modules/save-cwd (Depends-on): Depend on chdir-long.
13861         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
13862
13863 2005-01-18  Jim Meyering  <jim@meyering.net>
13864
13865         Merge from coreutils.
13866         * m4/chdir-long.m4, m4/openat.m4: New files.
13867         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
13868         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
13869         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
13870         is sane and DOES follow symlinks.  Besides, testing 20 different
13871         systems found no broken chown implementations.
13872         Prompted by a change in rsync's copy of this macro.
13873         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
13874
13875         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
13876
13877         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
13878         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
13879         NULL-means-set-to-current-time semantics.
13880         Remove temporary file immediately, rather than waiting
13881         for configure's at-exit trap code to do it.
13882
13883 2005-01-18  Jim Meyering  <jim@meyering.net>
13884
13885         * lib/version-etc.c (version_etc_copyright): Update copyright date.
13886
13887         * lib/utimens.c (futimens): Account for the fact that futimes
13888         can also fail with errno == ENOSYS or errno == ENOENT.
13889         Patch from Dmitry V. Levin.
13890
13891         Change the name of the robust chdir function from chdir to chdir_long.
13892         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
13893         (restore_cwd): Use chdir_long, not chdir.
13894         * lib/chdir-long.c: Renamed from chdir.c.
13895         * lib/chdir-long.h: Renamed from chdir.h.
13896         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
13897         Hurd.
13898
13899 2005-01-18  Bruno Haible  <bruno@clisp.org>
13900
13901         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
13902         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
13903         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
13904         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
13905         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
13906         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
13907         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
13908         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
13909         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
13910         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
13911         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
13912         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
13913         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
13914         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
13915         Use an all-permissive copyright notice, recommended by RMS.
13916
13917 2005-01-18  Bob Proulx  <bob@proulx.com>
13918
13919         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
13920         simplify offsetof() macro construct to avoid compile failure with
13921         native HP-UX 11.0 ANSI C compiler.
13922
13923 2005-01-17  Bruno Haible  <bruno@clisp.org>
13924
13925         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
13926         redundant because stpncpy.m4 takes care of it.
13927
13928 2005-01-17  Bruno Haible  <bruno@clisp.org>
13929
13930         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
13931
13932 2005-01-17  Bruno Haible  <bruno@clisp.org>
13933
13934         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
13935         used.
13936
13937 2005-01-17  Bruno Haible  <bruno@clisp.org>
13938
13939         * lib/fwriteerror.h (fwriteerror): Change specification to include
13940         fclose.
13941         * lib/fwriteerror.c: Include <stdbool.h>.
13942         (fwriteerror): At the end, close the file stream. Record whether
13943         stdout was already closed.
13944
13945 2005-01-17  Bruno Haible  <bruno@clisp.org>
13946
13947         * lib/execute.c (environ): Declare if needed.
13948         * lib/pipe.c (environ): Likewise.
13949         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
13950
13951 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13952
13953         * modules/argp: Depend on vsnprintf
13954
13955 2005-01-10  Jim Meyering  <jim@meyering.net>
13956
13957         * modules/closeout (Depends-on): Add atexit.
13958
13959 2005-01-06  Bruno Haible  <bruno@clisp.org>
13960
13961         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
13962
13963 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13964
13965         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
13966         definitions to be after all include files, to avoid collisions.
13967         Problem reported by Bob Proulx.
13968
13969 2005-01-04  Jim Meyering  <jim@meyering.net>
13970
13971         Changes imported from coreutils.
13972         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
13973         as the mkstemp template, use a temporary directory and an
13974         8.3-friendly template to avoid trouble on systems like DJGPP.
13975         Reported by Juan M. Guerrero via Stepan Kasal.
13976         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
13977         close. Remove the temporary directory right away, rather than waiting
13978         for configure's at-exit trap code to do it.
13979         Suggestion from Stepan Kasal.
13980
13981 2005-01-01  Simon Josefsson  <jas@extundo.com>
13982
13983         * gnulib-tool: Print #include directives when --import'ing.
13984
13985 2004-12-28  Simon Josefsson  <jas@extundo.com>
13986
13987         * tests/test-base64.c: Include required header files.  Remove
13988         unused variables.
13989
13990 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13991
13992         * modules/error (Depends-on): Remove gettext.
13993
13994 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13995
13996         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
13997         not needed.  This removes a dependency on the gettext module.
13998         [defined _LIBC]: Do not include <libintl.h>; not needed.
13999
14000 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14001
14002         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
14003         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
14004
14005 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14006
14007         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
14008         HAVE_DECL_STRTOLD.
14009
14010 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14011
14012         * modules/getdate (Depends-on): Remove alloca-opt.
14013
14014 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14015
14016         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
14017
14018 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14019
14020         * lib/argp-parse.c: Include <stddef.h>.
14021         (alignof, alignto): New macros.
14022         (parser_init): Don't assume that void * is aligned sufficiently
14023         for struct option.
14024
14025         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
14026         need to extend the stack.
14027         (YYINITDEPTH): New macro, so that the initial stack isn't overly
14028         large.
14029
14030 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14031
14032         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
14033
14034 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14035
14036         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
14037         (2004-10-24) change.  Apparently this was a false alarm.
14038
14039         * modules/getdate: Depend on alloca-opt, not alloca.
14040
14041 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14042
14043         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
14044         Remove now-obsolete comment about AIX.
14045         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
14046         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
14047         (YYMAXDEPTH): New macro.
14048
14049 2004-12-18  Simon Josefsson  <jas@extundo.com>
14050
14051         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
14052
14053 2004-12-18  Bruno Haible  <bruno@clisp.org>
14054
14055         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
14056
14057 2004-12-18  Bruno Haible  <bruno@clisp.org>
14058
14059         * lib/fatal-signal.c (fatal_signals): Make non-const.
14060         (init_fatal_signals): New function.
14061         (uninstall_handlers, install_handlers): Ignore signals that were set to
14062         SIG_IGN.
14063         (at_fatal_signal): Call init_fatal_signals.
14064         (init_fatal_signal_set): Likewise. Ignore signals that were set to
14065         SIG_IGN.
14066         Reported by Paul Eggert.
14067
14068 2004-12-18  Bruno Haible  <bruno@clisp.org>
14069
14070         * doc/alloca.texi: New file.
14071         * doc/alloca-opt.texi: New file.
14072
14073 2004-12-17  Jim Meyering  <jim@meyering.net>
14074
14075         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
14076         Otherwise, install-sh could exit with improper exit status when
14077         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
14078
14079 2004-12-16  Simon Josefsson  <jas@extundo.com>
14080
14081         * tests/test-base64.c: Add license.
14082
14083 2004-12-15  Stepan Kasal  <address@hidden>
14084
14085         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
14086
14087 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
14088
14089         * modules/getcwd (Files): Add m4/d-ino.m4.
14090         Suggested by Mark D. Baushke.
14091
14092 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14093
14094         * lib/getdate.y (textint): New member "negative".
14095         (time_zone_hhmm): New function.
14096         Expect 14 shift-reduce conflicts, not 13.
14097         (o_colon_minutes): New rule.
14098         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
14099         (yylex): Set the "negative" member of signed numbers.
14100
14101 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14102
14103         * doc/getdate.texi (Time of day items, Time zone items):
14104         Describe new formats +00:00, UTC+00:00.
14105
14106 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14107
14108         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
14109         spurious "-l"s.  Problem reported by Stepan Kasal.
14110
14111 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
14112
14113         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
14114         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
14115
14116 2004-12-04  Simon Josefsson  <jas@extundo.com>
14117
14118         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
14119         Vandoorselaere <yoann@prelude-ids.org>.
14120
14121 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14122
14123         Changes imported from coreutils.
14124         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
14125         exist.
14126         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
14127
14128 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14129
14130         Changes imported from coreutils.
14131         * lib/hard-locale.c: Assume <locale.h> exists.
14132         Include "strdup.h".
14133         (GLIBC_VERSION): New macro.
14134         (hard_locale): Assume setlocale exists.
14135         Rewrite to avoid #ifdef.
14136         Use strdup rather than malloc + strcpy.
14137         * lib/human.c: Assume <locale.h> exists.
14138         (human_readable): Assume localeconv exists.
14139
14140 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14141
14142         * modules/hard-locale (Depends-on): Add strdup.
14143
14144 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
14145
14146         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
14147         convert T2, not T.  (Imported from libc.)
14148
14149 2004-11-30  Simon Josefsson  <jas@extundo.com>
14150
14151         * modules/restrict (License): Change to LGPL.
14152
14153 2004-11-30  Simon Josefsson  <jas@extundo.com>
14154
14155         * m4/restrict.m4: Add copyright and copying conditions.
14156
14157 2004-11-30  Simon Josefsson  <jas@extundo.com>
14158
14159         * m4/base64.m4: New file.
14160
14161 2004-11-30  Simon Josefsson  <jas@extundo.com>
14162
14163         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
14164         base64.
14165
14166         * tests/test-base64.c: New file.
14167
14168         * modules/base64: New file.
14169
14170 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14171
14172         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
14173         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
14174
14175         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
14176
14177 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14178
14179         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
14180         (__getcwd.c): Don't restore errno; glibc doesn't.
14181         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
14182         first, falling back to our code only if its results look suspicious.
14183         Ensure that the resulting buffer is only as large as necessary.
14184
14185         * lib/readutmp.c: Include readutmp.h first.
14186         Include <errno.h>, since readutmp.h no longer does that.
14187         * lib/readutmp.h: Don't include <errno.h>,
14188         <sys/param.h>, <time.h>; not needed to establish interface.
14189         (errno): Remove decl.
14190         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
14191         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
14192         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
14193
14194 2004-11-28  Simon Josefsson  <jas@extundo.com>
14195
14196         * lib/base64.h, base64.c: New file.
14197
14198 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
14199
14200         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
14201
14202 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
14203
14204         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
14205         (Depends-on): Remove pathmax, same.  Add mempcpy.
14206         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
14207         (Makefile.am): Append getcwd.h to lib_SOURCES.
14208         (Include): Add getcwd.h.
14209         (Maintainer): Change from Jim Meyering to "all, glibc",
14210         since getdate now uses intended-for-glibc code.
14211         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
14212         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
14213
14214 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14215
14216         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
14217         HP's ANSI C compiler.
14218         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
14219         Declaring int functions causes warnings on some modern systems and
14220         shouldn't be needed to compile on ancient ones.
14221         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
14222         defined.
14223
14224         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
14225         with the following changes.
14226         (__set_errno): Parenthesize properly.
14227         Include <stdbool.h>.
14228         (MIN, MAX, MATCHING_INO): New macros.
14229         (__getcwd): Define with prototype, not K&R form.
14230         Use heuristics to allocate default buffer on stack if possible.
14231         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
14232         behavior, and to avoid the PATH_MAX limit when computing
14233         ../../../../...
14234         Use MATCHING_INO to compare inode number to file.
14235         Check for arithmetic overflow in size calculations.
14236         Fix bug in reallocation of dot array that caused getcwd to fail
14237         on directories nested deeper than 75.
14238         Be more careful about saving errno on error.
14239         Do not use realloc; use only free+malloc, as this is a bit
14240         more flexible and avoids a needless copy operation.
14241         Do not inspect st_dev and st_ino for symbolic links; POSIX
14242         doesn't specify the latter.
14243         Check for closedir errors.
14244         Avoid needless casts.
14245         Use "#ifdef weak_alias" around weak_alias, to be like other
14246         glibc code.
14247         The following changes to getcwd.c have effect only when used in
14248         gnulib; they have no effect inside glibc proper.
14249         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
14250         as alloca isn't used.
14251         (alloca, __alloca): Likewise.
14252         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
14253         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
14254         unconditionally, as gnulib assumes C89 or better.
14255         Do not include <sys/param.h>.
14256         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
14257         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
14258         better.
14259         (NULL) [!defined NULL]: Remove; we assume C89 or better.
14260         Include <dirent.h> in a way that is compatible with modern Autoconf.
14261         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
14262         New macros, if not already defined.
14263         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
14264         Use "_LIBC", not "defined _LIBC", for consistency.
14265         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
14266         a mempcpy module.
14267         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
14268         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
14269         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
14270         credit only to Jim Meyering and adjust the copyright dates.
14271         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
14272         <stdlib.h>, <unistd.h>, "pathmax.h".
14273         Instead, include "xgetcwd.h" (first) and "getcwd.h".
14274         (INITIAL_BUFFER_SIZE): Remove.
14275         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
14276
14277 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14278
14279         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
14280         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
14281         Use the _ONCE methods, for efficiency.
14282         Check for fcntl.h.  In test program, include <errno.h>
14283         and <fcntl.h> if available.  Remove old K&R cruft from
14284         test program.  Check for common errors in GNU/Linux,
14285         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
14286         don't do AC_LIBOBJ, as that's getcwd.m4's job.
14287         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
14288         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
14289         name accordingly.
14290         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
14291         accommodate new getcwd.c.
14292         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
14293         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
14294         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
14295         that's all we need now.
14296
14297 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14298
14299         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
14300         argp-parse.c depends on getopt internals, that means we should
14301         always use our getopt, to be on the safe side.
14302         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
14303         order not to spoil the result of an eventual previous invocation
14304         of gl_GETOPT_SUBSTITUTE.
14305
14306 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14307
14308         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
14309         redefinition warnings. To avoid them, include the defines
14310         in `#if !defined __need_getopt ... #endif'. The only place
14311         where __getopt_argv_const is used is in definitions
14312         of getopt_long and getopt_long_only below, which are as well
14313         protected by `#ifndef __need_getopt'.
14314         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
14315         __need_getopt after including <stdio.h> and <unistd.h> These
14316         headers might have defined it.
14317
14318 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14319
14320         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
14321
14322 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14323
14324         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
14325         (futimens): New function, which uses futimes if available.
14326         (futimens, utimens): Support timespec==NULL, with same semantics
14327         as utime and utimens.
14328         * lib/utimens.h (futimens): New decl.
14329
14330 2004-11-23  Jim Meyering  <jim@meyering.net>
14331
14332         * lib/getopt_.h: Remove trailing blanks.
14333
14334 2004-11-23  Jim Meyering  <jim@meyering.net>
14335
14336         * lib/__fpending.c: Add comment.
14337
14338 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
14339
14340         * modules/canonicalize (Depends-on): Add xreadlink.
14341         Problem reported by James Youngman.
14342
14343 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
14344
14345         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
14346         New macros.
14347         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
14348         optopt): Use them instead of invoking ## directly; otherwise, the
14349         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
14350
14351 2004-11-19  Bruno Haible  <bruno@clisp.org>
14352
14353         * lib/strtok_r.c: Move comments from here...
14354         * lib/strtok_r.h: ... to here.
14355
14356 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14357
14358         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
14359         implementations that mishandle size_t overflow.
14360
14361 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14362
14363         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
14364         might fail.  Problem reported by Yoann Vandoorselaere.
14365         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
14366         implementations that mishandle size_t overflow.
14367
14368 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14369
14370         * modules/canon-host (Depends-on): Add strdup.
14371
14372 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14373
14374         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
14375
14376 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14377
14378         * lib/canon-host.c: Include "strdup.h".
14379         (canon_host): Use getaddrinfo if available, so that IPv6 works.
14380         Use strdup instead of malloc/strcpy to duplicate strings.
14381
14382         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
14383         (human_space_before_unit): New constant.
14384         * lib/human.c (human_readable): Support it.
14385
14386         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
14387         (xgetcwd): Set errno correctly when failing.
14388         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
14389         the failure is actually due to a PATH_MAX problem.
14390
14391         Further getopt changes to make it more likely that glibc will
14392         buy the changes back.
14393         * lib/getopt.c (POSIXLY_CORRECT): New constant.
14394         (getopt): Use it, so to preserve glibc semantic
14395         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
14396         when compiling for libc.
14397         * lib/getopt_.h (__getopt_argv_const): Bring it back.
14398         (getopt_long, getopt_long_only): Use it.
14399
14400         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14401         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
14402         (getopt): Argv is now char * const *, as per standard.
14403         (_getopt_internal_r, _getopt_internal): Argv is now char **,
14404         not char *__getopt_argv_const *.
14405         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14406         _getopt_long_only_r): Likewise.
14407         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
14408         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14409         _getopt_long_r, _getopt_long_only_r): Likewise.
14410         * lib/getopt_.h (__getopt_argv_const): Remove.
14411         (getopt): Argv is now char * const *, as per standard.
14412
14413         * lib/getdate.y (tORDINAL): New token.
14414         (day, relunit): Allow it for relative times.
14415         (relative_time_table): Use tORDINAL for ordinals.
14416
14417 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14418
14419         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
14420         Document that "second" isn't allowed as an ordinal number.
14421
14422 2004-11-16  Jim Meyering  <jim@meyering.net>
14423
14424         * modules/closeout (Depends-on): Add fpending.
14425
14426 2004-11-15  Jim Meyering  <jim@meyering.net>
14427
14428         * lib/closeout.c: Include "__fpending.h" once again.
14429         Include <stdbool.h>.
14430         (close_stdout): Don't fail just because stdout was closed initially,
14431         since some programs don't write to stdout in the normal course of
14432         operation (other than --version and --help), and we don't want this
14433         function to make e.g. `touch file >&-' fail.
14434         But do fail if it was closed and someone has tried to write to it.
14435         E.g., `printf foo >&-' must fail.
14436
14437 2004-11-13  Jim Meyering  <jim@meyering.net>
14438
14439         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
14440
14441 2004-11-12  Simon Josefsson  <jas@extundo.com>
14442
14443         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
14444         small doc fix is still pending.
14445
14446 2004-11-11  Simon Josefsson  <jas@extundo.com>
14447
14448         * modules/strtok_r: New file.
14449
14450         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14451         strtok_r.
14452
14453 2004-11-11  Simon Josefsson  <jas@extundo.com>
14454
14455         * m4/strtok_r.m4: New file.
14456
14457         * m4/getopt.m4: Replace opterr.
14458
14459 2004-11-11  Simon Josefsson  <jas@extundo.com>
14460
14461         * lib/strtok_r.h, strtok_r.c: New file.
14462
14463 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14464
14465         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
14466         of replacing opterr, getopt, etc.  This should handle the
14467         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
14468
14469 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14470
14471         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
14472         we can stop lying to compilers about the constness of argv when we
14473         are compiled outside glibc.
14474         (getopt, getopt_long, getopt_long_only): Use it.
14475         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14476         _getopt_internal, getopt): Likewise.
14477         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14478         _getopt_long_only_r): Likewise.
14479         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14480         _getopt_long_r, _getopt_long_only_r): Likewise.
14481
14482         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
14483         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
14484         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
14485         the other external symbols.
14486         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
14487         declaration, since the above renaming now works around collisions.
14488
14489 2004-11-11  Jim Meyering  <jim@meyering.net>
14490
14491         * lib/linebreak.c: Remove trailing blanks.
14492         * lib/alloca_.h: Likewise.
14493         * lib/acosl.c: Likewise.
14494         * lib/euidaccess.c: Likewise.
14495         * lib/allocsa.h: Likewise.
14496
14497 2004-11-10  Simon Josefsson  <jas@extundo.com>
14498
14499         * m4/getaddrinfo.m4: New file.
14500
14501 2004-11-10  Simon Josefsson  <jas@extundo.com>
14502
14503         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
14504
14505 2004-11-10  Simon Josefsson  <jas@extundo.com>
14506
14507         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14508         getaddrinfo.
14509
14510         * modules/getaddrinfo: New file.
14511
14512 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14513
14514         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
14515
14516 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14517
14518         * lib/mktime.c (SHR): New macro, which is a portable
14519         substitute for >> that should work even on Crays.
14520         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
14521         Problem reported by Mark D. Baushke in
14522         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
14523         * lib/getdate.y (SHR): Likewise.
14524         (tm_diff): Use it.
14525         * lib/strftime.c (SHR): Likewise.
14526         (tm_diff): Use it.
14527         * lib/quotearg.c (struct quoting_options): Use unsigned int for
14528         quote_these_too, so that right shifts are well defined.  All uses
14529         changed.
14530
14531 2004-11-10  Jim Meyering  <jim@meyering.net>
14532
14533         Ensure that no close failure goes unreported.
14534         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
14535         return early when it seems there's nothing to flush.
14536         Don't include __fpending.h.
14537
14538 2004-11-10  Jim Meyering  <jim@meyering.net>
14539
14540         * modules/closeout (Depends-on): Remove fpending.
14541
14542 2004-11-10  Jim Meyering  <jim@meyering.net>
14543
14544         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
14545
14546 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14547
14548         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
14549         gl_FUNC_STRFTIME.
14550         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
14551         and AC_REQUIRE when possible, to avoid duplicate checks.
14552         Check for <wchar.h>.
14553
14554 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14555
14556         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
14557
14558 2004-11-09  Bruno Haible  <bruno@clisp.org>
14559
14560         * m4/sockpfaf.m4: New file.
14561
14562 2004-11-05  Bruno Haible  <bruno@clisp.org>
14563
14564         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
14565         Reported by Mark D. Baushke <mdb@cvshome.org>.
14566
14567 2004-11-04  Bruno Haible  <bruno@clisp.org>
14568
14569         2004-09-11  Bruno Haible  <bruno@clisp.org>
14570                 * allocsa.valgrind: New file.
14571         2004-02-06  Bruno Haible  <bruno@clisp.org>
14572                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
14573                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
14574                 Reported by Christopher Seip <chris.seip@hp.com>.
14575
14576 2004-11-04  Bruno Haible  <bruno@clisp.org>
14577
14578         * modules/allocsa (Files): Add lib/allocsa.valgrind.
14579         (Makefile.am): Distribute it.
14580
14581 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
14582
14583         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
14584         with errno == ERANGE if the buffer is too small.
14585         Problem reported by Mark D. Baushke.
14586
14587 2004-11-03  Albert Chin  <china@thewrittenword.com>
14588             Paul Eggert  <eggert@cs.ucla.edu>
14589
14590         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
14591         equivalent, substitute $ac_type for equivalent type rather than
14592         blindly using uint32_t *always* which won't work if uint32_t is not
14593         available.  Define _UINT32_T to work around typedef of uint32_t if
14594         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
14595         2.5.1.
14596
14597 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14598
14599         * m4/jm-macros.m4: Sync from coreutils.
14600         (gl_MACROS): Check for mbrlen, for pathchk.
14601         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
14602
14603 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14604
14605         * lib/xreadlink.c (MAXSIZE): New macro.
14606         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
14607         size does not exceed MAXSIZE.  Avoid cast.
14608         As suggested by Mark D. Baushke in
14609         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
14610         if readlink fails with buffer size just under MAXSIZE, try again
14611         with MAXSIZE.
14612
14613 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14614
14615         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
14616
14617 2004-11-02  Derek R. Price  <derek@ximbiot.com>
14618         and  Paul Eggert  <eggert@cs.ucla.edu>
14619
14620         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
14621         (get_date): Overparenthesize to avoid GCC warning.
14622
14623 2004-11-02  Bruno Haible  <bruno@clisp.org>
14624
14625         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
14626         returns void.
14627
14628 2004-11-02  Bruno Haible  <bruno@clisp.org>
14629
14630         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
14631         function returns void.
14632
14633 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14634
14635         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
14636         fflush_unlocked, flockfile, funlockfile, funlockfile,
14637         fputs_unlocked, putc_unlocked.
14638
14639 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14640
14641         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14642         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
14643         already declared.
14644
14645 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14646
14647         * modules/getdate (Files): Add doc/getdate.texi.
14648         (Depends-on): Add setenv, xalloc.
14649
14650 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14651
14652         * lib/getdate.y: Add support for TZ="foo" within a date string.
14653         Fix some bugs near time_t boundaries.  Reject dates with
14654         out-of-range components, e.g., "Sept 31".
14655         Include <stdlib.h>, "setenv.h", "xalloc.h".
14656         (ISDIGIT_LOCALE): Remove; unused.
14657         Note that the TZ and time functions used here are not reentrant.
14658         (mktime_ok, get_tz): New functions.
14659         (TZBUFSIZE): New constant.
14660         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
14661         This requires that we sometimes generate our own TZ="XXX..." setting.
14662
14663 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14664
14665         * doc/getdate.texi: New file, from coreutils with modifications for
14666         the new TZ parsing.
14667
14668 2004-10-27  Derek R. Price  <derek@ximbiot.com>
14669
14670         * lib/mktime.c (not_equal_tm): Remove redundant check.
14671
14672 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14673
14674         * modules/regex (lib_SOURCES): Add regex.c.
14675         Reported by James Youngman in
14676         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
14677
14678 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14679
14680         * lib/getdate.y: Use Bison 1.875 features, and some minor
14681         code cleanups.  This change does not affect semantics.
14682         Don't include <stdlib.h>; no longer needed.
14683         Don't include unlocked-io.h; only the "#if TEST" code uses
14684         stdio, and performance isn't crucial there.
14685         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
14686         Bison 1.875 features as described below.
14687         All uses of "PC." replaced by "pc->".
14688         (YYSTYPE): Add a forward declaration.
14689         (yylex, yyerror): Use full prototypes in forward decls.
14690         Use "%pure-parser" rather than obsolescent "%pure_parser".
14691         Use %parse-param and %lex-param instead of obsolescent
14692         YYPARSE_PARAM and YYLEX_PARAM.
14693         (meridian_table, month_and_day_table, time_units_table,
14694         relative_time_table, time_zone_table, military_table,
14695         lookup_zone, lookup_word, get_date):
14696         Use NULL instead of 0 where appropriate.
14697         (to_hour): Avoid abort (), to avoid a dependency on
14698         stdlib.h.
14699         (yyerror, yylex): Now accepts parser_control * arg.
14700         (main) [TEST]: Use '\0' rather than 0 for char.
14701
14702 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14703
14704         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
14705
14706 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14707
14708         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
14709         It's now the caller's responsibility to handle the case where
14710         !HAVE_GETPAGESIZE && !defined getpagesize.
14711
14712         * lib/mktime.c (leapyear): Arg is long int, not int.
14713
14714 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
14715
14716         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
14717
14718 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
14719
14720         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
14721         missing.  Problem reported by James Youngman.
14722
14723 2004-10-16  Simon Josefsson  <jas@extundo.com>
14724
14725         * gnulib-tool: Fix comments.  Fix parse problem.
14726         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
14727
14728 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
14729
14730         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
14731         implementation of getopt_long.  Problem reported by Alexander Taler in:
14732         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
14733
14734 2004-10-15  Bruno Haible  <bruno@clisp.org>
14735
14736         * gnulib-tool: Untabify. Initialize supplied_libname.
14737         (func_usage): More homogenous output.
14738         (func_modules_transitive_closure, func_modules_to_filelist,
14739         func_emit_lib_Makefile_am): New functions.
14740         (func_import): New function, extracted from big case statement. Use
14741         func_get_license, func_modules_transitive_closure,
14742         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
14743         opt_lgpl. Don't use test -a, as it's not portable.
14744         (func_create_testdir): Use func_modules_transitive_closure,
14745         func_modules_to_filelist, func_emit_lib_Makefile_am.
14746
14747 2004-10-15  Bruno Haible  <bruno@clisp.org>
14748
14749         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
14750
14751 2004-10-15  Bruno Haible  <bruno@clisp.org>
14752
14753         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
14754         the portions belonging to each module.
14755         Suggested by Derek Robert Price <derek@ximbiot.com>.
14756
14757 2004-10-12  Simon Josefsson  <jas@extundo.com>
14758
14759         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14760         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
14761         to real functions.
14762
14763 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14764
14765         * modules/vsnprintf: New file.
14766
14767 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14768
14769         * m4/vsnprintf.m4: New file.
14770
14771 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14772
14773         * lib/vsnprintf.h: New file.
14774         * lib/vsnprintf.c: New file.
14775
14776 2004-10-11  Bruno Haible  <bruno@clisp.org>
14777
14778         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
14779         vsnprintf.
14780
14781 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
14782
14783         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
14784
14785 2004-10-07  Bruno Haible  <bruno@clisp.org>
14786
14787         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
14788         fits into the provided buffer.
14789
14790 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
14791
14792         * lib/diacrit.c, diacrit.h: Add GPL notice.
14793
14794         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
14795         notice.
14796         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
14797         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
14798         This avoids a potential constant-folding bug.
14799
14800 2004-10-05  Bruno Haible  <bruno@clisp.org>
14801
14802         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
14803         for the declaration of strsep.
14804
14805 2004-10-05  Bruno Haible  <bruno@clisp.org>
14806
14807         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
14808
14809 2004-10-04  Simon Josefsson  <jas@extundo.com>
14810
14811         * modules/memmem: New file.
14812         * tests/test-memmem.c: New file.
14813         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
14814
14815 2004-10-04  Simon Josefsson  <jas@extundo.com>
14816
14817         * m4/memmem.m4: New file.
14818
14819 2004-10-04  Simon Josefsson  <jas@extundo.com>
14820
14821         * lib/memmem.h: New file.
14822         * lib/memmem.c: New file, taken from glibc.
14823
14824 2004-10-04  Simon Josefsson  <jas@extundo.com>
14825
14826         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
14827         '#ifdef USE_UNLOCKED_IO'.
14828
14829 2004-10-04  Simon Josefsson  <jas@extundo.com>
14830
14831         * config/srclist.txt: Add memmem from glibc.
14832
14833 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14834
14835         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
14836
14837         * modules/argmatch, modules/argp, modules/closeout, modules/error,
14838         modules/exclude, modules/getdate, modules/getline,
14839         modules/getndelim2, modules/getpass, modules/getpass-gnu,
14840         modules/getusershell, modules/linebuffer, modules/md5,
14841         modules/mountlist, modules/posixtm, modules/readtokens,
14842         modules/readutmp, modules/regex, modules/sha1,
14843         modules/version-etc, modules/yesno:
14844         Remove dependency on unlocked-io.
14845
14846 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14847
14848         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
14849
14850         * m4/unlocked-io.m4: Add copyright notice.
14851         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
14852
14853 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14854
14855         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
14856         * lib/xmalloc.c (xmemdup): Likewise.
14857         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
14858         XFREE): Remove these long-obsolescent macros.
14859         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
14860         * lib/xstrdup.c: Remove.
14861
14862         * lib/regex.c (re_comp): Cast gettext return value to char *,
14863         Problem reported by Martin Neitzel via Mark D. Baushke.
14864
14865 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14866
14867         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
14868         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
14869         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
14870         regex.c, sha1.c, version-etc.c, yesno.c:
14871         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
14872         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
14873         the includer's responsibility.
14874
14875         Sync from coreutils.
14876
14877         * lib/modechange.c (mode_compile): Don't decrement a pointer that
14878         points to the start of a string, as the C Standard says the
14879         resulting behavior is undefined.
14880
14881         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
14882         simple -> simple_backups, numbered_existing ->
14883         numbered_existing_backups, numbered -> numbered_backups
14884         to avoid shadowing problems.  All uses changed.
14885         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
14886         * lib/backupfile.c (check_extension, numbered_backup):
14887         Rename locals to avoid shadowing 'basename'.
14888         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
14889         once.
14890
14891         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
14892         * lib/.cvsignore: Add getopt.h.
14893
14894 2004-10-04  Bruno Haible  <bruno@clisp.org>
14895
14896         * modules/README: New file.
14897         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
14898         not a module.
14899
14900 2004-10-02  Jim Meyering  <jim@meyering.net>
14901
14902         * lib/dirfd.h, getpagesize.h: Add copyright notice.
14903
14904 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14905
14906         * modules/strsep: New file.
14907
14908 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14909
14910         * m4/strsep.m4: New file.
14911
14912 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14913
14914         * lib/strsep.h: New file.
14915         * lib/strsep.c: New file.
14916
14917 2004-10-01  Simon Josefsson  <jas@extundo.com>
14918
14919         * lib/snprintf.c (snprintf): Handle size==0.
14920
14921 2004-10-01  Simon Josefsson  <jas@extundo.com>
14922             Bruno Haible  <bruno@clisp.org>
14923
14924         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
14925         (snprintf): Declare 'args'.
14926
14927 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
14928
14929         * lib/snprintf.c: Remove comments as to why each header is needed.
14930
14931 2004-10-01  Bruno Haible  <bruno@clisp.org>
14932
14933         * MODULES.html.sh: Add strsep.
14934
14935 2004-09-30  Simon Josefsson  <jas@extundo.com>
14936
14937         * modules/snprintf: New file.
14938
14939 2004-09-30  Simon Josefsson  <jas@extundo.com>
14940
14941         * m4/snprintf.m4: New file.
14942
14943 2004-09-30  Simon Josefsson  <jas@extundo.com>
14944
14945         * lib/snprintf.h, lib/snprintf.c: New files.
14946
14947 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14948
14949         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
14950         (hol_entry_help): Never translate an empty string.
14951         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
14952         * lib/argp.h (OPTION_NO_TRANS): New option.
14953
14954 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14955
14956         * modules/argp (Maintainer): Replace Simon Josefsson
14957         by Sergey Poznyakoff.
14958
14959 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14960
14961         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
14962         changes merged back into glibc.
14963
14964 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14965
14966         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
14967
14968 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
14969
14970         * lib/xvasprintf.c: Include xalloc.h.
14971         (xvasprintf): Use xalloc_die, not xmalloc_die.
14972
14973 2004-09-29  Bruno Haible  <bruno@clisp.org>
14974
14975         * modules/alloca-opt: New file, derived from modules/alloca.
14976         * modules/allocsa: Depend on alloca-opt instead of alloca.
14977         * modules/setenv: Likewise.
14978         * modules/vasnprintf: Likewise.
14979         * MODULES.html.sh: Add alloca-opt.
14980
14981 2004-09-28  Simon Josefsson  <jas@extundo.com>
14982
14983         * gnulib-tool: New parameter --lgpl, to asseert that modules are
14984         LGPL, and to replace license template from GPL to LGPL.
14985
14986 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14987
14988         * modules/dummy: Change license to LGPL.
14989
14990 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14991
14992         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
14993
14994 2004-09-24  Simon Josefsson  <jas@extundo.com>
14995
14996         * modules/minmax (License): Change from GPL to LGPL.
14997
14998 2004-09-23  Simon Josefsson  <jas@extundo.com>
14999
15000         * gnulib-tool (--import): Typo.
15001
15002 2004-09-23  Simon Josefsson  <jas@extundo.com>
15003
15004         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
15005
15006 2004-09-22  Bruno Haible  <bruno@clisp.org>
15007
15008         * modules/*: Add 'License' field.
15009         * gnulib-tool: Accept --extract-license option.
15010         (func_get_license): New function.
15011
15012 2004-09-21  Bruno Haible  <bruno@clisp.org>
15013
15014         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
15015         Reported by Simon Josefsson.
15016
15017 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15018
15019         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
15020         gl_AC_TYPE_LONG_LONG.
15021
15022 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15023
15024         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
15025
15026 2004-09-18  Simon Josefsson  <jas@extundo.com>
15027         and  Paul Eggert  <eggert@cs.ucla.edu>
15028
15029         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
15030         calls with autoreconf.  Define GL_LIB.
15031
15032 2004-09-14  Karl Berry  <karl@gnu.org>
15033
15034         * config/srclist.txt: unsync setenv.c, sigh.
15035
15036 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15037
15038         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
15039         Problem reported by Bruno Haible in:
15040         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
15041
15042 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15043
15044         * config/srclist.txt: Comment out argp-pvh.c.
15045
15046 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
15047
15048         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
15049         in case some system header has #define'd it.  Problem reported by
15050         Soeren D. Schulze in
15051         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
15052
15053 2004-09-09  Karl Berry  <karl@gnu.org>
15054
15055         * regex.[ch]: delete from the root.  These were supposed to be
15056                 synced with emacs cvs, but this has not happened for about
15057                 a year, and anyway nothing else uses emacs regex.[ch].
15058                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
15059                 lib/regex[.ch] is untouched.
15060
15061 2004-09-09  Bruno Haible  <bruno@clisp.org>
15062
15063         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
15064
15065 2004-09-09  Bruno Haible  <bruno@clisp.org>
15066
15067         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
15068         modifications.
15069         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
15070
15071 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15072
15073         * modules/xvasprintf: New file.
15074         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
15075
15076 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15077
15078         * lib/xvasprintf.h: New file.
15079         * lib/xvasprintf.c: New file.
15080         * lib/xasprintf.c: New file.
15081
15082 2004-09-08  Bruno Haible  <bruno@clisp.org>
15083
15084         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
15085
15086 2004-09-08  Bruno Haible  <bruno@clisp.org>
15087
15088         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
15089         length is > INT_MAX.
15090         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
15091         more.
15092
15093 2004-09-08  Bruno Haible  <bruno@clisp.org>
15094
15095         * lib/stdint_.h: New file, taken from GNU clisp.
15096
15097 2004-09-08  Bruno Haible  <bruno@clisp.org>
15098             Oskar Liljeblad  <oskar@osk.mine.nu>
15099
15100         * modules/stdint: New file.
15101         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
15102
15103 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15104
15105         Import from coreutils.
15106         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
15107         strings on unbounded length.  alloca's performance benefits aren't
15108         that important here.
15109         (V_STRDUP): Remove.
15110         (parse_with_separator): New function, with most of the internals
15111         of the old parse_user_spec.  Allow user to omit both user and group,
15112         for compatibility with FreeBSD.
15113         Clone only the user name, not the entire spec.
15114         Do not set *uid, *gid unless entirely successful.
15115         Avoid memory leak in some failing cases.
15116         Fix regression for USER.GROUP reported by Dmitry V. Levin in
15117         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
15118         (parse_user_spec): Rewrite to use parse_with_separator.
15119
15120 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15121
15122         * modules/userspec: Don't depend on alloca.
15123
15124 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15125
15126         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
15127
15128 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15129
15130         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
15131         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
15132         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
15133
15134 2004-08-16  Simon Josefsson  <jas@extundo.com>
15135
15136         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
15137         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
15138         Add --dry-run for --import.
15139         Let user provided command line parameters override configure.ac
15140         settings.
15141
15142 2004-08-12  Simon Josefsson  <jas@extundo.com>
15143
15144         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
15145         as discussed with Paul Eggert in threads rooted at
15146         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
15147         and
15148         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
15149         Before, the test was empty, and relied on ELIDE_CODE in source
15150         code.)
15151         (gl_PREREQ_GETOPT): New macro.
15152         (gl_GETOPT): Use them.
15153
15154 2004-08-12  Simon Josefsson  <jas@extundo.com>
15155
15156         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
15157         * lib/getopt_.h: Renamed from getopt.h.
15158
15159 2004-08-12  Simon Josefsson  <jas@extundo.com>
15160
15161         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
15162         Change default library name from libfoo to libgnu.
15163         Now, if you have a configure.ac that says:
15164                 gl_SOURCE_BASE(gl)
15165                 gl_M4_BASE(gl/m4)
15166                 gl_MODULES(error getopt etcetera)
15167                 gl_INIT
15168         you can import all you need by running:
15169                 ../gnulib/gnulib-tool --import
15170
15171         * modules/getopt (Files): Rename getopt.h to getopt_.h.
15172         (Makefile.am): Rewrite, use logic from argz.
15173         (Include): Use <getopt.h> instead of "getopt.h".
15174
15175 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15176
15177         * modules/argp (Files): Add m4/unlocked-io.m4.
15178         (Depends-on): Add extensions.
15179
15180 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15181
15182         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
15183         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
15184         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
15185         Check for program_invocation_name, program_invocation_short_name,
15186         flockfile, funlockfile, features.h, _getopt_long_only_r.
15187
15188 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15189
15190         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
15191         its complicated substitute.
15192         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
15193         and program_invocation_name.
15194         (__argp_basename) [!_LIBC]: Remove; the only use was
15195         replaced by its body.
15196         (__argp_short_program_name): Change condition from
15197         !defined __argp_short_program_name to
15198         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
15199         to match argp-namefrob.h.
15200         (__argp_failure): Don't assume strerror_r returns char *.
15201         * lib/argp-parse.c (N_): Define unconditionally.
15202         (argp_default_options): Fill out initializers with 0 to avoid
15203         gcc warnings.
15204
15205 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15206
15207         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
15208         getopt1.c.
15209
15210 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15211
15212         Merge from coreutils.
15213
15214         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
15215
15216         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
15217         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
15218
15219 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15220
15221         Merge from coreutils.
15222
15223         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
15224         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
15225         for Reliant Unix 5.43.
15226
15227         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
15228         (union fooround): Use uintmax_t, not long int.
15229         The rest is a merge from libc:
15230         [defined _LIBC]: Include <shlib-compat.h>.
15231         (_obstack) [defined _LIBC]: Remove after 2.3.4.
15232
15233         * lib/settime.c (settime): Recode to avoid warning with
15234         Sun Forte C 6U2.
15235
15236         * lib/strverscmp.c: Convert to UTF-8.
15237
15238 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15239
15240         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15241         m4/uintmax_t.m4.
15242
15243 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15244
15245         * modules/xalloc-die: New file.
15246         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
15247
15248         * modules/md5 (Files): Add m4/uint32_t.m4.
15249         * modules/sha1: Renamed from modules/sha.
15250         (Files):
15251         Rename lib/sha.h to lib/sha1.h.
15252         Rename lib/sha.c to lib/sha1.c.
15253         Rename m4/sha.m4 to m4/sha1.m4.
15254         (lib_SOURCES): Likewise.
15255         (configure.ac): Rename gl_SHA to gl_SHA1.
15256         (Include): sha.h -> sha1.h.
15257
15258 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15259
15260         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
15261         * m4/sha1.m4: Renamed from sha.m4.
15262         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
15263
15264 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15265
15266         * lib/obstack.h (obstack_empty_p):
15267         Don't assume that chunk->contents is suitably aligned.
15268         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
15269         Likewise. Problem reported by Benno in
15270         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
15271
15272         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
15273         readable.  This could be improved further but it'd take some work.
15274
15275 2004-08-08  Simon Josefsson  <jas@extundo.com>
15276
15277         * modules/xgethostname (Depends-on): Remove exit and error (not
15278         used).
15279
15280         * modules/getpass-gnu: Add getpass.h.
15281         (Depends-on): Add stdbool.
15282         * modules/getpass: Add getpass.h.
15283
15284 2004-08-08  Simon Josefsson  <jas@extundo.com>
15285
15286         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
15287         Check getpass declaration.
15288
15289 2004-08-08  Simon Josefsson  <jas@extundo.com>
15290
15291         * lib/xgethostname.c: Don't include error.h (not used).
15292
15293         * lib/getpass.h: Add.
15294         * lib/getpass.c: Include getpass.h first.
15295
15296 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
15297
15298         * lib/xalloc-die.c: New file.
15299         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
15300         All uses removed.
15301         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
15302         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
15303         xalloc-die.c.
15304         (_, N_, xalloc_die): Move to xalloc-die.c.
15305         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
15306         so that we needn't mess with xalloc_msg_memory_exhausted.
15307
15308         * lib/sha1.h: Renamed from sha.h.
15309         (SHA1_H): Renamed from _SHA_H.
15310         (sha1_ctx): Renamed from sha_ctx.
15311         (sha1_init_ctx): Renamed from sha_init_ctx.
15312         (sha1_process_block): Renamed from sha_process_block.
15313         (sha1_process_bytes): Renamed from sha_process_bytes.
15314         (sha1_finish_ctx): Renamed from sha_finish_ctx.
15315         (sha1_read_ctx): Renamed from sha_read_ctx.
15316         (sha1_stream): Renamed from sha_stream.
15317         (sha1_buffer): Renamed from sha_buffer.
15318         * lib/sha1.c: Likewise; renamed from sha.c.
15319         Do not include <sys/types.h>.
15320         Include <stddef.h> rather than <stdlib.h>.
15321
15322 2004-08-08  Bruno Haible  <bruno@clisp.org>
15323
15324         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
15325         FILESYSTEM_PREFIX_LEN.
15326         * lib/progreloc.c: Likewise.
15327         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
15328
15329 2004-08-06  Simon Josefsson  <jas@extundo.com>
15330
15331         * modules/progname (Depends-on): Don't depend on stdbool.
15332
15333 2004-08-06  Simon Josefsson  <jas@extundo.com>
15334
15335         * modules/getsubopt: New file.
15336         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15337         getsubopt.
15338
15339 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15340
15341         More merge from coreutils.
15342
15343         * m4/utimens.m4, m4/utimecmp.m4: New files.
15344         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
15345         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
15346         prereq.m4, sha.m4: Import changes from coreutils.
15347
15348 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15349
15350         More merge from coreutils.
15351         * modules/raise, modules/readtokens0, modules/utimens:
15352         * modules/utimecmp, module/xnanosleep: New files.
15353         * modules/strftime: Add lib/strftime.h.
15354         Change include from <time.h> to "strftime.h".
15355         * modules/yesno: Add lib/yesno.h.
15356         * modules/backupfile: Remove lib/addext.c.
15357         * modules/euidaccess: Add stat-macros.h.
15358         * modules/canonicalize, modules/euidaccess,
15359         modules/filemode, modules/lchown, modules/makepath,
15360         modules/rmdir, modules/stat: Likewise.
15361
15362 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15363
15364         Merge from tar.
15365         * lib/argp-help.c (make_hol, hol_append): Don't assume that
15366         SIZE_MAX is a valid preprocessor constant.
15367         (__argp_basename): Change from "#ifndef _LIBC"
15368         to "#ifndef __argp_short_program_name", so that
15369         we don't compile these functions for tar.
15370
15371         More merges from coreutils.
15372         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
15373         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
15374         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
15375         * lib/addext.c: Remove; no longer needed.
15376         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
15377         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
15378         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
15379         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
15380         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
15381         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
15382         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
15383         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
15384         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
15385         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15386         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
15387         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
15388         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
15389         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
15390         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
15391         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
15392         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
15393         Import changes from coreutils.
15394
15395 2004-08-05  Simon Josefsson  <jas@extundo.com>
15396
15397         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
15398
15399 2004-08-05  Simon Josefsson  <jas@extundo.com>
15400
15401         * m4/getsubopt.m4: New file.
15402
15403 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15404
15405         Merge from coreutils.
15406
15407         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
15408         * m4/getcwd-path-max.m4: New files.
15409
15410         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
15411         FILESYSTEM_PREFIX_LEN ->
15412         FILE_SYSTEM_PREFIX_LEN.
15413         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
15414         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
15415         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
15416         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
15417
15418         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
15419         prerequisite modules now handle the DOS stuff.
15420         Don't check for unistd.h.
15421
15422 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15423
15424         Merge from coreutils.
15425
15426         * lib/.gdb-history: Remove; this doesn't belong here.
15427
15428         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
15429         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
15430         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
15431         * lib/getcwd.c: New files.
15432
15433         * lib/dirname.h: Include <stdbool.h>.
15434         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
15435         for consistency with POSIX terminology.  All uses changed.
15436         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
15437         (strip_trailing_slashes): Use bool for booleans.
15438         * lib/stripslash.c (strip_trailing_slashes): Likewise.
15439
15440         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
15441         sometimes returns a positive errno value even when it succeeds.
15442         (print_errno_message) [!LIBC]: Fall back on strerror if
15443         __strerror_r fails.
15444
15445         * lib/path-concat.c (mempcpy): Don't define if a system header defines
15446         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
15447         (longest_relative_suffix): New function.
15448         (path_concat): Use it.  Assume first argument is not NULL.
15449         Port to DOS.  Omit redundant separators.
15450         Report an error instead of returning NULL.
15451         Use mempcpy instead of memcpy.
15452         (xpath_concat): Remove: not declared or used.
15453
15454         * lib/same.h: Include <stdbool.h>
15455         (same_name): Return bool, not int.
15456         * lib/same.c (same_name): Likewise.
15457         (errno): Don't declare; we assume C89 or better now.
15458
15459         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
15460         if not already defined.
15461
15462         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
15463         * lib/dup-safer.c (errno): Likewise.
15464
15465 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15466
15467         Merge from coreutils.
15468         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
15469         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
15470         * modules/path-concat: Don't depend on strdup.
15471
15472 2004-08-03  Simon Josefsson  <jas@extundo.com>
15473
15474         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
15475         * lib/progname.h: Don't include stdbool.h.
15476
15477 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15478
15479         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
15480         * MODULES.html.sh (func_all_modules): Remove fatal.
15481
15482 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15483
15484         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
15485
15486 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15487
15488         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
15489         working.
15490
15491 2004-08-02  Simon Josefsson  <jas@extundo.com>
15492
15493         * lib/getsubopt.h: New file, with comments from Bruno Haible.
15494         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
15495         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
15496
15497 2004-08-01  Simon Josefsson  <jas@extundo.com>
15498
15499         * lib/xgetdomainname.c: Include stdlib.h, for free().
15500
15501 2004-07-19  Bruno Haible  <bruno@clisp.org>
15502
15503         * MODULES.html.sh (func_all_modules): Add dummy.
15504
15505 2004-07-16  Simon Josefsson  <jas@extundo.com>
15506
15507         * modules/dummy: New file.
15508
15509 2004-07-16  Simon Josefsson  <jas@extundo.com>
15510
15511         * lib/dummy.c: New file.
15512
15513 2004-07-16  Bruno Haible  <bruno@clisp.org>
15514
15515         * lib/backupfile.h: Add extern "C" for C++.
15516         * lib/closeout.h: Likewise.
15517         * lib/copy-file.h: Likewise.
15518         * lib/findprog.h: Likewise.
15519         * lib/full-write.h: Likewise.
15520         * lib/pathname.h: Likewise.
15521         * lib/progname.h: Likewise.
15522         * lib/stpcpy.h: Likewise.
15523         * lib/stpncpy.h: Likewise.
15524         * lib/strcase.h: Likewise.
15525         * lib/strstr.h: Likewise.
15526         * lib/xalloc.h: Likewise.
15527
15528         * lib/mbswidth.h: Add extern "C" for C++.
15529         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
15530
15531 2004-07-13  Robert Millan  <robertmh@gnu.org>
15532
15533         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
15534
15535 2004-07-09  Simon Josefsson  <jas@extundo.com>
15536
15537         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
15538         failed without this.)
15539
15540 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15541
15542         * modules/chown (Files): Add lib/fchown-stub.c, since
15543         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
15544
15545 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15546
15547         * lib/fchown-stub.c: New file.
15548
15549 2004-06-24  Jim Meyering  <jim@meyering.net>
15550
15551         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
15552
15553 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15554
15555         * modules/argz: Omit "#include".
15556
15557         * MODULES.html.sh (func_all_modules): Add calloc, to match
15558         2004-06-01 addition of calloc module.
15559
15560 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15561
15562         * m4/argz.m4: New file, which is autoupdated from libtool.
15563
15564 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15565
15566         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
15567         libtool.
15568
15569 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15570
15571         * config/srclist-update: Don't insist on "USA." before the
15572         close-comment, as libtool omits the period and puts the */ on a
15573         separate line.
15574         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
15575         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
15576
15577 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
15578
15579         * modules/argz: New file.
15580         * MODULES.html.sh (func_all_modules): Add argz.
15581
15582 2004-06-12  Jim Meyering  <jim@meyering.net>
15583         and  Paul Eggert  <eggert@cs.ucla.edu>
15584
15585         * modules/hash (Files): Add lib/xalloc.h.
15586         * modules/pipe (Depends-on): Add wait-process.
15587         * modules/stat (Depends-on): Add xalloc.
15588         * modules/userspec (Files): Add lib/userspec.h.
15589         * modules/xstrto
15590
15591         Upgrade from gettext-0.13.
15592         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
15593         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
15594         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
15595
15596 2004-06-10  Jim Meyering  <jim@meyering.net>
15597
15598         * lib/calloc.c: New file.
15599
15600 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
15601
15602         * lib/getdate.y (yylex): Allow space between sign and number.
15603         Problem reported by Dan Jacobson.
15604
15605 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15606
15607         Merge from coreutils CVS.
15608
15609         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
15610         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
15611         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
15612         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
15613         xstrtol.m4: Fix copyright date and/or serial number.
15614
15615         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
15616         See if we need an fchown replacement.
15617         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
15618         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
15619         and use the replacement function if we detect either defect.
15620
15621         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
15622         gl_UTIMECMP.
15623
15624 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15625         and  Jim Meyering  <jim@meyering.net>
15626
15627         Merge from coreutils CVS.
15628
15629         * lib/stat-macros.h: New file, with contents from file-type.h
15630         and coreutils' system.h.
15631         * lib/file-type.c: Include "stat-macros.h".
15632         * lib/file-type.h (file_type): Move all macro definitions to new file,
15633         stat-macros.h.
15634
15635         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
15636         Wrap old code with this conditional.
15637         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
15638         function that does not dereference symlinks.
15639         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
15640
15641         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
15642         dependency problems.
15643         (xreadlink): Accept new arg SIZE, for efficiency.
15644         All decls and uses changed.
15645         * lib/xreadlink.h: Include <stddef.h>, for size_t.
15646
15647         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
15648         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
15649
15650         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
15651         sysexits.h.
15652
15653 2004-06-01  Jim Meyering  <jim@meyering.net>
15654
15655         * m4/calloc.m4: New file.
15656
15657 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
15658
15659         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
15660         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
15661         Also, fix a typo in a diagnostic.
15662
15663 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15664
15665         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
15666         or AC_FUNC_REALLOC.
15667
15668 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15669
15670         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
15671         macros to be defined.
15672         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
15673         the allocator returns NULL because the requested size is zero.
15674
15675 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15676
15677         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
15678         var.  Add comment explaining why libc still defines it.  This
15679         merges the following patch from glibc:
15680         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
15681
15682 2004-05-20  Andreas Schwab  <schwab@suse.de>
15683
15684         * m4/free.m4: Replace free if it not known to work, not the other
15685         way round.
15686
15687 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15688
15689         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
15690         present in glibc since revision 1.1 of this file.
15691         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
15692         obstack_alignment_mask, obstack_alloc, obstack_base,
15693         obstack_blank, obstack_blank_fast, obstack_chunk_size,
15694         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
15695         obstack_grow0, obstack_init, obstack_int_grow,
15696         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
15697         obstack_next_free, obstack_object_size, obstack_ptr_grow,
15698         obstack_ptr_grow_fast, obstack_room): Remove declarations of
15699         nonexistent functions.
15700
15701 2004-05-18  Karl Berry  <karl@gnu.org>
15702
15703         * config/srclist.txt: break link for vasnprintf.c.
15704
15705 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15706
15707         Port obstack to the AS/400, where pointers are 16 bytes wide and
15708         you cannot cast an integer to a valid pointer.  This patch is
15709         currently waiting to be integrated into glibc; see
15710         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
15711
15712         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
15713         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
15714         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
15715         (struct obstack): temp member is now a union of a pointer and
15716         an integer, instead of an integer.  All integer uses changed.
15717         This does not affect the physical layout of struct obstack,
15718         except on hosts (like the AS/400) where the size or alignment of
15719         void * is greater than that of ptrdiff_t.
15720         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
15721         __STDC__)]: Store temporary in pointer member of union, not
15722         integer member.
15723         * lib/obstack.c: Include <stddef.h>, for offsetof.
15724         (struct fooalign): Remove; it doesn't need a name.
15725         (union fooround): Change double to long double, and add void *.
15726         (DEFAULT_ALIGNMENT): Use offsetof to compute.
15727         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
15728         not a macro.  Hence the values are always int; so remove all
15729         casts-to-int in uses.
15730
15731 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15732
15733         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
15734         we can get this patch merged into glibc.
15735
15736 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15737             Paul Eggert  <eggert@cs.ucla.edu>
15738
15739         * m4/argp: Depend on alloca.
15740
15741 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15742             Paul Eggert  <eggert@cs.ucla.edu>
15743
15744         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
15745         freecoding.
15746
15747 2004-05-17  Bruno Haible  <bruno@clisp.org>
15748
15749         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
15750         precision that consists of a '.' followed by an empty digit string.
15751         Patch by Tor Lillqvist <tml@iki.fi>.
15752
15753 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15754
15755         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
15756         for backward compatibility with older code.  We need our own
15757         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
15758         it under some other name, and our alloca.h will define it.
15759
15760 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15761             Derek Price  <derek@ximbiot.com>
15762
15763         * lib/alloca.c: Include <alloca.h>, to get our interface.
15764         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
15765         include <alloca.h> first.  Use C89 prototype for alloca; this
15766         requires including <stddef.h> for size_t.  Use extern "C" if C++.
15767         Use #elif for simplicity, since we can assume C89 now.
15768         Don't try to source the system alloca.h since it will not be found
15769         and to prevent recursively including its replacement.
15770         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
15771         * lib/regex.c: Likewise.
15772
15773 2004-05-16  Derek Price  <derek@ximbiot.com>
15774             Paul Eggert  <eggert@cs.ucla.edu>
15775
15776         getline cleanup.  This changes the getndelim2 API: both order of
15777         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
15778         no delimiter).
15779
15780         * lib/getline.c: Don't include stddef.h or stdio.h, since our
15781         interface does that.
15782         (getline): Always use getdelim, so that we don't have two
15783         copies of this code.
15784         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
15785         if available.
15786         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
15787         (GETNDELIM2_MAXIMUM): New macro.
15788         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
15789         instead of the old practice of delim2==0.  All callers changed.
15790         Return -1 on overflow, instead of returning junk.
15791         Do not set *linesize unless allocation succeeds.
15792         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
15793         that we include sys/types.h.
15794         * lib/getnline.h: Likewise.
15795         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
15796         (getndelim2): Reorder arguments.
15797         * lib/getnline.c (getnline, getndelim):
15798         Don't discard the NMAX argument.
15799         (getnline): Invoke getndelim, to avoid code duplication.
15800         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
15801         of (size_t) -1 by callers of the getnline family.
15802
15803 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15804
15805         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
15806         Check for gettimeofday.
15807         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
15808         Check for settimeofday, stime.
15809
15810 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15811
15812         * lib/nanosleep.c (suspended): Change its type from int to
15813         sig_atomic_t volatile.
15814         (first_call): Make it private to rpl_nanosleep, and have it
15815         be zero initially as that's a bit faster.
15816         (my_usleep): Round up fractional times instead of truncating them,
15817         as this is the usual meaning for 'sleep'.
15818
15819         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
15820         doesn't work.
15821         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
15822         (ENOSYS): Define if not defined.
15823         (settime): Fall back on stime if it exists and settimeofday fails.
15824         But don't bother with fallbacks if a method fails with errno == EPERM.
15825
15826 2004-05-11  Jim Meyering  <jim@meyering.net>
15827
15828         Prior to this change, the save_cwd caller required read access to the
15829         current directory on most systems (ones with the fchdir function).
15830
15831         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
15832         fails, try write-only, and finally, resort to using xgetcwd.
15833
15834 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
15835
15836         * lib/obstack.c, obstack.h: Import changes from libc.
15837
15838 2004-04-28  Bruno Haible  <bruno@clisp.org>
15839
15840         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
15841         also implicitly appends .exe to executables.
15842         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
15843         accepts Windows pathnames.
15844         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
15845         Treat Cygwin like Windows, since it now accepts Windows pathnames.
15846         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
15847         Treat Cygwin like Windows, since it now accepts Windows pathnames.
15848         Reported by Derek Robert Price <derek@ximbiot.com>.
15849
15850 2004-04-21  Karl Berry  <karl@gnu.org>
15851
15852         * config/srclist.txt (localcharset.c): break sync.
15853
15854 2004-04-20  Paul Eggert  <eggert@twinsun.com>
15855
15856         * m4/host-os.m4: Add a copyright notice.
15857
15858 2004-04-20  Jim Meyering  <jim@meyering.net>
15859
15860         Change UTILS_ to gl_ in AC_DEFINE'd names.
15861         Change utils_- and jm_-prefixed variables, too.
15862         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
15863         UTILS_FUNC_MKDIR_TRAILING_SLASH.
15864         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
15865
15866         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
15867         Don't emit trailing blanks.
15868         Also rename jm_-prefixed variables to have gl_ prefix.
15869
15870         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
15871         Also rename jm_-prefixed variables to have gl_ prefix.
15872
15873         * m4/jm-macros.m4: Reflect the renamings.
15874         * m4/prereq.m4: Likewise.
15875
15876 2004-04-20  Jim Meyering  <jim@meyering.net>
15877
15878         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
15879         memory.
15880
15881 2004-04-20  Jim Meyering  <jim@meyering.net>
15882             Bruno Haible  <bruno@clisp.org>
15883
15884         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
15885         memory when realloc fails.
15886
15887 2004-04-19  Jim Meyering  <jim@meyering.net>
15888
15889         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
15890         now that readutmp.c may call `free (0)'.
15891
15892 2004-04-19  Bruno Haible  <bruno@clisp.org>
15893
15894         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
15895         * m4/inttypes_h.m4: Likewise.
15896         * m4/stdint_h.m4: Likewise.
15897         * m4/intmax_t.m4: Likewise.
15898         * m4/uintmax_t.m4: Likewise.
15899
15900 2004-04-18  Jim Meyering  <jim@meyering.net>
15901
15902         * m4/prereq.m4: Don't forbid jm_ prefix.
15903
15904         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
15905         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
15906         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
15907         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
15908         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
15909         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
15910         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
15911         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
15912         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
15913         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
15914         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
15915         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
15916         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
15917         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
15918         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
15919         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
15920         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
15921         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
15922         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
15923
15924 2004-04-18  Jim Meyering  <jim@meyering.net>
15925
15926         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
15927         failure, don't leak memory and do call END_UTMP_ENT.
15928
15929 2004-04-16  Jim Meyering  <jim@meyering.net>
15930
15931         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
15932         coreutils' stat program.
15933         (gl_PREREQ): Don't require jm_PREREQ_STAT.
15934
15935 2004-04-11  Paul Eggert  <eggert@twinsun.com>
15936
15937         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
15938         C89.
15939         (CHAR_BIT): Remove, since we assume C89.
15940         Include <stdint.h> if available, as per current Autoconf CVS advice.
15941
15942 2004-03-31  Jim Meyering  <jim@meyering.net>
15943
15944         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
15945         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
15946         * m4/xalloc.m4: Likewise.
15947
15948 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15949
15950         Merge from coreutils.
15951
15952         * m4/inttostr.m4: New file.
15953         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
15954         Require AM_STDBOOL_H and gl_TIMESPEC instead.
15955         Require gl_CLOCK_TIME.
15956         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
15957
15958 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15959
15960         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
15961         not bool, to be more consistent with Unix conventions.
15962         Suggested by Bruno Haible.
15963
15964         Merge from coreutils.
15965
15966         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
15967         * lib/umaxtostr.c: New files.
15968
15969         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
15970         the usual <time.h> dance.
15971         (get_date): Change signature to support fractional time stamps.
15972         All callers changed.
15973         * lib/getdate.y: Include "getdate.h" first, as we can now
15974         assume C89 and don't need to worry about 'const'.
15975         Similarly, include "unlocked-io.h" near start, not in middle.
15976         Include <limits.h>.
15977         (textint.value): Use long int rather than int.
15978         (textint.digits): Use size_t rather than int.
15979         (BILLION, LOG10_BILLION): New constants.
15980         (parser_control): New member rel_ns.  Members day_ordinal,
15981         time_zone, month, day, hour, minutes, rel_year, rel_month,
15982         rel_day, rel_hour, rel_minutes, rel_seconds
15983         are now long int, not int.  Member seconds is now struct timespec,
15984         not int.  New member timespec_seen.  Members dates_seen, days_seen,
15985         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
15986         not int.
15987         (%union.intval): Now long int, not int.
15988         New member timespec.
15989         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
15990         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
15991         (spec): Now is a timespec or an item list.
15992         (timespec, items): New nonterminals.
15993         (time, rel, relunit, number, get_date):
15994         Add support for fractional seconds.
15995         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
15996         (gmtime, localtime, mktime): Remove decls; not needed with C89.
15997         (to_hour): First arg is now long int, not int.
15998         (to_year): Returns long int, not int.
15999         Don't treat year -70 like 70.
16000         (tm_diff): Returns long int, not int.
16001         (lookup_word): Use bool instead of int when appropriate.
16002         (yylex): Use size_t for count, not int.
16003         Detect overflow when parsing large integer constants.
16004         Add support for fractions.
16005         (get_date): Make pointers 'const' if possible.
16006         Use more-portable code to detect integer overflow.
16007         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
16008         Don't use ctime; it's not reliable if the year has >4 digits.
16009
16010         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
16011         This is for compatibility with BSD.
16012
16013         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
16014         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
16015         From coreutils' system.h.
16016
16017         * lib/userspec.c: Don't include "posixver.h".
16018         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
16019         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
16020         compatible extension.  Simplify code by removing a boolean int
16021         that was always nonzero if a string was nonnull.
16022
16023 2004-03-30  Jim Meyering  <jim@meyering.net>
16024
16025         Merge from coreutils.
16026
16027         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
16028         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
16029         on some systems one must include <grp.h> before it.
16030         Reported by Christian Krackowizer.
16031
16032 2004-03-30  Jim Meyering  <jim@meyering.net>
16033
16034         Merge from coreutils.
16035
16036         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
16037
16038         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
16039         an empty input stream.
16040
16041         * lib/readtokens.c: Include <stdbool.h>.
16042         (readtoken): Use `size_t' rather than int/long.
16043         All callers adjusted.
16044         Use `bool' rather than `int' where appropriate.
16045         Use memset rather than an explicit loop.
16046         Use x2nrealloc rather than xrealloc.
16047         Allow the use of `\0' as a delimiter.
16048         (readtokens): Likewise.
16049         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
16050
16051 2004-03-30  Jim Meyering  <jim@meyering.net>
16052
16053         * m4/realloc.m4: Remove file, since now it does no more than
16054         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
16055         the `configure.ac' section of module/realloc.
16056         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
16057
16058 2004-03-30  Bruno Haible  <bruno@clisp.org>
16059
16060         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
16061         nonnull.
16062
16063 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16064
16065         Merge changes to getloadavg.c from coreutils and Emacs.
16066
16067         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
16068         Define to an expression, not to the empty string.
16069         Include cloexec.h and xalloc.h.
16070         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
16071         Use set_cloexec_flag rather than rolling our own.
16072         * lib/cloexec.c, lib/cloexec.h: New files.
16073
16074 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16075
16076         * m4/cloexec.m4: New file.
16077
16078 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16079
16080         * lib/getopt.h: Sync with libc CVS.
16081
16082 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16083             Bruno Haible  <bruno@clisp.org>
16084
16085         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
16086         mbswidth.
16087
16088 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16089             Bruno Haible  <bruno@clisp.org>
16090
16091         * lib/mbswidth.h: Include <wchar.h> only if
16092         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
16093         <wchar.h>.
16094         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
16095
16096 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16097
16098         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
16099         Sync with libc CVS.
16100         * lib/getopt_int.h: New file, also synced from libc.
16101
16102 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16103
16104         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
16105         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
16106         Bring back getopt.c, getopt.h, getopt1.c.
16107
16108 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16109
16110         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
16111         All uses changed.  Check for sa_sigaction member; this fixes
16112         a bug first reported by Jason Andrade in
16113         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16114
16115 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16116
16117         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
16118         '#if' expressions.  Unlike the code it replaces, it does not
16119         depend on (defined _SC_PAGESIZE).  However, it does depend on
16120         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
16121         first reported by Jason Andrade in
16122         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16123
16124 2004-02-25  Simon Josefsson  <jas@extundo.com>
16125
16126         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
16127
16128 2004-02-25  Simon Josefsson  <jas@extundo.com>
16129
16130         * lib/strdup.h: New file.
16131         * lib/strdup.c: Include it.
16132         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
16133         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
16134
16135 2004-02-23  Karl Berry  <karl@gnu.org>
16136
16137         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
16138         (from fencepost.gnu.org:/gd/gnuorg).
16139
16140 2004-02-23  Karl Berry  <karl@gnu.org>
16141
16142         * config/srclistvars.sh (GNUORG) [karl]: redefine.
16143         * config/srclist.txt: add maintain/standards documents.
16144
16145 2004-02-18  Bruno Haible  <bruno@clisp.org>
16146
16147         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
16148         Reported by Derek Robert Price <derek@ximbiot.com>.
16149
16150 2004-02-16  Karl Berry  <karl@gnu.org>
16151
16152         * config/mkinstalldirs, install-sh: update from automake.
16153
16154 2004-02-06  Karl Berry  <karl@gnu.org>
16155
16156         * m4/po.m4: update from gettext 0.14.1.
16157
16158 2004-02-06  Karl Berry  <karl@gnu.org>
16159
16160         * lib/config.charset: update from gettext 0.14.1.
16161
16162 2004-02-05  Paul Eggert  <eggert@twinsun.com>
16163
16164         Add comments and code, prompted by suggestions from Bruno Haible
16165         for sh-quote.
16166         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
16167         describing the enum quoting_style values.
16168         * lib/quotearg.c (quotearg_alloc): New function.
16169         (quotearg_buffer_restyled): Treat lone { and } as special.
16170         Treat = as special.  Work around bug with older shells
16171         that "see" a '\' that is really the 2nd byte of a multibyte char.
16172         Quote empty string with shell_quoting_style.
16173
16174 2004-02-03  Bruno Haible  <bruno@clisp.org>
16175
16176         * m4/pipe.m4: New file, from GNU gettext.
16177
16178 2004-02-03  Bruno Haible  <bruno@clisp.org>
16179
16180         * lib/pipe.h: New file, from GNU gettext.
16181         * lib/pipe.c: New file, from GNU gettext.
16182
16183 2004-01-27  Bruno Haible  <bruno@clisp.org>
16184
16185         * m4/execute.m4: New file, from GNU gettext.
16186
16187 2004-01-27  Bruno Haible  <bruno@clisp.org>
16188
16189         * lib/execute.h: New file, from GNU gettext.
16190         * lib/execute.c: New file, from GNU gettext.
16191         * lib/w32spawn.h: New file, from GNU gettext.
16192
16193 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16194
16195         Merge from diffutils.
16196
16197         * lib/file-type.c (file_type): Add typed memory objects.
16198         * lib/file-type.h (S_TYPEISTMO): New macro.
16199
16200         * lib/c-stack.h (c_stack_action): Remove argv argument.
16201         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
16202         (die): Don't calculate message unless segv_action returns.
16203         (get_stack_location, min_address_from_argv, max_address_from_argv,
16204         volatile stack_base, volatile_stack_size): Remove.
16205         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
16206         that every segmentation violation is a stack overflow.  (Ouch!)
16207         See Debian bug 136249 (still outstanding) for more info about why
16208         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
16209
16210 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16211
16212         Exit-status fix from coreutils.
16213
16214         Use exit_failure consistently in place of EXIT_FAILURE,
16215         so that program exit statuses are consistent on failure.
16216
16217         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
16218         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
16219         * lib/argmatch.h: Comment fix to match the above.
16220         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
16221         Now a macro referring to exit_failure, instead of a separate
16222         variable.  Include "exitfail.h" to get it.
16223         * lib/xstrtol.h: Include "exitfail.h".
16224         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
16225
16226         * lib/long-options.c (parse_long_options): Use prototype
16227         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
16228         for clarity.
16229
16230 2004-01-21  Jim Meyering  <jim@meyering.net>
16231
16232         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
16233         so as not to conflict with a different-sized __mktime_internal
16234         function in GNU libc.
16235         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
16236         Problem building statically-linked `ls' reported by Michael Brunnbauer.
16237
16238 2004-01-20  Karl Berry  <karl@gnu.org>
16239
16240         * config/config.guess: update from config.
16241
16242         * config/srclistvars.sh: GNUWWWLICENSES for karl.
16243
16244 2004-01-20  Bruno Haible  <bruno@clisp.org>
16245
16246         Safer stack allocation.
16247         * lib/setenv.c: Include allocsa.h.
16248         (alloca): Remove fallback definition.
16249         (freea): Remove macro.
16250         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
16251         instead of freea.
16252
16253 2004-01-20  Bruno Haible  <bruno@clisp.org>
16254
16255         * m4/eealloc.m4: New file, from GNU gettext.
16256
16257 2004-01-20  Bruno Haible  <bruno@clisp.org>
16258
16259         * m4/allocsa.m4: New file, from GNU gettext.
16260
16261 2004-01-20  Bruno Haible  <bruno@clisp.org>
16262
16263         * lib/xallocsa.h: New file, from GNU gettext.
16264         * lib/xallocsa.c: New file, from GNU gettext.
16265
16266 2004-01-20  Bruno Haible  <bruno@clisp.org>
16267
16268         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
16269
16270 2004-01-20  Bruno Haible  <bruno@clisp.org>
16271
16272         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
16273         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
16274         specially.
16275
16276 2004-01-20  Bruno Haible  <bruno@clisp.org>
16277
16278         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
16279         patch.
16280
16281 2004-01-20  Bruno Haible  <bruno@clisp.org>
16282
16283         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
16284
16285 2004-01-20  Bruno Haible  <bruno@clisp.org>
16286
16287         * lib/eealloc.h: New file.
16288
16289 2004-01-20  Bruno Haible  <bruno@clisp.org>
16290
16291         * lib/binary-io.h: Avoid warnings on Cygwin.
16292
16293 2004-01-20  Bruno Haible  <bruno@clisp.org>
16294
16295         * lib/allocsa.h: New file, from GNU gettext.
16296         * lib/allocsa.c: New file, from GNU gettext.
16297
16298 2004-01-18  Karl Berry  <karl@gnu.org>
16299
16300         * doc/gpl.texi, doc/lgpl.texi: new files.
16301
16302 2004-01-18  Karl Berry  <karl@gnu.org>
16303
16304         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
16305         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
16306
16307 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16308
16309         Merge from coreutils.
16310
16311         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
16312         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
16313         (gl_DEFAULT_POSIX2_VERSION): Move
16314         the documentation from 'configure' into 'config.hin',
16315         so that 'configure --help' isn't burdened by it and
16316         we don't have to worry about its formatting there.
16317         Reword the documentation so that it's more succinct
16318         and can be run together into a single paragraph.
16319         * m4/same.m4 (gl_SAME): Check for pathconf.
16320
16321 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16322
16323         Merge from coreutils.
16324
16325         * lib/posixver.c: Include posixver.h.
16326
16327         * lib/same.c: Include <stdbool.h>, <limits.h>.
16328         (_POSIX_NAME_MAX): Define if not defined.
16329         (MIN): New macro.
16330         (same_name): If file names are silently truncated, report
16331         that the file names are the same if they are the same after
16332         the silent truncation.
16333
16334         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
16335         conversion function.
16336         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
16337         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
16338         longer needed.
16339
16340 2004-01-15  Jim Meyering  <jim@meyering.net>
16341
16342         Merge from coreutils.
16343
16344         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
16345         if no library is required.
16346         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
16347         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
16348         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
16349         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
16350         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
16351         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
16352         value, $ac_cv_search_crypt, if it's "none required".
16353         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
16354         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
16355         not gl_FUNC_GETLOADAVG.
16356         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
16357         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
16358
16359 2004-01-15  Jim Meyering  <jim@meyering.net>
16360
16361         Merge from coreutils.
16362
16363         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
16364         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
16365         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
16366
16367         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
16368         optional configure-time default.
16369
16370         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16371
16372         * lib/xreadlink.c (xreadlink): Correct outdated comment.
16373
16374 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
16375
16376         Merge from coreutils.
16377
16378         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
16379         value, $ac_cv_search_nanosleep, if it's "none required".
16380
16381 2004-01-14  Paul Eggert  <eggert@twinsun.com>
16382
16383         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
16384         with like-named macro in fnmatch.c.
16385         (EXT): Use an internal constant instead.
16386
16387         Merge fnmatch patches from glibc.
16388         * lib/fnmatch.c (mbsinit): Remove define.
16389         Add libc_hidden_ver (__fnmatch, fnmatch).
16390         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
16391         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
16392
16393 2004-01-14  Karl Berry  <karl@gnu.org>
16394
16395         * config/install-sh: update from automake.
16396
16397 2004-01-13  Karl Berry  <karl@gnu.org>
16398
16399         * config/install-sh: update from automake.
16400
16401 2004-01-09  Karl Berry  <karl@gnu.org>
16402
16403         * config/install-sh: update from automake.
16404
16405 2004-01-05  Karl Berry  <karl@gnu.org>
16406
16407         * config/config.{sub,guess}: update from config.
16408
16409 2003-12-31  Karl Berry  <karl@gnu.org>
16410
16411         * config/depcomp: update from automake.
16412
16413 2003-12-14  Karl Berry  <karl@gnu.org>
16414
16415         * lib/config.charset: update from gettext-runtime.
16416
16417 2003-12-03  Paul Eggert  <eggert@twinsun.com>
16418
16419         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
16420         Bug reported by Alfred M. Szmidt.
16421
16422 2003-12-03  Bruno Haible  <bruno@clisp.org>
16423
16424         * m4/gettext.m4: Upgrade from gettext-0.13.
16425         * m4/po.m4: Upgrade from gettext-0.13.
16426         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
16427         * m4/intmax.m4: New file, from gettext-0.13.
16428         * m4/printf-posix.m4: New file, from gettext-0.13.
16429
16430 2003-11-29  Karl Berry  <karl@gnu.org>
16431
16432         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
16433
16434 2003-11-25  Paul Eggert  <eggert@twinsun.com>
16435             Bruno Haible  <bruno@clisp.org>
16436
16437         * lib/printf-parse.h: Don't include sys/types.h.
16438         (ARG_NONE): New macro.
16439         (char_directive): Change type of *arg_index fields to size_t.
16440         * lib/printf-parse.c: Don't include sys/types.h.
16441         (SSIZE_MAX): Remove macro.
16442         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
16443         Remove unnecessary overflow check.
16444         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
16445         fields.
16446
16447 2003-11-25  Bruno Haible  <bruno@clisp.org>
16448
16449         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
16450
16451 2003-11-25  Bruno Haible  <bruno@clisp.org>
16452
16453         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
16454         gt_TYPE_SSIZE_T.
16455
16456 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16457
16458         * modules/alloca: Remove dependency on xalloc.
16459
16460 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16461
16462         * lib/alloca.c: Remove dependency on xalloc module.
16463         (xalloc_die): Remove.
16464         (memory_full) [!defined emacs]: New macro.
16465         [!defined emacs]: Don't include xalloc.h.
16466         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
16467         address arithmetic overflows.  Change datatypes a bit to avoid
16468         unnecessary casts.
16469
16470 2003-11-22  Jim Meyering  <jim@meyering.net>
16471
16472         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
16473         s/size/size_t/.
16474
16475 2003-11-21  Karl Berry  <karl@gnu.org>
16476
16477         * config/config.{sub,guess}: update from config.
16478
16479 2003-11-18  Karl Berry  <karl@gnu.org>
16480
16481         * config/config.{sub,guess}: update from config.
16482
16483         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
16484
16485 2003-11-17  Paul Eggert  <eggert@twinsun.com>
16486
16487         * README: Mention that S+T cannot overflow if S is the size of
16488         an existing object and T is sufficiently small.
16489
16490 2003-11-17  Jim Meyering  <jim@meyering.net>
16491
16492         On systems without utime and without a utimes function capable of
16493         dealing with a NULL struct utimbuf* argument, this utime replacement
16494         could -- in unusual circumstances -- leak a file descriptor.
16495         * lib/utime.c: Include <unistd.h> and <errno.h>.
16496         (utime_null): Be sure to close `fd' and to preserve errno.
16497         Reported by Geoff Collyer via Arnold Robbins.
16498
16499 2003-11-17  Bruno Haible  <bruno@clisp.org>
16500
16501         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
16502         (Depends-on): Add xsize.
16503
16504 2003-11-17  Bruno Haible  <bruno@clisp.org>
16505
16506         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
16507
16508 2003-11-17  Bruno Haible  <bruno@clisp.org>
16509
16510         * lib/vasnprintf.c (alloca): Remove fallback definition.
16511         (freea): Remove definition.
16512         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
16513         Reported by Paul Eggert.
16514
16515 2003-11-16  Paul Eggert  <eggert@twinsun.com>
16516             Bruno Haible  <bruno@clisp.org>
16517
16518         Protect against address arithmetic overflow.
16519         * lib/printf-args.h: Include stddef.h.
16520         (arguments): Change type of field 'count' to size_t.
16521         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
16522         'unsigned int' where appropriate.
16523         * lib/printf-parse.h: Include sys/types.h.
16524         (char_directive): Change type of *arg_index fields to ssize_t.
16525         (char_directives): Change type of fields 'count', max_*_length to
16526         size_t.
16527         * lib/printf-parse.c: Include sys/types.h and xsize.h.
16528         (SSIZE_MAX): Define fallback value.
16529         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
16530         instead of 'int' where appropriate. Check a_allocated, d_allocated
16531         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
16532         * lib/vasnprintf.c: Include xsize.h.
16533         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
16534         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
16535         overflow. Avoid wraparound when converting a width or precision from
16536         decimal to binary.
16537
16538 2003-11-16  Bruno Haible  <bruno@clisp.org>
16539
16540         Update from GNU gettext.
16541         * lib/printf-parse.c: Generalize to it can be compiled for wide
16542         strings.
16543         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
16544         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
16545         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
16546         SNPRINTF): New macros.
16547         Don't include <alloca.h> if the file is used inside libintl.
16548         (local_wcslen): New function, for Solaris 2.5.1.
16549         (VASNPRINTF): Use it instead of wcslen.
16550
16551 2003-11-16  Bruno Haible  <bruno@clisp.org>
16552
16553         * lib/xsize.h (xmax): New function.
16554         (xsum, xsum3, xsum4): Declare as "pure" functions.
16555
16556 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16557
16558         * modules/xalloc (Files): Undo latest change, since xalloc.h
16559         no longer needs SIZE_MAX or PTRDIFF_MAX.
16560
16561 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16562
16563         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
16564         gl_PTRDIFF_MAX.
16565
16566 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16567
16568         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
16569         "return", to pacify some unknown compiler.  Problem reported
16570         by Joerg Schilling.
16571
16572 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16573
16574         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
16575         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
16576         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
16577         heuristic is just as accurate as far as we know, and it removes a
16578         dependency on size_max.m4 and ptrdiff_max.m4.
16579
16580 2003-11-11  Bruno Haible  <bruno@clisp.org>
16581
16582         * modules/xsize (Files): Add m4/size_max.m4.
16583         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
16584
16585 2003-11-11  Bruno Haible  <bruno@clisp.org>
16586
16587         * m4/size_max.m4: New file.
16588         * m4/ptrdiff_max.m4: New file.
16589         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
16590         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
16591         (gl_XALLOC): Invoke it.
16592
16593 2003-11-11  Bruno Haible  <bruno@clisp.org>
16594
16595         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
16596         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
16597         defined.
16598
16599 2003-11-10  Paul Eggert  <eggert@twinsun.com>
16600
16601         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
16602         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
16603         rejected some allocations of exactly SIZE_MAX - 2 bytes.
16604         From Bruno Haible.
16605         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
16606         not (size_t) -1, since it's defined here.
16607
16608 2003-11-09  Karl Berry  <karl@gnu.org>
16609
16610         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
16611
16612 2003-11-06  Paul Eggert  <eggert@twinsun.com>
16613
16614         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
16615         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
16616         Reject sizes of exactly SIZE_MAX bytes.
16617         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
16618         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
16619
16620 2003-11-05  Bruno Haible  <bruno@clisp.org>
16621
16622         * lib/xsize.h: Include limits.h, to avoid a possible collision with
16623         SIZE_MAX defined in <limits.h> on Solaris.
16624
16625 2003-11-04  Jim Meyering  <jim@meyering.net>
16626
16627         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
16628         variable names, rather than @VAR@.
16629         * modules/poll: Likewise.
16630
16631 2003-11-04  Bruno Haible  <bruno@clisp.org>
16632
16633         * modules/xsize: New file.
16634         * modules/linebreak: Depend on xsize.
16635         * MODULES.html.sh (func_all_modules): Add xsize.
16636
16637 2003-11-04  Bruno Haible  <bruno@clisp.org>
16638
16639         * m4/xsize.m4: New file.
16640
16641 2003-11-04  Bruno Haible  <bruno@clisp.org>
16642
16643         * lib/xsize.h: New file.
16644         * lib/linebreak.c: Include xsize.h.
16645         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
16646         argument for overflow.
16647         Suggested by Paul Eggert.
16648
16649 2003-11-03  Karl Berry  <karl@gnu.org>
16650
16651         * config/config.{guess,sub}: update from config.
16652
16653 2003-11-03  Jim Meyering  <jim@meyering.net>
16654
16655         * modules/userspec (lib_SOURCES): Add userspec.h.
16656         (Include): Add "userspec.h".
16657         Improve description.
16658
16659 2003-11-03  Jim Meyering  <jim@meyering.net>
16660
16661         * lib/userspec.c: Include "userspec.h".
16662         * lib/userspec.h: New file.
16663
16664 2003-11-03  Bruno Haible  <bruno@clisp.org>
16665
16666         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
16667
16668 2003-11-03  Bruno Haible  <bruno@clisp.org>
16669
16670         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
16671         available, to avoid (extremely rare) race condition.
16672         Suggested by Paul Eggert.
16673
16674 2003-11-02  Karl Berry  <karl@gnu.org>
16675
16676         * config/srclist.txt (vasprintf.c): sync broken, sigh.
16677
16678 2003-10-31  Paul Eggert  <eggert@twinsun.com>
16679
16680         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
16681         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
16682         (read_filesystem_list): Set and use me_type_malloced.
16683         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
16684         whatever the type happens to be), for brevity and consistency.
16685         Check for size calculation overflow on Alphas running OSF/1.
16686
16687 2003-10-31  Jim Meyering  <jim@meyering.net>
16688
16689         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
16690
16691         * lib/linebuffer.c: Include <string.h> for declaration of memset.
16692
16693 2003-10-30  Paul Eggert  <eggert@twinsun.com>
16694             Bruno Haible  <bruno@clisp.org>
16695
16696         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
16697         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
16698
16699 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16700
16701         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
16702         netbsd*-gnu*.  Suggested by Robert Millan.
16703
16704 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16705
16706         * modules/group-member: Depend on stdbool.
16707
16708 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16709
16710         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
16711
16712 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16713
16714         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
16715         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
16716         after the 'gnu' in these cases.  This fixes some bugs in the
16717         previous change, and is based on suggestions by Robert Millan.
16718
16719 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16720
16721         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
16722         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
16723         no longer needed.
16724         * lib/quotearg.c (quotearg_n_options): Use it.
16725         * lib/group-member.c: Include <stdbool.h>.
16726         (free_group_info): Arg is now const *; don't free arg.
16727         (get_group_info): Now returns bool and accepts struct group_info *,
16728         rather than returning a malloc'ed struct group_info *.
16729         All uses changed.  Check for overflow in internal size calculation.
16730
16731         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
16732         rather than xmalloc/xrealloc.
16733         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
16734         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
16735         conformance bug: the old code used a pointer after freeing the
16736         storage that it addressed.
16737         * lib/hash.c (hash_initialize): Simplify the code by using
16738         xalloc_oversized rather than doing it by hand.
16739         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
16740         the buffer preserved.  Use free and xmalloc instead.
16741         * lib/quotearg.c (quotearg_n_options): Likewise.
16742         Use a simpler test for size overflow.  Don't use xalloc_oversized
16743         because unsigned int might be wider than size_t (!); this suggests
16744         that we should switch from unsigned int to size_t for slot numbers.
16745
16746 2003-10-28  Paul Eggert  <eggert@twinsun.com>
16747
16748         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
16749         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
16750         NetBSD kernels.  Requested by Richard Stallman.
16751
16752 2003-10-27  Paul Eggert  <eggert@twinsun.com>
16753
16754         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
16755         to allocate the returned structure.  Do not allocate a subarray,
16756         as x2nrealloc will do that.
16757         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
16758         instead of xnrealloc.
16759         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
16760
16761 2003-10-27  Bruno Haible  <bruno@clisp.org>
16762
16763         * lib/stdbool_.h: Better support for BeOS.
16764
16765 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16766
16767         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
16768         now uses inline.
16769
16770 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16771
16772         * lib/xalloc.h (xalloc_oversized): New static inline function, for
16773         callers that want to do their own size-overflow checking.  Include
16774         <stdbool.h>, since xalloc_oversized returns bool.
16775         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
16776         to use xalloc_oversized.
16777
16778         Add two functions x2realloc, x2nrealloc, for programs that grow
16779         arrays dynamically by doubling their sizes.
16780         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
16781         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
16782         New functions.
16783
16784         Port to C99 semantics for 'inline' of external functions.
16785         Bug reported by Bruno Haible.
16786         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
16787         with the old contents of xnmalloc.
16788         (xnmalloc, xmalloc): Use it.
16789         (xnrealloc_inline): New static inline function,
16790         with the old contents of xnrealloc.
16791         (xnrealloc, xrealloc): Use it.
16792
16793         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
16794         that.
16795
16796 2003-10-26  Karl Berry  <karl@gnu.org>
16797
16798         * config/srclist.txt (COPYING.DOC): no longer available from
16799         /gd/gnuorg; don't know where the ultimate source is.
16800
16801 2003-10-25  Paul Eggert  <eggert@twinsun.com>
16802
16803         Fix several address-calculation bugs in the hash modules,
16804         plus some minor code cleanup.
16805
16806         * lib/hash.h: Include <stdbool.h>, for bool.
16807         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
16808         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
16809         hash_get_n_entries, hash_get_max_bucket_length,
16810         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
16811         hash_rehash): Use size_t rather than unsigned.
16812         * lib/hash.c (struct hash_table, hash_get_n_buckets,
16813         hash_get_n_buckets_used, hash_get_n_entries,
16814         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
16815         hash_get_entries, hash_do_for_each, hash_string, is_prime,
16816         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
16817         Likewise.
16818         (SIZE_MAX): Define if not defined.
16819         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
16820         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
16821         hash_print):
16822         Use const * when possible.
16823         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
16824         (check_tuning): Fix bug: if tuning parameters were very close to
16825         0 or 1, rounding errors could have caused subscript violations.
16826         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
16827         (hash_initialize): Add 'fail:' label
16828         to free table and return NULL, and use it to simplify code.
16829         Use calloc rather than clearing the storage ourself.
16830         (hash_initialize, hash_rehash): Check for arithmetic overflow in
16831         buffer size calculations.
16832         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
16833         Include <stddef.h>, for size_t.
16834         * lib/hash-pjw.c (hash_pjw): Likewise.
16835         Switch to method described by Bruno Haible.
16836         Include <limits.h>, for CHAR_BIT.
16837         (SIZE_BITS): New macro.
16838
16839 2003-10-23  Paul Eggert  <eggert@twinsun.com>
16840
16841         * m4/getline.m4 (AM_FUNC_GETLINE):
16842         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
16843         hosts.  Problem reported by Derek Robert Price in
16844         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
16845         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
16846         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
16847
16848 2003-10-21  Paul Eggert  <eggert@twinsun.com>
16849
16850         * lib/getndelim2.c (getndelim2): When size calculation overflows,
16851         ceiling the allocation at NMAX bytes rather than silently
16852         discarding input bytes before NMAX is reached.  This makes
16853         a difference only if NMAX exceeds SIZE_MAX / 2.
16854
16855         * lib/obstack.c: Merge from glibc.
16856         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
16857         Add libc_hidden_def (_obstack_newchunk).
16858         (_obstack_free) [! defined _LIBC]: Remove.
16859         [defined _LIBC]: Make a strong alias from obstack_free, rather than
16860         a clone of the function body.
16861         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
16862         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
16863
16864         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
16865         glibc.
16866         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
16867         arg to memcpy.
16868
16869         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
16870         (obstack_ptr_grow_fast, obstack_int_grow_fast):
16871         Don't use lvalue casts, as GCC plans to remove support for them
16872         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
16873         was also present in the non-GCC version, indicating that this
16874         code had always been buggy and had never been widely used.
16875         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
16876         Use the fast variant of each macro, rather than copying the
16877         definiens of the fast variant; that way, we'll be more likely to
16878         catch future bugs in the fast variants.
16879
16880 2003-10-20  Bruno Haible  <bruno@clisp.org>
16881
16882         * modules/wait-process: New file.
16883         * MODULES.html.sh (func_all_modules): Add wait-process.
16884
16885 2003-10-20  Bruno Haible  <bruno@clisp.org>
16886
16887         * m4/wait-process.m4: New file.
16888
16889 2003-10-20  Bruno Haible  <bruno@clisp.org>
16890
16891         * lib/wait-process.h: New file, from GNU gettext.
16892         * lib/wait-process.c: New file, from GNU gettext.
16893
16894 2003-10-19  Jim Meyering  <jim@meyering.net>
16895
16896         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
16897         HPUX 10.20.
16898
16899 2003-10-18  Karl Berry  <karl@gnu.org>
16900
16901         * config/config.guess: update from config.
16902
16903 2003-10-16  Paul Eggert  <eggert@twinsun.com>
16904
16905         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
16906         (getgroups): First arg is int, not size_t.
16907         Don't let 'free' mangle errno.
16908
16909 2003-10-16  Paul Eggert  <eggert@twinsun.com>
16910
16911         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
16912
16913 2003-10-16  Karl Berry  <karl@gnu.org>
16914
16915         * config/config.{guess,sub}: update from config.
16916
16917 2003-10-16  Jim Meyering  <jim@meyering.net>
16918
16919         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
16920         memcpy.
16921
16922 2003-10-15  Paul Eggert  <eggert@twinsun.com>
16923
16924         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
16925         (SIZE_MAX): Remove.
16926         (new_exclude, add_exclude_file): Initial size no longer needs to
16927         be a power of 2.
16928         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
16929         our own address arithmetic overflow checking.
16930
16931         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
16932         (fnmatch): Do not alloca more than 2000 wide characters;
16933         instead, use malloc for large buffers.
16934         Check for address arithmetic overflow, and return -1
16935         with errno set to ENOMEM in that case.
16936         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
16937         (NEW_PATTERN): Do not alloca more than 8000 bytes;
16938         instead, return -1.  Check for address arithmetic overflow.
16939
16940 2003-10-14  Paul Eggert  <eggert@twinsun.com>
16941
16942         Handle invalid suffixes and overflow independently, so that
16943         callers can treat them independently as needed.  Fix some bugs in
16944         suffix handling, e.g., "100k@" was not diagnosed as an invalid
16945         suffix for a human-readable blocksize.  The major caller-visible
16946         change is the addition of a new
16947         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
16948         that both overflow and suffix chars were found.
16949
16950         * lib/human.c (humblock): Don't check separately for invalid suffix
16951         char; that is xstrtoumax's job (now that its bug is fixed).
16952         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
16953         INTMAX_MAX]: New macros.
16954         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
16955         TYPE_MAXIMUM): New macros.
16956         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
16957         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
16958         if overflow occurs, as it's what __strtol does and it's more useful
16959         in practice.
16960         (__xstrtol): If __strtol reports some error other than ERANGE,
16961         reflect it to the caller as LONGINT_INVALID.  If it reports
16962         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
16963         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
16964         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
16965         value.
16966         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
16967         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
16968         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
16969         [defined UINTMAX_MAX]: New macros.
16970
16971 2003-10-14  Bruno Haible  <bruno@clisp.org>
16972
16973         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
16974
16975 2003-10-14  Bruno Haible  <bruno@clisp.org>
16976
16977         * m4/sig_atomic_t: New file, from GNU gettext.
16978         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
16979
16980 2003-10-14  Bruno Haible  <bruno@clisp.org>
16981
16982         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
16983         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
16984         Also use volatile where needed.
16985
16986 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16987
16988         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
16989         Change maintainer from Bruno Haible to 'all'.
16990
16991 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16992
16993         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
16994
16995 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16996
16997         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
16998         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
16999         and define in terms of the other primitives.
17000         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
17001         (SIZE_MAX): Define if not already defined.
17002         (array_size_overflow): New function.
17003         (xalloc_die): Abort instead of exiting if 'error' returns.
17004         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
17005         (xmalloc, xrealloc): Use them.
17006         (xcalloc): Check for address arithmetic overflow.
17007         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
17008         a bit faster than strcpy.
17009
17010 2003-10-10  Simon Josefsson  <jas@extundo.com>
17011
17012         * modules/argp (Depends-on): Add restrict and strcase.
17013
17014 2003-10-10  Simon Josefsson  <jas@extundo.com>
17015
17016         * m4/argp.m4: Add AC_C_INLINE.
17017
17018 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17019
17020         Merge getpass from libc, plus a few fixes.
17021
17022         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
17023         Include <stdbool.h>.
17024         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
17025         __fsetlocking to empty.
17026         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
17027         do include <bits/libc-lock.h>.
17028         Do not include <fcntl.h>; not needed.
17029         [_LIBC]: Include <wchar.h>.
17030         (NOTCANCEL_MODE): New macro.
17031         (flockfile, funlockfile) [_LIBC]: New macros.
17032         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
17033         [!_LIBC]: New macros.
17034         (call_fclose): New function.
17035         (getpass): Use it.  Save tty stream separately; this simplifies the
17036         code and makes it more reliable if stdin happens to equal stdout.
17037         Invoke __fsetlocking on tty.
17038         Handle thread cancellation if needed.
17039         Namespace cleanup (use __tcgetattr, __getline).
17040         Use bool for Booleans.
17041         [USE_IN_LIBIO]: Handle wide streams.
17042         [!_LIBC]: Unconditionally do the fseek, since we don't know what
17043         stream might go where.
17044
17045         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
17046         doesn't have to include <stdio.h> before us.
17047         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
17048         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
17049         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17050         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
17051         if not declared, so that we can use getpass.c code from libc without
17052         rewriting it.
17053         (flockfile, ftrylockfile, funlockfile): New macros.
17054
17055 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17056
17057         * modules/getpass: Depend on stdbool.
17058
17059 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17060
17061         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
17062
17063 2003-10-07  Karl Berry  <karl@gnu.org>
17064
17065         * config/config.{guess,sub}: update from config.
17066
17067 2003-10-06  Jim Meyering  <jim@meyering.net>
17068             Bruno Haible  <bruno@clisp.org>
17069
17070         This lets translators provide better translations for the
17071         "Written by ..." part of --version output.
17072         * lib/version-etc.h: Include stdarg.h.
17073         (version_etc_copyright): Declare as readonly.
17074         (version_etc): Make this function variadic with a NULL-terminated list
17075         of author name strings.
17076         (version_etc_va): New declaration.
17077         * lib/version-etc.c: Include stdarg.h, stdlib.h.
17078         (version_etc_copyright): Declare as readonly.
17079         (version_etc_va): New function. Provide a different translatable string
17080         for each possible number of authors < 10. Abbreviate when there are 10
17081         authors or more.
17082         (version_etc): Make this function variadic. Call version_etc_va.
17083         Suggestion from Gary V. Vaughan.
17084
17085         * lib/long-options.h (parse_long_options): Change prototype: the
17086         authors string is moved to the end and becomes variadic.
17087         * lib/long-options.c: Include stdarg.h.
17088         (parse_long_options): Make this function variadic, too.
17089         Call version_etc_va, not version_etc.
17090
17091 2003-10-06  Bruno Haible  <bruno@clisp.org>
17092
17093         * modules/version-etc-2: Remove file.
17094         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
17095
17096 2003-10-06  Bruno Haible  <bruno@clisp.org>
17097
17098         * modules/fatal-signal: New file.
17099         * MODULES.html.sh (func_all_modules): Add fatal-signal.
17100
17101 2003-10-06  Bruno Haible  <bruno@clisp.org>
17102
17103         * m4/fatal-signal.m4: New file.
17104         * m4/signalblocking.m4: New file, from GNU gettext.
17105
17106 2003-10-06  Bruno Haible  <bruno@clisp.org>
17107
17108         * lib/version-etc-2.h: Remove file.
17109         * lib/version-etc-2.c: Remove file.
17110
17111 2003-10-06  Bruno Haible  <bruno@clisp.org>
17112
17113         * lib/fatal-signal.h: New file, from GNU gettext.
17114         * lib/fatal-signal.c: New file, from GNU gettext.
17115
17116 2003-10-05  Paul Eggert  <eggert@twinsun.com>
17117
17118         * README: Rework advice for preventing empty .o files.
17119         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
17120         not <sys/types.h>.
17121
17122 2003-10-04  Karl Berry  <karl@gnu.org>
17123
17124         * lib/argp*: update from libc.
17125
17126 2003-10-04  Karl Berry  <karl@gnu.org>
17127
17128         * config/config.{guess,sub}: update from config.
17129
17130 2003-10-02  Bruno Haible  <bruno@clisp.org>
17131
17132         * modules/lchown (Include): Add lchown.h.
17133         * modules/time_r (Include): Use "..." syntax.
17134         * modules/xgetdomainname (Include): Add xgetdomainname.h.
17135
17136 2003-10-01  Simon Josefsson  <jas@extundo.com>
17137
17138         * MODULES.html.sh (func_all_modules): Move gethostname from section
17139         'based on' to section 'lacking' POSIX:2001.
17140
17141 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
17142
17143         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
17144         to output mode on the same stream.
17145
17146 2003-09-29  Paul Eggert  <eggert@twinsun.com>
17147
17148         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
17149         Fix arg typo in previous patch.
17150
17151 2003-09-28  Jim Meyering  <jim@meyering.net>
17152
17153         * lib/error.c: Correct cpp indentation.
17154
17155 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17156
17157         * modules/free: New file.
17158
17159 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17160
17161         * m4/free.m4: New file.
17162
17163 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17164
17165         * lib/minmax.h (MIN, MAX)
17166         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
17167         Omit the special code that used __typeof__, since we worry that
17168         it could be more trouble than it's worth.  See:
17169         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
17170         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
17171
17172         * lib/free.c: New file.
17173
17174 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
17175
17176         Trivial fixes to Makefile.am parts of module listings.
17177         * modules/strstr: Append strstr.h to lib_SOURCES.
17178         * modules/strcase: Likewise, for strcase.h.
17179
17180 2003-09-27  Karl Berry  <karl@gnu.org>
17181
17182         * config/mkinstalldirs: update from automake.
17183
17184 2003-09-26  Paul Eggert  <eggert@twinsun.com>
17185
17186         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
17187         (error_tail): Do not loop, reallocating temporary buffer, since
17188         the output cannot contain more wide characters than the input
17189         contains bytes, the size must be big enough already.  This avoids
17190         one potential size overflow calculation.  Check for size overflow
17191         when calculating temporary buffer size.  Free temporary buffer
17192         when done, if it was allocated with malloc; this plugs a memory
17193         leak.  Remove casts from void * to pointers, that are no longer
17194         needed now that we're assuming C89 or better.
17195
17196         Merge error changes from glibc.
17197
17198         * lib/error.c, error.h: Update copyright notice header to match glibc.
17199         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
17200         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
17201         Disable cancellation while printing error.
17202         * lib/error.h: Prepend __ to parameter names.
17203
17204 2003-09-26  Jim Meyering  <jim@meyering.net>
17205
17206         * lib/error.c (error_tail): Move some declarations
17207         into inner scope where the local variables are used.
17208
17209 2003-09-26  Bruno Haible  <bruno@clisp.org>
17210
17211         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
17212         stpncpy().
17213         Don't define stpncpy through config.h; it's now done through stpncpy.h.
17214
17215 2003-09-26  Bruno Haible  <bruno@clisp.org>
17216
17217         * lib/stpncpy.h (gnu_stpncpy): New declaration.
17218         (stpncpy): Define as alias for gnu_stpncpy.
17219         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
17220
17221 2003-09-25  Simon Josefsson  <jas@extundo.com>
17222
17223         * lib/xgetdomainname.h: New file.
17224         * lib/xgetdomainname.c: New file.
17225
17226 2003-09-25  Simon Josefsson  <jas@extundo.com>
17227             Bruno Haible  <bruno@clisp.org>
17228
17229         * modules/getdomainname: New file.
17230         * modules/xgetdomainname: New file.
17231         * MODULES.html.sh (func_all_modules): Add getdomainname,
17232         xgetdomainname.
17233
17234 2003-09-25  Simon Josefsson  <jas@extundo.com>
17235             Bruno Haible  <bruno@clisp.org>
17236
17237         * m4/getdomainname.m4: New file.
17238
17239 2003-09-25  Simon Josefsson  <jas@extundo.com>
17240             Bruno Haible  <bruno@clisp.org>
17241
17242         * lib/getdomainname.h: New file.
17243         * lib/getdomainname.c: New file.
17244
17245 2003-09-25  Karl Berry  <karl@gnu.org>
17246
17247         * lib/argp-fmtstream.c, argp-help.c: update from libc.
17248
17249 2003-09-25  Karl Berry  <karl@gnu.org>
17250
17251         * config/install-sh: update from automake.
17252
17253 2003-09-25  Bruno Haible  <bruno@clisp.org>
17254
17255         * modules/version-etc-2: New file, from modules/version-etc with
17256         modifications.
17257         * MODULES.html.sh (func_all_modules): Add version-etc-2.
17258
17259 2003-09-25  Bruno Haible  <bruno@clisp.org>
17260
17261         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
17262         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
17263
17264 2003-09-24  Simon Josefsson  <jas@extundo.com>
17265
17266         * modules/xgethostname: Add xgethostname.h.
17267
17268 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17269
17270         * lib/linebuffer.c (freebuffer): Don't free the argument, just
17271         the buffer associated with the argument.  Bug reported by
17272         Simon Josefsson.
17273
17274 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17275
17276         * README: Document assumptions that 'int' is at least 32 bits
17277         wide, that integer arithmetic is 2's complement without overflow,
17278         that there are no holes in integer values, that adding sizes of
17279         two nonoverlapping objects can't overflow, and that all-bits-zero
17280         yields scalar zero.  Fix spelling and capitalization typos.
17281
17282 2003-09-19  Karl Berry  <karl@gnu.org>
17283
17284         * lib/argp.h: update from libc.
17285
17286 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17287
17288         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
17289         to avoid spurious warnings like "AC_RUN_IFELSE was called before
17290         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
17291
17292 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17293
17294         * gnulib-tool: Use "test -h", not "test -L", for portability
17295         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
17296         (tags_regexp): Remove, since \| doesn't conform to POSIX.
17297         (sed_extract_prog): Issue s commands one-by-one, rather than
17298         using \| in one s command.
17299
17300 2003-09-16  Paul Eggert  <eggert@twinsun.com>
17301
17302         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
17303         input error, instead of returning NULL the next time we are called
17304         (and therefore losing track of errno).
17305
17306 2003-09-16  Bruno Haible  <bruno@clisp.org>
17307
17308         * gnulib-tool (func_create_testdir): Warn about duplicated
17309         dependencies.
17310
17311 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17312
17313         * modules/argmatch, modules/fatal, modules/obstack,
17314         modules/xalloc, modules/xgethostname: Sort dependencies by
17315         importance, not alphabetically.
17316
17317 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17318
17319         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
17320         fails, so that the caller gets the proper errno.
17321
17322         * lib/readutmp.c (read_utmp): Likewise.
17323         Check for fstat error.  Close stream and free storage
17324         when failing.
17325
17326 2003-09-14  Karl Berry  <karl@gnu.org>
17327
17328         * config/srclist.txt (strdup.c): disable for c89 changes.
17329
17330 2003-09-14  Jim Meyering  <jim@meyering.net>
17331
17332         * lib/getloadavg.c: Correct cpp indentation.
17333         * lib/strdup.c: Likewise.
17334         * lib/vasnprintf.c: Likewise.
17335
17336 2003-09-14  Bruno Haible  <bruno@clisp.org>
17337
17338         * modules/fwriteerror: New file.
17339         * MODULES.html.sh (func_all_modules): Add fwriteerror.
17340
17341 2003-09-14  Bruno Haible  <bruno@clisp.org>
17342
17343         * lib/fwriteerror.h: New file.
17344         * lib/fwriteerror.c: New file.
17345
17346 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17347
17348         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
17349         modules/xgethostname, modules/xalloc: Depend on exit.
17350
17351 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17352
17353         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
17354
17355         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
17356         and AC_MINIX, too, so that their extensions are available.
17357
17358         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
17359         This macro has been superseded by gl_BACKUPFILE.
17360
17361         More patches to assume C89 or better.
17362
17363         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
17364
17365         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
17366         unconditionally.
17367         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
17368         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
17369         Include <string.h>, <stdlib.h> unconditionally.
17370         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
17371         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
17372         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
17373         headers or for string.h.
17374         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
17375         or strtoul.
17376
17377         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
17378         headers.
17379         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
17380         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17381         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
17382         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
17383         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17384         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
17385         memcpy, memset.
17386         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
17387         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
17388         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
17389         strtol.
17390         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
17391         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
17392         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
17393         strtoul.
17394
17395 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17396
17397         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
17398         * lib/obstack.c [!defined _LIBC]: Likewise.
17399         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
17400         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
17401         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
17402
17403         More changes to assume C89 or better.
17404
17405         * lib/error.c (error_tail): Assume vprintf.
17406
17407         * lib/argmatch.c (getenv): Remove decl.
17408         * lib/progreloc.c (get_full_program_name): Define via prototype.
17409         * lib/setenv.c (clearenv): Likewise.
17410         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
17411         needed.
17412         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
17413         (malloc, memcpy): Remove decls.
17414         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
17415         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
17416         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17417         (memcpy): Remove macro.
17418         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
17419         (__P): Remove.  All uses removed.
17420         (PTR): Remove.  All uses changed to void *.
17421         (CHAR_BIT, NULL): Remove.
17422         (spaces, zeros, memset_space, memset_zero)
17423         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
17424         Remove.
17425         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
17426         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
17427         Define with prototype.
17428         Remove now-unnecessary prototype decl.
17429         (extra_args_spec): Assume ANSI C.  All uses changed.
17430         (extra_args_spec_iso): Remove.
17431         (my_strftime, emacs_strftimeu): Define via prototype.
17432         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
17433         unconditionally.
17434         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
17435         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
17436         (strtoul, strtol): Remove decls.
17437         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
17438         LONG_MAX): Remove.
17439         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17440         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
17441         (LOCALE_PARAM_PROTO): New macro.
17442         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
17443         (INTERNAL (strtol), strtol): Define with a prototype.
17444         (PARAMS): Remove.  All uses removed.
17445         * lib/tempname.c: Include <string.h> unconditionally.
17446         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
17447         * lib/xgethostname.c (main): Define with a prototype.
17448         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
17449         Include <stdlib.h> unconditionally.
17450         (calloc, malloc, realloc, free): Remove decls.
17451         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
17452         Include <stdlib.h> unconditionally.  Sort include file names.
17453         (strtod): Remove.
17454         (xstrtod): Define with a prototype.
17455         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
17456         (strtol, strtoul): Remove decls.
17457
17458 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17459
17460         More patches to assume C89 or better.
17461         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
17462         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
17463         string.h, memchr, STDC_HEADERS.
17464
17465 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17466
17467         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
17468         Include <stdlib.h>, <string.h> unconditionally.
17469         Remove now-unnecessary cast to char *.
17470         * lib/strnlen.c: Include <string.h> unconditionally.
17471         * lib/yesno.c (yesno): Define with a prototype.
17472
17473 2003-09-11  Bruno Haible  <bruno@clisp.org>
17474
17475         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
17476
17477 2003-09-10  Jim Meyering  <jim@meyering.net>
17478
17479         * lib/error.c: Correct indentation of cpp directives.
17480
17481 2003-09-10  Bruno Haible  <bruno@clisp.org>
17482
17483         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
17484         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
17485         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
17486         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
17487         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
17488         <stdlib.h> and <string.h> checks.
17489         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
17490         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
17491
17492 2003-09-10  Bruno Haible  <bruno@clisp.org>
17493
17494         * lib/strcspn.c: Include <string.h> unconditionally.
17495         * lib/strpbrk.c: Include <string.h> unconditionally.
17496         * lib/strstr.c: Include <string.h> unconditionally.
17497         * lib/unicodeio.c: Include <string.h> unconditionally.
17498         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
17499         * lib/unsetenv.c: Likewise.
17500         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
17501         * lib/yesno.c: Include <stdlib.h> unconditionally.
17502         (rpmatch): Add prototype.
17503
17504 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17505
17506         More patches to assume C89 or better.
17507         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
17508         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
17509         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
17510         or for string.h.
17511         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
17512         stdlib.h.
17513         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
17514         C headers.
17515         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
17516         string.h.
17517         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
17518         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
17519         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
17520         or for string.h.
17521         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
17522         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
17523         C headers.
17524         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
17525         memcpy.
17526         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
17527         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
17528         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
17529         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
17530         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
17531         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
17532         string.h, free.
17533         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
17534         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
17535         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
17536         C headers, or for string.h.
17537         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
17538         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
17539         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
17540         headers, memory.h, stdlib.h, string.h, strings.h.
17541         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
17542         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
17543         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
17544         strchr.
17545         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
17546         headers, memory.h, string.h.
17547         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
17548         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
17549         free.
17550         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
17551         headers.
17552         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
17553         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
17554         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
17555         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
17556         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
17557
17558 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17559
17560         More K&R removal.
17561
17562         * lib/acosl.c (main): Use a prototype.
17563         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
17564         tanl.c: Likewise.
17565
17566         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
17567
17568         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
17569         (getopt, etopt_long, getopt_long_only, _getopt_internal)
17570         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
17571         with a prototype.
17572         * lib/getopt.c (const): Remove macro.
17573         Include <string.h> unconditionally.
17574         (my_index): Remove; all uses changed to strchr.
17575         (strlen): Remove decl.
17576         (exchange): Remove forward decl; no longer needed.
17577         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
17578         Define with prototype.
17579         * lib/getopt1.c (const): Remove macro.
17580         (getopt_long, getopt_long_only, main): Define with prototype.
17581
17582         * lib/getugroups.c: Include <string.h> unconditionally.
17583
17584         * lib/getusershell.c: Include <stdlib.h> unconditionally.
17585         (getusershell, setusershell, endusershell, readname, main):
17586         Define with prototypes.
17587
17588         * lib/group-member.c: Include group-member.h first.
17589         Include <stdlib.h> unconditionally.
17590
17591         * lib/hard-locale.c: Include hard-locale.h first.
17592         Include <stdlib.h>, <string.h> unconditionally.
17593
17594         * lib/hash.c (free, malloc): Remove decls.
17595         Include <stdlib.h> unconditionally.
17596
17597         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
17598         (getenv): Do not declare.
17599
17600         * lib/idcache.c: Include <string.h> unconditionally.
17601
17602         * lib/long-options.c: Include long-options.h first, to test interface.
17603         Include <stdlib.h> unconditionally.
17604
17605         * lib/makepath.c: Include makepath.h first, to test interface.
17606         Include <stdlib.h> and <string.h> unconditionally.
17607
17608         * lib/linebuffer.c: Include <stdlib.h>.
17609         (free): Remove decl.
17610
17611         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
17612         stddef.h. rpl_malloc returns void *, not char *.
17613         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
17614         prototype.
17615
17616         * lib/md5.h: Include <limits.h> unconditionally.
17617         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
17618         (__P): Remove; all uses removed.
17619         * lib/md5.c: Include "md5.h" first.
17620         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
17621         md5_buffer, md5_process_bytes, md5_process_block):
17622         Define with prototypes.
17623         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
17624         * lib/sha.c: Include "sha.h" first.
17625         Include <stdlib.h>, <string.h> unconditionally.
17626
17627         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
17628         * lib/memcmp.c (__ptr_t): Likewise.
17629         * lib/memrchr.c (__ptr_t): Likewise.
17630         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
17631         Include <string.h> unconditionally.
17632         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
17633         * lib/memchr.c: Include <stdlib.h> unconditionally.
17634         * lib/memchr.c (LONG_MAX): Remove.
17635         * lib/memrchr.c (LONG_MAX): Likewise.
17636         * lib/memchr.c (__memchr): Define via a prototype.
17637         * lib/memrchr.c (__memrchr): Likewise.
17638         * lib/memcmp.c (__P): Remove, and remove all uses.
17639         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
17640         Remove forward decls; no longer needed.
17641         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
17642         Use types required by C89 in prototype.
17643
17644         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
17645         * lib/savedir.c: Likewise.
17646         * lib/mkdir.c (free): Remove decl.
17647         * lib/rmdir.c (rmdir): Define with a prototype.
17648         * lib/savedir.c: Include savedir.h first, to test interface.
17649
17650         * lib/mktime.c (STDC_HEADERS): Remove.
17651         Include <stdlib.h>, <string.h> unconditionally.
17652
17653         * lib/modechange.c: Include <stdlib.h> unconditionally.
17654         (malloc): Remove decl.
17655
17656         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
17657         (free): Remove decl.
17658
17659         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
17660         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
17661         (This type really should be intptr_t, but that's a C99ism.)
17662         (_obstack_memcpy): Remove: all uses changed to memcpy.
17663         Include <string.h> unconditionally.
17664         (struct obstack): Assume __STDC__ for types of members
17665         chunkfun, freefun, extra_arg.
17666         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
17667         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
17668         obstack_begin, obstack_specify_allocation,
17669         obstack_specify_allocation_with_arg, obstack_chunkfun,
17670         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
17671         Remove unprototyped decls and the macros that use them.
17672         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
17673         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
17674         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
17675         (defined __STDC__ && __STDC__)]:
17676         Remove nonprototyped code.
17677         Include <stdlib.h> unconditionally.
17678         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
17679         _obstack_allocated_p, _obstack_free, obstack_free,
17680         _obstack_memory_used, print_and_abort):
17681         Define using prototypes.
17682         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
17683         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
17684         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
17685         obstack_next_free, obstack_object_size, obstack_room) [0]:
17686         Remove unused, unprototyped code.
17687
17688         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
17689
17690         * lib/physmem.c (physmem_total, physmem_available, main): Define
17691         with prototypes.
17692
17693         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
17694         (main): Define with a prototype.
17695
17696         * lib/posixver.c (getenv): Remove decl.
17697
17698         * lib/putenv.c (malloc): Returns void *, not char *.
17699         Include <string.h> unconditionally.
17700         (strchr, memcpy, NULL): Do not define.
17701
17702         * lib/readtokens.c: Include readtokens.h first, to test interface.
17703         Include <stdlib.h>, <string.h> unconditionally.
17704         (init_tokenbuffer): Define with a prototype.
17705
17706         * lib/regex.c (PARAMS): Remove.  All uses removed.
17707         All uses of _RE_ARGS removed, too.
17708         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
17709         unconditionally.
17710         (bzero): Assume memset exists.
17711         (memcmp, memcpy, NULL): Remove.
17712         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
17713         char, or assignments to local vars of type signed char.
17714         (init_syntax_once, PREFIX(extract_number_and_incr),
17715         PREFIX(print_partial_compiled_pattern),
17716         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
17717         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
17718         PREFIX(regex_grow_registers), PREFIX(regex_compile),
17719         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
17720         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
17721         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
17722         wcs_compile_range, byte_compile_range, truncate_wchar,
17723         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
17724         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
17725         count_mbs_length, wcs_re_match_2_internal,
17726         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
17727         PREFIX(alt_match_null_string_p),
17728         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
17729         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
17730         regfree, PREFIX(extract_number)): Define with prototype.  Remove
17731         now-unnecessary declaration, if any.
17732         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
17733         regcomp, regexec):
17734         Remove now-unnecessary casts among pointer types.
17735         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
17736
17737         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
17738         (free): Remove decl.
17739
17740         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
17741
17742         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
17743         (free): Remove decl.
17744
17745         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
17746         * lib/xgetcwd.c: Likewise.
17747
17748         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
17749         (free): Remove decl.
17750
17751         * lib/strchrnul.c (strchrnul): Define with a prototype.
17752         Fix bug: c_in was not converted to char before searching.
17753
17754         The following changes are not K&R related:
17755
17756         * lib/group-member.h: Include <sys/types.h>, so that this file is
17757         self-contained.
17758         * lib/makepath.h: Likewise.
17759
17760         * lib/getusershell.c (readname, default_index, line_size, readname):
17761         Use size_t, not int, for sizes.
17762         (readname): If the size overflows, report an error instead of
17763         looping forever.
17764
17765 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17766
17767         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
17768         libc.
17769
17770 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17771
17772         * README: New section: portability guidelines.
17773
17774 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17775
17776         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
17777         C89 spec.
17778
17779 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17780
17781         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
17782
17783 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17784
17785         Assume C89 or better; remove K&R cruft.
17786         A few of these changes were first proposed by Derek Robert Price
17787         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
17788
17789         * lib/addext.c: Include <string.h> unconditionally.
17790         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
17791         Don't declare getenv or malloc.
17792
17793         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
17794         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
17795         (NULL): Remove.
17796         (find_stack_direction, alloca): Use prototypes.
17797
17798         * lib/atexit.c (atexit): Define using a prototype.
17799
17800         * lib/basename.c, dirname.c, stripslash.c:
17801         Include <string.h> unconditionally.
17802
17803         * lib/bcopy.c: Include <stddef.h>.
17804         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
17805
17806         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
17807
17808         * lib/error.h (error, error_at_line, error_print_progname)
17809         [! (defined (__STDC__) && __STDC__)]: Remove decls.
17810         * lib/error.c: Include error.h first, to check interface.
17811         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
17812         (VA_START): Remove; all uses changeed to va_start.
17813         (exit, strerror): Remove decls.
17814         (error_print_progname): Prototype uncondionally.
17815         Don't include <errno.h>; no longer needed.
17816         (private_strerror): Remove.
17817         (error_tail): Always define.
17818         (error, error_at_line): Assume C89 or better; always use prototypes.
17819         * lib/fatal.c: Include "fatal.h" first, to test interface.
17820         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
17821         (VA_START): Remove; all uses changed to va_start.
17822         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
17823         this case.
17824         (exit): Remove decl.
17825         (fatal): Prototype unconditionally.  Assume va_start works.
17826         Abort at end, to pacify gcc.
17827
17828         * lib/euidaccess.c (main): Define with a prototype.
17829
17830         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
17831
17832         * lib/exitfail.c: Include <stdlib.h> unconditionally.
17833
17834         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
17835         prototypes.
17836         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
17837         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
17838         (getenv): Remove decl.
17839         (fnmatch): Define using a prototype.
17840         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
17841         (FCT): Define using a prototype.
17842
17843         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
17844
17845         * lib/gethostname.c: Include <stddef.h>.
17846         (gethostname): Define with prototype.  Length is size_t, not int.
17847
17848 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17849
17850         Assume C89 or better; remove K&R cruft.
17851         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
17852         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
17853         string.h, getenv, malloc.
17854         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
17855         headers.
17856         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
17857         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
17858         do not check for strerror.
17859         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
17860         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
17861         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
17862         do not check for doprnt or vprintf.
17863         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
17864         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
17865
17866 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17867
17868         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
17869         getversion.c should have been removed then, but was accidentally
17870         preserved.
17871
17872         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
17873         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
17874
17875 2003-09-08  Karl Berry  <karl@gnu.org>
17876
17877         * config/config.sub, config.guess, srclistvars.sh: update from savannah
17878                 config, forget about prep.
17879
17880         * config/depcomp, missing: update from automake.
17881
17882 2003-09-07  Paul Eggert  <eggert@twinsun.com>
17883
17884         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
17885         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
17886
17887 2003-09-07  Paul Eggert  <eggert@twinsun.com>
17888
17889         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
17890         copy_tm_result.  Bug reported by Simon Josefsson in
17891         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
17892
17893 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17894
17895         * m4/time_r.m4: New file.
17896         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
17897         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
17898         is. Check for timegm declaration.
17899         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
17900         Do not check for gmtime_r.
17901         Replace mktime if __mktime_internal does not exist and if mktime
17902         hasn't been replaced already.
17903
17904 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17905
17906         * lib/time_r.c, lib/time_r.h: New files.
17907
17908         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
17909         __localtime_r.
17910         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
17911         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
17912
17913         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
17914         __gmtime_r.
17915         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
17916         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
17917         Include <time_r.h>.
17918
17919         * lib/timegm.c: Switch to glibc implementation, with the following
17920         changes:
17921         [defined HAVE_CONFIG_H]: Include <config.h>.
17922         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
17923         (__mktime_internal) [!defined _LIBC]: New decl.
17924         (__gmtime_r) [!defined _LIBC]: New macro and function.
17925         (timegm): Use a prototype, since gnulib assumes C89.
17926         Do not bother declaring tmp to be const, as it's not really usefu.
17927         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
17928         (timegm): Declare only if HAVE_DECL_TIMEGM.
17929
17930 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17931
17932         * MODULES.html.sh (func_all_modules): Add time_r.
17933         * modules/time_r: New file.
17934         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
17935         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
17936
17937 2003-09-03  Paul Eggert  <eggert@twinsun.com>
17938
17939         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
17940         Bug reported by Lute Kamstra in
17941         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
17942
17943         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
17944         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
17945         course with correspondingly smaller numbers for tomorrow and
17946         yesterday.  From Tadayoshi Funaba.  Originally installed into
17947         sh-utils on 1999-08-07, but the patch got lost (I guess during the
17948         coreutils merge?).
17949
17950 2003-08-31  Simon Josefsson  <jas@extundo.com>
17951
17952         * modules/timegm: New file.
17953         * MODULES.html.sh (func_all_modules): Add timegm.
17954
17955 2003-08-31  Simon Josefsson  <jas@extundo.com>
17956
17957         * m4/timegm.m4: New file.
17958
17959 2003-08-31  Simon Josefsson  <jas@extundo.com>
17960
17961         * lib/timegm.h: New file.
17962         * lib/timegm.c: New file.  Based on
17963         wget-1.8.2/src/http.c:mktime_from_utc.
17964
17965 2003-08-31  Karl Berry  <karl@gnu.org>
17966
17967         * lib/argp.h: update from libc.
17968
17969 2003-08-28  Bruno Haible  <bruno@clisp.org>
17970
17971         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
17972         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
17973         followed by '#define fnmatch fnmatch_posix' gives an error.
17974
17975 2003-08-28  Bruno Haible  <bruno@clisp.org>
17976
17977         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
17978         warning on QNX, which defines O_BINARY to 000000.
17979
17980 2003-08-27  Jim Meyering  <jim@meyering.net>
17981
17982         * m4/mkstemp.m4: Require that the system mkstemp be able to create
17983         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
17984         would fail after 32.  Reported by Danny Levinson.  Details here:
17985         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
17986
17987 2003-08-24  Bruno Haible  <bruno@clisp.org>
17988
17989         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
17990         MSVC7 <stdio.h> is included later.
17991
17992 2003-08-22  Simon Josefsson  <jas@extundo.com>
17993
17994         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
17995
17996 2003-08-20  Karl Berry  <karl@gnu.org>
17997
17998         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
17999
18000 2003-08-20  Bruno Haible  <bruno@clisp.org>
18001
18002         * modules/progname: New file.
18003         * MODULES.html.sh (func_all_modules): Add progname.
18004
18005 2003-08-20  Bruno Haible  <bruno@clisp.org>
18006
18007         * lib/progname.h: New file, from GNU gettext.
18008         * lib/progname.c: New file, from GNU gettext.
18009         * lib/progreloc.c: New file, from GNU gettext.
18010
18011 2003-08-19  Jim Meyering  <jim@meyering.net>
18012
18013         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
18014         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
18015
18016 2003-08-19  Bruno Haible  <bruno@clisp.org>
18017
18018         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
18019         more.
18020
18021 2003-08-19  Bruno Haible  <bruno@clisp.org>
18022
18023         * lib/xstrdup.c: Assume <string.h> exists.
18024
18025 2003-08-18  Paul Eggert  <eggert@twinsun.com>
18026
18027         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
18028         in makefile rules.
18029
18030 2003-08-18  Jim Meyering  <jim@meyering.net>
18031
18032         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
18033         * m4/lib-ld.m4: Likewise.
18034
18035 2003-08-18  Jim Meyering  <jim@meyering.net>
18036
18037         * lib/setenv.h: Indent nested cpp directive.
18038         * lib/vasnprintf.c: Remove trailing blanks.
18039
18040 2003-08-17  Simon Josefsson  <jas@extundo.com>
18041
18042         * modules/xstrndup: New file.
18043         * MODULES.html.sh (func_all_modules): Add xstrndup.
18044
18045 2003-08-17  Simon Josefsson  <jas@extundo.com>
18046
18047         * modules/argp: Fix autoconf macro name. Add more dependencies.
18048
18049 2003-08-17  Simon Josefsson  <jas@extundo.com>
18050
18051         * m4/xstrndup.m4: New file.
18052
18053 2003-08-17  Simon Josefsson  <jas@extundo.com>
18054
18055         * m4/argp.m4: New file.
18056
18057 2003-08-17  Simon Josefsson  <jas@extundo.com>
18058             Bruno Haible  <bruno@clisp.org>
18059
18060         * lib/xstrndup.h: New file.
18061         * lib/xstrndup.c: New file.
18062
18063 2003-08-17  Bruno Haible  <bruno@clisp.org>
18064
18065         * modules/strndup (Files, Include): Add lib/strndup.h.
18066
18067 2003-08-17  Bruno Haible  <bruno@clisp.org>
18068
18069         * modules/euidaccess (Files): Add lib/euidaccess.h.
18070
18071 2003-08-17  Bruno Haible  <bruno@clisp.org>
18072
18073         * lib/strndup.h: New file.
18074
18075 2003-08-17  Bruno Haible  <bruno@clisp.org>
18076
18077         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
18078         like AC_GNU_SOURCE.
18079         * modules/extensions (configure.ac): Comment out the invocation of
18080         gl_USE_SYSTEM_EXTENSIONS.
18081
18082 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18083
18084         Merges from coreutils, etc.
18085         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
18086         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
18087         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
18088         fixing a typo.
18089         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
18090         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
18091
18092 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18093
18094         Document merge from coreutils.
18095         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
18096         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
18097         * modules/utime: Add m4/utimes-null.m4.
18098
18099 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18100
18101         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
18102         space, undoing this 2003-08-12 change:
18103         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18104
18105 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18106
18107         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
18108         strtoul.c from libc, undoing this 2003-08-12 change:
18109         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18110
18111 2003-08-16  Jim Meyering  <jim@meyering.net>
18112
18113         Merges from coreutils.
18114         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
18115         prefix.  Adjust cache variables similarly.  Create 500 rather than
18116         just 300 files, to exercise bug on Darwin6.5, too.
18117         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
18118         $missing_dir.
18119         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
18120         AM_SYS_POSIX_TERMIOS.
18121         Reported by mkc@mathdogs.com.
18122         Also change use of $am_cv_sys_posix_termios
18123         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
18124         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
18125         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
18126         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
18127         in /proc/mounts until it finds one with matching device number.  This
18128         is unnecessary when the FILE argument *is* a mount point.  No stat call
18129         is necessary in that case.  So, disable the statvfs-testing code on
18130         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
18131         as RedHat bug# 84846.
18132         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18133         to 1MB, so as not to render systems with no stack size limit (e.g.,
18134         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18135         Include <unistd.h>.  On some systems,
18136         it is required for the definition of _SC_PAGESIZE.
18137
18138 2003-08-16  Jim Meyering  <jim@meyering.net>
18139
18140         Merge from coreutils.
18141         * lib/xstrtoimax.c: #else #if -> #elif.
18142         * lib/xstrtoumax.c: Likewise.
18143
18144 2003-08-16  Jim Meyering  <jim@meyering.net>
18145
18146         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
18147         * m4/utimes.m4: Removed.
18148         * m4/utimes-null.m4: Renamed from utimes.m4.
18149
18150         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18151         to 1MB, so as not to render systems with no stack size limit (e.g.,
18152         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18153         Include <unistd.h>.  On some systems,
18154         it is required for the definition of _SC_PAGESIZE.
18155
18156 2003-08-16  Jim Meyering  <jim@meyering.net>
18157         and Paul Eggert  <eggert@cs.ucla.edu>
18158
18159         Merges from coreutils, etc.
18160
18161         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
18162         using the latest version from cvs.  This avoids problems with #line
18163         directives using a vendor (Sun) compiler.
18164         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
18165         Don't set GETGROUPS_LIB here; now it's
18166         done via getgroups.m4's wrapper function.
18167         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
18168         rather than just in sh-util/configure.in, so that the
18169         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
18170         same.
18171         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
18172         AC_FUNC_GETLOADAVG where to find getloadavg.c.
18173         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
18174         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
18175         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
18176         Remove code that is now done by the newly-required macros.
18177         Append $(EXEEXT) to DF_PROG.
18178         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
18179         Do not invoke or require the following here,
18180         since prereq.m4 or some gnulib .m4 now does this for us:
18181         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
18182         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
18183         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
18184         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
18185         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
18186         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
18187         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
18188         AC_FUNC_OBSTACK.
18189         Do not replace the following functions, as this is now the job
18190         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
18191         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
18192         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
18193         atexit getpass, strdup, getpagesize.
18194         Replace 'raise'.
18195         Do not check for the following functions, as this is now the job
18196         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
18197         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
18198         setregid.
18199         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
18200         Check for sys/sysctl.h.
18201         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
18202         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
18203         of checking for ssize_t ourselves.
18204
18205         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
18206         Require every macro that gnulib/modules/* suggests for us.
18207         (jm_PREREQ_ADDEXT): New macro.
18208         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
18209         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
18210
18211         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
18212         (gl_PHYSMEM): Use it.
18213         Also check for `table' function.
18214         Check for new headers and functions.
18215         Add check for sys/sysmp.h.
18216         With suggestions from Kaveh Ghazi.
18217         Ignore headers that are present but cannot be compiled.  This
18218         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
18219         C 5.4.
18220
18221 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18222
18223         Document merge from coreutils.
18224         * modules/userspec: Depend on posixver.
18225         * modules/strftime: Depend on tzset.
18226
18227 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18228
18229         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
18230         rather than tab, after '#' in shell-script copyright notices.
18231         Suggested by Bruno Haible.
18232
18233 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18234
18235         * config/srclist-update: Use three spaces, rather than tab, after '#'
18236         in shell-script copyright notices.  Suggested by Bruno Haible.
18237         Remove unnecessary parenthesization in regular expression.
18238
18239 2003-08-15  Jim Meyering  <jim@meyering.net>
18240
18241         Merge from coreutils.
18242         * lib/xgethostname.c: Include <stdlib.h>.
18243         (xghostname): Don't exit for anything other than memory-related
18244         failure; just return NULL.
18245         * lib/userspec.c: Include "posixver.h".
18246         (parse_user_spec): Accept `.' as a separator only
18247         in pre-POSIX-200112 mode.
18248         * lib/strtoimax.c: Use #elif rather than #else #if.
18249         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
18250         Remove function, now that we can rely on a working tzset function.
18251         [!_LIBC]: Ensure that the required autoconf test has been run.
18252         [!defined _NL_CURRENT && HAVE_STRFTIME]:
18253         Use underlying_strftime for %r.
18254         * lib/sha.c: Merge in some clean-up and optimization changes from
18255         glibc.
18256         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
18257         Ensure that it is a multiple of 64.
18258         Rearrange loop exit tests so as to avoid performing an
18259         additional fread after encountering an error or EOF.
18260         * lib/realloc.c: Update copyright date.
18261
18262 2003-08-15  Jim Meyering  <jim@meyering.net>
18263         and Paul Eggert  <eggert@twinsun.com>
18264
18265         Merge from coreutils.
18266         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
18267         member but strut utmpx does not.  Needed for AIX 4.3.3.
18268         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
18269
18270 2003-08-15  Jim Meyering  <jim@meyering.net>
18271         and Paul Eggert  <eggert@cs.ucla.edu>
18272
18273         Merges from coreutils, etc.
18274         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
18275         Require gl_FUNC_TZSET_CLOBBER.
18276         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
18277         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
18278         members.
18279
18280 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18281
18282         Help the merge from coreutils.
18283         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
18284         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
18285         * m4/tzset.m4: Use it too.
18286
18287 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18288
18289         * modules/tzset: New file.
18290
18291 2003-08-14  Jim Meyering  <jim@meyering.net>
18292
18293         Merges from coreutils.
18294         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
18295         variable names, rather than @FNMATCH_H@.
18296         * modules/alloca: Likewise for $(ALLOCA_H).
18297
18298         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
18299         the three copies of the literal target, `fnmatch.h'.
18300         * modules/alloca (alloca.h): Likewise.
18301
18302 2003-08-14  Jim Meyering  <jim@meyering.net>
18303
18304         Merge from coreutils.
18305         * m4/tzset.m4: New file.
18306         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
18307         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
18308         otherwise, AIX 5.1 systems would end up using the latter.
18309         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
18310         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
18311         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
18312         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
18313
18314 2003-08-14  Jim Meyering  <jim@meyering.net>
18315
18316         Merge from coreutils.
18317         * lib/obstack.h: Whitespace changes.
18318         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
18319         and xcalloc return values.
18320         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
18321         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
18322         hang on OSF/1 5.1 for DIR on both local and remote file systems.
18323         Reported by (and fix confirmed by) Nelson H. F. Beebe.
18324         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18325         error from mntctl.
18326         Use mntctl's return value to drive the entry-processing loop, since
18327         we can't rely on the value of the vmt_length member in the last
18328         entry.  On some systems doing so could result in exhausting
18329         virtual memory.  Based in part on a patch from Mike Jetzer.
18330
18331 2003-08-14  Jim Meyering  <jim@meyering.net>
18332         and Paul Eggert  <eggert@twinsun.com>
18333
18334         Merges from coreutils, plus other fixes.
18335         * lib/physmem.c: Merge in portability changes from gcc/libiberty
18336         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
18337         for credits and details.  Thanks to Kaveh Ghazi for helping
18338         to keep these files in sync.
18339         (ARRAY_SIZE): Define it.
18340         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
18341         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
18342         (memcasecmp): Don't assume size_t fits in unsigned int.
18343         Remove casts and duplicate code.
18344         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
18345         (memcpy): Remove definition.
18346         Merge in some clean-up and optimization changes from glibc.
18347         [BLOCKSIZE]: Move definition to top of file.
18348         Ensure that it is a multiple of 64.
18349         Rearrange loop exit tests so as to avoid performing an
18350         additional fread after encountering an error or EOF.
18351         * lib/md5.h (md5_uintptr): Define.
18352         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
18353         return to the initial working directory.  Preserve errno
18354         for caller.
18355         * lib/idcache.c: Include "xalloc.h".
18356         (xmalloc, xrealloc): Remove decls.
18357         (getuser): Remove casts no longer required in C89.
18358         * lib/human.c: Include stdio.h, for sprintf.
18359         * lib/group-member.c: Include "xalloc.h".
18360         (xmalloc, xrealloc): Remove decls.
18361         (get_group_info): Remove casts no longer required in C89.
18362         * lib/getusershell.c (readname): Remove casts no longer required in
18363         C89.
18364         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
18365         * lib/getline.c: Whitespace fix, from coreutils.
18366
18367 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18368
18369         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
18370         Check for isascii.
18371
18372         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18373         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18374         Undo previous (whitespace-only) change.
18375
18376 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18377
18378         * lib/exclude.c: Include <ctype.h>
18379         (IN_CTYPE_DOMAIN): New macro.
18380         (is_space): New fn.
18381         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
18382         and empty lines.
18383
18384         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18385         Undo previous (whitespace-only) change.
18386
18387 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18388
18389         * config/srclist-update: Change update back to the old behavior,
18390         leaving whitespace alone.  Use one 'sed' command rather than a
18391         pipeline.
18392         (fixlicense): Now a variable, not a function.
18393         (remove_trailing_blanks): Remove.
18394         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
18395         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18396         Undo previous (whitespace-only) change.
18397
18398 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18399
18400         Merge from coreutils.
18401         * modules/euidaccess: Add lib_SOURCES, include for new
18402         file euidaccess.h
18403
18404 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18405
18406         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18407         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18408         Normalize leading white space and remove trailing white space.
18409
18410         Merge from coreutils
18411         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
18412
18413         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
18414         0.12.1.  These files are now being upgraded automatically by
18415         ../config/srclist-update.
18416
18417 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18418
18419         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18420         Normalize leading white space and remove trailing white space.
18421         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
18422         notice, as per ../config/srclist-update.
18423
18424         Merge from coreutils.
18425         * lib/euidaccess.h: New file.
18426         * lib/euidaccess.c: Include it.
18427         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
18428         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
18429         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
18430
18431 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18432
18433         * config/srclist-update: Add copyright notice.
18434         (remove_id_lines, remove_trailing_blanks): New constants.
18435         (fixfile): Use them to normalize spacing a bit in copied files.
18436         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18437         Normalize leading white space and remove trailing white space.
18438
18439         * config/texinfo.tex: Sync with texinfo.
18440
18441         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
18442         strtoul.c from libc, to merge coreutils whitespace changes.
18443
18444         * config/srclist.txt: Get the following m4 files from gettext:
18445         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
18446         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
18447         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
18448         wint_t.m4.
18449
18450 2003-08-12  Karl Berry  <karl@gnu.org>
18451
18452         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
18453         been made.
18454
18455 2003-08-11  Paul Eggert  <eggert@twinsun.com>
18456
18457         * modules/gnu-source, m4/gnu-source.m4:
18458         Remove; we're assuming Autoconf 2.54 or later now.
18459         Suggested by Bruno Haible.
18460         * MODULES.html.sh (func_all_modules): Remove gnu-source.
18461
18462 2003-08-11  Bruno Haible  <bruno@clisp.org>
18463
18464         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
18465
18466 2003-08-11  Bruno Haible  <bruno@clisp.org>
18467
18468         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
18469         (vasnprintf): Use it instead of wcslen.
18470
18471 2003-08-11  Bruno Haible  <bruno@clisp.org>
18472
18473         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
18474         value to ensure that _Bool promotes to int. Use #define for _Bool when
18475         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
18476
18477 2003-08-10  Karl Berry  <karl@gnu.org>
18478
18479         * lib/regex.h: update from libc (whitespace fix).
18480
18481 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18482
18483         Merge some files from coreutils.  These changes were
18484         originally made by Jim Meyering.
18485         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
18486         many older Unixes require this.
18487         * lib/alloca.c (alloca): Remove cast to argument of free;
18488         no longer needed in C89.
18489         * lib/alloca_.h, regex.h: Fix white space to match
18490         what GNU indent does.
18491
18492 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18493
18494         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
18495         apparently Emacs's Unicode mode got confused before my 2003-08-05
18496         checkin.
18497
18498 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18499
18500         * m4/extensions.m4: New file.
18501         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
18502         Require gl_USE_SYSTEM_EXTENSIONS.
18503         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
18504         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
18505
18506 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18507
18508         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
18509         * modules/extensions, modules/gnu-source: New files.
18510         * modules/timespec, modules/unlocked-io: Depend on extensions.
18511
18512 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18513
18514         * modules/restrict: New file.
18515         * MODULES.html.sh (func_all_modules): Add restrict.
18516         * modules/regex: Depend on restrict.
18517
18518 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18519
18520         * m4/restrict.m4: New file.
18521         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
18522
18523 2003-08-07  Bruno Haible  <bruno@clisp.org>
18524
18525         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
18526         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
18527
18528 2003-08-07  Bruno Haible  <bruno@clisp.org>
18529
18530         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
18531         makes the module 'getndelim2' compatible with the module 'getline'.
18532
18533 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18534
18535         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
18536         byte with "\201" to avoid glitches when editing that source file
18537         with multi-gnome-terminal.
18538
18539 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18540
18541         * lib/bumpalloc.h: Remove.
18542
18543 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18544
18545         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
18546         * modules/bumpalloc: Remove.
18547
18548 2003-08-04  Paul Eggert  <eggert@twinsun.com>
18549
18550         * lib/getloadavg.c: Change copyright notice and spacing to conform to
18551         GNU coding style.
18552
18553         Merge from coreutils.
18554         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
18555         1. From glibc.
18556         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
18557         from Karl Berry, implemented by Jim Meyering.
18558         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
18559         from Dmitry V. Levin.
18560         Remove anachronistic cast of xrealloc.
18561         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
18562         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
18563         type. Otherwise, it wouldn't compile with at least /bin/cc on
18564         ymp-cray-unicos9.0.2.X.
18565         Combine two mostly-identical uses of alloca into one.
18566         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
18567
18568 2003-08-04  Dave Love  <d.love@dl.ac.uk>
18569
18570         [From Emacs.]
18571
18572         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
18573         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
18574         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
18575         obsolete NLIST_NAME_UNION.
18576         [__GNU__]: Undef BSD and FSCALE.
18577         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
18578
18579 2003-08-03  Paul Eggert  <eggert@twinsun.com>
18580
18581         * lib/stdbool_.h (_Bool): Make it signed char, instead of
18582         an enum type, so that it's guaranteed to promote to int.  See:
18583         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
18584
18585 2003-08-03  Karl Berry  <karl@gnu.org>
18586
18587         * config/depcomp: update from automake.
18588
18589 2003-07-31  Paul Eggert  <eggert@twinsun.com>
18590
18591         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
18592         (strerror): Don't assume that a printable int fits in 14 bytes.
18593
18594 2003-07-31  Bruno Haible  <bruno@clisp.org>
18595
18596         * modules/getpass-gnu: New file.
18597         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
18598
18599 2003-07-31  Bruno Haible  <bruno@clisp.org>
18600
18601         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
18602
18603 2003-07-24  Karl Berry  <karl@gnu.org>
18604
18605         * config/missing: update from automake.
18606
18607 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
18608             Bruno Haible  <bruno@clisp.org>
18609
18610         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
18611         * lib/getline.c (getline, getdelim): Likewise.
18612         Remove _GNU_SOURCE define; now it's defined in config.h through
18613         m4/getline.m4.
18614
18615 2003-07-23  Karl Berry  <karl@gnu.org>
18616
18617         * config/config.sub: update from prep.
18618
18619 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18620
18621         * modules/xalloc (Depends-on): Add exitfail.
18622         * modules/xmemcoll: Likewise.
18623
18624 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18625
18626         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
18627         over-parenthesization in macros.
18628
18629         Sync with coreutils.
18630
18631         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
18632         required by C99.
18633
18634         Use `exit_failure' for xalloc and xmemcoll instead of their own
18635         private exit-failure variables.
18636         * lib/xalloc.h (xalloc_exit_failure): Remove.
18637         * lib/xmalloc.c: Likewise.  Include exitfail.h.
18638         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
18639         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
18640         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
18641         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
18642
18643 2003-07-20  Jim Meyering  <jim@meyering.net>
18644
18645         * modules/closeout (Depends-on): Add exitfail.
18646         Suggestion from Bruno Haible.
18647
18648 2003-07-19  Karl Berry  <karl@gnu.org>
18649
18650         * config/config.sub: update from prep.
18651
18652 2003-07-18  Paul Eggert  <eggert@twinsun.com>
18653
18654         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
18655         Remove.
18656         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
18657         to test that it can stand by itself.  Include "exitfail.h".
18658         Clients should set exit_failure instead.
18659         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
18660
18661 2003-07-18  Bruno Haible  <bruno@clisp.org>
18662
18663         * modules/getndelim2: New file.
18664         * modules/getline: Share files with module getndelim2.
18665         * modules/getnline: Depend on getndelim2 instead of sharing files with
18666         it. Add getnline.c to lib_SOURCES.
18667         * MODULES.html.sh (func_all_modules): Add getndelim2.
18668
18669 2003-07-18  Bruno Haible  <bruno@clisp.org>
18670
18671         * m4/getndelim2.m4: New file.
18672         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
18673         invoke gl_PREREQ_GETNDELIM2.
18674         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
18675         gl_PREREQ_GETNDELIM2.
18676         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
18677         gl_GETNDELIM2.
18678
18679 2003-07-18  Bruno Haible  <bruno@clisp.org>
18680
18681         * lib/getndelim2.h: New file.
18682         * lib/getndelim2.c: Make into a module of its own. Include config.h,
18683         getndelim2.h.
18684         (getndelim2): Make non-static. Change return type to ssize_t.
18685         * lib/getline.h: Change argument names.
18686         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
18687         * lib/getnline.c: Include getndelim2.h.
18688
18689 2003-07-18  Andreas Schwab  <schwab@suse.de>
18690
18691         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
18692
18693 2003-07-17  Karl Berry  <karl@gnu.org>
18694
18695         * config/config.sub: update from prep.
18696
18697 2003-07-17  Bruno Haible  <bruno@clisp.org>
18698
18699         * modules/getnline: New file.
18700         * modules/getline: Add lib/getndelim2.c to source file list.
18701         * MODULES.html.sh (func_all_modules): Add getnline.
18702
18703 2003-07-17  Bruno Haible  <bruno@clisp.org>
18704
18705         * m4/getnline.m4: New file.
18706
18707 2003-07-17  Bruno Haible  <bruno@clisp.org>
18708
18709         * m4/Makefile.am.in: Remove file.
18710         * m4/Makefile.am: Remove file.
18711         * m4/Makefile.in: Remove file.
18712
18713 2003-07-17  Bruno Haible  <bruno@clisp.org>
18714
18715         * lib/getnline.h: New file.
18716         * lib/getnline.c: New file.
18717         * lib/getndelim2.c: New file, extracted from getline.c.
18718         (getndelim2): Renamed from getdelim2, with added nmax argument.
18719         * lib/getline.c: Include getndelim2.c.
18720         (getdelim2): Moved out to getndelim2.c.
18721         (getline, getdelim): Update.
18722
18723 2003-07-17  Bruno Haible  <bruno@clisp.org>
18724
18725         * lib/Makefile.am: Remove file.
18726         * lib/Makefile.in: Remove file.
18727
18728 2003-07-17  Bruno Haible  <bruno@clisp.org>
18729
18730         * configure.in: Remove file.
18731         * Makefile.in: Remove file.
18732
18733 2003-07-17  Bruno Haible  <bruno@clisp.org>
18734
18735         * MODULES.html.sh: Put the </BODY> right before </HTML>.
18736
18737 2003-07-16  Karl Berry  <karl@gnu.org>
18738
18739         * config/srclist-update: was running fixlicense twice, which caused
18740                 texinfo.tex to be nullified for some reason.  Simplify,
18741                 $gplsrc is no longer needed as far as I can see?
18742
18743 2003-07-16  Jim Meyering  <jim@meyering.net>
18744
18745         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
18746
18747 2003-07-15  Paul Eggert  <eggert@twinsun.com>
18748
18749         * config/srclist.txt: Get the following files from gettext-runtime/intl
18750         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
18751         ref-del.sin.  From Bruno Haible.
18752         * config/srclist-update (fixfile): Change grep pattern again, since the
18753         previous fix didn't work (there was another trailing $).  Use
18754         '[$]' to escape the $s.
18755
18756 2003-07-15  Karl Berry  <karl@gnu.org>
18757
18758         * lib/vasnprintf.c: update from gettext.
18759
18760 2003-07-15  Karl Berry  <karl@gnu.org>
18761
18762         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
18763         gets expanded when surrounded by '$'.
18764
18765 2003-07-15  Jim Meyering  <jim@meyering.net>
18766
18767         * modules/save-cwd: Don't depend on error.  From Derek Price.
18768
18769 2003-07-15  Jim Meyering  <jim@meyering.net>
18770
18771         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
18772
18773 2003-07-14  Simon Josefsson  <jas@extundo.com>
18774
18775         * modules/mempcpy: New file.
18776         * MODULES.html.sh (func_all_modules): Add mempcpy.
18777
18778 2003-07-14  Simon Josefsson  <jas@extundo.com>
18779
18780         * m4/mempcpy.m4: New file.
18781
18782 2003-07-14  Simon Josefsson  <jas@extundo.com>
18783
18784         * lib/mempcpy.h: New file.
18785         * lib/mempcpy.c: New file.
18786
18787 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18788
18789         * modules/getdate, modules/posixtm: Depend on mktime.
18790
18791 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18792
18793         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
18794         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
18795         unicodeio.c, unicodeio.h, unlocked-io.h:
18796         Switch from LGPL to GPL.
18797
18798 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18799
18800         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
18801         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
18802         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
18803         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
18804         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
18805         updated automatically by ../config/srclist-update.  This changes
18806         their license from LPGL to GPL.
18807
18808 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18809
18810         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
18811         assumed to refer to the root of the most recent stable gettext version.
18812         * config/srclistvars.sh: Add defaults for eggert.
18813         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
18814         Match "This program" as well as "The program".  This is needed
18815         for gettext.
18816
18817 2003-07-14  Jim Meyering  <jim@meyering.net>
18818
18819         Don't emit diagnostics.  Let callers do that.
18820         * lib/save-cwd.c: Don't include "error.h".
18821         (save_cwd): Don't call error.  Ensure that errno is valid
18822         when returning nonzero.
18823
18824         * lib/save-cwd.h (restore_cwd): Update prototype.
18825         * lib/save-cwd.c (restore_cwd): Remove two parameters.
18826         Simplify.  Don't call error upon failure.  Let callers do that.
18827         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
18828         when auditing is enabled.  But don't bother updating the #if.
18829
18830 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
18831
18832         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
18833         it breaks C++ compilation.
18834         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
18835
18836 2003-07-10  Simon Josefsson  <jas@extundo.com>
18837
18838         * modules/strchrnul (Makefile.am): Add strchrnul.h.
18839
18840 2003-07-10  Jim Meyering  <jim@meyering.net>
18841
18842         * m4/clock_time.m4: Remove trailing blank.
18843         * m4/intmax_t.m4: Likewise.
18844
18845 2003-07-10  Jim Meyering  <jim@meyering.net>
18846
18847         * lib/vasnprintf.c: Remove trailing blanks.
18848         Make cpp indentation consistent.
18849
18850 2003-07-09  Paul Eggert  <eggert@twinsun.com>
18851
18852         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
18853         posixver.c, strftime.c, strnlen.c, strverscmp.c:
18854         Switch from LGPL to GPL.
18855
18856 2003-07-09  Paul Eggert  <eggert@twinsun.com>
18857
18858         * config/srclist.txt: Sort sublists.  Add
18859         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
18860         that differ from gnulib for one reason or another; we'd like this list
18861         to be smaller but for now let's document what we have.
18862
18863 2003-07-08  Paul Eggert  <eggert@twinsun.com>
18864
18865         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
18866         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
18867         and sweeter "eval x=$x".
18868         * config/srclist.txt: Get lib/argp* from glibc.
18869
18870 2003-07-07  Paul Eggert  <eggert@twinsun.com>
18871
18872         * lib/mktime.c: Fix some boundary cases and remove need for floating
18873         point.
18874
18875         Issue a compile-time diagnostic if time_t is floating point, or if
18876         two's complement arithmetic is not in effect, or if arithmetic
18877         right shift does not propagate the sign.  These assumptions were
18878         all in the original code but they weren't checked.
18879
18880         (TIME_T_MIDPOINT, verify): New macros.
18881         (__isleap): Remove; it has integer overflow problems.
18882         (leapyear): New function, without those problems.
18883         (ydhms_tm_diff): Remove; splitting into two parts.
18884         (ydhms_diff): New function, containing the arithmetic part of
18885         the old ydhms_tm_diff function.  Issue a compile-time
18886         diagnostic if we are not using C99 integer division.
18887         Avoid casts when possible.
18888         (guess_time_tm): New function, containing the checking part of
18889         the old ydhms_tm_diff function.  Return the new value, rather than
18890         the difference between it and the old.  Accept a new argument T
18891         so that *T specifies the old value.  Check for overflow in the result.
18892
18893         (__mktime_internal): Use a time_t offset, not a long int offset.
18894         This undoes the 2003-06-04 change, which is no longer needed now
18895         that we have better overflow checking.
18896         (localtime_offset): Likewise.
18897
18898         (__mktime_internal): Avoid harmful overflow on hosts where time_t
18899         and long are 64-bit but int is only 32-bit.
18900         (ydhms_diff): Use long int to store year1 and yday1.
18901         Issue a compile-time diagnostic if long int is not wide enough.
18902
18903         (__mktime_internal): Use long int to store adjusted year and yday.
18904         Use plain C rather than preprocessor commands, if that doesn't
18905         affect efficiency.
18906         Check for overflow (and try to repair) after each probe
18907         rather than checking only at the very end.  This avoids some bugs
18908         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
18909         does not equal GMT offset at maximum time).
18910         Use integer to check for overflow rather than floating point; this
18911         is more portable to non-IEEE hosts, and is a tad faster.
18912         When we detect that we are oscillating between two values,
18913         don't check whether tm_isdst has the requested value, since
18914         we already know the answer.  When tm_isdst has the wrong value,
18915         use a different heuristic to find the right one, based on the
18916         extreme values actually observed in practice in tz2003a,
18917         rather than the (overly optimistic) "previous 3 calendar quarters".
18918
18919         (not_equal_tm, print_tm, check_result): Use "const T" rather than
18920         "T const" to accommodate glibc style.
18921         (check_result): Use less-confusing report format.  "long" -> "long int.
18922         (main): Likewise.
18923         Don't loop if the iteration overflows time_t.
18924         Allow a negative step in the iteration.
18925
18926 2003-07-06  Karl Berry  <karl@gnu.org>
18927
18928         * config/depcomp: update from automake.
18929         * config/config.sub: update from prep.
18930
18931 2003-07-03  Karl Berry  <karl@gnu.org>
18932
18933         * config/config.guess: update from prep.
18934
18935 2003-07-01  Paul Eggert  <eggert@twinsun.com>
18936
18937         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
18938         xreadlink.c now includes it unconditionally.
18939
18940 2003-07-01  Paul Eggert  <eggert@twinsun.com>
18941
18942         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
18943         having it depend on HAVE_SYS_TYPES_H.
18944
18945 2003-07-01  Bruno Haible  <bruno@clisp.org>
18946
18947         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
18948         <sys/types.h> should be sufficient.
18949         Reported by Paul Eggert.
18950
18951 2003-06-26  Karl Berry  <karl@gnu.org>
18952
18953         * config/depcomp: update from automake.
18954
18955 2003-06-26  Bruno Haible  <bruno@clisp.org>
18956
18957         * modules/human: Depend on module stdbool.
18958
18959 2003-06-25  Bruno Haible  <bruno@clisp.org>
18960
18961         * modules/readlink: New file.
18962         * modules/xreadlink: Depend on it.
18963         * MODULES.html.sh (func_all_modules): Add readlink.
18964
18965 2003-06-25  Bruno Haible  <bruno@clisp.org>
18966
18967         * m4/readlink.m4: New file.
18968
18969 2003-06-25  Bruno Haible  <bruno@clisp.org>
18970
18971         * lib/readlink.c: New file.
18972
18973 2003-06-22  Karl Berry  <karl@gnu.org>
18974
18975         * config/srclist.txt: update mkinstalldirs from automake.
18976         * config/mkinstalldirs: update.
18977
18978 2003-06-22  Bruno Haible  <bruno@clisp.org>
18979
18980         Portability to mingw32.
18981         * m4/ssize_t.m4: New file, from GNU gettext.
18982         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
18983         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
18984
18985 2003-06-22  Bruno Haible  <bruno@clisp.org>
18986
18987         * modules/safe-read: Add m4/ssize_t.m4.
18988         * modules/xreadlink: Add m4/ssize_t.m4.
18989
18990 2003-06-20  Bruno Haible  <bruno@clisp.org>
18991
18992         Assume C89, so PARAMS isn't needed.
18993         * lib/unicodeio.h (PARAMS): Remove.
18994         * lib/unicodeio.c: Don't use PARAMS.
18995
18996 2003-06-18  Karl Berry  <karl@gnu.org>
18997
18998         * config/config.{guess,sub}: update from prep.
18999
19000 2003-06-18  Jim Meyering  <jim@meyering.net>
19001
19002         Merge changes from coreutils.
19003         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
19004         Remove explicit declarations of xmalloc and realloc.
19005         Include xalloc.h.
19006         (read_utmp): Remove anachronistic cast of xmalloc.
19007
19008 2003-06-17  Paul Eggert  <eggert@twinsun.com>
19009
19010         Assume C89, so PARAMS isn't needed.
19011         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
19012         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
19013         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
19014         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
19015         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
19016         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
19017         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
19018         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
19019         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
19020         lib/xstrtod.h, lib/xstrtol.h: Likewise.
19021         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
19022         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
19023         no longer needed. Anyway, config.h should always be included before any
19024         other file.
19025
19026 2003-06-11  Simon Josefsson  <jas@extundo.com>
19027
19028         * modules/sysexits: New file.
19029         * MODULES.html.sh (func_all_modules): Add sysexits.
19030
19031 2003-06-11  Simon Josefsson  <jas@extundo.com>
19032
19033         * lib/sysexit_.h: New file.
19034
19035 2003-06-11  Derek Price  <derek@ximbiot.com>
19036
19037         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
19038         necessary.
19039
19040 2003-06-11  Bruno Haible  <bruno@clisp.org>
19041
19042         * m4/sysexits.m4: New file.
19043
19044 2003-06-10  Simon Josefsson  <jas@extundo.com>
19045
19046         * lib/argp.h: New file, from glibc.
19047         * lib/argp-ba.c: New file, from glibc.
19048         * lib/argp-eexst.c: New file, from glibc.
19049         * lib/argp-fmtstream.c: New file, from glibc.
19050         * lib/argp-fmtstream.h: New file, from glibc.
19051         * lib/argp-fs-xinl.c: New file, from glibc.
19052         * lib/argp-help.c: New file, from glibc.
19053         * lib/argp-namefrob.h: New file, from glibc.
19054         * lib/argp-parse.c: New file, from glibc.
19055         * lib/argp-pv.c: New file, from glibc.
19056         * lib/argp-pvh.c: New file, from glibc.
19057         * lib/argp-xinl.c: New file, from glibc.
19058
19059 2003-06-10  Simon Josefsson  <jas@extundo.com>
19060
19061         * modules/strchrnul: New file.
19062
19063 2003-06-10  Simon Josefsson  <jas@extundo.com>
19064
19065         * modules/argp: New file.
19066
19067 2003-06-10  Simon Josefsson  <jas@extundo.com>
19068
19069         * m4/strchrnul.m4: New file.
19070
19071 2003-06-10  Simon Josefsson  <jas@extundo.com>
19072
19073         * lib/strchrnul.h: New file.
19074         * lib/strchrnul.c: New file.
19075
19076 2003-06-10  Bruno Haible  <bruno@clisp.org>
19077
19078         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
19079
19080 2003-06-07  Karl Berry  <karl@gnu.org>
19081
19082         * config/config.{guess,sub}: update from prep.
19083
19084 2003-06-07  Jim Meyering  <jim@meyering.net>
19085
19086         * modules/strtod: Use $(...) notation, not @...@ for
19087         AC_REPLACE'd variables.
19088         * modules/localcharset: Likewise.
19089
19090 2003-06-07  Jim Meyering  <jim@meyering.net>
19091
19092         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
19093         in place of my name in the copyright comment.
19094         Remove definition and uses of __P.
19095
19096         From coreutils.
19097         * lib/stat.c: Don't declare xmalloc explicitly.
19098         Instead, include "xalloc.h".
19099         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
19100         xrealloc, and xcalloc return values.
19101         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
19102         Improve comment.
19103         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
19104
19105 2003-06-07  Bruno Haible  <bruno@clisp.org>
19106
19107         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
19108         avoid AC_CONFIG_LINKS.
19109         * modules/fnmatch (Makefile.am): Use explicit creation rule for
19110         fnmatch.h, to avoid AC_CONFIG_LINKS.
19111         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
19112
19113 2003-06-07  Bruno Haible  <bruno@clisp.org>
19114
19115         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
19116         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
19117         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19118         directory.
19119         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
19120         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19121         directory.
19122
19123 2003-06-06  Jim Meyering  <jim@meyering.net>
19124
19125         Merge from coreutils.
19126         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
19127         Consolidate declarations and initializations of *_base* locals.
19128
19129         Merge from coreutils.
19130         This avoids a core dump on systems without GNU putenv,
19131         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
19132         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
19133         (unsetenv): New static function, from GNU libc.
19134         (rpl_putenv): Use it.
19135
19136         * lib/modechange.c: Remove trailing blanks.
19137
19138         Merge from coreutils.
19139         * lib/fsusage.c: Remove declaration of statfs.
19140         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
19141
19142         * lib/posixtm.c: Include <stdbool.h> unconditionally.
19143
19144 2003-06-06  Jim Meyering  <jim@meyering.net>
19145
19146         * lib/stdbool_.h: Renamed from stdbool.h.in.
19147
19148 2003-06-06  Jim Meyering  <jim@meyering.net>
19149             Bruno Haible  <bruno@clisp.org>
19150
19151         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
19152         Adjust Makefile.am snippet not to redirect directly to target.
19153         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
19154
19155 2003-06-05  Paul Eggert  <eggert@twinsun.com>
19156
19157         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
19158         mismatch, look in future quarters as well as past.  This fixes a
19159         bug when processing fall-backwards gaps immediately after a long
19160         period of daylight-saving time.
19161
19162         * lib/mktime.c: Assume freestanding C89 or better.
19163         (HAVE_LIMITS_H): Remove.  Assume it's 1.
19164         (__P): Remove; not used.
19165         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
19166         (mktime, not_equal_tm, print_tm, check_result,
19167         main): Use prototypes.  Use const * where appropriate.
19168         (main): Fix typo in testing code that uncovered by above changes.
19169         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
19170
19171 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19172
19173         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
19174         locale.h, localeconv.  This merges changes from coreutils.
19175
19176         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
19177         It can be removed after the next Autoconf is released.
19178         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
19179         needed.
19180
19181 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19182
19183         * lib/mktime.c: Fix Debian bug 177940
19184         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
19185         (localtime_offset): Now long int, not time_t, because we want it
19186         to be guaranteed to be signed.  All uses changed.
19187         (__mktime_internal): If overflow would occur when adding offset,
19188         don't add it.
19189
19190         Merge 'human' changes from coreutils.  Rewrite to support
19191         locale-specific notations like thousands separators.
19192         * lib/human.c: Simplify authorship notice.
19193         Include human.h immediately after config.h.
19194         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
19195         <limits.h>: Do not include, since human.h does.
19196         (SIZE_MAX, UINTMAX_MAX): New macros.
19197         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
19198         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
19199         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
19200         (power_letter): Renamed from suffixes.
19201         (generate_suffix_backwards): Remove.
19202         (adjust_value): Now takes int style (because of human.h changes)
19203         and long double value (for greater precision on some platforms).
19204         (group_number): New function.
19205         (human_readable): Use it.  Use integer options, not enum.
19206         Put the options before the sizes in the arg list.
19207         Support all the new options.
19208         The old human_readable function has been removed;
19209         use inttostr.h instead.
19210         (human_readable, default_block_size, humblock):
19211         Use uintmax_t, not int, for block sizes.
19212         (human_readable_inexact, block_size_types): Remove.
19213         (block_size_opts): New constant.
19214         (human_options): Renamed from human_block_size, with new signature
19215         that allows block sizes up to UINTMAX_MAX.  All callers changed.
19216         * lib/human.h: Add copyright and authorship notice.
19217         Include <limits.h> and <stdbool.h> unconditionally.
19218         (PARAMS): Remove.  All uses removed.
19219         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
19220         (enum human_inexact_style): Remove tag; now a nameless enum.
19221         (human_floor, human_ceiling, human_round_to_even): Now have
19222         values 2, 0, 1 rather than -1, 1, 0.
19223         (human_group_digits, human_suppress_point_zero, human_autoscale,
19224         human_base_1024, human_SI, human_B): New constants.
19225         (human_readable_inexact, human_block_size): Remove.
19226         (human_readable): Size args are now uintmax_t, not int.
19227         (human_options): New decl.
19228
19229         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
19230         unnecessary now that we assume C89 or better.  This change
19231         imported from coreutils.
19232
19233         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19234         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
19235         in the 2003-05-30 sync from glibc.
19236
19237         .h files should stand alone, but we shouldn't include <sys/types.h>
19238         if we can get away with just <stddef.h>.
19239
19240         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
19241         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
19242         rather than <sys/types.h>, as we merely need size_t.
19243         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
19244         to get size_t.
19245         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
19246         Include <stdio.h>, to get FILE.
19247         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
19248         memcasecmp.h has included <stddef.h> and all we need is size_t.
19249         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
19250         our interface, instead of including <sys/types.h>
19251
19252 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19253
19254         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
19255         now, as glibc mktime is buggy on non-glibc systems.
19256
19257 2003-06-03  Karl Berry  <karl@gnu.org>
19258
19259         * config/config.sub: update from prep.
19260
19261 2003-06-02  Paul Eggert  <eggert@twinsun.com>
19262
19263         [from coreutils]
19264         Fix some minor time-related bugs with POSIX time arguments.
19265         Some valid time stamps were being rejected (notably -1, and
19266         time stamps before 1900 on 64-bit hosts).  And some invalid
19267         time stamps were being accepted, e.g. September 31.
19268
19269         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
19270         that we can return (time_t) -1 successfully.
19271         * lib/posixtm.c: Likewise.
19272         [HAVE_STDBOOL_H]: Include <stdbool.h>.
19273         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
19274         (t): Remove static var.
19275         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
19276         of static var.  All uses changed.
19277         (year): Do not reject years before 1900; they can occur with
19278         64-bit time_t.
19279         (posix_time_parse): Do not check for out-of-range components;
19280         that is now the caller's responsibility, since our checks were
19281         only approximations.
19282         (posixtime): Use mktime to check for out-of-range components,
19283         since it knows them exactly.
19284         If mktime returns (time_t) -1, check whether an error actually occurred
19285         by invoking localtime on -1.
19286         (main) [TEST_POSIXTIME]: Check for input data errors, and report
19287         posixtime failures better.
19288         Improve the test data (in comments only).
19289
19290 2003-06-02  Karl Berry  <karl@gnu.org>
19291
19292         * config/mkinstalldirs (version): new variable.
19293         (--version): new option.
19294         (usage): improve message.
19295
19296 2003-05-30  Karl Berry  <karl@gnu.org>
19297
19298         * lib/mktime.c: update from libc.
19299
19300 2003-05-30  Bruno Haible  <bruno@clisp.org>
19301
19302         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
19303         * config/config.rpath: Upgrade to gettext-0.12.1.
19304
19305 2003-05-30  Bruno Haible  <bruno@clisp.org>
19306
19307         * m4/gettext.m4: Upgrade to gettext-0.12.1.
19308         * m4/nls.m4: New file, from gettext-0.12.1.
19309         * m4/po.m4: New file, from gettext-0.12.1.
19310         * m4/progtest.m4: Upgrade to gettext-0.12.1.
19311
19312 2003-05-30  Bruno Haible  <bruno@clisp.org>
19313
19314         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
19315         * lib/localcharset.h: Likewise.
19316         * lib/localcharset.c: Likewise.
19317
19318 2003-05-29  Karl Berry  <karl@gnu.org>
19319
19320         * config/config.rpath: update from gettext.
19321
19322 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19323
19324         Assume the headers required for C89 freestanding compilers.
19325         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
19326         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
19327         * m4/human.m4 (gl_HUMAN): Likewise.
19328         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
19329         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
19330         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19331         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
19332         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19333         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
19334
19335 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19336
19337         Assume the headers required for C89 freestanding compilers.
19338         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
19339         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
19340         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
19341         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
19342         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
19343         define, since <limits.h> is guaranteed to do that.
19344         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
19345         * lib/exclude.c: Include <stdbool.h> unconditionally.
19346         * lib/tempname.c: Include <stddef.h> unconditionally.
19347         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
19348         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
19349         <stddef.h> does that.
19350         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
19351         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
19352         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
19353         needed.
19354         * lib/xstrtol.c: Likewise.
19355         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
19356         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
19357
19358         * lib/addext.c (addext): Use assignment rather than cast, to avoid
19359         warnings on some platforms.
19360
19361         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19362         arbitrarily.
19363
19364 2003-05-26  Jim Meyering  <jim@meyering.net>
19365
19366         Merge in a change from coreutils:
19367         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
19368         that is guaranteed to be `no'.  Use `no_such_member' to indicate
19369         that condition, rather than `-1' which is slightly misleading.
19370         Change the name of the cache variable to have the gl_ prefix.
19371         Prompted by a patch from Richard Dawe for DJGPP.
19372
19373 2003-05-24  Karl Berry  <karl@gnu.org>
19374
19375         * config/config.guess: update from prep.
19376
19377 2003-05-22  Karl Berry  <karl@gnu.org>
19378
19379         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
19380
19381 2003-05-20  Karl Berry  <karl@gnu.org>
19382
19383         * config/config.guess: update from prep.
19384
19385 2003-05-18  Karl Berry  <karl@gnu.org>
19386
19387         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
19388         might actually be set by the user.
19389
19390         * config/depcomp, install-sh, mdate-sh: update from automake.
19391
19392 2003-05-17  Bruno Haible  <bruno@clisp.org>
19393
19394         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
19395         invalid expansion for AC_EGREP_CPP.
19396         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
19397         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
19398         Suggested by Akim Demaille <akim@epita.fr> in
19399         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
19400
19401 2003-05-12  Jim Meyering  <jim@meyering.net>
19402
19403         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
19404         the space-padded-by-default conversion specifiers, %e, %k, %l.
19405
19406 2003-05-12  Bruno Haible  <bruno@clisp.org>
19407
19408         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
19409         the string is longer than 4 KB.
19410
19411 2003-05-11  Karl Berry  <karl@gnu.org>
19412
19413         * config/config.{guess,sub}: update from prep.
19414
19415 2003-05-09  Bruno Haible  <bruno@clisp.org>
19416
19417         * modules/error: Add m4/strerror_r.m4 to file list.
19418
19419 2003-05-03  Bruno Haible  <bruno@clisp.org>
19420
19421         Upgrade to Unicode-4.0.
19422         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
19423         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
19424         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
19425         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
19426         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
19427         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
19428         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
19429         Change width of U+E0100..U+E01EF from 1 to 0.
19430
19431 2003-04-25  Jim Meyering  <jim@meyering.net>
19432
19433         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
19434         of type size_t, not int.
19435
19436 2003-04-25  Bruno Haible  <bruno@clisp.org>
19437
19438         * lib/copy-file.c: Include <stddef.h>, for size_t.
19439
19440 2003-04-21  Paul Eggert  <eggert@twinsun.com>
19441
19442         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
19443         code which expansion is under static control.  Patch imported from
19444         Akim Demaille's patch to Bison; see
19445         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
19446
19447 2003-04-14  Bruno Haible  <bruno@clisp.org>
19448
19449         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
19450
19451 2003-04-11  Jim Meyering  <jim@meyering.net>
19452
19453         Merge changes from Coreutils.
19454
19455         2003-03-22  Jim Meyering  <jim@meyering.net>
19456
19457         * lib/strftime.c (widen): Cast alloca return value to proper type.
19458
19459         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
19460
19461         From GNU libc.
19462         * lib/strftime.c (my_strftime): Handle very large width
19463         specifications for numeric values correctly.  Improve checks for
19464         overflow.
19465
19466         2003-01-19  Jim Meyering  <jim@meyering.net>
19467
19468         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
19469         definitions.
19470         (nl_get_alt_digit) [! defined my_strftime]: Define.
19471         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
19472         _nl_get_alt_digit and _nl_get_walt_digit.
19473
19474         * lib/strftime.c (my_strftime): Merge in locale-related changes from
19475         libc. These changes have no effect outside of _LIBC.
19476
19477 2003-04-10  Bruno Haible  <bruno@clisp.org>
19478
19479         * modules/findprog: New file.
19480         * MODULES.html.sh (func_all_modules): Add it.
19481
19482 2003-04-10  Bruno Haible  <bruno@clisp.org>
19483
19484         * m4/findprog.m4: New file.
19485         * m4/eaccess.m4: New file.
19486
19487 2003-04-10  Bruno Haible  <bruno@clisp.org>
19488
19489         * lib/findprog.h: New file, from GNU gettext.
19490         * lib/findprog.c: New file, from GNU gettext.
19491
19492 2003-04-05  Jim Meyering  <jim@meyering.net>
19493
19494         Merge changes from Coreutils.
19495
19496         * lib/exclude.h (PARAMS): Remove definition and uses.
19497         * lib/exclude.c: Remove uses of `PARAMS'.
19498
19499         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
19500         Add test-cases for DOS filenames. Declare program_name.
19501         (main): Set up program_name.  Patch by Rich Dawe.
19502
19503         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19504         error from mntctl.
19505         Use mntctl's return value to drive the entry-processing loop, since
19506         we can't rely on the value of the vmt_length member in the last
19507         entry.  On some systems doing so could result in exhausting
19508         virtual memory.  Based in part on a patch from Mike Jetzer.
19509
19510 2003-04-04  Bruno Haible  <bruno@clisp.org>
19511
19512         * modules/linebreak: New file.
19513         * MODULES.html.sh (func_all_modules): Add it.
19514
19515 2003-04-04  Bruno Haible  <bruno@clisp.org>
19516
19517         * m4/linebreak.m4: New file.
19518
19519 2003-04-04  Bruno Haible  <bruno@clisp.org>
19520
19521         * lib/linebreak.h: New file, from GNU gettext.
19522         * lib/linebreak.c: New file, from GNU gettext with slight
19523         modifications.
19524         * lib/lbrkprop.h: New file, from GNU gettext.
19525
19526 2003-04-03  Bruno Haible  <bruno@clisp.org>
19527
19528         * modules/utf8-ucs4: New file.
19529         * modules/utf16-ucs4: New file.
19530         * modules/ucs4-utf8: New file.
19531         * modules/ucs4-utf16: New file.
19532         * MODULES.html.sh (func_all_modules): Add them.
19533
19534 2003-04-03  Bruno Haible  <bruno@clisp.org>
19535
19536         * m4/utf-ucs4.m4: New file.
19537         * m4/ucs4-utf.m4: New file.
19538
19539 2003-04-03  Bruno Haible  <bruno@clisp.org>
19540
19541         * lib/utf8-ucs4.h: New file, from GNU gettext.
19542         * lib/utf16-ucs4.h: New file, from GNU gettext.
19543         * lib/ucs4-utf8.h: New file, from GNU gettext.
19544         * lib/ucs4-utf16.h: New file, from GNU gettext.
19545
19546 2003-04-02  Bruno Haible  <bruno@clisp.org>
19547
19548         * modules/binary-io: New file.
19549         * MODULES.html.sh (func_all_modules): Add it.
19550
19551 2003-04-02  Bruno Haible  <bruno@clisp.org>
19552
19553         * lib/binary-io.h: New file, from GNU gettext.
19554
19555 2003-04-01  Bruno Haible  <bruno@clisp.org>
19556
19557         * modules/pathname: New file.
19558         * MODULES.html.sh (func_all_modules): Add it.
19559
19560 2003-04-01  Bruno Haible  <bruno@clisp.org>
19561
19562         * lib/pathname.h: New file, from GNU gettext.
19563         * lib/concatpath.c: New file, from GNU gettext.
19564
19565 2003-03-30  Bruno Haible  <bruno@clisp.org>
19566
19567         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
19568
19569 2003-03-30  Bruno Haible  <bruno@clisp.org>
19570
19571         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
19572         function chown() doesn't exist.
19573
19574 2003-03-28  Bruno Haible  <bruno@clisp.org>
19575
19576         * modules/copy-file: New file.
19577         * MODULES.html.sh (func_all_modules): Add it.
19578
19579 2003-03-28  Bruno Haible  <bruno@clisp.org>
19580
19581         * m4/copy-file.m4: New file.
19582
19583 2003-03-28  Bruno Haible  <bruno@clisp.org>
19584
19585         * lib/copy-file.h: New file, from GNU gettext.
19586         * lib/copy-file.c: New file, from GNU gettext.
19587
19588 2003-03-18  Jim Meyering  <jim@meyering.net>
19589
19590         * lib/quote.c (quote_n): Fix typo in comment.
19591
19592 2003-03-18  Bruno Haible  <bruno@clisp.org>
19593
19594         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
19595         checking.
19596         * m4/onceonly_2_57.m4: Likewise.
19597
19598 2003-03-17  Bruno Haible  <bruno@clisp.org>
19599
19600         * m4/onceonly.m4: Require autoconf 2.54 or newer.
19601         (m4_quote): Remove macro.
19602         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
19603
19604 2003-03-14  Jim Meyering  <jim@meyering.net>
19605
19606         Merge changes from Coreutils.
19607         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
19608         to be const, in order to avoid warnings.
19609         (obstack_room): Likewise.
19610         (obstack_empty_p): Likewise.
19611
19612 2003-03-14  Bruno Haible  <bruno@clisp.org>
19613
19614         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
19615         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
19616
19617 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19618
19619         Merge changes from Bison.
19620         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
19621         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
19622         when compiling Bison 1.875's `bitset bset = obstack_alloc
19623         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
19624         * lib/hash.c: Include <stdbool.h> unconditionally.
19625
19626 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19627
19628         * m4/onceonly.m4 (m4_quote): New macro.
19629         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
19630         Quote AC_FOREACH variable-expansions properly.
19631
19632 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19633
19634         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
19635
19636 2003-03-09  Paul Eggert  <eggert@twinsun.com>
19637
19638         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
19639         Reported by Bruce Becker; see:
19640         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
19641
19642 2003-03-03  Paul Eggert  <eggert@twinsun.com>
19643             Bruno Haible  <bruno@clisp.org>
19644
19645         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
19646         Reported by John Hughes, see
19647         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
19648
19649 2003-02-20  Bruno Haible  <bruno@clisp.org>
19650
19651         * MODULES.html.sh (func_all_modules): Add poll.
19652
19653 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19654
19655         * modules/poll: New file.
19656
19657 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19658
19659         * lib/poll_.h: New file.
19660         * lib/poll.c: New file.
19661
19662 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19663
19664         * m4/poll.m4: New file.
19665
19666 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19667
19668         * modules/mathl: New file.
19669
19670 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19671
19672         * lib/mathl.h: New file.
19673         * lib/acosl.c: New file.
19674         * lib/asinl.c: New file.
19675         * lib/atanl.c: New file.
19676         * lib/ceill.c: New file.
19677         * lib/cosl.c: New file.
19678         * lib/expl.c: New file.
19679         * lib/floorl.c: New file.
19680         * lib/frexpl.c: New file.
19681         * lib/ldexpl.c: New file.
19682         * lib/logl.c: New file.
19683         * lib/sincosl.c: New file.
19684         * lib/sinl.c: New file.
19685         * lib/sqrtl.c: New file.
19686         * lib/tanl.c: New file.
19687         * lib/trigl.c: New file.
19688         * lib/trigl.h: New file.
19689
19690 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19691
19692         * m4/mathl.m4: New file.
19693
19694 2003-02-18  Bruno Haible  <bruno@clisp.org>
19695
19696         * MODULES.html.sh (func_all_modules): Add mathl.
19697
19698 2003-02-17  Bruno Haible  <bruno@clisp.org>
19699
19700         * modules/mkdtemp: New module.
19701         * MODULES.html.sh (func_all_modules): Add it.
19702
19703 2003-02-17  Bruno Haible  <bruno@clisp.org>
19704
19705         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
19706
19707 2003-02-17  Bruno Haible  <bruno@clisp.org>
19708
19709         * lib/mkdtemp.h: New file, from GNU gettext.
19710         * lib/mkdtemp.c: New file, from GNU gettext.
19711
19712 2003-02-02  Jim Meyering  <jim@meyering.net>
19713
19714         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
19715         e.g. glibc-2.2.93.
19716
19717 2003-01-31  Bruno Haible  <bruno@clisp.org>
19718
19719         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
19720         'rpl_rename'.
19721         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
19722         'rpl_strnlen'.
19723         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
19724         'rpl_strtod'.
19725         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
19726         'rpl_utime'.
19727
19728 2003-01-31  Bruno Haible  <bruno@clisp.org>
19729
19730         * lib/rename.c: #undef rename before defining rpl_rename.
19731         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
19732
19733 2003-01-30  Bruno Haible  <bruno@clisp.org>
19734
19735         * modules/vasnprintf, modules/vasprintf: New modules.
19736         * MODULES.html.sh (func_all_modules): Add them.
19737
19738 2003-01-30  Bruno Haible  <bruno@clisp.org>
19739
19740         * m4/signed.m4: New file, from GNU gettext.
19741         * m4/longdouble.m4: New file, from GNU gettext.
19742         * m4/wchar_t.m4: New file, from GNU gettext.
19743         * m4/wint_t.m4: New file, from GNU gettext.
19744         * m4/vasnprintf.m4: New file.
19745         * m4/vasprintf.m4: New file.
19746
19747 2003-01-30  Bruno Haible  <bruno@clisp.org>
19748
19749         * lib/printf-args.h: New file, from GNU gettext.
19750         * lib/printf-args.c: New file, from GNU gettext.
19751         * lib/printf-parse.h: New file, from GNU gettext.
19752         * lib/printf-parse.c: New file, from GNU gettext.
19753         * lib/vasnprintf.h: New file, from GNU gettext.
19754         * lib/vasnprintf.c: New file, from GNU gettext.
19755         * lib/asnprintf.c: New file, from GNU gettext.
19756         * lib/vasprintf.h: New file, from GNU gettext with modifications.
19757         * lib/vasprintf.c: New file, from GNU gettext.
19758         * lib/asprintf.c: New file, from GNU gettext.
19759
19760 2003-01-29  Bruno Haible  <bruno@clisp.org>
19761
19762         * modules/stpncpy: New module.
19763         * MODULES.html.sh (func_all_modules): Add it.
19764
19765 2003-01-29  Bruno Haible  <bruno@clisp.org>
19766
19767         * m4/stpncpy.m4: New file.
19768
19769 2003-01-29  Bruno Haible  <bruno@clisp.org>
19770
19771         * lib/stpncpy.h: New file, from GNU gettext with modifications.
19772         * lib/stpncpy.c: New file, from GNU gettext with modifications.
19773
19774 2003-01-28  Bruno Haible  <bruno@clisp.org>
19775
19776         * modules/c-ctype: New module.
19777         * MODULES.html.sh (func_all_modules): Add it.
19778
19779 2003-01-28  Bruno Haible  <bruno@clisp.org>
19780
19781         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
19782         Paul Eggert.
19783         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
19784         Paul Eggert.
19785
19786 2003-01-27  Bruno Haible  <bruno@clisp.org>
19787
19788         * modules/xsetenv: New module.
19789         * MODULES.html.sh (func_all_modules): Add it.
19790
19791 2003-01-27  Bruno Haible  <bruno@clisp.org>
19792
19793         * lib/xsetenv.h: New file, from GNU gettext.
19794         * lib/xsetenv.c: New file, from GNU gettext.
19795
19796 2003-01-23  Jim Meyering  <jim@meyering.net>
19797
19798         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
19799         from working on systems without dirfd (at least Irix and OSF1/Tru64).
19800
19801 2003-01-23  Bruno Haible  <bruno@clisp.org>
19802
19803         * modules/minmax: New module.
19804         * MODULES.html.sh (func_all_modules): Add it.
19805
19806 2003-01-23  Bruno Haible  <bruno@clisp.org>
19807
19808         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
19809         Eggert.
19810
19811 2003-01-22  Bruno Haible  <bruno@clisp.org>
19812
19813         * modules/exit: New module.
19814         * MODULES.html.sh (func_all_modules): Add it.
19815
19816 2003-01-22  Bruno Haible  <bruno@clisp.org>
19817
19818         * lib/exit.h: New file, from GNU gettext.
19819
19820 2003-01-19  Bruno Haible  <bruno@clisp.org>
19821
19822         * gnulib-tool: Recognize option --extract-maintainer.
19823         (func_get_maintainer): New function.
19824         * modules/*: Add Maintainer entry.
19825
19826 2003-01-16  Jim Meyering  <jim@meyering.net>
19827
19828         * m4/regex.m4: The `regex' struct is both input and output.
19829         Initialize it before each use.  Patch by Tim Waugh.
19830
19831 2003-01-16  Bruno Haible  <bruno@clisp.org>
19832
19833         * MODULES.html.sh: Add a table of contents. Add the module name as
19834         leftmost column. Add hyperlinks.
19835
19836 2003-01-15  Bruno Haible  <bruno@clisp.org>
19837
19838         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
19839
19840 2003-01-15  Bruno Haible  <bruno@clisp.org>
19841
19842         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
19843         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
19844         suffix.
19845
19846 2003-01-15  Bruno Haible  <bruno@clisp.org>
19847
19848         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
19849
19850 2003-01-15  Bruno Haible  <bruno@clisp.org>
19851
19852         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
19853         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
19854
19855 2003-01-14  Jim Meyering  <jim@meyering.net>
19856
19857         * lib/same.c (same_name): Tweak a comment.
19858
19859 2003-01-14  Bruno Haible  <bruno@clisp.org>
19860
19861         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
19862         when a string comparison is sufficient.
19863
19864 2003-01-14  Bruno Haible  <bruno@clisp.org>
19865
19866         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
19867         'unsigned int'.
19868
19869 2003-01-14  Bruno Haible  <bruno@clisp.org>
19870
19871         * lib/hash-pjw.c: Add comment about low quality of this function.
19872
19873 2003-01-13  Bruno Haible  <bruno@clisp.org>
19874
19875         * modules/stpcpy: Distribute lib/stpcpy.h.
19876         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
19877
19878 2003-01-13  Bruno Haible  <bruno@clisp.org>
19879
19880         * modules/*: Add a description.
19881         * modules/strpbrk: Fix Makefile.am snippet.
19882         * modules/strtoimax: Fix dependencies.
19883         * modules/strtoumax: Likewise.
19884
19885 2003-01-13  Bruno Haible  <bruno@clisp.org>
19886
19887         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
19888         * modules/alloca (Makefile.am): All object files depend on alloca.h.
19889         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
19890
19891 2003-01-13  Bruno Haible  <bruno@clisp.org>
19892
19893         * gnulib-tool (func_create_testdir): Store config/* files in the main
19894         directory.
19895         * config.rpath: Move to ...
19896         * config/config.rpath: ... here.
19897         * modules/gettext: Contains config/config.rpath, not config.rpath.
19898         * modules/iconv: Likewise.
19899
19900 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19901
19902         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19903         to avoid collisions with libcurses and libreadline.
19904
19905         * m4/getstr.m4: Remove.
19906         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
19907
19908 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19909
19910         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19911         to avoid collisions with libcurses and libreadline.
19912
19913         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
19914         * lib/getstr.h, getstr.c: Remove.
19915         * lib/getline.c: Include "getline.h", to check interface.
19916         Move body of old getstr.c here: this defines MIN_CHUNK and
19917         declares getdelim2, which is renamed from getstr.
19918         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
19919
19920         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
19921         All uses changed.
19922         * lib/linebuffer.h: Likewise.
19923         (readline): Remove backward-compatibility macro.
19924
19925 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19926
19927         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19928         to avoid collisions with libcurses and libreadline.
19929         * getstr: Remove.
19930         * MODULES.html.sh: Remove getstr.
19931         * modules/getline: Depend on unlocked-io, not getstr.
19932
19933 2003-01-12  Jim Meyering  <jim@meyering.net>
19934
19935         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
19936
19937 2003-01-10  Bruno Haible  <bruno@clisp.org>
19938
19939         * modules/alloca: Change Makefile.am requirements. Simplify Include
19940         requirements. Add lib/alloca_.h to file list.
19941
19942 2003-01-10  Bruno Haible  <bruno@clisp.org>
19943
19944         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
19945
19946 2003-01-10  Bruno Haible  <bruno@clisp.org>
19947
19948         * lib/alloca_.h: New file.
19949         * lib/getdate.y: Unconditionally include alloca.h.
19950         * lib/makepath.c: Likewise.
19951         * lib/setenv.c: Likewise.
19952         * lib/userspec.c: Likewise.
19953
19954 2003-01-09  Karl Berry  <karl@gnu.org>
19955
19956         * MODULES.html.sh: include `dirname $0` in PATH, to find
19957         gnulib-tool.
19958
19959 2003-01-09  Bruno Haible  <bruno@clisp.org>
19960
19961         * modules/stdbool: Change configure.ac, Makefile.am requirements.
19962         Simplify Include requirements. Add lib/stdbool.h.in to file list.
19963
19964 2003-01-09  Bruno Haible  <bruno@clisp.org>
19965
19966         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
19967
19968 2003-01-09  Bruno Haible  <bruno@clisp.org>
19969
19970         * lib/stdbool.h.in: New file.
19971
19972 2003-01-09  Bruno Haible  <bruno@clisp.org>
19973
19974         * gnulib-tool (func_all_modules): Ignore files ending in ~.
19975         * MODULES.html.sh: Likewise.
19976
19977 2003-01-08  Jim Meyering  <jim@meyering.net>
19978
19979         * lib/full-write.c: Undefine and define-away `const' after inclusion
19980         of errno.h, not before.  Suggestion from Bruno Haible.
19981
19982 2003-01-08  Bruno Haible  <bruno@clisp.org>
19983
19984         * modules/full-read: Depend on full-write.
19985
19986 2003-01-08  Bruno Haible  <bruno@clisp.org>
19987
19988         * lib/safe-read.c: Include specification header first, to ensure its
19989         selfcontainedness.
19990         * lib/full-write.c: Likewise.
19991
19992 2003-01-07  Jim Meyering  <jim@meyering.net>
19993
19994         * lib/full-write.c: Rework so that it may serve to define full_read,
19995         too.
19996         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
19997
19998 2003-01-07  Bruno Haible  <bruno@clisp.org>
19999
20000         * lib/strtoimax.c: Include <stdint.h> as an alternative to
20001         <inttypes.h>.
20002         * lib/xstrtol.h: Likewise.
20003         * lib/xstrtoimax.c: Likewise.
20004         * lib/xstrtoumax.c: Likewise.
20005         * lib/human.h: Likewise.
20006
20007         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
20008         on systems that have <inttypes.h> but not <stdint.h>.
20009
20010 2003-01-07  Bruno Haible  <bruno@clisp.org>
20011
20012         * MODULES.html.sh: Add copyright notice.
20013         (missed_files): Omit CVS directory entries.
20014         (func_module): Make it work with sed-3.02.
20015         * MODULES.txt: Remove file.
20016
20017 2003-01-06  Jim Meyering  <jim@meyering.net>
20018
20019         * lib/version-etc.c: Update year in translatable copyright string.
20020
20021 2003-01-03  Karl Berry  <karl@gnu.org>
20022
20023         * config/config.{guess,sub}: update from prep.
20024
20025 2003-01-02  Karl Berry  <karl@gnu.org>
20026
20027         * doc/COPYING.DOC: belatedly updated to 1.2.
20028
20029 2003-01-01  Karl Berry  <karl@gnu.org>
20030
20031         * gnulib-tool (func_verify_module): report module name $module in
20032         error message, not $1.
20033         * gnulib-tool (create-testdir): don't complain if destdir couldn't
20034         be created, only if it doesn't exist.
20035         * gnulib-tool (last_checkin_date): don't expand the $Date here.
20036
20037 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20038
20039         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
20040
20041 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20042
20043         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
20044         memcmp if strcoll doesn't work.
20045
20046 2002-12-31  Bruno Haible  <bruno@clisp.org>
20047
20048         * lib/utime.c (utime_null): No need to call ftruncate if the file was
20049         nonempty.
20050
20051 2002-12-31  Bruno Haible  <bruno@clisp.org>
20052
20053         * lib/memcoll.c (STRCOLL): New macro.
20054         (memcoll): Use it.
20055
20056 2002-12-31  Bruno Haible  <bruno@clisp.org>
20057
20058         * lib/localcharset.h: New file.
20059         * lib/localcharset.c: Include it.
20060         * lib/unicodeio.c: Likewise.
20061
20062 2002-12-31  Bruno Haible  <bruno@clisp.org>
20063
20064         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
20065         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
20066
20067 2002-12-31  Bruno Haible  <bruno@clisp.org>
20068
20069         * lib/getline.h: Include <stddef.h>, for size_t.
20070
20071         * lib/unicodeio.h: Include <stddef.h>, for size_t.
20072         * lib/unicodeio.c: Don't include <stddef.h>.
20073
20074 2002-12-31  Bruno Haible  <bruno@clisp.org>
20075
20076         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
20077         HAVE_TM_ZONE.
20078
20079 2002-12-24  Karl Berry  <karl@gnu.org>
20080
20081         * config/config.guess: update from prep.
20082
20083 2002-12-24  Bruno Haible  <bruno@clisp.org>
20084
20085         General infrasructure.
20086         * m4/README: Rewritten.
20087         * m4/onceonly.m4: New file.
20088         * m4/onceonly_2_57.m4: New file.
20089
20090         Module atexit.
20091         * m4/atexit.m4: New file.
20092
20093         Module strtod.
20094         * m4/strtod.m4: New file.
20095
20096         Module strtol.
20097         * m4/strtol.m4: New file.
20098
20099         Module strtoul.
20100         * m4/strtoul.m4: New file.
20101
20102         Module memchr.
20103         * m4/memchr.m4: New file.
20104
20105         Module memcmp.
20106         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
20107         (jm_FUNC_MEMCMP): Invoke it.
20108
20109         Module memcpy.
20110         * m4/memcpy.m4: New file.
20111
20112         Module memmove.
20113         * m4/memmove.m4: New file.
20114
20115         Module memset.
20116         * m4/memset.m4: New file.
20117
20118         Module strcspn.
20119         * m4/strcspn.m4: New file.
20120
20121         Module strpbrk.
20122         * m4/strpbrk.m4: New file.
20123
20124         Module strstr.
20125         * m4/strstr.m4: New file.
20126
20127         Module strerror.
20128         * m4/strerror.m4: New file.
20129
20130         Module mktime.
20131         * m4/mktime.m4: Renamed from jm-mktime.m4.
20132         (gl_PREREQ_MKTIME): New macro.
20133         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
20134
20135         Module malloc.
20136         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
20137         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
20138         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
20139
20140         Module realloc.
20141         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
20142         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
20143         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
20144
20145         Module strftime.
20146         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
20147         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
20148         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
20149         gl_TM_GMTOFF.
20150         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
20151
20152         Module xalloc.
20153         * m4/xalloc.m4: New file.
20154
20155         Module alloca.
20156         * m4/alloca.m4: New file.
20157
20158         Module putenv.
20159         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
20160         (jm_FUNC_PUTENV): Invoke it.
20161
20162         Module setenv.
20163         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
20164         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
20165         when invoked twice.
20166         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
20167         gt_FUNC_SETENV.
20168
20169         Module memrchr.
20170         * m4/memrchr.m4: New file.
20171
20172         Module stpcpy.
20173         * m4/stpcpy.m4: New file.
20174
20175         Module strcase.
20176         * m4/strcase.m4: New file.
20177
20178         Module strdup.
20179         * m4/strdup.m4: New file.
20180
20181         Module strnlen.
20182         * m4/strnlen.m4: New file.
20183
20184         Module strndup.
20185         * m4/strndup.m4: New file.
20186
20187         Module xstrtod.
20188         * m4/xstrtod.m4: New file.
20189
20190         Module xstrtol.
20191         * m4/xstrtol.m4: New file.
20192
20193         Module getdate.
20194         * m4/getdate.m4: New file.
20195
20196         Module unlocked-io.
20197         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
20198         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
20199         * m4/jm-glibc-io.m4n: Remove file.
20200
20201         Module long-options.
20202         * m4/long-options.m4: New file.
20203
20204         Module md5.
20205         * m4/md5.m4: New file.
20206
20207         Module sha.
20208         * m4/sha.m4: New file.
20209
20210         Module getstr.
20211         * m4/getstr.m4: New file.
20212
20213         Module getline.
20214         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
20215         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
20216         <sys/types.h>, for size_t. Use the function name gnu_getline, not
20217         simply getline. Infoke gl_PREREQ_GETLINE.
20218
20219         Module obstack.
20220         * m4/obstack.m4: New file.
20221
20222         Module hash.
20223         * m4/hash.m4: New file.
20224
20225         Module readtokens.
20226         * m4/readtokens.m4: New file.
20227
20228         Module strverscmp.
20229         * m4/strverscmp.m4: New file.
20230
20231         Module stdbool.
20232         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
20233         OSF/1.
20234
20235         Module strtoll.
20236         * m4/strtoll.m4: New file.
20237
20238         Module strtoull.
20239         * m4/strtoull.m4: New file.
20240
20241         Module strtoimax.
20242         * m4/strtoimax.m4: New file.
20243
20244         Module strtoumax.
20245         * m4/strtoumax.m4: New file.
20246
20247         Module xstrtoimax.
20248         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
20249         jm_AC_PREREQ_XSTRTOIMAX.
20250         Moved the strtol prerequisites to strtol.m4.
20251         Moved the strtoll prerequisites to strtoll.m4.
20252         Moved the strtoimax prerequisites to strtoimax.m4.
20253
20254         Module xstrtoumax.
20255         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
20256         jm_AC_PREREQ_XSTRTOUMAX.
20257         Moved the strtoul prerequisites to strtoul.m4.
20258         Moved the strtoull prerequisites to strtoull.m4.
20259         Moved the strtoumax prerequisites to strtoumax.m4.
20260
20261         Module chown.
20262         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
20263         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
20264
20265         Module dup2.
20266         * m4/dup2.m4: New file.
20267
20268         Module ftruncate.
20269         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
20270         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
20271
20272         Module getgroups.
20273         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
20274         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
20275
20276         Module gettimeofday.
20277         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
20278         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
20279         gl_PREREQ_GETTIMEOFDAY.
20280
20281         Module mkdir.
20282         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
20283         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
20284
20285         Module mkstemp.
20286         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
20287         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
20288         jm_AC_TYPE_UINTMAX_T.
20289         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
20290
20291         Module stat.
20292         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
20293         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
20294
20295         Module lstat.
20296         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
20297         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
20298
20299         Module timespec.
20300         * m4/timespec.m4 (gl_TIMESPEC): New macro.
20301         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
20302         * m4/st_mtim.m4: Indentation.
20303
20304         Module nanosleep.
20305         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
20306         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
20307         gl_PREREQ_NANOSLEEP.
20308
20309         Module regex.
20310         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
20311         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
20312         (gl_REGEX): New macro.
20313
20314         Module rename.
20315         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
20316         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
20317
20318         Module rmdir.
20319         * m4/rmdir.m4: New file.
20320
20321         Module utime.
20322         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
20323         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
20324         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
20325
20326         Module dirname.
20327         * m4/dirname.m4: New file.
20328
20329         Module getopt.
20330         * m4/getopt.m4: New file.
20331
20332         Module unistd-safer.
20333         * m4/unistd-safer.m4: New file.
20334
20335         Module fnmatch.
20336         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
20337         declaration.
20338         (gl_PREREQ_FNMATCH_EXTRA): New macro.
20339         (gl_FUNC_FNMATCH_POSIX): New macro.
20340         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
20341         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
20342         simply fnmatch.
20343
20344         Module exclude.
20345         * m4/exclude.m4: New file.
20346
20347         Module human.
20348         * m4/human.m4: New file.
20349
20350         Module acl.
20351         * m4/acl.m4: Nop.
20352
20353         Module backupfile.
20354         * m4/backupfile.m4: New file.
20355         * m4/d-ino.m4: Indentation.
20356
20357         Module fsusage.
20358         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
20359         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
20360         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
20361
20362         Module dirfd.
20363         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
20364         requirements.
20365
20366         Module euidaccess.
20367         * m4/euidaccess.m4: New file.
20368
20369         Module file-type.
20370         * m4/file-type.m4: New file.
20371
20372         Module fileblocks.
20373         * m4/fileblocks.m4: New file.
20374
20375         Module filemode.
20376         * m4/filemode.m4: New file.
20377
20378         Module isdir.
20379         * m4/isdir.m4: New file.
20380
20381         Module lchown.
20382         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
20383         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
20384
20385         Module makepath.
20386         * m4/makepath.m4: New file.
20387
20388         Module modechange.
20389         * m4/modechange.m4: New file.
20390
20391         Module mountlist.
20392         * m4/mountlist.m4: New file.
20393         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
20394         Indentation.
20395
20396         Module path-concat.
20397         * m4/path-concat.m4: New file.
20398
20399         Module pathmax.
20400         * m4/pathmax.m4: New file.
20401
20402         Module same.
20403         * m4/same.m4: New file.
20404
20405         Module save-cwd.
20406         * m4/save-cwd.m4: New file.
20407
20408         Module savedir.
20409         * m4/savedir.m4: New file.
20410
20411         Module xgetcwd.
20412         * m4/xgetcwd.m4: New file.
20413         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
20414
20415         Module xreadlink.
20416         * m4/xreadlink.m4: New file.
20417
20418         Module safe-read.
20419         * m4/safe-read.m4: New file.
20420
20421         Module safe-write.
20422         * m4/safe-write.m4: New file.
20423
20424         Module closeout.
20425         * m4/closeout.m4: New file.
20426
20427         Module stdio-safer.
20428         * m4/stdio-safer.m4: New file.
20429
20430         Module getpass.
20431         * m4/getpass.m4: New file.
20432
20433         Module getugroups.
20434         * m4/getugroups.m4: New file.
20435
20436         Module group-member.
20437         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
20438         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
20439
20440         Module idcache.
20441         * m4/idcache.m4: New file.
20442
20443         Module userspec.
20444         * m4/userspec.m4: New file.
20445
20446         Module gettime.
20447         * m4/clock_time.m4: New file.
20448         * m4/gettime.m4: New file.
20449
20450         Module settime.
20451         * m4/settime.m4: New file.
20452
20453         Module posixtm.
20454         * m4/posixtm.m4: New file.
20455
20456         Module gethostname.
20457         * m4/gethostname.m4: New file.
20458
20459         Module canon-host.
20460         * m4/canon-host.m4: New file.
20461
20462         Module gettext.
20463         * m4/codeset.m4: New file, from gettext-0.11.5.
20464         * m4/gettext.m4: New file, from gettext-0.11.5.
20465         * m4/glibc21.m4: New file, from gettext-0.11.5.
20466         * m4/iconv.m4: New file, from gettext-0.11.5.
20467         * m4/intdiv0.m4: New file, from gettext-0.11.5.
20468         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
20469         * m4/inttypes.m4: New file, from gettext-0.11.5.
20470         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
20471         * m4/isc-posix.m4: New file, from gettext-0.11.5.
20472         * m4/lcmessage.m4: New file, from gettext-0.11.5.
20473         * m4/lib-ld.m4: New file, from gettext-0.11.5.
20474         * m4/lib-link.m4: New file, from gettext-0.11.5.
20475         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
20476         * m4/progtest.m4: New file, from gettext-0.11.5.
20477         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
20478         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
20479         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
20480
20481         Module localcharset.
20482         * m4/localcharset.m4: New file.
20483
20484         Module hard-locale.
20485         * m4/hard-locale.m4: New file.
20486
20487         Module mbswidth.
20488         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
20489         onceonly macros.
20490         * m4/mbrtowc.m4: Add comment.
20491
20492         Module memcasecmp.
20493         * m4/memcasecmp.m4: New file.
20494
20495         Module memcoll.
20496         * m4/memcoll.m4: New file.
20497
20498         Module unicodeio.
20499         * m4/unicodeio.m4: New file.
20500
20501         Module rpmatch.
20502         * m4/rpmatch.m4: New file.
20503
20504         Module yesno.
20505         * m4/yesno.m4: New file.
20506
20507         Module exitfail.
20508         * m4/exitfail.m4: New file.
20509
20510         Module c-stack.
20511         * m4/c-stack.m4 (gl_C_STACK): New macro.
20512         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
20513
20514         Module error.
20515         * m4/error.m4 (gl_ERROR): New macro.
20516         (jm_PREREQ_ERROR): Use onceonly macros.
20517
20518         Module fatal.
20519         * m4/fatal.m4: New file.
20520
20521         Module getloadavg.
20522         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
20523         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
20524
20525         Module getpagesize.
20526         * m4/getpagesize.m4: New file.
20527
20528         Module getusershell.
20529         * m4/getusershell.m4: New file.
20530
20531         Module physmem.
20532         * m4/physmem.m4: New file.
20533
20534         Module posixver.
20535         * m4/posixver.m4: New file.
20536
20537         Module quotearg.
20538         * m4/quotearg.m4: New file.
20539
20540         Module quote.
20541         * m4/quote.m4: New file.
20542
20543         Module readutmp.
20544         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
20545
20546         Module sig2str.
20547         * m4/sig2str.m4: New file.
20548
20549         Other.
20550         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
20551         ulonglong.m4.
20552         * m4/intmax_t.m4: New file.
20553         * m4/d-type.m4: Indentation.
20554         * m4/jm-macros.m4: Update.
20555         * m4/prereq.m4 (jm_PREREQ): Update.
20556         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
20557         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
20558         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
20559         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
20560         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
20561         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
20562         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
20563         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
20564         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
20565         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
20566         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
20567         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
20568         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
20569         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
20570         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
20571         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
20572         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
20573         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
20574         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
20575
20576 2002-12-24  Bruno Haible  <bruno@clisp.org>
20577
20578         * MODULES.txt: Update according to m4/ changes.
20579
20580         Module gettext.
20581         * config.rpath: New file, from gettext-0.11.5.
20582
20583         * modules/*: New module descriptions.
20584         * gnulib-tool: New file.
20585         * MODULES.html.sh: New file.
20586
20587 2002-12-21  Karl Berry  <karl@gnu.org>
20588
20589         * doc/fdl.texi: update to version 1.2.
20590
20591 2002-12-19  Karl Berry  <karl@gnu.org>
20592
20593         * config/config.guess: update from prep.
20594
20595 2002-12-18  Bruno Haible  <bruno@clisp.org>
20596
20597         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
20598         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
20599
20600 2002-12-17  Bruno Haible  <bruno@clisp.org>
20601
20602         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
20603         stdlib.h, string.h.
20604
20605 2002-12-17  Bruno Haible  <bruno@clisp.org>
20606
20607         * lib/canon-host.c (strdup): Remove unused declaration.
20608
20609         * lib/fsusage.c: Include full_read.h.
20610         (get_fs_usage): Use full_read instead of safe_read.
20611
20612         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
20613
20614 2002-12-12  Karl Berry  <karl@gnu.org>
20615
20616         * config/config.guess: update from prep.
20617
20618 2002-12-11  Bruno Haible  <bruno@clisp.org>
20619
20620         * m4/setenv.m4: New file, from gettext-0.11.5.
20621
20622 2002-12-11  Bruno Haible  <bruno@clisp.org>
20623
20624         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
20625         not unsetenv().
20626         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
20627         modifications:
20628
20629         2002-12-11  Bruno Haible  <bruno@clisp.org>
20630
20631                 * setenv.c (alloca): Fall back to malloc.
20632                 (freea): New macro.
20633                 (setenv): Use freea() to free memory allocated with alloca().
20634
20635         2002-11-13  Bruno Haible  <bruno@clisp.org>
20636
20637                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
20638                 function declarations.
20639                 * unsetenv.c (unsetenv): Likewise.
20640
20641         2002-03-04  Bruno Haible  <bruno@clisp.org>
20642
20643                 Portability to AIX 4.3.3.
20644                 * unsetenv.c: New file, extracted from setenv.c.
20645                 * setenv.c: Move the unsetenv() function to unsetenv.c.
20646
20647         2001-12-20  Bruno Haible  <bruno@clisp.org>
20648
20649                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
20650                 use malloc instead. For SunOS 4.
20651
20652         2001-12-11  Bruno Haible  <bruno@clisp.org>
20653
20654                 * setenv.c: Declare alloca.
20655                 (compar_fn_t): New typedef.
20656                 (KNOWN_VALUE, STORE_VALUE): Use it.
20657
20658         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
20659         setenv.h.
20660
20661 2002-12-10  Paul Eggert  <eggert@twinsun.com>
20662
20663         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
20664         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
20665         Choose values that are less likely to collide with system fnmatch
20666         options.
20667         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
20668         defined (e.g., a pure POSIX system).
20669         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
20670         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
20671
20672 2002-12-06  Paul Eggert  <eggert@twinsun.com>
20673
20674         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
20675         a pain in practice to deal with generated m4 files.  This change
20676         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
20677
20678         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
20679         and jm-glibc-io.m4, as they are no longer a special case.
20680         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
20681         kludge and the auto-generation stuff.  Check only whether the
20682         functions are declared, not whether they exist, since older hosts
20683         that don't declare the functions can't use the optimization anyway.
20684
20685 2002-12-06  Jim Meyering  <jim@meyering.net>
20686
20687         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
20688
20689         Merge in changes from libc's misc/error.c, in preparation
20690         for the merge of gnulib's changes back into libc.
20691
20692         * lib/error.c (_): Define only if not already defined.
20693         Move definition to follow all #include directives.
20694         Include unlocked-io.h only if !_LIBC.
20695         [_LIBC]: Include <libio/libioP.h>.
20696         [USE_IN_LIBIO]: Include <libio/iolibio.h>
20697         (fflush): Tweak definition to use INTUSE.
20698         (putc): Define.
20699
20700 2002-12-05  Paul Eggert  <eggert@twinsun.com>
20701
20702         * lib/alloca.c [defined emacs]: Include "lisp.h".
20703         (xalloc_die) [defined emacs]: New macro.
20704         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
20705         [! defined emacs]: Include <xalloc.h>.
20706         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
20707         (pointer): Typedef to POINTER_TYPE *.
20708         (malloc): Remove decl; we now always use xmalloc.
20709         (alloca): Use old-style definition, since Emacs needs this.
20710         Check for arithmetic overflow when computing combined size.
20711
20712 2002-12-04  Paul Eggert  <eggert@twinsun.com>
20713
20714         Do not generate unlocked-io.h automatically, since it's easier to
20715         maintain it by hand.
20716
20717         * lib/unlocked-io.h: New file, from GNU diffutils,
20718         but with proper copyright notice and attribution.
20719         * lib/gen-uio: Remove.
20720         * lib/Makefile.am: Add copyright notice.
20721         (libfetish_a_SOURCES): Add unlocked-io.h.
20722         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
20723         (DISTCLEANFILES, io_functions): Remove macros.
20724         (EXTRA_DIST): Remove gen_uio.
20725         (unlocked-io.h): Remove rule.
20726
20727 2002-12-04  Jim Meyering  <jim@meyering.net>
20728
20729         Reflect the fact that stat.c and lstat.c are no longer generated.
20730         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
20731         (DISTCLEANFILES): Likewise.
20732         (EXTRA_DIST): Likewise.
20733         (all_local): Don't depend on stat.c or lstat.c.
20734         (stat.c, lstat.c): Remove rules.
20735         (EXTRA_DIST): Remove xstat.in.
20736
20737         * lib/xstat.in: Remove file.  Contents moved into stat.c.
20738         * lib/stat.c: New file.  Contents mostly from xstat.in.
20739         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
20740         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
20741
20742         * lib/safe-read.c: Rework so that it may serve to define safe_write,
20743         too.
20744         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
20745
20746 2002-12-03  Jim Meyering  <jim@meyering.net>
20747
20748         * lib/safe-read.c, safe-write.c: Change variable names and comments,
20749         but not semantics, to minimize the differences between these two files.
20750         (safe_read): Change comment to mention SAFE_READ_ERROR.
20751
20752         * lib/safe-read.c (IS_EINTR): Define.
20753         (safe_read): Use IS_EINTR in place of in-function cpp directives.
20754
20755 2002-12-02  Jim Meyering  <jim@meyering.net>
20756
20757         * lib/safe-read.c (EINTR): Define.
20758         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
20759         (INT_MAX): Provide fallback.
20760         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
20761
20762         * lib/safe-read.h (SAFE_READ_ERROR): Define.
20763
20764 2002-12-02  Bruno Haible  <bruno@clisp.org>
20765
20766         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
20767         Define, taken from safe-read.c.
20768         (INT_MAX): Provide fallback.
20769         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
20770         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
20771
20772         * lib/safe-read.c (EINTR): Remove definition.
20773         (safe_read): Don't use EINTR if it is absent.
20774
20775 2002-12-01  Jim Meyering  <jim@meyering.net>
20776
20777         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
20778         zero.
20779         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
20780
20781 2002-11-27  Paul Eggert  <eggert@twinsun.com>
20782
20783         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
20784         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
20785         with `if (! (value < limit)) abort ();', for readability.
20786
20787 2002-11-26  Karl Berry  <karl@gnu.org>
20788
20789         * lib/strdup.c: copy from libc again, with jim's ok.
20790         * lib/.cppi-disable: re-add strdup.c
20791
20792 2002-11-25  Karl Berry  <karl@gnu.org>
20793
20794         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
20795         instead of "strtol.c".
20796
20797 2002-11-25  Karl Berry  <karl@gnu.org>
20798
20799         * config/install-sh: update from automake for variable quoting, $0 in
20800         error msgs, etc.
20801
20802         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
20803         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
20804         entry.
20805
20806 2002-11-25  Jim Meyering  <jim@meyering.net>
20807
20808         * lib/mktime.c: Sync from libc, now that it has the latest fix.
20809
20810 2002-11-24  Karl Berry  <karl@gnu.org>
20811
20812         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
20813         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
20814
20815 2002-11-24  Jim Meyering  <jim@meyering.net>
20816
20817         Update from coreutils:
20818
20819         * lib/mktime.c: Merge in changes from libc.
20820
20821         Avoid a link-time failure on some Linux systems.
20822         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
20823         (otherwise).
20824         (__mon_yday): Declare with the STATIC attribute.
20825         (__mktime_internal): Likewise.
20826         Based on a report from Greg Schafer.
20827
20828 2002-11-23  Jim Meyering  <jim@meyering.net>
20829
20830         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
20831         Use `unsigned', not `int', as type of index.
20832
20833         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
20834
20835         * lib/fsusage.c: Remove unneeded parentheses around operands of
20836         `defined'.
20837
20838 2002-11-22  Paul Eggert  <eggert@twinsun.com>
20839
20840         * lib/quotearg.h: Allow multiple inclusion by surrounding with
20841         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
20842         so that we can be included first.
20843         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
20844         * lib/quotearg.c: Include quotearg.h immediately after config.h.
20845         No need to include stddef.h or sys/types.h any more.
20846         Surround local include files with "", not "<>".
20847         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
20848         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
20849         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
20850         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20851         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20852         (ISPRINT): Remove; no longer needed now that we assume C89.
20853
20854         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
20855         Preserve errno.
20856
20857         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
20858         quotearg_char): Use SIZE_MAX rather than
20859         (size_t) -1 when we are talking about "infinity".
20860
20861         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
20862
20863 2002-11-22  Paul Eggert  <eggert@twinsun.com>
20864
20865         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
20866         hint that one should use `if (! x) abort ();' rather than `assert
20867         (x);', and anyway it's one less thing to worry about configuring.
20868         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
20869         hash_rehash, hash_insert): Use abort rather than assert.
20870
20871 2002-11-22  Bruno Haible  <bruno@clisp.org>
20872
20873         * lib/safe-read.h: Assume C89. Add comments.
20874         (safe_read): Change return type to size_t.
20875         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
20876         byte counts > SSIZE_MAX correctly.
20877         * lib/safe-write.h: New file.
20878         * lib/safe-write.c: New file.
20879         * lib/full-read.h: New file.
20880         * lib/full-read.c: New file.
20881         * lib/full-write.h: Assume C89. Add comments.
20882         * lib/full-write.c: Include safe-write.h.
20883         (full_write): Rewritten to use safe_write.
20884         Suggested by Jim Meyering and Paul Eggert.
20885
20886 2002-11-21  Jim Meyering  <jim@meyering.net>
20887
20888         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
20889
20890         Merge in changes from the coreutils.
20891
20892         2002-09-25  Paul Eggert  <eggert@twinsun.com>
20893         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
20894         <stdint.h>.
20895         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
20896         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
20897         int.  Work more efficiently if X is the same width as uintmax_t.
20898         Do not compare X to -1, to avoid bogus compiler warning.
20899         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
20900         Don't assume that f_frsize and f_bsize are the same type.
20901
20902         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
20903         warning on FreeBSD.
20904
20905         * lib/makepath.c (make_path): Restore umask *before* creating the final
20906         component.
20907         (make_path): Minor reformatting.
20908
20909         * lib/xmalloc.c: Adjust to work with new autoconf macros,
20910         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
20911         HAVE_MALLOC/HAVE_REALLOC.
20912
20913         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
20914         dummy ones.  At least on GNU/Linux systems, `auto' means something
20915         else.
20916         From Michael Stone.
20917
20918 2002-11-21  Bruno Haible  <bruno@clisp.org>
20919
20920         Remove case insensitive option matching.
20921         * lib/argmatch.h (argcasematch): Remove declaration.
20922         (ARGCASEMATCH): Remove macro.
20923         (__xargmatch_internal): Remove case_sensitive argument.
20924         (XARGMATCH): Update.
20925         (XARGCASEMATCH): Remove macro.
20926         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
20927         case_sensitive argument.
20928         (argcasematch): Remove function.
20929         (__xargmatch_internal): Remove case_sensitive argument.
20930         (main): Use XARGMATCH instead of XARGCASEMATCH.
20931
20932         * lib/xmalloc.c: Change compile-time error message. Add comment about
20933         required autoconf version.
20934
20935 2002-11-20  Paul Eggert  <eggert@twinsun.com>
20936
20937         Merge argmatch cleanups from Bison.  Assume C89.
20938
20939         * lib/argmatch.c: Include config.h here, not in argmatch.h.
20940         Include stdlib.h, for EXIT_FAILURE.
20941         Always include <string.h>, since we assume C89.
20942         (EXIT_FAILURE): Remove pre-C89 bug workaround.
20943         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
20944         Include <stddef.h> instead, since it's all we need for size_t.
20945         (PARAMS): Remove.  All uses removed.
20946         (ARRAY_CARDINALITY): Do not bother to #undef.
20947         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
20948         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20949         Remove unnecessary parentheses.
20950         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20951         Insert necessary parentheses.
20952         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
20953         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
20954
20955 2002-11-19  Bruno Haible  <bruno@clisp.org>
20956
20957         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
20958         * lib/mbswidth.h: Include <stddef.h>, for size_t.
20959
20960         * lib/mbswidth.h (PARAMS): Remove macro.
20961         (mbswidth, mbsnwidth): Use ANSI C function declarations.
20962         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
20963
20964         * lib/gcd.h (PARAMS): Remove macro.
20965         (gcd): Use ANSI C function declarations.
20966         * lib/gcd.c (gcd): Likewise.
20967
20968 2002-11-15  Bruno Haible  <bruno@clisp.org>
20969
20970         * lib/strcspn.c: Include <stddef.h>.
20971         (strcspn): Use ANSI C function declaration. Change return type to
20972         size_t. Use NULL.
20973         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
20974         (strpbrk): Use NULL.
20975         * lib/strpbrk.h (PARAMS): Remove macro.
20976         (strpbrk): Use ANSI C function declaration.
20977         * lib/strstr.c: Don't include <sys/types.h>.
20978         * lib/strstr.h (PARAMS): Remove macro.
20979         (strstr): Use ANSI C function declarations.
20980
20981 2002-11-14  Karl Berry  <karl@gnu.org>
20982
20983         * config/mkinstalldirs: `do' on separate line, instead of
20984         `for var; do'.
20985
20986 2002-11-06  Bruno Haible  <bruno@clisp.org>
20987
20988         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
20989         * lib/gcd.c (gcd): Likewise.
20990
20991 2002-11-05  Bruno Haible  <bruno@clisp.org>
20992
20993         * lib/gcd.h: New file, from gettext-0.11.5.
20994         * lib/gcd.c: New file, from gettext-0.11.5.
20995
20996 2002-11-05  Bruno Haible  <bruno@clisp.org>
20997
20998         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20999         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21000         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21001         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21002
21003         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
21004         <libintl.h>.
21005         * lib/makepath.c: Include gettext.h instead of <locale.h> and
21006         <libintl.h>.
21007
21008         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
21009         * lib/human.c: Include gettext.h instead of <libintl.h>.
21010         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
21011         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
21012         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
21013         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
21014         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
21015         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
21016         (textdomain): Remove definition.
21017         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
21018
21019         * lib/long-options.c: Remove include of <libintl.h> and definition of
21020         _.
21021         * lib/same.c: Remove include of <libintl.h> and definition of _.
21022
21023 2002-11-04  Owen Taylor  <otaylor@redhat.com>
21024
21025         * lib/config.charset: A few additions for Solaris.
21026
21027 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21028
21029         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
21030         * lib/localcharset.c (locale_charset): Declare as extern "C".
21031
21032 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21033
21034         * lib/config.charset: msdos in uk_UA uses CP1125.
21035
21036 2002-11-04  Bruno Haible  <bruno@clisp.org>
21037
21038         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
21039         * lib/strcase.h: New file, from GNU gettext-0.11.5.
21040         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
21041         * lib/strstr.h: New file, from GNU gettext-0.11.5.
21042         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
21043
21044 2002-11-04  Bruno Haible  <bruno@clisp.org>
21045
21046         * lib/localcharset.c (locale_charset): Don't return an empty string.
21047
21048 2002-11-04  Bruno Haible  <bruno@clisp.org>
21049
21050         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
21051         aliases.
21052
21053 2002-11-04  Bruno Haible  <bruno@clisp.org>
21054
21055         * lib/config.charset: Update for newest glibc. Add canonical names
21056         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
21057
21058 2002-11-04  Bruno Haible  <bruno@clisp.org>
21059
21060         * lib/config.charset: Add support for NetBSD.
21061
21062 2002-11-04  Bruno Haible  <bruno@clisp.org>
21063
21064         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
21065
21066 2002-11-01  Bruno Haible  <bruno@clisp.org>
21067
21068         * configure.in: Add AC_CONFIG_AUX_DIR call.
21069         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
21070         test/Makefile.
21071         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
21072
21073 2002-09-28  Karl Berry  <karl@gnu.org>
21074
21075         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
21076         installed automake until the next release, since changes have been
21077         made.
21078
21079 2002-09-25  Karl Berry  <karl@gnu.org>
21080
21081         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
21082         * lib/getopt*: copy from libc/posix.
21083         * lib/gettext.h: copy from gettext.
21084         * lib/.cppi-disable: add strdup.c, gettext.h.
21085
21086 2002-09-25  Karl Berry  <karl@gnu.org>
21087
21088         * config/srclist.txt: enable gettext.h check.
21089         * config/config.{guess,sub}: update from prep.
21090         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
21091                 from automake 1.6.3.
21092         See srclist*.
21093
21094 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
21095
21096         * regex.c (PATFETCH): Remove the translating fetch.
21097         (PATFETCH_RAW): Rename to PATFETCH.
21098         (set_image_of_range): New fun.
21099         (SET_RANGE_TABLE_WORK_AREA): Use it.
21100         (regex_compile): Don't translate the pattern chars so eagerly.
21101         Only do it when inserting an `exactn' bytecode or when handling
21102         a char-range.
21103         (mutually_exclusive_p): Avoid empty statement.
21104
21105 2002-07-06  Jim Meyering  <meyering@lucent.com>
21106
21107         * m4/README: Don't mention Makefile.am.in.
21108         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
21109
21110 2002-07-01  Jim Meyering  <meyering@lucent.com>
21111
21112         * lib/c-stack.c: Include sys/time.h.
21113         From Volker Borchert.
21114
21115 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21116
21117         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
21118
21119 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21120
21121         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
21122         New macro.  Use it uniformly instead of
21123         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
21124         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
21125         reported by Vin Shelton.
21126
21127 2002-06-22  Paul Eggert  <eggert@twinsun.com>
21128
21129         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
21130         Do not assume SA_SIGINFO behavior.
21131         Bug reported by Jim Meyering on NetBSD 1.5.2.
21132
21133 2002-06-22  Jim Meyering  <meyering@lucent.com>
21134
21135         * m4/c-stack.m4: New file, from diffutils-2.8.2.
21136         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
21137
21138         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
21139         now that configure.ac uses AC_GNU_SOURCE.
21140         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
21141         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
21142
21143         Update to latest tools.  Suggestions from Paul Eggert.
21144         * m4/stdbool.m4: New file, from diffutils-2.8.2.
21145         * m4/gnu-source.m4: Update from diffutils-2.8.2.
21146         * m4/fnmatch.m4: Likewise.
21147         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
21148         to AC_HEADER_STDBOOL
21149
21150 2002-06-22  Jim Meyering  <meyering@lucent.com>
21151
21152         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
21153         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
21154
21155 2002-06-22  Jim Meyering  <meyering@lucent.com>
21156
21157         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
21158
21159         * lib/exitfail.c, exitfail.h: Likewise.
21160         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
21161
21162         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
21163         of fnmatch.h.
21164         (EXTRA_DIST): Add fnmatch_loop.c.
21165         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
21166
21167         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
21168         * lib/fnmatch.c: Update from diffutils-2.8.2.
21169         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
21170         * lib/fnmatch.h: Remove file.
21171
21172 2002-06-21  Jim Meyering  <meyering@lucent.com>
21173
21174         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
21175         * m4/mbrtowc.m4: Likewise.
21176
21177         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
21178         * m4/mbswidth.m4: Reflect name change:
21179         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
21180         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21181
21182         * m4/lib-link.m4: Update from gettext-0.11.2.
21183         * m4/gettext.m4: Likewise.
21184
21185         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
21186         From Alfred M. Szmidt.
21187
21188 2002-06-18  Paul Eggert  <eggert@twinsun.com>
21189
21190         * lib/file-type.h: Report an error if neither S_ISREG nor
21191         S_IFREG is defined, instead of using a test specific to glibc
21192         2.2.  This should be safe, since POSIX requires S_ISREG and
21193         Unix Version 7 had S_IFREG.  We don't need to check for
21194         <sys/types.h> since we don't use any symbols that it defines.
21195
21196 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
21197
21198         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
21199         $@-t, so that each temporary file name is unique and valid in the first
21200         8 characters, for operation under DOS.
21201
21202 2002-06-15  Paul Eggert  <eggert@twinsun.com>
21203
21204         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
21205
21206 2002-06-15  Jim Meyering  <meyering@lucent.com>
21207
21208         Work even with DJGPP 2.03, which lacks support for symlinks.
21209         From Richard Dawe.
21210         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
21211         is defined.
21212         * lib/lchown.c (S_ISLNK): Likewise.
21213
21214 2002-06-15  Jim Meyering  <meyering@lucent.com>
21215
21216         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
21217         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
21218         have been included before this file.
21219
21220 2002-06-14  Jim Meyering  <meyering@lucent.com>
21221
21222         * lib/file-type.h: Use the version from diffutils-2.8.2.
21223         * lib/file-type.c: Likewise.
21224
21225 2002-06-07  Jim Meyering  <meyering@lucent.com>
21226
21227         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
21228         They're needed at least for NetBSD 1.5.2.
21229         ($statxfs_includes): Include those same headers.
21230         ($statxfs_includes): Include sys/vfs.h if available.
21231         ($statxfs_includes): Likewise for sys/statvfs.h.
21232         Check for the following members in both structs statfs and statvfs:
21233         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
21234
21235 2002-06-01  Jim Meyering  <meyering@lucent.com>
21236
21237         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
21238         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
21239
21240 2002-05-28  Jim Meyering  <meyering@lucent.com>
21241
21242         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
21243         Reported by Volker Borchert.
21244
21245 2002-05-27  Jim Meyering  <meyering@lucent.com>
21246
21247         Fix a problem seen only on nonconforming systems whereby ls.c's
21248         use of localtime, and then of gettimeofday would cause trouble:
21249         the localtime call used to initialize rpl_gettimeofday's save
21250         mechanism would clobber ls's current local time information so
21251         that in any long listing the first file would always be listed
21252         with date 1970-01-01.  Analysis by Volker Borchert.
21253
21254         * lib/gettimeofday.c (localtime): Undefine.
21255         (rpl_localtime): New function.
21256
21257 2002-05-27  Jim Meyering  <meyering@lucent.com>
21258
21259         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
21260         localtime.
21261
21262         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
21263         use the replacement function; it wouldn't resolve at link time.
21264         Reported by Volker Borchert.
21265
21266 2002-05-22  Jim Meyering  <meyering@lucent.com>
21267
21268         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
21269         file-type.h.
21270         * lib/file-type.h: New file.
21271         * lib/file-type.c (file_type): New file/function.  Extracted from
21272         diffutils.
21273
21274 2002-04-30  Jim Meyering  <meyering@lucent.com>
21275
21276         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
21277
21278 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21279
21280         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
21281
21282 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21283
21284         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
21285         Do not check for alloca.h (no longer used) or stdbool.h (was never
21286         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
21287
21288 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21289
21290         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
21291
21292 2002-04-29  Jim Meyering  <meyering@lucent.com>
21293
21294         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
21295         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
21296         Use AC_FUNC_STRNLEN here instead.
21297
21298         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
21299         With autoconf-2.53a, it's part of AC_PROG_CC.
21300
21301 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21302
21303         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
21304         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
21305
21306 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21307
21308         * lib/sig2str.h, lib/sig2str.c: New files.
21309         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
21310
21311 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21312
21313         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
21314         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
21315         of 127, since 64 is the largest conceivable number for ancient
21316         nonstandard hosts.
21317         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
21318
21319 2002-04-28  Jim Meyering  <meyering@lucent.com>
21320
21321         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
21322
21323 2002-04-24  Jim Meyering  <meyering@lucent.com>
21324
21325         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
21326         (jm_PREREQ): Use it.
21327
21328         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
21329         mach/mach.h fcntl.h.
21330         Check for this function: setlocale.
21331
21332 2002-04-24  Jim Meyering  <meyering@lucent.com>
21333
21334         * lib/gettext.h: New file, from Gettext.
21335         * lib/Makefile.am (INCLUDES): Remove -I../intl.
21336         (libfetish_a_SOURCES): Add gettext.h.
21337
21338 2002-04-16  Jim Meyering  <meyering@lucent.com>
21339
21340         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
21341         ut_pid, ut_id, ut_exit.
21342
21343 2002-04-16  Jim Meyering  <meyering@lucent.com>
21344
21345         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
21346         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
21347         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
21348
21349 2002-04-12  Jim Meyering  <meyering@lucent.com>
21350
21351         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
21352         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
21353         existence of the getmntinfo function.  Needed for Darwin 5.3.
21354
21355         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
21356         This is necessary at least on Darwin 5.3.
21357
21358         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
21359         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
21360         strnlen.o in the library, and that makes some versions of ranlib
21361         object.
21362
21363 2002-04-12  Jim Meyering  <meyering@lucent.com>
21364
21365         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
21366
21367 2002-04-09  Jim Meyering  <meyering@lucent.com>
21368
21369         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
21370         to be more precise.  Rather than saying we're checking whether the
21371         function `works', say what we're testing.
21372         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
21373         Reported by Bruno Haible.
21374
21375 2002-03-10  Jim Meyering  <meyering@lucent.com>
21376
21377         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
21378         Suggestion from Santiago Vila.
21379
21380 2002-03-08  Jim Meyering  <meyering@lucent.com>
21381
21382         * lib/rename.c: Mention that this wrapper is needed also on
21383         mips-dec-ultrix4.4 systems.
21384
21385 2002-03-02  Jim Meyering  <meyering@lucent.com>
21386
21387         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
21388         not HAVE_CLOCK_SETTIME.
21389
21390 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21391
21392         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
21393         Check for clock_settime.
21394
21395 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21396
21397         * lib/nanosleep.h: Rename to....
21398         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
21399
21400         * lib/gettime.c: New file.
21401         * lib/settime.c: New file.
21402         * lib/stime.c: Remove.
21403
21404         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
21405         timespec.h.  Remove nanosleep.h.
21406
21407 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21408
21409         * m4/acl.m4: New file.
21410         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
21411         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
21412
21413 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21414
21415         * lib/acl.c, lib/acl.h: New files.
21416         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
21417
21418 2002-02-24  Jim Meyering  <meyering@lucent.com>
21419
21420         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
21421         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
21422         cause trouble.  Reported by Nelson Beebe.
21423
21424 2002-02-23  Paul Eggert  <eggert@twinsun.com>
21425
21426         * lib/path-concat.c (xpath_concat): Reorder code to pacify
21427         compilers that don't know that xalloc_die never returns.
21428
21429 2002-02-20  Jim Meyering  <meyering@lucent.com>
21430
21431         * lib/getdate.c: Regenerate using bison-1.33.
21432
21433 2002-02-17  Jim Meyering  <meyering@lucent.com>
21434
21435         * config/config.guess (main): Don't use `head -1'; it's no longer
21436         portable. Use `sed 1q' instead.
21437
21438 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
21439
21440         * m4/codeset.m4: Upgrade to gettext-0.11.
21441         * m4/gettext.m4: Upgrade to gettext-0.11.
21442         * m4/glibc21.m4: Upgrade to gettext-0.11.
21443         * m4/iconv.m4: Upgrade to gettext-0.11.
21444         * m4/isc-posix.m4: Upgrade to gettext-0.11.
21445         * m4/lcmessage.m4: Upgrade to gettext-0.11.
21446         * m4/lib-ld.m4: New file, from gettext-0.11.
21447         * m4/lib-link.m4: New file, from gettext-0.11.
21448         * m4/lib-prefix.m4: New file, from gettext-0.11.
21449         * m4/progtest.m4: Upgrade to gettext-0.11.
21450
21451 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21452
21453         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
21454         (jm_PREREQ): Use it.
21455
21456 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21457
21458         * lib/posixver.c, lib/posixver.h: New files.
21459         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21460
21461 2002-02-02  Paul Eggert  <eggert@twinsun.com>
21462             Bruno Haible  <bruno@clisp.org>
21463
21464         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
21465         (fwrite_success_callback): New declaration.
21466         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
21467         print_unicode_char. Call failure callback instead of error.
21468         (fwrite_success_callback): New function.
21469         (exit_failure_callback): New function.
21470         (fallback_failure_callback): New function.
21471         (print_unicode_char): Call unicode_to_mb.
21472
21473 2002-01-26  Jim Meyering  <meyering@lucent.com>
21474
21475         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
21476         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
21477
21478 2002-01-26  Jim Meyering  <meyering@lucent.com>
21479
21480         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
21481
21482 2002-01-22  Paul Eggert  <eggert@twinsun.com>
21483
21484         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
21485
21486 2002-01-22  Jim Meyering  <meyering@lucent.com>
21487
21488         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
21489         Otherwise, some versions of automake would omit the rule that makes
21490         Makefile from Makefile.in.
21491
21492 2002-01-21  Paul Eggert  <eggert@twinsun.com>
21493
21494         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
21495         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21496         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
21497         (memcoll): Set errno to zero if there is no error.
21498
21499         * lib/quotearg.c (quotearg_buffer_restyled):
21500         Fix bug with quoting buffers containing NUL when backslashing escapes.
21501         This bug was exposed by the other changes in this patch.
21502         (quotearg_n_options): New arg ARGSIZE.
21503         All callers changed.
21504         (quoting_options_from_style): New function.
21505         (quotearg_n_style): Use it.
21506         (quotearg_n_style_mem): New function.
21507
21508         * lib/quotearg.h (quotearg_n_style_mem): New function.
21509
21510 2002-01-19  Jim Meyering  <meyering@lucent.com>
21511
21512         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
21513         Remove useless quotes: DF_PROG="df".
21514         * m4/strnlen.m4: New file.
21515
21516 2002-01-16  Paul Eggert  <eggert@twinsun.com>
21517
21518         * lib/backupfile.c (ISDIGIT): Comment fix.
21519         * lib/getdate.y (ISDIGIT): Likewise.
21520         * lib/posixtm.c (ISDIGIT, year): Likewise.
21521         * lib/strverscmp.c (ISDIGIT): Likewise.
21522         * lib/userspec.c (ISDIGIT): Likewise.
21523
21524 2002-01-16  Jim Meyering  <meyering@lucent.com>
21525
21526         * lib/getdate.y: Add three semicolons, each just before a closing
21527         brace. Bison (as of version 1.31) no longer papers over that mistake.
21528
21529 2002-01-05  Jim Meyering  <meyering@lucent.com>
21530
21531         * lib/version-etc.c (version_etc_copyright): Update copyright year.
21532
21533 2001-12-19  Paul Eggert  <eggert@twinsun.com>
21534
21535         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
21536         not silently exit merely because the output buffer happens to
21537         have nothing pending.
21538
21539 2001-12-18  Paul Eggert  <eggert@twinsun.com>
21540
21541         See the big note in ../ChangeLog.
21542         * lib/human.c (suffixes): Prefer K to k for 1024.
21543         (generate_suffix_backwards): New function.
21544         (human_readable_inexact): Use it.
21545         * lib/xstrtol.c (__xstrtol): If there is no number but there
21546         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
21547         Accept 'K' as well as 'k'.
21548
21549 2001-12-15  Jim Meyering  <meyering@lucent.com>
21550
21551         * lib/regex.h (__restrict_arr): Update from libc.
21552
21553         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
21554         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
21555         (STREQ): Define.
21556
21557 2001-12-14  Jim Meyering  <meyering@lucent.com>
21558
21559         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
21560         Suggestion from Bruno Haible.
21561
21562 2001-12-10  Jim Meyering  <meyering@lucent.com>
21563
21564         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
21565         xrealloc, Instead, include "xalloc.h".
21566         (initbuffer): Don't cast xmalloc return value to char*.
21567         (readline): Reword comment.
21568         Don't cast xrealloc return value to char*
21569         Return NULL, not 0.
21570
21571 2001-12-09  Jim Meyering  <meyering@lucent.com>
21572
21573         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
21574         about `signed and unsigned type in conditional expression'.
21575         * lib/posixtm.c (posix_time_parse): Likewise.
21576
21577         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
21578
21579         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
21580         to avoid a pedantic warning.
21581
21582         * lib/getstr.c: Don't include assert.h.
21583         (getstr): Remove warning-evoking assertions.
21584         Return -1 if offset parameter is out of bounds.
21585         Change the type of a local from int to size_t.
21586
21587         * lib/strftime.c (my_strftime_localtime_r): Include this function
21588         definition in the `#if ! HAVE_TM_GMTOFF' block.
21589
21590         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
21591         Include xalloc.h instead.
21592
21593 2001-12-02  Jim Meyering  <meyering@lucent.com>
21594
21595         * lib/tempname.c: Don't declare getenv, thus reverting the change of
21596         2001-11-18.  It's no longer necessary, now that stdlib.h is always
21597         included.
21598
21599         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
21600         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
21601
21602 2001-11-30  Akim Demaille  <akim@epita.fr>
21603
21604         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
21605         before being defined.
21606
21607 2001-11-27  Paul Eggert  <eggert@twinsun.com>
21608
21609         * lib/quotearg.h (quotearg_n, quotearg_n_style):
21610         First arg is int, not unsigned.
21611         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21612         (SIZE_MAX, UINT_MAX): New macros.
21613         (quotearg_n_options): Abort if N is negative.
21614         Avoid overflow check on hosts where size_t is 64 bits and int
21615         is 32 bits, as overflow is impossible there.
21616         Fix off-by-one typo that caused unnecessary reallocation.
21617
21618 2001-11-27  Jim Meyering  <meyering@lucent.com>
21619
21620         * lib/tempname.c: Merge with version from libc.
21621         * lib/regex.c: Likewise.
21622
21623         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
21624         systems for which STDC_HEADERS is 0, it was not included, resulting in
21625         a warning about an integer-to-pointer conversion problem with getenv.
21626         Reported by Volker Borchert.
21627
21628 2001-11-26  Jim Meyering  <meyering@lucent.com>
21629
21630         * lib/gtod.h: Remove file.
21631         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
21632         * lib/gettimeofday.c: Don't include gtod.h.
21633         (GTOD_init): Remove function.
21634         (rpl_gettimeofday): Do its job here instead, rather than aborting.
21635         Suggestion from Volker Borchert.
21636
21637 2001-11-23  Jim Meyering  <meyering@lucent.com>
21638
21639         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
21640         it.
21641         * lib/hash.c (struct hash_table): Define it here instead.
21642
21643 2001-11-22  Jim Meyering  <meyering@lucent.com>
21644
21645         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
21646
21647 2001-11-20  Jim Meyering  <meyering@lucent.com>
21648
21649         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
21650         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
21651
21652 2001-11-19  Jim Meyering  <meyering@lucent.com>
21653
21654         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
21655         directory.  Use "conftestXXXXXX" as the template.
21656         Suggestion from Paul Eggert.
21657
21658         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
21659         immediately, so the test doesn't mistakenly hit the max-open-files
21660         limit.
21661
21662 2001-11-18  Paul Eggert  <eggert@twinsun.com>
21663
21664         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
21665         (TEMPORARIES): New macro.
21666         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
21667         removes an artificial limitation (e.g. HP-UX 10.20, where
21668         TMP_MAX is 17576).
21669
21670 2001-11-18  Jim Meyering  <meyering@lucent.com>
21671
21672         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
21673
21674 2001-11-18  Jim Meyering  <meyering@lucent.com>
21675
21676         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
21677         on SunOS 4.
21678
21679         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
21680         files will be created before anything else.
21681
21682 2001-11-17  Paul Eggert  <eggert@twinsun.com>
21683
21684         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
21685         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
21686
21687 2001-11-17  Jim Meyering  <meyering@lucent.com>
21688
21689         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
21690         Prompted by a report from Bob Proulx.
21691
21692         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
21693         Instead, require UTILS_FUNC_MKSTEMP.
21694
21695 2001-11-17  Jim Meyering  <meyering@lucent.com>
21696
21697         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
21698         Now, that's done as part of AC_FUNC_STRTOD.
21699
21700 2001-11-17  Jim Meyering  <meyering@lucent.com>
21701
21702         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
21703         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
21704         rather than group writable.  Patch by Juan F. Codagnone.
21705
21706         * lib/readtokens.c: Remove explicit declarations of xmalloc and
21707         xrealloc, Instead, include "xalloc.h".
21708
21709         * lib/mountlist.c: Include unlocked-io.h after all system headers.
21710         Remove explicit declarations of xmalloc, xrealloc,
21711         and xstrdup.  Instead, include "xalloc.h".
21712
21713         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
21714         unlocked-io.h.
21715         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
21716         Likewise.
21717         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
21718
21719         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
21720         Reported by Padraig Brady.
21721
21722         * lib/mkstemp.c: #undef mkstemp.
21723         Include config.h.
21724         (rpl_mkstemp): Rename from mkstemp.
21725         Protoize.
21726
21727 2001-11-16  Jim Meyering  <meyering@lucent.com>
21728
21729         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
21730         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
21731         determine the amount of total physical memory, use pstat_getstatic.
21732         HPUX-11 doesn't define _SC_PHYS_PAGES.
21733         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
21734         If sysconf couldn't be used to determine the amount of available
21735         physical memory, use both pstat_getstatic and pstat_getdynamic.
21736         Based on a patch from Bob Proulx.
21737
21738 2001-11-10  Jim Meyering  <meyering@lucent.com>
21739
21740         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
21741         (jm_PREREQ): Use it.
21742
21743 2001-11-09  Jim Meyering  <meyering@lucent.com>
21744
21745         * m4/jm-macros.m4: Require autoconf-2.52f.
21746         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
21747         Use these AC_-prefixed names, not the AM_-prefixed ones.
21748
21749         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
21750
21751 2001-11-05  Jim Meyering  <meyering@lucent.com>
21752
21753         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
21754
21755 2001-11-04  Jim Meyering  <meyering@lucent.com>
21756
21757         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
21758         $DEFS.
21759
21760 2001-11-03  Jim Meyering  <meyering@lucent.com>
21761
21762         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
21763         of AC_DEFUN.
21764
21765         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
21766         know the name of the variable in the macro definition.
21767
21768 2001-11-03  Jim Meyering  <meyering@lucent.com>
21769
21770         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
21771         in argmatch_to_argument call.
21772
21773         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
21774         argument.
21775
21776         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
21777         e.g., a fault due to an attempt to free a NULL pointer.
21778
21779 2001-11-01  Jim Meyering  <meyering@lucent.com>
21780
21781         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
21782         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
21783
21784 2001-11-01  Jim Meyering  <meyering@lucent.com>
21785
21786         * lib/dirfd.c, lib/dirfd.h: New files.
21787         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
21788
21789         * lib/hash.c (hash_print) [TESTING]: Clean up.
21790
21791 2001-10-22  Paul Eggert  <eggert@twinsun.com>
21792
21793         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
21794         to avoid a warning if -Wall.
21795
21796 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
21797
21798         * README: New file
21799         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
21800         (per RMS's instructions, this is now the canonical source)
21801         * lgpl/, gpl/: New directories.
21802
21803 2001-10-21  Paul Eggert  <eggert@twinsun.com>
21804
21805         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
21806
21807 2001-10-21  Jim Meyering  <meyering@lucent.com>
21808
21809         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
21810         this code would end up calling gettext even in packages built
21811         with --disable-nls.
21812         * lib/getopt.c (_): Likewise.
21813         * lib/regex.c (_): Likewise.
21814
21815 2001-10-20  Paul Eggert  <eggert@twinsun.com>
21816
21817         * m4/error.m4 (jm_PREREQ_ERROR):
21818         Do not invoke AC_CHECK_FUNCS with strerror_r, as
21819         AC_FUNC_STRERROR_R does that.
21820         Check for strerror declaration.
21821
21822         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
21823         are supposed to have them these days.
21824         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
21825         Merge changes from latest Autoconf CVS.
21826         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
21827         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
21828         POSIX decided to standardize on the int flavor of strerror_r.
21829
21830 2001-10-20  Paul Eggert  <eggert@twinsun.com>
21831
21832         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
21833         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
21834         Use strerror_r that is only a macro, even if it is not a function.
21835         (strerror): Check for HAVE_DECL_STRERROR before declaring.
21836         (private_strerror): Use prototypes, not old-style function definition.
21837         (print_errno_message): New function.
21838         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
21839         char*-flavored one.
21840         (error_tail, error, error_at_line): Use it.
21841
21842 2001-10-11  Jim Meyering  <meyering@lucent.com>
21843
21844         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
21845         and quote_n (1, ... to avoid clobbering a buffer.
21846
21847 2001-10-05  Jim Meyering  <meyering@lucent.com>
21848
21849         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
21850         hash-pjw.h.
21851         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
21852         * lib/hash-pjw.h: New file.
21853
21854 2001-09-30  Jim Meyering  <meyering@lucent.com>
21855
21856         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
21857         `struct fsstat' has the `f_fstypename' member.
21858         Use that to define FS_TYPE, which is now used to make
21859         the getfsstat link test tighter.
21860
21861 2001-09-30  Jim Meyering  <meyering@lucent.com>
21862
21863         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
21864         Include <sys/ucred.h>, for Apple Darwin.
21865         Include sys/mount.h and sys/fs_types.h only if available.
21866         (FS_TYPE): Define.
21867         (read_filesystem_list): Use FS_TYPE.
21868
21869 2001-09-29  Paul Eggert  <eggert@twinsun.com>
21870
21871         * lib/exclude.c (excluded_filename): 0 -> false, since it's
21872         a boolean context.
21873
21874 2001-09-29  Jim Meyering  <meyering@lucent.com>
21875
21876         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
21877         [one-argument getmntent function]): Include stdio.h before mntent.h.
21878         SunOS 4.1.x needs it for the declaration of `FILE'.
21879         Patch by Volker Borchert.
21880
21881         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
21882         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
21883         sys/fs_types.h, and make the link-test for getfsstat guard #include
21884         directives with appropriate #if HAVE_*_H tests so that we can
21885         detect getfsstat on Apple Darwin1.3.7 systems.
21886         Reported by Nelson Beebe.
21887         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
21888
21889 2001-09-28  Paul Eggert  <eggert@twinsun.com>
21890
21891         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
21892         #defines strtoimax.  Also treat the other strto* functions
21893         like strtoimax.
21894
21895         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
21896         Check for strtoul and strtoumax,
21897         as those declarations are made even in the signed case.
21898         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
21899         Likewise, for strtol and strtoimax.
21900
21901 2001-09-28  Paul Eggert  <eggert@twinsun.com>
21902
21903         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
21904         #defines strtoimax.  Also treat the other strto* functions
21905         like strtoimax.
21906
21907         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
21908         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
21909         (strtoimax, strtoumax): Do not declare if already defined as a macro.
21910
21911 2001-09-26  Jim Meyering  <meyering@lucent.com>
21912
21913         Most macros in unlocked-io.h had the wrong number of arguments.
21914         * lib/gen-uio: New script.
21915         (USE_UNLOCKED_IO): Define to 1 if not already defined.
21916         * lib/unlocked-io.hin: Remove file.
21917         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
21918         rather than trying to embed it here.
21919         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
21920         Reported by Padraig Brady.
21921
21922 2001-09-25  Volker Borchert  <bt@teknon.de>
21923
21924         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
21925         `result'.
21926
21927 2001-09-24  Jim Meyering  <meyering@lucent.com>
21928
21929         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
21930
21931 2001-09-23  Jim Meyering  <meyering@lucent.com>
21932
21933         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
21934         instead of the mere test for existence of mntent.h.  The latter
21935         would get a false-positive on AIX 3.4 systems.
21936         In the outer getmntent if-block, don't die if neither of the getmntent
21937         tests succeeds.  Instead, just fall through and continue with the
21938         remaining tests.
21939
21940 2001-09-23  Jim Meyering  <meyering@lucent.com>
21941
21942         * lib/mountlist.c: Remove useless parentheses in #if directives.
21943         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
21944         the deprecated MOUNTED symbol is no longer defined in mntent.h.
21945
21946 2001-09-22  Jim Meyering  <meyering@lucent.com>
21947
21948         * m4/gettext.m4: New file.  From gettext.
21949         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
21950         * m4/progtest.m4: Likewise
21951         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
21952         * m4/glibc21.m4: Likewise.
21953
21954         * m4/libintl.m4: Remove.  No longer used.
21955
21956 2001-09-22  Jim Meyering  <meyering@lucent.com>
21957
21958         * lib/localcharset.c: Update from latest gettext.
21959         * lib/config.charset: Likewise.
21960
21961 2001-09-20  Jim Meyering  <meyering@lucent.com>
21962
21963         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
21964         strtoimax.
21965         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
21966         strtoumax.
21967
21968 2001-09-20  Jim Meyering  <meyering@lucent.com>
21969
21970         * lib/xstrtol.c (strtoimax): Guard declaration with
21971         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
21972         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
21973         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
21974         (strtoumax): Likewise, for completeness (it wasn't necessary).
21975
21976 2001-09-17  Paul Eggert  <eggert@twinsun.com>
21977
21978         * lib/strtoimax.c (HAVE_LONG_LONG):
21979         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
21980         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
21981         to work around bug in IBM C compiler.
21982
21983 2001-09-17  Jim Meyering  <meyering@lucent.com>
21984
21985         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
21986         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
21987         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
21988         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
21989         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
21990         whenever the right hand side need not be expanded by the shell.
21991
21992 2001-09-16  Paul Eggert  <eggert@twinsun.com>
21993
21994         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
21995         library.  It's not correct, as some older glibcs are buggy.
21996         fnmatch wasn't fixed until glibc 2.2.
21997
21998         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
21999         special shell magic here.
22000
22001 2001-09-16  Jim Meyering  <meyering@lucent.com>
22002
22003         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
22004         * m4/jm-macros.m4: Require it.
22005
22006 2001-09-16  Jim Meyering  <meyering@lucent.com>
22007
22008         * lib/mkdir.c: New file.
22009
22010 2001-09-15  Jim Meyering  <meyering@lucent.com>
22011
22012         * m4/jm-macros.m4: Check for help2man.
22013
22014 2001-09-11  Jim Meyering  <meyering@lucent.com>
22015
22016         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
22017         The body, by Paul Eggert, was moved here from configure.in.
22018         * m4/jm-macros.m4: Require UTILS_HOST_OS.
22019
22020 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22021
22022         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
22023         (jm_PREREQ): Use it.
22024
22025 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22026
22027         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
22028         Use ssize_t, not int, to store result of readlink.
22029         Check for ssize_t overflow as well as size_t overflow,
22030         as POSIX says the result of readlink is implementation-defined
22031         when ssize_t overflows.
22032         Remove unnecessary cast to char*.
22033         Use free+malloc instead of realloc, as the storage doesn't need
22034         to be preserved and it's clearer and can be more efficient that way.
22035         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
22036         * lib/xreadlink.h (xreadlink): Update prototype.
22037
22038 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22039
22040         * lib/xgetcwd.c: Revert some of the previous change; intead,
22041         fix the HAVE_GETCWD_NULL code to behave more like the
22042         !HAVE_GETCWD_NULL code used to.
22043
22044         Include "xalloc.h".
22045         (xgetcwd): Do not return NULL when memory is exhausted; instead,
22046         invoke xalloc_die.
22047
22048 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22049
22050         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
22051         sys/param.h, as pathmax.h includes them.
22052
22053 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22054
22055         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
22056         (jm_PREREQ_XGETCWD): New macro.
22057
22058         * m4/getcwd.m4: New file.
22059
22060 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22061
22062         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
22063         like the HAVE_GETCWD_NULL code.
22064         Include pathmax.h if not HAVE_GETCWD.
22065         Do not include xalloc.h.
22066         (INITIAL_BUFFER_SIZE): New symbol.
22067         Do not use xmalloc / xrealloc, since the caller is responsible for
22068         handling errors.  Preserve errno around `free' during failure.
22069         Do not overrun buffer when using getwd.
22070
22071 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22072
22073         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
22074         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
22075         getcwd (NULL, 0).
22076
22077 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22078
22079         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
22080         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
22081         spotted by Jim Meyering.
22082
22083 2001-09-03  Jim Meyering  <meyering@lucent.com>
22084
22085         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
22086         failure.
22087
22088 2001-09-02  Jim Meyering  <meyering@lucent.com>
22089
22090         * lib/error.c: Update from GNU libc.
22091
22092 2001-09-01  Jim Meyering  <meyering@lucent.com>
22093
22094         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
22095         Used by df.
22096
22097 2001-09-01  Jim Meyering  <meyering@lucent.com>
22098
22099         * lib/xreadlink.c: New file.
22100         * lib/xreadlink.h: New file.
22101         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
22102         xreadlink.h.
22103
22104         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
22105         doesn't conflict with sparc Solaris 7's definition in
22106         /usr/include/sys/int_types.h.
22107
22108         * lib/exclude.c: Use `""', not `<>' to #include non-system header
22109         files.
22110         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
22111         and strncasecmp as r-values.  Unixware didn't have declarations.
22112
22113 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22114
22115         * lib/xstrtol.h: Add copyright notice.
22116         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
22117         LONGINT_INVALID_SUFFIX_CHAR.
22118
22119 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22120
22121         * lib/xstrtol.c (strtoimax): New decl.
22122
22123 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22124
22125         * lib/xgetcwd.c: Don't include pathmax.h.
22126         Include stdlib.h and unistd.h if available.
22127         Include xalloc.h.
22128         (xmalloc, xstrdup, free): Remove decls.
22129         (xgetcwd): Don't assume sizes fit in unsigned.
22130         Check for overflow when computing sizes.
22131         Simplify reallocation code.
22132
22133 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22134
22135         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
22136         a directory's st_size can have an arbitrary value, so the old
22137         usage could waste an arbitrary amount of memory.  All uses
22138         changed.
22139         * lib/savedir.h: Update prototype.
22140
22141 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22142
22143         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
22144
22145         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
22146         old strtoimax.c.
22147
22148         Also, make the following further changes to make this file's
22149         configuration more similar to that of strtol.c:
22150         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
22151         (strtoumax, uintmax_t, strtoull, strtol): Remove.
22152         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
22153         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
22154         changed to signed values.
22155
22156         And make the following changes as well:
22157         Fix copyright notice, as 1999 was missing.
22158         (verify): New macro.
22159         (strtoimax): Check sizes at compile-time, not run-time.
22160         Prefer strtol to strtoll if both work.
22161         (main): Remove; it was not that useful and was a pain to maintain.
22162
22163         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
22164
22165 2001-08-31  Jim Meyering  <meyering@lucent.com>
22166
22167         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
22168         Use an initial, malloc'd, buffer of length 128 rather than
22169         a statically allocated one of length 1024.
22170
22171 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22172
22173         Simplify code, partly by assuming autoconf 2.52 semantics.
22174
22175         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
22176
22177         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
22178         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
22179         All uses removed.
22180         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
22181         Move AC_REQUIRE to next-to-top level, to avoid confusion.
22182         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
22183         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
22184         jm_AC_HEADER_INTTYPES_H.
22185         * m4/jm-macros.m4 (jm_MACROS): Likewise.
22186
22187         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
22188
22189         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22190         Quote first arg of AC_DEFUN.
22191         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
22192         since they are needed to parse the include file even if we need
22193         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
22194         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
22195         but with opposite signedness.
22196
22197 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22198
22199         Merge 'exclude' changes from tar 1.13.22.
22200         This fixes one or two unlikely storage allocation overflow bugs,
22201         but doesn't change user-visible behavior otherwise.
22202
22203 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22204
22205         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
22206         (jm_PREREQ_EXCLUDE): New macro.
22207
22208 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22209
22210         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22211         tm to be declared.
22212
22213 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22214
22215         * lib/hash.c: Remove '2001' from copyright notice.
22216
22217 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22218
22219         * lib/full-write.h: New file.
22220         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
22221         * lib/full-write.c: Correct credits, as cccp.c no longer
22222         exists and anyway it was so heavily changed from the old cccp
22223         code as to be unrecognizable.  Include full-write.h.
22224         (full_write) Return size_t, with short writes meaning failure.
22225         All callers changed.  This fixes a bug with large buffers
22226         on 64-bit hosts.
22227         * lib/utime.c: Include full-write.h.
22228
22229 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22230
22231         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
22232         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
22233         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
22234         Include if available.
22235         (<xalloc.h>): Include
22236         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
22237         (verify): New macro.  Use it to verify that EXCLUDE macros do not
22238         collide with FNM macros.
22239         (struct patopts): New struct.
22240         (struct exclude): Use it, as exclude patterns now come with options.
22241         (new_exclude): Support above changes.
22242         (new_exclude, add_exclude_file):
22243         Initial size must now be a power of two to simplify overflow checking.
22244         (free_exclude, fnmatch_no_wildcards): New function.
22245         (excluded_filename): No longer requires options arg, as the options
22246         are determined by add_exclude.  Now returns bool, not int.
22247         (excluded_filename, add_exclude):
22248         Add support for the fancy new exclusion options.
22249         (add_exclude, add_exclude_file): Now takes int options arg.
22250         Check for arithmetic overflow when computing sizes.
22251         (add_exclude_file): xrealloc might modify errno, so don't
22252         realloc until after errno might be used.
22253
22254         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
22255         New macros.
22256         (free_exclude): New decl.
22257         (add_exclude, add_exclude_file): Now takes int options arg.
22258         (excluded_filename): No longer requires options arg, as the options
22259         are determined by add_exclude.  Now returns bool, not int.
22260
22261 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22262
22263         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
22264
22265 2001-08-27  Jim Meyering  <meyering@lucent.com>
22266
22267         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
22268
22269         * lib/version-etc.c (N_): Remove definition.
22270         Revert most of last change.
22271         Instead, simply don't mark the `Copyright...' string for translation.
22272         Based on advice from Paul Eggert.
22273
22274         * lib/strtoxmax.c: Tweak comment.
22275
22276 2001-08-26  Jim Meyering  <meyering@lucent.com>
22277
22278         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
22279
22280         * m4/xstrtoimax.m4: New file.
22281         * m4/xstrtoumax.m4: Add comments explaining why we
22282         AC_REPLACE_FUNCS(strtol).
22283
22284 2001-08-26  Jim Meyering  <meyering@lucent.com>
22285
22286         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
22287         of copyright with `%s' so translators don't get an untranslated
22288         message in 2002.
22289         (COPYRIGHT_YEAR): Define.
22290         (version_etc): Use fprintf rather than fputs.
22291         Suggestion from Ulrich Drepper.
22292
22293         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
22294
22295         * lib/strtoll.c: New file, from GNU libc.
22296         * lib/xstrtoimax.c: New file.
22297
22298         * lib/xstrtol.h: Add xstrtoimax.
22299         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
22300         * lib/strtoimax.c: New file.  Likewise, but first define
22301         STRTOUXMAX_SIGNED.
22302
22303         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
22304         ...
22305         * lib/strtoxmax.c: ... then renamed to this.
22306
22307 2001-08-18  Paul Eggert  <eggert@twinsun.com>
22308
22309         * m4/inttypes.m4: Add AC_PREREQ(2.13).
22310         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
22311         (jm_AC_TYPE_INTMAX_T): New macro.
22312         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
22313
22314         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
22315
22316         * m4/longlong.m4: Renamed from ulonglong.m4.
22317         * m4/inttypes.m4: Renamed from inttypes_h.m4.
22318         * m4/uintmax_t.m4: Removed.
22319
22320 2001-08-13  Paul Eggert  <eggert@twinsun.com>
22321
22322         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
22323         Port to Solaris 8, where 'sed' requires a space after the 'r'
22324         command, and where sh dislikes "$/".  Clean up the spacing a bit.
22325         Redirect output to $tmp just once.
22326
22327 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
22328
22329         * lib/addext.c (<errno.h>): Include.
22330         (errno): Declare if not defined.
22331         (addext): Work correctly when pathconf returns -1 and leaves
22332         errno alone because there is no limit.  Also, work even if
22333         pathconf returns a value greater than SIZE_MAX.
22334
22335 2001-08-12  Jim Meyering  <meyering@lucent.com>
22336
22337         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
22338         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
22339         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
22340         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
22341         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
22342         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
22343         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
22344         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
22345         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
22346         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
22347         utime.m4, utimes.m4, xstrtoumax.m4:
22348         Quote the first argument in each use of AC_DEFUN.
22349
22350 2001-08-12  Jim Meyering  <meyering@lucent.com>
22351
22352         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
22353         Simply `return getcwd (NULL, 0);'.
22354         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
22355         Use 1300 as initial value for length, not PATH_MAX.
22356
22357         * lib/pathmax.h: Clean up cpp syntax.
22358
22359 2001-08-12  Jim Meyering  <meyering@lucent.com>
22360
22361         * lib/gettimeofday.c: New file.
22362         * lib/gtod.h: New file.
22363         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
22364
22365 2001-08-05  Jim Meyering  <meyering@lucent.com>
22366
22367         * m4/jm-macros.m4: Require autoconf-2.52.
22368
22369 2001-08-04  Jim Meyering  <meyering@lucent.com>
22370
22371         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
22372         stmt, to get in sync with glibc.
22373
22374 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22375
22376         The following changes are from gettext 0.10.39 as maintained by
22377         Bruno Haible.
22378
22379         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
22380         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
22381         with inverted sense.  All uses changed.
22382
22383         * lib/mbswidth.c: Don't include <limits.h>.
22384         Include <stdlib.h> and <string.h> unconditionally.
22385         (iswcntrl, mbsinit, ISCNTRL): New macros.
22386         (mbsnwidth): Use K&R style function declarations.
22387         Don't bother checking for MB_LEN_MAX == 1, since the compiler
22388         can optimize it when MB_CUR_MAX == 1.
22389         The width of control characters is zero, not 1.
22390
22391 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22392
22393         The following changes are from gettext 0.10.39 as maintained by
22394         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
22395
22396         * m4/codeset.m4: Upgrade to serial AM1.
22397         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
22398         all uses changed.  Quote first arg of AC_DEFUN.
22399         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
22400
22401         * m4/iconv.m4: Upgrade to serial AM2.
22402         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
22403         Add --with-libconv-prefix.
22404         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
22405         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
22406         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
22407         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
22408         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
22409
22410         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
22411         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
22412         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
22413         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
22414         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
22415         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
22416         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
22417         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
22418         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
22419
22420         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
22421         string.h any more.
22422
22423         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
22424         not the default value.
22425
22426         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
22427         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
22428         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
22429         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
22430         Also check for iswcntrl, used for wcwidth fallback.
22431         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
22432         to Autoconf 2.13.
22433
22434 2001-08-03  Jim Meyering  <meyering@lucent.com>
22435
22436         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
22437         as it was in the original.  Reported by Paul Eggert.
22438
22439 2001-07-16  Jim Meyering  <meyering@lucent.com>
22440
22441         * m4/gettimeofday.m4: New file.
22442         Prompted by a report from Bernhard Baehr.
22443
22444 2001-07-15  Jim Meyering  <meyering@lucent.com>
22445
22446         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
22447         stuff. Now it's in ../Makefile.cfg.
22448
22449 2001-07-15  Jim Meyering  <meyering@lucent.com>
22450
22451         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
22452         (BUILT_SOURCES): Add unlocked-io.h.
22453         (io_functions): Define.
22454         (unlocked-io.h): New rule.
22455         (DISTCLEANFILES): Add unlocked-io.h.
22456         (all-local): Depend on unlocked-io.h, to ensure it is created.
22457
22458         * lib/unlocked-io.hin: New file
22459
22460         * lib/regex.c: Update from glibc.
22461
22462 2001-07-05  Jim Meyering  <meyering@lucent.com>
22463
22464         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
22465         recommendation.
22466         (libfetish_a_SOURCES): Put all .h files here instead.
22467         Remove a thus-exposed (better checks in automake) duplicate and
22468         two unnecessary .h files.
22469
22470 2001-07-04  Jim Meyering  <meyering@lucent.com>
22471
22472         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
22473         that generates jm-glibc-io.m4 so that it doesn't trigger any make
22474         distcheck failure.
22475
22476 2001-07-02  Jim Meyering  <meyering@lucent.com>
22477
22478         The following changes were prompted by suggestions from Bruno Haible.
22479
22480         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
22481         is now generated.
22482         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
22483         definition of EXTRA_DIST.
22484         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
22485         ensure that the generated file is created/updated whenever the list
22486         of $(unlocked_functions) is changed.
22487         (jm-glibc-io.m4): New rule.
22488         (unlocked-io.h): New rule -- currently unused.
22489
22490 2001-06-24  Jim Meyering  <meyering@lucent.com>
22491
22492         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
22493         unmatched right bracket, rather than kludging it with an extra,
22494         falsely-matching quote in a comment.  Patch by Akim Demaille.
22495
22496 2001-06-11  Jim Meyering  <meyering@lucent.com>
22497
22498         * lib/regex.c: Update from GNU libc.
22499
22500 2001-05-27  Jim Meyering  <meyering@lucent.com>
22501
22502         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
22503         Check for ut_type in struct utmp.
22504
22505 2001-05-27  Jim Meyering  <meyering@lucent.com>
22506
22507         * lib/readutmp.h (UT_TYPE): Define.
22508
22509 2001-05-24  Jim Meyering  <meyering@lucent.com>
22510
22511         * lib/argmatch.c: Include "quote.h".
22512         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
22513         quote function.  Reported by Göran Uddeborg.
22514
22515 2001-05-22  Jim Meyering  <meyering@lucent.com>
22516
22517         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
22518         now that we use the package-supplied version unconditionally.
22519         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
22520
22521 2001-05-21  Jim Meyering  <meyering@lucent.com>
22522
22523         * m4/regex.m4: Change a couple backticks to single quotes to avoid
22524         shell syntax errors.
22525
22526 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22527
22528         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
22529
22530 2001-05-20  Paul Eggert  <eggert@twinsun.com>
22531
22532         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
22533         Don't bother to check library strftime, since
22534         we'll be using our own my_strftime function anyway.
22535         Define my_strftime instead of strftime.
22536
22537 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
22538
22539         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
22540         which is not yet declared.
22541
22542 2001-05-15  Jim Meyering  <meyering@lucent.com>
22543
22544         * m4/regex.m4: Use proper quoting so brackets appear in the test
22545         program.
22546         Reported by, and with help from, Bruno Haible.
22547
22548 2001-05-13  Jim Meyering  <meyering@lucent.com>
22549
22550         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
22551         undefined.
22552
22553 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22554
22555         dirname code cleanup.  base_name now behaves more compatibly
22556         with POSIX basename when given file names that have trailing
22557         slashes, and similarly for dir_name.  Add new primitives
22558         base_len and dir_len.  Put the directory-name-related decls
22559         into dirname.h.
22560
22561         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
22562         * lib/backupfile.c (base_name): Likewise.
22563         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
22564         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
22565         * lib/makepath.c (strip_trailing_slashes): Likewise.
22566         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
22567         ISSLASH): Likewise.
22568         * lib/rename.c (strip_trailing_slashes): Likewise.
22569         * lib/same.c (base_name): Likewise.
22570         * lib/stripslash.c (ISSLASH): Likewise.
22571
22572         * lib/addext.c: Include <dirname.h> after size_t is defined.
22573         * lib/backupfile.c: Likewise.
22574
22575         * lib/addext.c (addext): Use base_len to trim redundant
22576         trailing slashes instead of doing it ourselves.
22577         But do not trim the last slash if it is not redundant.
22578
22579         * lib/backupfile.c (find_backup_file_name,
22580         max_backup_version): Use base_len instead of rolling it ourselves.
22581         Handle the case of "" and (on DOS) "C:" correctly.
22582
22583         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
22584         needed. Include <string.h>, <dirname.h>.
22585         (base_name): Allow file names ending in slashes, other than names
22586         that are all slashes.  In this case, return the basename followed
22587         by the slashes.  This is more general, and can be used in places
22588         where the original base_name purposely had an assertion failure.
22589         (base_len): New function.
22590
22591         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
22592         Do not include <assert.h>; no longer needed.
22593         Include xalloc.h.
22594         (memrchr): Remove decl.
22595         (dir_name_r): Remove.
22596         (dir_len): Renamed from dirlen.  All callers changed.
22597         Rewrite in terms of base_name, for simplicity and consistency.
22598         (dir_name): Never return NULL.  All callers changed.
22599         Do not include <stdlib.h> in test program; no longer needed.
22600         return 0; is fine for test program.
22601
22602         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
22603         New macros.
22604         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
22605
22606         * lib/path-concat.c (path_concat): Use base_len to compute
22607         base length, not strlen; this means we cannot rely on memcpy
22608         to null-terminate.
22609
22610         * lib/same.c (STREQ): Remove.
22611         (same_name): Handle the case where the basename ends in trailing '/'.
22612
22613         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
22614         a slash was stripped.  Do not strip the last slash after a
22615         file system prefix.
22616
22617 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22618
22619         * lib/Makefile.am (libfetish_a_SOURCES):
22620         Add strftime.c, since we now compile it on all hosts.
22621
22622         * lib/strftime.c (my_strftime):
22623         Define to nstrftime if emacs, but only if my_strftime is not defined.
22624         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
22625         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
22626         Add one more extra argument: a nanoseconds value.
22627         All uses changed.
22628         (ns): New macro.
22629         (my_strftime function): Add %N format.
22630         (emacs_strftimeu): Renamed from emacs_strftime,
22631         with extra ut argument.
22632
22633 2001-05-09  Paul Eggert  <eggert@twinsun.com>
22634
22635         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
22636
22637 2001-04-21  Jim Meyering  <meyering@lucent.com>
22638
22639         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
22640         doesn't interfere.
22641
22642 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22643
22644         * m4/ftruncate.m4: Check for chsize.
22645         Link with ftruncate.o unconditionally if ftruncate is missing.
22646         This was required when cross-compiling to i586-mingw32msvc.
22647
22648 2001-04-08  Jim Meyering  <meyering@lucent.com>
22649
22650         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
22651         recomputed; that's necessary when the offset spans a DST transition.
22652         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
22653
22654 2001-04-02  Jim Meyering  <meyering@lucent.com>
22655
22656         * lib/regex.h, regex.c: Update from GNU libc.
22657
22658 2001-03-24  Jim Meyering  <meyering@lucent.com>
22659
22660         * m4/jm-macros.m4: Require autoconf-2.49d.
22661
22662 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
22663
22664         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
22665
22666 2001-03-19  Paul Eggert  <eggert@twinsun.com>
22667
22668         * lib/version-etc.c (version_etc_copyright): Update to 2001.
22669
22670 2001-03-17  Jim Meyering  <meyering@lucent.com>
22671
22672         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
22673         now that the version in autoconf is equivalent.
22674         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
22675
22676         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
22677         Suggestion from Akim Demaille.
22678
22679         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
22680         (jm_PREREQ_TEMPNAME): New function.
22681
22682 2001-03-16  Paul Eggert  <eggert@twinsun.com>
22683
22684         * lib/tempname.c (uint64_t): Define to uintmax_t if
22685         not defined, and if UINT64_MAX is not defined.
22686         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
22687         Reported by John David Anglin.
22688
22689 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
22690
22691         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
22692         resolve alias if codeset is empty.
22693         * lib/config.charset (BeOS): Use wildcard syntax.
22694
22695 2001-03-13  Jim Meyering  <meyering@lucent.com>
22696
22697         * lib/path-concat.c (path_concat)
22698         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
22699         concatenating e.g., `C:' and `foo'.
22700         From Bruno Haible.
22701
22702 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22703
22704         * lib/localcharset.c (locale_charset): Don't use
22705         setlocale(LC_CTYPE,NULL). Don't return NULL.
22706         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
22707
22708 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22709
22710         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
22711         support for DOS/DJGPP.
22712
22713 2001-03-01  Paul Eggert  <eggert@twinsun.com>
22714
22715         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
22716         lacks mkstemp.  Compile our own tempname.c if we compile our own
22717         mkstemp.c, as mkstemp relies on tempname.
22718
22719 2001-03-01  Jim Meyering  <meyering@lucent.com>
22720
22721         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
22722         AH_VERBATIM really does output its argument verbatim.
22723
22724 2001-02-28  Paul Eggert  <eggert@twinsun.com>
22725
22726         * lib/Makefile.am (libfetish_a_SOURCES):
22727         Add dup-safer.c, fopen-safer.c.
22728         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
22729
22730         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
22731         * lib/unistd-safer.h: New files.
22732
22733 2001-02-25  Paul Eggert  <eggert@twinsun.com>
22734
22735         The mkstemp replacement is taken from glibc 2.2.2, with some
22736         portability fixes for use outside glibc, as follows:
22737
22738         * lib/tempname.c (struct_stat64): New macro.
22739         (direxists, __gen_tempname): Use it.
22740         This avoids a portability problem with Solaris 8.
22741
22742         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
22743         (<stddef.h>, <stdint.h>, <string.h>):
22744         Include only if STDC_HEADERS || _LIBC.
22745         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
22746         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
22747         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
22748         (__set_errno): Define this macro if <errno.h> doesn't.
22749         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
22750         Define these macros if <stdio.h> doesn't.
22751         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
22752         Define these macros if <sys/stat.h>
22753         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
22754         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
22755         __xstat64): Define if not _LIBC.
22756         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
22757         (__gen_tempname): Invoke gettimeofday only if
22758         HAVE_GETTIMEOFDAY || _LIBC;
22759         otherwise, fall back on plain "time".
22760         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
22761
22762         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
22763
22764         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
22765
22766 2001-02-18  Paul Eggert  <eggert@twinsun.com>
22767
22768         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
22769
22770 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22771
22772         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
22773         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
22774         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
22775         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22776
22777 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22778
22779         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
22780         Remove workaround macros for hosts that have mbrtowc but not
22781         mbstate_t, as we now insist on proper declarations for both
22782         before using mbrtowc.
22783
22784 2001-02-17  Jim Meyering  <meyering@lucent.com>
22785
22786         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
22787         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
22788         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
22789         UnixWare 7.1.1.
22790
22791         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
22792         rather than AC_CACHE_VAL.
22793
22794 2001-02-17  Jim Meyering  <meyering@lucent.com>
22795
22796         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
22797         around included file name.
22798
22799         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
22800
22801         * lib/strftime.c: Update from GNU libc (the only changes were to
22802         comments).
22803
22804 2001-02-17  Jim Meyering  <meyering@lucent.com>
22805
22806         * lib/regex.c: Update from libc.
22807
22808 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
22809
22810         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
22811         clash.
22812
22813 2001-02-16  Paul Eggert  <eggert@twinsun.com>
22814
22815         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
22816         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
22817         Reported by Mark Hounschell via Paul Eggert.
22818
22819 2001-02-07  Jim Meyering  <meyering@lucent.com>
22820
22821         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
22822
22823 2001-02-05  Jim Meyering  <meyering@lucent.com>
22824
22825         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
22826         it includes the patch required for `large file' support with at least
22827         HP-UX's 10.20 /bin/cc.
22828
22829 2001-02-03  Jim Meyering  <meyering@lucent.com>
22830
22831         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
22832         AS_IF, now that it works once again (mysteriously).
22833         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
22834
22835 2001-01-30  Jim Meyering  <meyering@lucent.com>
22836
22837         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
22838         * m4/chown.m4: Rename conftestchown to conftest.chown.
22839         * m4/rename.m4: s/conftestdir/conftest.d1/ and
22840         s/conftestdir2/conftest.d2/.
22841         * m4/utimes.m4: s/conftestdata/conftest.data/
22842         Inspired by Pavel Roskin's change in autoconf.
22843
22844 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
22845
22846         * lib/config.charset: Update for FreeBSD 4.2.
22847
22848 2001-01-27  Jim Meyering  <meyering@lucent.com>
22849
22850         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
22851         a use of AS_IF.
22852         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
22853
22854 2001-01-26  Jim Meyering  <meyering@lucent.com>
22855
22856         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
22857         quotearg.c includes it.
22858
22859 2001-01-26  Jim Meyering  <meyering@lucent.com>
22860
22861         * lib/quotearg.c: Include stddef.h.
22862         * lib/quote.c: Include stddef.h.
22863         Reported by Axel Kittenberger.
22864
22865         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
22866         line in double quotes so that it evokes a better diagnostic.
22867         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
22868         Reported by Axel Kittenberger.
22869
22870 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
22871
22872         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
22873         as if it was a `charset'.
22874
22875 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
22876
22877         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
22878         has const.
22879
22880 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
22881
22882         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
22883         to avoid a warning.  Add back 'const' to inptr.
22884
22885 2001-01-20  Jim Meyering  <meyering@lucent.com>
22886
22887         Be sure that headers are checked before used in code compiled
22888         for the type checks.
22889         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
22890         In place of that, invoke jm_CHECK_ALL_TYPES.
22891         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
22892         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
22893         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
22894         The check for ssize_t was mistakenly run before the test for unistd.h.
22895
22896         The configure-time check for stdbool.h was missing.
22897         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
22898         (jm_PREREQ_HASH): New function.
22899
22900 2001-01-17  Jim Meyering  <meyering@lucent.com>
22901
22902         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
22903         for autoconf-2.49c.
22904         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
22905
22906 2001-01-16  Jim Meyering  <meyering@lucent.com>
22907
22908         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
22909         From Bruno Haible.
22910
22911 2001-01-14  Jim Meyering  <meyering@lucent.com>
22912
22913         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
22914         foo and bar.  Create conftestdir/ in the script, not in the C code.
22915         Remove directories in the script, not in the C code.
22916         Remove conftestdir{,2} before trying to create the directory.
22917         Make the entire configure script fail if the mkdir fails.
22918
22919 2001-01-14  Jim Meyering  <meyering@lucent.com>
22920
22921         * lib/rename.c: New file.  From Volker Borchert.
22922         Include stdlib.h, string.h or strings.h, and xalloc.h.
22923         Use strip_trailing_slashes rather than open-coding it.
22924
22925 2001-01-03  Paul Eggert  <eggert@twinsun.com>
22926
22927         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
22928
22929 2001-01-03  Jim Meyering  <meyering@lucent.com>
22930
22931         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
22932         of local `inptr' to avoid warning with some system declarations of
22933         iconv.
22934
22935 2001-01-02  Volker Borchert  <bt@teknon.de>
22936
22937         * m4/rename.m4: New file.
22938         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
22939
22940 2001-01-01  Jim Meyering  <meyering@lucent.com>
22941
22942         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
22943         even on systems with utmpx.h.  It's necessary for the declaration of
22944         utmp's ut_user member.  Reported by Andreas Jaeger.
22945
22946         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
22947         available. They are required for the declarations of getgrgid and
22948         getpwuid resp.
22949         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
22950         Reported by Andreas Jaeger.
22951
22952 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
22953
22954         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
22955         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
22956         so `make install' also works in VPATH builds.
22957
22958 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
22959
22960         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
22961         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
22962         can be used in subdirectories.
22963
22964 2000-12-29  Paul Eggert  <eggert@twinsun.com>
22965
22966         * lib/modechange.c: Do not assume that mode_t uses the
22967         traditional octal encoding.  E.g. "chmod 1 FOO" should set
22968         the other-execute bit of FOO even if S_IXOTH != 1.
22969
22970         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
22971         WOTH, XOTH, ALLM): New macros.
22972         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
22973          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
22974         Use them.
22975         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
22976         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
22977         (mode_compile):
22978         No need to use uintmax_t; unsigned long is long enough.
22979         Don't bother to get suffix since we don't use it.
22980
22981 2000-12-26  Jim Meyering  <meyering@lucent.com>
22982
22983         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
22984         better with autoheader.
22985
22986 2000-12-24  Jim Meyering  <meyering@lucent.com>
22987
22988         * lib/hash.c (is_prime): Return explicit boolean values.
22989         (hash_get_first): Return NULL to appease Irix5.6's 89.
22990         Reported by Nelson Beebe.
22991
22992 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
22993
22994         * lib/localcharset.c (locale_charset): Add support for Win32.
22995
22996 2000-12-18  Paul Eggert  <eggert@twinsun.com>
22997
22998         * lib/physmem.h, lib/physmem.c: New files.
22999
23000         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
23001         (noinst_HEADERS): Add physmem.h.
23002
23003         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
23004         't' for compatibility with Solaris 8 sort.
23005
23006 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
23007
23008         * lib/config.charset: Add support for BeOS.
23009
23010 2000-12-17  Jim Meyering  <meyering@lucent.com>
23011
23012         * m4/dos.m4 (jm_AC_DOS): New file and macro.
23013         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
23014
23015 2000-12-16  Jim Meyering  <meyering@lucent.com>
23016
23017         This bug had a serious impact on chown: `chown N:M FILE' (for integer
23018         N and M) would have treated it like `chown N:N FILE'.
23019
23020         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
23021
23022 2000-12-16  Jim Meyering  <meyering@lucent.com>
23023
23024         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
23025         SHELLS_FILE to a file name that's useful on djgpp systems.
23026         Include stdlib.h.
23027         (ADDITIONAL_DEFAULT_SHELLS): Define.
23028         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
23029         Based mostly on a patch from Prashant TR.
23030
23031 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
23032
23033         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
23034         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
23035         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
23036
23037 2000-12-08  Andreas Schwab  <schwab@suse.de>
23038
23039         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
23040         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
23041
23042 2000-12-07  Jim Meyering  <meyering@lucent.com>
23043
23044         * lib/stripslash.c (ISSLASH): Define.
23045         (strip_trailing_slashes): Use ISSLASH rather than comparing against
23046         `/'.
23047         From Prashant TR.
23048
23049         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
23050         (dir_name_r): Declare this function as static.
23051         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
23052         manifest itself on a name containing a mix of slashes and
23053         backslashes.
23054         Make this function work with names starting with a DOS-style
23055         drive letter and colon prefix.
23056         (dir_name): Append `.' if necessary.
23057         Based mostly on patches from Prashant TR and Eli Zaretskii.
23058
23059         * lib/dirname.h (dir_name_r): Remove prototype.
23060
23061 2000-12-06  Paul Eggert  <eggert@twinsun.com>
23062
23063         * m4/off_t-format.m4: Remove this file.
23064         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
23065
23066 2000-12-06  Jim Meyering  <meyering@lucent.com>
23067
23068         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
23069         replacement strtoull, we may well need the replacement strtoul, too.
23070         Check for declarations of strtoul and strtoull.
23071         Check for strtol.  Mainly as a cue to cause automake to include
23072         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
23073         Check for limits.h -- strtol.c needs it.
23074
23075 2000-12-05  Jim Meyering  <meyering@lucent.com>
23076
23077         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
23078
23079 2000-12-04  Jim Meyering  <meyering@lucent.com>
23080
23081         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
23082         Also include memory.h, stdlib.h, unistd.h if appropriate.
23083         Reported by Andreas Jaeger (conflicting declaration of malloc).
23084
23085 2000-12-02  Jim Meyering  <meyering@lucent.com>
23086
23087         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
23088         * m4/jm-macros.m4 (jm_MACROS): require it.
23089
23090 2000-12-02  Jim Meyering  <meyering@lucent.com>
23091
23092         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
23093
23094 2000-12-01  Paul Eggert  <eggert@twinsun.com>
23095
23096         * lib/memrchr.c: Include <config.h> before any system include file.
23097
23098 2000-11-30  Jim Meyering  <meyering@lucent.com>
23099
23100         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
23101
23102 2000-11-30  Jim Meyering  <meyering@lucent.com>
23103
23104         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
23105
23106 2000-11-29  Paul Eggert  <eggert@twinsun.com>
23107
23108         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
23109
23110 2000-11-26  Jim Meyering  <meyering@lucent.com>
23111
23112         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
23113
23114 2000-11-22  Paul Eggert  <eggert@twinsun.com>
23115
23116         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
23117         size of (size_t) -1; it's not portable.
23118
23119 2000-11-17  Jim Meyering  <meyering@lucent.com>
23120
23121         * lib/strstr.c: Update from GNU libc.
23122
23123 2000-11-17  Akim Demaille  <akim@epita.fr>
23124
23125         * lib/obstack.h: Formatting changes.
23126         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
23127         prevent type checking.
23128         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23129         cast the value to (void *): assigning a `foo *' to a `void *'
23130         variable is valid.
23131         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23132
23133 2000-11-16  Jim Meyering  <meyering@lucent.com>
23134
23135         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
23136
23137 2000-11-11  Jim Meyering  <meyering@lucent.com>
23138
23139         * lib/error.c: Add a couple #includes, merging from GNU libc version.
23140
23141 2000-11-10  Jim Meyering  <meyering@lucent.com>
23142
23143         * lib/obstack.h: Update from GNU libc.
23144         * lib/obstack.c: Likewise.
23145
23146 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
23147
23148         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
23149
23150 2000-11-06  Paul Eggert  <eggert@twinsun.com>
23151
23152         * lib/getusershell.c (setusershell): Use rewind rather than
23153         fseek/fseeko, to avoid configuration hassles with fseeko.
23154         Don't bother opening SHELLS_FILE if shellstream is NULL;
23155         it's not necessary.
23156
23157 2000-11-05  Jim Meyering  <meyering@lucent.com>
23158
23159         * lib/makepath.h (make_dir): Declare.
23160         * lib/makepath.c (make_dir): Remove `static' attribute.
23161         Tweak a comment.
23162
23163 2000-11-04  Jim Meyering  <meyering@lucent.com>
23164
23165         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
23166
23167 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
23168
23169         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
23170         last one in a bucket, advance to the next bucket.
23171
23172 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
23173
23174         * lib/fnmatch.c: Do not comment out all the code if we are using
23175         the GNU C library, because in some cases we are replacing buggy
23176         code in the GNU C library itself.
23177
23178 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
23179
23180         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
23181         (regex_compile): Catch bogus \(\1\).
23182
23183 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23184
23185         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
23186         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
23187         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
23188
23189 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23190
23191         * lib/error.h, getline.h, modechange.h:
23192         Remove "2000" from Copyright line, as the file hasn't been
23193         changed this year other than in the copyright notice.
23194
23195         * lib/xalloc.h: Add "2000" to Copyright line, as this file
23196         was changed this year.
23197
23198 2000-10-29  Jim Meyering  <meyering@lucent.com>
23199
23200         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
23201         renaming.
23202         * m4/ls-mntd-fs.m4: Likewise
23203
23204 2000-10-29  Jim Meyering  <meyering@lucent.com>
23205
23206         * lib/xstat.in: Fix grammar in comment.
23207
23208 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
23209
23210         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
23211         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
23212         doesn't define __restrict_arr.
23213
23214 2000-10-28  Jim Meyering  <meyering@lucent.com>
23215
23216         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
23217         (jm_PREREQ_MEMCHR): New function.
23218
23219 2000-10-28  Jim Meyering  <meyering@lucent.com>
23220
23221         * lib/memchr.c: Update from libc.
23222         Adjust for portability:
23223         [HAVE_STDLIB_H]: Include stdlib.h.
23224         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
23225         Undef __memchr, too.
23226         [!weak_alias]: Define __memchr to memchr.
23227
23228         * lib/regex.c: Update from libc.
23229         * lib/regex.h: Likewise.
23230         * lib/getopt1.c: Likewise.
23231         * lib/memcmp.c: Likewise.
23232
23233         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
23234         Avoid using fseek, when possible -- it's broken by design.
23235         Patch by Ulrich Drepper.
23236
23237 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
23238
23239         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
23240         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
23241         Giving in to popular pressure to shut up the compiler with casts.
23242
23243 2000-10-26  Jim Meyering  <meyering@lucent.com>
23244
23245         * lib/strftime.c: Update from libc.
23246
23247 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
23248
23249         * regex.c: More `unsigned char' -> `re_char' changes.
23250         Also change several `int' into `re_wchar_t'.
23251         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
23252         (PUSH_FAILURE_POINTER): Don't cast any more.
23253         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
23254         We want GCC to complain, since this piece of code makes
23255         re_match non-reentrant, which *should* be fixed.
23256         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
23257         (EXTEND_BUFFER): Use RETALLOC.
23258         (SET_LIST_BIT): Don't cast.
23259         (re_wchar_t): New type.
23260         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
23261         that those two functions will always properly return.
23262         (IMMEDIATE_QUIT_CHECK): Cast to void.
23263         (analyse_first): Use recursion rather than an explicit stack.
23264         (re_compile_fastmap): Can't fail anymore.
23265         (re_search_2): Don't check re_compile_fastmap for failure.
23266         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
23267         Now also sets the new value (passed in a new argument).
23268         (re_match_2_internal): Use it.
23269         Also, use a new var `reg' of type size_t when looping through regs
23270         rather than reuse the inappropriate `mcnt'.
23271
23272 2000-10-25  Jim Meyering  <meyering@lucent.com>
23273
23274         * lib/obstack.c: Update from libc.
23275
23276 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
23277
23278         * regex.c (regex_compile): Change the way of handling a range from
23279         a char less than 256 to a char not less than 256.
23280
23281 2000-10-24  Andrew Innes  <andrewi@gnu.org>
23282
23283         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
23284         NT-Emacs only.
23285         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
23286         so that re_search functions only quit when callers expect them to.
23287
23288 2000-10-23  Jim Meyering  <meyering@lucent.com>
23289
23290         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
23291         wrong.  That set_locale call must not have any side effects.
23292         From Paul Eggert.
23293
23294 2000-10-22  Jim Meyering  <meyering@lucent.com>
23295
23296         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
23297         [CYCLIC]: Remove now-unused definition.
23298
23299         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
23300         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
23301         Suggestion from Ulrich Drepper.
23302
23303 2000-10-21  Jim Meyering  <meyering@lucent.com>
23304
23305         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
23306         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
23307         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
23308
23309 2000-10-21  Jim Meyering  <meyering@lucent.com>
23310
23311         * lib/dirname.c (memrchr): Declare if necessary.
23312         (dir_name): Remove the restriction that there be no
23313         trailing slashes.  Now, this code skips past them, effectively
23314         ignoring them.
23315         [TEST_DIRNAME] (main): New unit tests.
23316
23317         * lib/memrchr.c: New file from GNU libc.
23318         Undef __memrchr, too.
23319         [!weak_alias]: Define __memrchr to memrchr.
23320         Guard weak_alias use with `#ifdef weak_alias'.
23321
23322 2000-10-21  Jim Meyering  <meyering@lucent.com>
23323
23324         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
23325         (dir_name): Use dir_name_r.
23326         * lib/dirname.h (dir_name_r): Declare it.
23327
23328 2000-10-17  Jim Meyering  <meyering@lucent.com>
23329
23330         * lib/quote.h (PARAMS): Define and use.
23331         Reported by Akim Demaille.
23332
23333         * lib/getopt.c: Update from libc.
23334
23335 2000-10-16  Jim Meyering  <meyering@lucent.com>
23336
23337         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
23338         setlocale.
23339         From Jan Fedak.
23340
23341 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
23342
23343         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
23344
23345 2000-09-25  Jim Meyering  <meyering@lucent.com>
23346
23347         * lib/md5.h (rol): Define (from GnuPG).
23348
23349         * lib/sha.c: Give credit (GnuPG) where due.
23350         (M): Use rol rather than open-coding it.
23351         Add a FIXME comment.
23352
23353 2000-09-21  Jim Meyering  <meyering@lucent.com>
23354
23355         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
23356         Reported by Michael Stone.
23357
23358 2000-09-20  Jim Meyering  <meyering@lucent.com>
23359
23360         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
23361         (noinst_HEADERS): Add sha.h.
23362         Based on code from Scott G. Miller and from GnuPG.
23363
23364 2000-09-18  Jim Meyering  <meyering@lucent.com>
23365
23366         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
23367         LIBS. Otherwise, everyone ends up linking with -lelf for some
23368         configurations.
23369         Reported by Mike Stone.
23370
23371 2000-09-15  Jim Meyering  <meyering@lucent.com>
23372
23373         * lib/regex.c: Update from libc.
23374
23375 2000-09-10  Jim Meyering  <meyering@lucent.com>
23376
23377         * lib/getopt.c (_getopt_internal): Update from glibc.
23378
23379 2000-09-09  Jim Meyering  <meyering@lucent.com>
23380
23381         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
23382         think it should be used as a general replacement for isascii.
23383         * lib/fnmatch.c: Likewise.
23384         * lib/mbswidth.c: Likewise
23385         * lib/regex.c: Likewise.
23386
23387         Don't use atoi.
23388         * lib/userspec.c: Include sys/param.h and limits.h.
23389         Include xstrtol.h.
23390         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23391         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
23392         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
23393         UID, GID.  Check range.
23394
23395 2000-09-06  Jim Meyering  <meyering@lucent.com>
23396
23397         * lib/getopt.c (_getopt_internal): Update from glibc.
23398
23399 2000-08-30  Jim Meyering  <meyering@lucent.com>
23400
23401         * lib/strftime.c: Merge in changes from GNU libc.
23402
23403 2000-08-26  Jim Meyering  <meyering@lucent.com>
23404
23405         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
23406         * m4/fpending.m4: New file.
23407
23408 2000-08-26  Jim Meyering  <meyering@lucent.com>
23409
23410         * lib/closeout.c: Include "__fpending.h".
23411         (close_stdout_status): Return right away if there's nothing to flush.
23412
23413         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
23414         * lib/__fpending.c: New file.
23415         * lib/__fpending.h: New file.
23416
23417 2000-08-20  Jim Meyering  <meyering@lucent.com>
23418
23419         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
23420         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
23421         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
23422
23423 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
23424
23425         Improve fileutils installation on systems where running
23426         programs (like install) can't be unlinked.
23427         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
23428         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
23429
23430 2000-08-07  Paul Eggert  <eggert@twinsun.com>
23431
23432         Standardize on "memory exhausted" instead of "Memory exhausted"
23433         or "virtual memory exhausted".
23434         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
23435         "virtual memory exhausted".
23436         * lib/same.c (same_name): Invoke xalloc_die instead of printing
23437         our own message.
23438         * lib/userspec.c (parse_user_spec): Likewise.
23439         * lib/bumpalloc.h: comment fix
23440         * lib/same.c, userspec.c: Include xalloc.h.
23441
23442         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
23443         not char *const and pointing to a constant array.
23444         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
23445         (xrealloc): Comment fix.
23446
23447         * lib/userspec.c (parse_user_spec):
23448         Don't translate a message until just before returning,
23449         to avoid unnecessary translation.
23450
23451 2000-08-07  Jim Meyering  <meyering@lucent.com>
23452
23453         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
23454         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
23455         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
23456         getgroups.c, gethostname.c, getopt.h, group-member.c,
23457         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
23458         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
23459         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
23460         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
23461         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
23462         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
23463         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
23464         yesno.c: Back out Copyright date changes for each file with no change
23465         this year.  This eases coordination with other programs using the same
23466         source code modules.  From Paul Eggert.
23467
23468 2000-08-06  Paul Eggert  <eggert@twinsun.com>
23469
23470         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
23471         not char, for compatibility with glibc 2.1.3 strftime.c.
23472
23473 2000-08-03  Greg McGary  <greg@mcgary.org>
23474
23475         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
23476         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
23477         (EXTEND_BUFFER): Use them.
23478
23479 2000-08-01  Jim Meyering  <meyering@lucent.com>
23480
23481         * lib/dirname.c (ISSLASH): Define.
23482         (BACKSLASH_IS_PATH_SEPARATOR): Define.
23483         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
23484         both `\' and `/' may be use as path separators.
23485         Based on a patch from Prashant TR.
23486
23487 2000-07-31  Paul Eggert  <eggert@twinsun.com>
23488
23489         * lib/quotearg.c (quotearg_n_options): Don't make the initial
23490         slot vector a constant, since it might get modified.
23491
23492 2000-07-31  Jim Meyering  <meyering@lucent.com>
23493
23494         * lib/xmalloc.c: Use `virtual memory exhausted', not
23495         `Memory exhausted'.
23496         * lib/obstack.c (print_and_abort): Likewise.
23497
23498 2000-07-30  Paul Eggert  <eggert@twinsun.com>
23499
23500         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
23501         buffer, so that the caller can always quote one small
23502         component of a "memory exhausted" message in slot 0.
23503         From a suggestion by Jim Meyering.
23504
23505 2000-07-30  Jim Meyering  <meyering@lucent.com>
23506
23507         * lib/makepath.c (make_path): Quote the other instance, too.
23508
23509         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
23510         (STATIC_BUF_SIZE): Define.
23511         (quotearg_n_options): Use only statically allocated storage when
23512         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
23513         than STATIC_BUF_SIZE.
23514
23515 2000-07-29  Jim Meyering  <meyering@lucent.com>
23516
23517         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
23518         * lib/dirname.c (dir_name): Likewise.
23519
23520         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
23521         `/'.
23522
23523         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
23524         (dir_name): Assert that there are no trailing slashes.
23525
23526 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
23527
23528         * lib/mbswidth.h (mbswidth): Add a flags argument.
23529         (mbswidth): New declaration.
23530         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
23531         * lib/mbswidth.c (mbswidth): Add a flags argument.
23532         (mbsnwidth): New function.
23533
23534 2000-07-24  Jim Meyering  <meyering@lucent.com>
23535
23536         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
23537
23538 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23539
23540         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
23541
23542 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23543
23544         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
23545         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
23546         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
23547         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
23548         invoke multibyte primitives.
23549
23550 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23551
23552         * lib/quotearg.c:
23553         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
23554         so that mbstate_t is always defined.
23555
23556         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
23557         be 1 in at least one GCC installation, and this configuration
23558         error is likely to be common.  Ignoring MB_LEN_MAX hurts
23559         performance on hosts that have mbrtowc but have only unibyte
23560         locales, but I assume these hosts are rare.
23561
23562 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23563
23564         * lib/mbswidth.c (_XOPEN_SOURCE):
23565         Don't define; this causes problems on Solaris 7.
23566         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
23567
23568 2000-07-23  Jim Meyering  <meyering@lucent.com>
23569
23570         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
23571         too: getgrgid, getpwuid, getuid.
23572
23573 2000-07-23  Jim Meyering  <meyering@lucent.com>
23574
23575         * lib/basename.c (base_name): Add an assertion.
23576
23577 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
23578
23579         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
23580         shadow its mbsinit function.
23581
23582 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23583
23584         * lib/mbswidth.h: New file.
23585         * lib/mbswidth.c: New file.
23586         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
23587         (noinst_HEADERS): Add mbswidth.h.
23588
23589 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23590
23591         * lib/config.charset: Add support for FreeBSD. Improve support for
23592         HP-UX and IRIX 6.
23593
23594 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
23595
23596         * m4/mbswidth.m4: New file.
23597         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
23598
23599 2000-07-15  Jim Meyering  <meyering@lucent.com>
23600
23601         * lib/makepath.c: Include quote.h.
23602         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
23603         corresponding argument in a `quote (...)' call.
23604         Give better diagnostics.
23605
23606         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
23607         (noinst_HEADERS): Add quote.h.
23608
23609         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
23610         from tar's src/misc.c.
23611         * lib/quote.h: New file.  Prototypes for same.
23612
23613 2000-07-14  Paul Eggert  <eggert@twinsun.com>
23614
23615         From a suggestion by Bruno Haible.
23616         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
23617         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
23618         to decide whether to define the BeOS workaround macro;
23619         this adjusts to the change to AC_MBSTATE_T.
23620
23621 2000-07-14  Jim Meyering  <meyering@lucent.com>
23622
23623         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
23624         jm_AC_TYPE_UINTMAX_T.
23625
23626 2000-07-13  Paul Eggert  <eggert@twinsun.com>
23627
23628         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
23629
23630         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
23631         quotearg_buffer_restyled): Add support for
23632         clocale_quoting_style.  Undo previous change to
23633         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
23634         and "{RIGHT QUOTATION MARK}" msgids.
23635
23636 2000-07-10  Paul Eggert  <eggert@twinsun.com>
23637
23638         From a suggestion by Bruno Haible.
23639         * m4/mbstate_t.m4 (AC_MBSTATE_T):
23640         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
23641         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
23642         and mbstate_t, to a single-part test that simply defines mbstate_t.
23643         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
23644         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
23645
23646 2000-07-10  Jim Meyering  <meyering@lucent.com>
23647
23648         * m4/strerror_r.m4: Mirror the correction made in autoconf.
23649
23650         * m4/gnu-source.m4: Output to confdefs.h directly.
23651         Suggestion from Akim Demaille.
23652
23653 2000-07-09  Paul Eggert  <eggert@twinsun.com>
23654
23655         The old behavior of quoting `like this' doesn't look good with
23656         newer, ISO-style fonts.  See:
23657         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
23658
23659         Instead, quote "like this" by default.  Let the translator
23660         tailor the locale-specific quoting behavior by providing
23661         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
23662
23663         * lib/quotearg.c (N_): New macro.
23664         (gettext_default): New function.
23665         (quotearg_buffer_restyled): Use
23666         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
23667         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
23668
23669 2000-07-09  Jim Meyering  <meyering@lucent.com>
23670
23671         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
23672         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
23673
23674         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
23675         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
23676
23677 2000-07-09  Jim Meyering  <meyering@lucent.com>
23678
23679         * lib/Most files: Update copyright dates to include 2000.
23680
23681 2000-07-08  Jim Meyering  <meyering@lucent.com>
23682
23683         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
23684         if not defined.
23685         (xgethostname): Remove now-unnecessary #ifdef.
23686         Move declaration of `err' into loop where it's used.
23687
23688 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23689         and Bruno Haible  <haible@clisp.cons.org>
23690
23691         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
23692         only if the test for an object-type mbstate_t fails.  This
23693         prevents us from mistakenly reporting that mbstate_t is a
23694         system object type after we "#define mbstate_t int" to work
23695         around its lack.
23696
23697 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23698         and Bruno Haible  <haible@clisp.cons.org>
23699
23700         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
23701
23702 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23703
23704         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
23705         to strerror_r.
23706         Include <ctype.h> for use of isalpha.
23707
23708 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23709
23710         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
23711         by allocating a larger buffer. Test the gethostname return value for
23712         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
23713         returns an error and ENAMETOOLONG isn't defined.
23714
23715 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23716
23717         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
23718         dimension.
23719
23720 2000-07-04  Jim Meyering  <meyering@lucent.com>
23721
23722         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
23723         of the deprecated AC_CHECKING.
23724
23725 2000-07-04  Jim Meyering  <meyering@lucent.com>
23726
23727         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
23728         Reported by Bruno Haible.
23729
23730 2000-07-04  Jim Meyering  <meyering@lucent.com>
23731
23732         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
23733         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
23734         lacks mbrtowc.
23735
23736 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23737
23738         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
23739         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
23740
23741 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23742         and Bruno Haible  <haible@clisp.cons.org>
23743
23744         * lib/quotearg.c (mbrtowc):
23745         Assign to *pwc, and return 1 only if result is nonzero.
23746         (iswprint): Use ISPRINT when substituting our own mbrtowc.
23747
23748 2000-07-03  Jim Meyering  <meyering@lucent.com>
23749
23750         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
23751
23752 2000-07-03  Jim Meyering  <meyering@lucent.com>
23753
23754         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
23755         This is necessary to get a definition of e.g., UTMP_FILE on
23756         HP-UX 10.20.
23757         From Bob Proulx.
23758
23759 2000-07-02  Jim Meyering  <meyering@lucent.com>
23760
23761         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
23762
23763         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
23764         AC_LIBOBJ(function_name).
23765         * m4/chown.m4: Likewise.
23766         * m4/fnmatch.m4: Likewise.
23767         * m4/ftruncate.m4: Likewise.
23768         * m4/getgroups.m4: Likewise.
23769         * m4/getline.m4: Likewise.
23770         * m4/group-member.m4: Likewise.
23771         * m4/jm-macros.m4: Likewise.
23772         * m4/lstat.m4: Likewise.
23773         * m4/malloc.m4: Likewise.
23774         * m4/memcmp.m4: Likewise.
23775         * m4/nanosleep.m4: Likewise.
23776         * m4/putenv.m4: Likewise.
23777         * m4/realloc.m4: Likewise.
23778         * m4/regex.m4: Likewise.
23779         * m4/stat.m4: Likewise.
23780         * m4/strftime.m4: Likewise.
23781
23782 2000-07-02  Jim Meyering  <meyering@lucent.com>
23783
23784         * lib/quotearg.c (mbstate_t): Don't define here.
23785
23786 2000-07-02  Jim Meyering  <meyering@lucent.com>
23787
23788         * lib/nanosleep.c (SIGCONT): Define if not already defined.
23789
23790 2000-07-01  Jim Meyering  <meyering@lucent.com>
23791
23792         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
23793
23794 2000-07-01  Jim Meyering  <meyering@lucent.com>
23795
23796         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
23797         problem.
23798
23799 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
23800
23801         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
23802         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
23803
23804 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
23805
23806         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
23807         per change in ../m4/ls-mntd-fs.m4.
23808         (read_filesystem_list): Ignore symbolic links.
23809
23810 2000-06-29  Jim Meyering  <meyering@lucent.com>
23811
23812         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
23813         for declaration of strcmp.
23814
23815         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
23816
23817         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
23818         Avoid warning by casting result to `char *' to remove `const'.
23819
23820 2000-06-28  Jim Meyering  <meyering@lucent.com>
23821
23822         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
23823         included by quotearg.c, for which we perform this test.  From
23824         Bruno Haible.
23825
23826 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
23827
23828         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
23829         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
23830         <utmpx.h> exists, put readutmp.o into LIBOBJS.
23831
23832 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
23833
23834         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
23835
23836 2000-06-26  Paul Eggert  <eggert@twinsun.com>
23837
23838         savedir now sets errno on failure and invokes xmalloc to get memory.
23839         Fix a couple of other minor bugs while we're at it.
23840
23841         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
23842         (NAMLEN): Remove macro.
23843         (malloc, realloc): Remove decls.
23844         (stpcpy): Likewise.
23845         ("xalloc.h"): Include.
23846         (NAME_SIZE_DEFAULT): New macro.
23847         (savedir): Use xmalloc / xrealloc to allocate memory.
23848         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
23849         Skip "" directory entries.
23850         Use strlen to calculate directory entry length, since the old method
23851         is rarely used these days and isn't worth supporting.
23852         Don't use a pointer after freeing it.
23853         Check for integer overflow when calculating allocation size.
23854         Use memcpy to copy entries, instead of stpcpy.
23855         Set errno properly when returning NULL.
23856         Check for readdir error.
23857
23858 2000-06-26  Jim Meyering  <meyering@lucent.com>
23859
23860         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
23861
23862 2000-06-25  Jim Meyering  <meyering@lucent.com>
23863
23864         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
23865         Linux header bug when _XOPEN_SOURCE is defined to 500.
23866
23867 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
23868
23869         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
23870         deficiency.
23871
23872 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
23873
23874         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
23875         Include xalloc.h.
23876         Don't include <stdlib.h>.  Don't declare malloc, realloc.
23877
23878 2000-06-24  Jim Meyering  <meyering@lucent.com>
23879
23880         * m4/strerror_r.m4: Revive this file -- to try out an experimental
23881         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
23882         for which strerror does return char*, but which lacks a conveniently
23883         accessible declaration of the function.  If the compile-test says
23884         strerror_r doesn't work, then resort to a `run'-test that works on
23885         BeOS and segfaults on DEC Unix.
23886
23887 2000-06-24  Jim Meyering  <meyering@lucent.com>
23888
23889         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
23890
23891 2000-06-23  Paul Eggert  <eggert@twinsun.com>
23892
23893         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
23894         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
23895
23896 2000-06-23  Paul Eggert  <eggert@twinsun.com>
23897
23898         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
23899         (mbrtowc, mbstate_t): Define substitutes if
23900         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
23901         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
23902         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
23903
23904 2000-06-23  Jim Meyering  <meyering@lucent.com>
23905
23906         * m4/afs.m4: Add missing AC_MSG_RESULT.
23907         Reported by Bruno Haible.
23908
23909         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
23910         Suggestion from Bruno Haible.
23911
23912 2000-06-23  Jim Meyering  <meyering@lucent.com>
23913
23914         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
23915
23916 2000-06-21  Jim Meyering  <meyering@lucent.com>
23917
23918         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
23919
23920 2000-06-21  Jim Meyering  <meyering@lucent.com>
23921
23922         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
23923         (noinst_HEADERS): Add getstr.h.
23924
23925         * lib/getline.c (getstr): Move into a separate file.
23926         * lib/getstr.c (getstr): New file, extracted from getline.c, with
23927         the following changes: new parameter, delim2; both delim[12]
23928         parameters have type `int', not `char'.  The latter would lose
23929         with 8-bit delimiters.
23930         * lib/getstr.h: New file.
23931
23932 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23933
23934         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
23935         than 1024, return a memory chunk of least possible size, instead
23936         of size PATH_MAX + 2. In the loop, increment the size proportionally.
23937         Use free/xmalloc instead of xrealloc to avoid copying for very long
23938         paths.
23939
23940 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23941
23942         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
23943         the empty string.
23944
23945 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23946
23947         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
23948         address, not strdup.  Include <stdlib.h> and don't declare free().
23949
23950 2000-06-19  Jim Meyering  <meyering@lucent.com>
23951
23952         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
23953
23954 2000-06-18  Jim Meyering  <meyering@lucent.com>
23955
23956         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
23957
23958         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
23959         `checking whether...' message to be consistent with that of the
23960         lstat test.
23961
23962 2000-06-18  Jim Meyering  <meyering@lucent.com>
23963
23964         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
23965         Besides, these days every porting target provides a mkdir function.
23966
23967         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
23968         needed. (this snippet comes from src/system.h).
23969
23970 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
23971
23972         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
23973
23974 2000-06-15  Paul Eggert  <eggert@twinsun.com>
23975
23976         * lib/human.c (adjust_value): New function.
23977         (human_readable_inexact): Apply rounding style even when
23978         printing approximate values.
23979
23980 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23981
23982         * lib/human.c (human_readable_inexact): Allow an input block
23983         size that is not a multiple of the output block size, and vice versa.
23984         Reported by Piergiorgio Sartor.
23985
23986 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23987
23988         * lib/getdate.y (get_date): Apply relative times after time
23989         zone indicator, not before.  Reported by Todd A. Jacobs.
23990
23991 2000-06-13  Jim Meyering  <meyering@lucent.com>
23992
23993         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
23994
23995         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
23996
23997 2000-06-12  Paul Eggert  <eggert@twinsun.com>
23998
23999         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
24000
24001 2000-06-12  Jim Meyering  <meyering@lucent.com>
24002
24003         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
24004         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
24005         optional argument.
24006         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
24007         the optional argument, `lib'.
24008
24009 2000-06-08  Jim Meyering  <meyering@lucent.com>
24010
24011         * m4/largefile.m4: Remove file (now that it's part of autoconf).
24012
24013 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24014
24015         Rewrite largefile configuration so that we don't need to run
24016         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
24017         AC_CANONICAL_HOST in configure.in -- jmm]
24018
24019         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
24020         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
24021         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
24022         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
24023         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
24024         All uses changed.
24025         Instead of inspecting the output of getconf, try to compile the
24026         test program without and with the macro definition.
24027         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
24028         for getconf.  Instead, check for the needed flags by compiling
24029         test programs.
24030
24031 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24032
24033         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
24034
24035 2000-06-04  Jim Meyering  <meyering@lucent.com>
24036
24037         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
24038         SunOS 4.1.4 for which gid_t is an unsigned type.
24039
24040 2000-06-03  Jim Meyering  <meyering@lucent.com>
24041
24042         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
24043         now that autoconf requires that.
24044
24045         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
24046         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
24047         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
24048
24049 2000-06-03  Jim Meyering  <meyering@lucent.com>
24050
24051         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
24052
24053 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24054
24055         * m4/glibc21.m4: New file.
24056         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
24057
24058 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24059
24060         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
24061         newer, don't install charset.alias.
24062         * lib/config.charset: Change the Linux/glibc rules so they become empty
24063         on glibc-2.1 or newer.
24064
24065 2000-06-02  Jim Meyering  <meyering@lucent.com>
24066
24067         * lib/mountlist.c: Back out last change.  Instead, do this...
24068         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
24069         me_dummy member using the same `ignore'-testing code.
24070         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
24071         fs_type strings.
24072         From Mark D. Roth.
24073
24074 2000-05-29  Jim Meyering  <meyering@lucent.com>
24075
24076         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
24077         mounts with the `ignore' attribute.  Based on a patch from
24078         Mark D. Roth.
24079
24080 2000-05-28  Jim Meyering  <meyering@lucent.com>
24081
24082         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
24083         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24084         * m4/stat.m4: Likewise.
24085         * m4/lstat.m4: Likewise.
24086         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
24087
24088         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
24089         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
24090
24091 2000-05-26  Jim Meyering  <meyering@lucent.com>
24092
24093         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
24094
24095 2000-05-24  Jim Meyering  <meyering@lucent.com>
24096
24097         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
24098         autoconf requires that.
24099         * m4/lib-check.m4: Likewise.
24100         * m4/jm-macros.m4: Likewise.
24101         * m4/strftime.m4: Likewise.
24102
24103         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
24104         AC_CHECK_DECLS, now that autoconf requires that.
24105
24106 2000-05-22  Jim Meyering  <meyering@lucent.com>
24107
24108         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24109         * m4/lstat.m4: Likewise.
24110
24111 2000-05-22  Jim Meyering  <meyering@lucent.com>
24112
24113         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
24114
24115 2000-05-20  Jim Meyering  <meyering@lucent.com>
24116
24117         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
24118         (jm_PREREQ): Use it.
24119
24120 2000-05-18  Jim Meyering  <meyering@lucent.com>
24121
24122         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
24123         back, too, since it may have been modified by allocate_entry.
24124         (hash_delete): Rewrite to use neither the assignment operator
24125         nor the comma operator in an if-expression.
24126
24127 2000-05-15  Paul Eggert  <eggert@twinsun.com>
24128
24129         * lib/closeout.c:
24130         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
24131         Remove; no longer needed.
24132         "quotearg.h": Add include.
24133         (file_name): Do not bother to explicitly initialize to NULL; it's less
24134         efficient on some hosts.
24135         (close_stdout_status): Remove test as to whether stdout was already
24136         closed; it breaks for the case "echo x | sort >&-".
24137         Quote file name colons.
24138         Do not assume that _("write error") lacks format strings.
24139
24140 2000-05-15  Jim Meyering  <meyering@lucent.com>
24141
24142         * lib/version-etc.c (version_etc_copyright): Update the copyright
24143         string used in all --version output.
24144
24145 2000-05-14  Jim Meyering  <meyering@lucent.com>
24146
24147         * lib/closeout.c (close_stdout_set_file_name): New function.
24148         (close_stdout_status): Use new file-scoped global.
24149         Return right away if fstat says the stdout file descriptor is invalid.
24150         * lib/closeout.h (close_stdout_set_file_name): Declare.
24151
24152 2000-05-10  Jim Meyering  <meyering@lucent.com>
24153
24154         * lib/closeout.c [default_exit_status]: New file-scoped variable.
24155         (close_stdout_set_status): New function.
24156         * lib/closeout.h (close_stdout_set_status): Declare.
24157
24158 2000-05-09  Jim Meyering  <meyering@lucent.com>
24159
24160         * m4/gettext.m4: Rename this...
24161         * m4/libintl.m4: ...to this.
24162
24163 2000-05-08  Jim Meyering  <meyering@lucent.com>
24164
24165         * lib/long-options.c: Don't include closeout.h.
24166         (parse_long_options): Don't call close_stdout for --version.
24167
24168 2000-05-06  Paul Eggert  <eggert@twinsun.com>
24169
24170         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
24171         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
24172         2.1.3 bug.  This avoids a clash when files like regex.c define
24173         _GNU_SOURCE.
24174
24175 2000-05-06  Jim Meyering  <meyering@lucent.com>
24176
24177         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
24178         (AC_REPLACE_FUNCS): Add strnlen.
24179
24180         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
24181         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
24182
24183         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
24184         AC_SEARCH_LIBS call for nanosleep.
24185         (LIB_NANOSLEEP): Set and AC_SUBST.
24186
24187 2000-05-06  Jim Meyering  <meyering@lucent.com>
24188
24189         * lib/strnlen.c: Undefine __strnlen and strnlen.
24190         [!weak_alias]: Define __strnlen to strnlen.
24191
24192         * lib/atexit.c: New file, from libiberty.
24193
24194 2000-05-06  Jim Meyering  <meyering@lucent.com>
24195
24196         * lib/closeout.c (close_stdout_status): Also check for errors on the
24197         stderr stream.
24198
24199 2000-05-05  Jim Meyering  <meyering@lucent.com>
24200
24201         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
24202         AC_SEARCH_LIBS call for clock_gettime.
24203         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
24204
24205         * m4/search-libs.m4: Update from autoconf.
24206
24207         su doesn't work on Solaris 2.6.
24208         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
24209         <shadow.h>.  Reported by Dragos Harabor.
24210
24211 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
24212
24213         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
24214         memcpy instead of xmalloc, xrealloc, path_concat.
24215         (locale_charset): Treat empty environment variables as absent.
24216         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
24217
24218 2000-05-04  Jim Meyering  <meyering@lucent.com>
24219
24220         * lib/getopt.c: Update from glibc.
24221         * lib/obstack.c: Likewise.
24222         * lib/obstack.h: Likewise.
24223         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
24224         file
24225
24226         * lib/regex.h: Likewise.
24227         * lib/strndup.c: Likewise.
24228         * lib/strnlen.c: New file, from glibc.
24229
24230 2000-05-03  Jim Meyering  <meyering@lucent.com>
24231
24232         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
24233
24234 2000-05-02  Paul Eggert  <eggert@twinsun.com>
24235
24236         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
24237         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
24238         compile-time test, rather than inspecting host and OS, to
24239         decide whether to define _LARGEFILE_SOURCE.
24240
24241 2000-05-01  Jim Meyering  <meyering@lucent.com>
24242
24243         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
24244
24245         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
24246         Based on a patch from Bruno Haible.
24247
24248 2000-05-01  Jim Meyering  <meyering@lucent.com>
24249
24250         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
24251
24252 2000-04-29  Jim Meyering  <meyering@lucent.com>
24253
24254         * lib/path-concat.c: Declare strdup only if it's not defined.
24255         * lib/canon-host.c: Likewise.
24256
24257 2000-04-28  Jim Meyering  <meyering@lucent.com>
24258
24259         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
24260         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
24261         is included first, then limits.h is included by locale.h by libintl.h.
24262         From John David Anglin.
24263
24264 2000-04-25  Jim Meyering  <meyering@lucent.com>
24265
24266         * lib/makepath.c (S_IRWXUGO): Define.
24267         (make_path): Always perform explicit chmod if MODE specifies any
24268         of the `special' permission bits.  Prompted by a bug report against
24269         install from Mate Wierdl and Joost van Baal.
24270
24271 2000-04-18  Jim Meyering  <meyering@lucent.com>
24272
24273         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
24274         (jm_PREREQ): Use it.
24275
24276 2000-04-18  Jim Meyering  <meyering@lucent.com>
24277
24278         * lib/README: New file.
24279
24280         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
24281         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
24282
24283 2000-04-17  Jim Meyering  <meyering@lucent.com>
24284
24285         Get it right :-)
24286         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
24287         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
24288         Suggestion from Akim Demaille.
24289
24290 2000-04-17  Jim Meyering  <meyering@lucent.com>
24291
24292         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
24293         the definition of it to rpl_strftime also defined-away the system's
24294         declaration.
24295
24296 2000-04-15  Jim Meyering  <meyering@lucent.com>
24297
24298         Use `C' to denote so-called `contiguous' files, the same way
24299         that tar does.
24300         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
24301         (ftypelet): Use S_ISCTG.
24302         From Michael Deutschmann.
24303
24304 2000-04-14  Jim Meyering  <meyering@lucent.com>
24305
24306         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
24307         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
24308         clobbered.
24309
24310 2000-04-14  Jim Meyering  <meyering@lucent.com>
24311
24312         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
24313
24314 2000-04-13  Jim Meyering  <meyering@lucent.com>
24315
24316         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
24317         AH_VERBATIM to insert required #ifndef into config.h.in.
24318         Suggestion from Akim Demaille.
24319
24320 2000-04-12  Jim Meyering  <meyering@lucent.com>
24321
24322         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
24323         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
24324         Christian Krackowizer.
24325
24326         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
24327         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
24328         (AC_SYS_LARGEFILE): Require.
24329         (AM_C_PROTOTYPES): Require.
24330
24331 2000-04-08  Jim Meyering  <meyering@lucent.com>
24332
24333         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
24334         names don't conflict.  Reported by Eli Zaretskii.
24335
24336 2000-04-07  Jim Meyering  <meyering@lucent.com>
24337
24338         * lib/putenv.c: Move inclusion of errno.h so it follows that of
24339         sys/types.h, to work around system header problems on AIX 3.2.5.
24340         From Bruno Haible.
24341
24342 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
24343
24344         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
24345         bug.  Deal with the different error behavior of Irix iconv.
24346
24347 2000-04-05  Paul Eggert  <eggert@twinsun.com>
24348
24349         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
24350         IRIX if the installer said otherwise.
24351
24352 2000-04-05  Jim Meyering  <meyering@lucent.com>
24353
24354         Portability tweaks required for ultrix4.3.
24355         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
24356         (jm_CHECK_DECLS): Add getutent to the list of functions.
24357         (_jm_DECL_HEADERS): Add utmpx.h.
24358         From John David Anglin.
24359
24360         * m4/strftime.m4: Back out the 2000-04-02 change.
24361         Instead of that change, simply undefine putenv in the test program.
24362
24363 2000-04-05  Jim Meyering  <meyering@lucent.com>
24364
24365         Portability tweaks required for ultrix4.3.
24366         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
24367         getutent.
24368         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
24369         * lib/canon-host.c: Declare strdup.
24370         * lib/path-concat.c: Likewise.
24371         From John David Anglin.
24372
24373 2000-04-04  Jim Meyering  <meyering@lucent.com>
24374
24375         Be more DOS 8.3-friendly.
24376         * lib/ref-add.sin: Renamed from ref-add.sed.in.
24377         * lib/ref-del.sin: Renamed from ref-del.sed.in.
24378         * lib/Makefile.am: Reflect renaming.
24379         Reported by Eli Zaretskii.
24380
24381         Use a temporary file name that won't clash with `charset.alias'
24382         in the DOS 8.3 name space.
24383         * lib/Makefile.am (charset_tmp): Define.
24384         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
24385         (uninstall-local): Likewise.
24386         Reported by Eli Zaretskii.
24387
24388 2000-04-03  Jim Meyering  <meyering@lucent.com>
24389
24390         * m4/gettext.m4: Fix typo in comment.
24391
24392         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
24393         textutils/configure.in).  Suggestion from Paul Eggert.
24394         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
24395
24396 2000-04-02  Paul Eggert  <eggert@twinsun.com>
24397
24398         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
24399         variable in the shell rather than using putenv, which isn't
24400         portable.  This avoids the configure-time inter-test dependency
24401         on the potentially-renamed putenv function.
24402
24403 2000-03-30  Paul Eggert  <eggert@twinsun.com>
24404
24405         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
24406         before checking struct stat.st_blksize, so that
24407         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
24408
24409 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24410
24411         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
24412         since strftime.c uses HAVE_STRFTIME to decide whether to use
24413         the underlying strftime.
24414
24415 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24416
24417         * lib/time/strftime.c (my_strftime): Make sure we call the system
24418         strftime, not ourselves, when invoking the underlying strftime.
24419
24420 2000-03-24  Jim Meyering  <meyering@lucent.com>
24421
24422         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
24423         (charset_alias): Define.
24424         (install-exec-local): Factor out common code.
24425         (uninstall-local): Split lines longer than 80.
24426         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
24427         (SUFFIXES): Define.
24428         (.sed.in.sed): New rule.  Don't redirect directly to $@.
24429         (CLEANFILES): Add ref-add.sed and ref-del.sed.
24430
24431 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
24432
24433         * lib/config.charset: Output a line containing "Packages using this
24434         file".
24435         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
24436         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
24437         ref-del.sed): New rules.
24438
24439 2000-03-17  Jim Meyering  <meyering@lucent.com>
24440
24441         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
24442         Otherwise, include <strings.h>
24443
24444 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
24445
24446         * lib/unicodeio.c (utf8_wctomb): New function.
24447         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
24448         format instead of in UCS-4 with platform dependent endianness.
24449
24450 2000-03-10  Jim Meyering  <meyering@lucent.com>
24451
24452         * m4/lib-check.m4: Look for getspnam in -lgen, too.
24453         From Marco Franzen.
24454
24455 2000-03-07  Paul Eggert  <eggert@twinsun.com>
24456
24457         * lib/savedir.c (savedir): Work even if directory size is
24458         negative; this can happen with some screwy NFS configurations.
24459
24460 2000-03-06  Jim Meyering  <meyering@lucent.com>
24461
24462         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
24463         if it's NULL (because we ran out of memory).  From Bruno Haible.
24464
24465 2000-03-05  Jim Meyering  <meyering@lucent.com>
24466
24467         * lib/localcharset.c ("path-concat.h"): Include.
24468         (get_charset_aliases): Use path_concat instead of ANSI string
24469         concatenation.
24470
24471         * lib/unicodeio.h (PARAMS): Define.
24472         Use it to guard prototype.
24473
24474 2000-03-04  Jim Meyering  <meyering@lucent.com>
24475
24476         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
24477         for lib/localcharset.c.
24478
24479 2000-03-04  Jim Meyering  <meyering@lucent.com>
24480
24481         * lib/Makefile.am (install-exec-local): Create $(libdir) before
24482         installing into it.
24483         (uninstall-local): Uncomment this rule so `make distcheck' works
24484         once again.
24485
24486         * lib/unicodeio.c (<errno.h>): Include it.
24487         (errno): Declare if not defined.
24488
24489         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
24490
24491         * lib/config.charset: New version, incorporating remarks from a linux
24492         i18n mailing list.  From Bruno Haible.
24493
24494 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
24495
24496         * m4/codeset.m4: New file.
24497         * m4/iconv.m4: New file.
24498         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
24499
24500 2000-03-03  Jim Meyering  <meyering@lucent.com>
24501
24502         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
24503
24504 2000-03-02  Jim Meyering  <meyering@lucent.com>
24505
24506         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
24507         the messages come out on separate lines.
24508
24509         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
24510         rather than jm_CHECK_DECLARATIONS.
24511         * m4/decl.m4: Remove now-unused file.
24512
24513         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
24514         geteuid.
24515
24516 2000-03-02  Jim Meyering  <meyering@lucent.com>
24517
24518         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
24519
24520 2000-03-01  Jim Meyering  <meyering@lucent.com>
24521
24522         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
24523         * lib/unicodeio.c: Likewise.
24524
24525 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
24526
24527         * lib/config.charset: New file.
24528         * lib/localcharset.c: New file.
24529         * lib/unicodeio.h, lib/unicodeio.c: New files.
24530         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
24531         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
24532         (noinst_HEADERS): Add unicodeio.h.
24533         (all-local, install-exec-local, charset.alias): New targets.
24534
24535 2000-02-28  Paul Eggert  <eggert@twinsun.com>
24536
24537         * lib/quotearg.c (ALERT_CHAR): New macro.
24538         (quotearg_buffer_restyled): Use it.
24539
24540 2000-02-27  Jim Meyering  <meyering@lucent.com>
24541
24542         * m4/check-decl.m4: Add getenv to the list.
24543
24544 2000-02-27  Jim Meyering  <meyering@lucent.com>
24545
24546         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
24547         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
24548
24549         * lib/backupfile.c: Guard inclusion of stdlib.h with
24550         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
24551         Declare malloc if needed.
24552
24553         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
24554         `#ifndef HAVE_DECL..'
24555         now that autoconf always defines the HAVE_DECL_ symbols.
24556         * lib/human.c: Likewise.
24557         * lib/same.c: Likewise.
24558         * lib/strtoumax.c: Likewise.
24559
24560         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
24561         declaration check was not run.
24562         * lib/hash.c: Likewise.
24563         * lib/human.c: Likewise.
24564         * lib/same.c: Likewise.
24565         * lib/strtoumax.c: Likewise.
24566
24567         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
24568         `.', then first look up the entire `.'-containing string as a login
24569         name.
24570
24571 2000-02-23  Jim Meyering  <meyering@lucent.com>
24572
24573         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
24574         in place of my hack.
24575
24576 2000-02-18  Paul Eggert  <eggert@twinsun.com>
24577
24578         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
24579         (textint): New typedef.
24580         (parser_control): Member year changed from int to textint.
24581         All uses changed.
24582         (YYSTYPE): Removed; replaced by %union with int and textint members.
24583         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
24584         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
24585         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
24586         (tSNUMBER, tUNUMBER): Now of type <textintval>.
24587         (date, number, to_year): Use width of number in digits, not its value,
24588         to determine whether it's a 2-digit year, or a 2-digit time.
24589         (yylex): Store number of digits of numeric tokens.
24590         Reported by John Kendall.
24591
24592         (parser_control): Changed from struct parser_control to typedef (for
24593         consistency).  All uses changed.
24594
24595         (tID): Removed; not used.
24596         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
24597
24598 2000-02-14  Paul Eggert  <eggert@twinsun.com>
24599
24600         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
24601         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
24602
24603 2000-02-12  Jim Meyering  <meyering@lucent.com>
24604
24605         * lib/userspec.c (ISDIGIT): Define it.
24606         (isdigit): Remove definition.
24607         (is_number): Use ISDIGIT, not isdigit.
24608         <libintl.h>: Include.
24609         (_ and N_): Define.
24610         (parse_user_spec): Mark translatable strings.
24611
24612 2000-02-10  Jim Meyering  <meyering@lucent.com>
24613
24614         With these changes, nanosleep.[ch] are finally enough like the other
24615         lib/* replacement files to compile on a few more losing systems.
24616
24617         * lib/nanosleep.h: Don't include config.h.
24618         Remove prototype from declaration of nanosleep.
24619         (PARAMS): Remove now-unneeded definition.
24620         * lib/nanosleep.c: #undef nanosleep.
24621         (rpl_nanosleep): Rename from nanosleep.
24622
24623 2000-02-10  Jim Meyering  <meyering@lucent.com>
24624
24625         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
24626         gnu_nanosleep to rpl_nanosleep.
24627
24628 2000-02-09  Jim Meyering  <meyering@lucent.com>
24629
24630         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
24631         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
24632
24633 2000-02-08  Akim Demaille  <akim@epita.fr>
24634
24635         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
24636         `[' and `]' and remove uses of `changequote'.
24637         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
24638         (AC_SYS_LARGEFILE): Likewise.
24639         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
24640         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
24641         of changequote.
24642         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
24643         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
24644         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
24645         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
24646
24647 2000-02-05  Jim Meyering  <meyering@lucent.com>
24648
24649         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
24650         Remove explicit use of AC_HEADER_TIME.  It is required by
24651         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
24652         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
24653         in autoconf whereby the expansion of the latter ended up preceding
24654         the expansion of its prerequisite, AC_HEADER_TIME.
24655         Reported by Volker Borchert.
24656
24657 2000-02-03  Jim Meyering  <meyering@lucent.com>
24658
24659         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
24660
24661 2000-02-03  Jim Meyering  <meyering@lucent.com>
24662
24663         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
24664         rather than with `#if HAVE_UTMPNAME'.
24665
24666 2000-02-02  Jim Meyering  <meyering@lucent.com>
24667
24668         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
24669         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
24670         Reported by Eli Zaretskii.
24671
24672 2000-02-01  Jim Meyering  <meyering@lucent.com>
24673
24674         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
24675
24676 2000-01-31  Jim Meyering  <meyering@lucent.com>
24677
24678         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
24679         functions.  Add the time.h and sys/time.h headers along with the
24680         AC_REQUIRE'ment of AC_HEADER_TIME.
24681
24682 2000-01-31  Jim Meyering  <meyering@lucent.com>
24683
24684         * lib/nanosleep.h (nanosleep): Guard declaration with
24685         `#if ! HAVE_DECL_NANOSLEEP'.
24686         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
24687         the declaration in that vendor's sys/timers.h.
24688         Reported by Christian Krackowizer.
24689
24690         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
24691         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
24692         (ISPRINT): Likewise.
24693         Reported by Tom Tromey.
24694
24695 2000-01-30  Jim Meyering  <meyering@lucent.com>
24696
24697         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
24698
24699         * m4/prereq.m4 (utmp_includes): Define.
24700         Check for ut_user and ut_name members in both struct utmpx
24701         and struct utmp.
24702
24703 2000-01-30  Jim Meyering  <meyering@lucent.com>
24704
24705         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
24706         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
24707         header files where only utmpx.ut_user is declared.
24708
24709         * lib/readutmp.h (UT_USER): Define.
24710
24711 2000-01-29  Jim Meyering  <meyering@lucent.com>
24712
24713         * m4/lib-check.m4: New file containing library-related checks from
24714         fileutils and sh-utils (textutils had none).
24715
24716 2000-01-28  Jim Meyering  <meyering@lucent.com>
24717
24718         * m4/perl.m4: Change format of warning message to look more like that
24719         from the missing script.  Suggestion from François Pinard.
24720
24721 2000-01-25  Jim Meyering  <meyering@lucent.com>
24722
24723         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
24724         well as time.h in the compile check.
24725         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
24726         Fix typo in cross-compiling case: s/yes/no/.
24727
24728 2000-01-23  Jim Meyering  <meyering@lucent.com>
24729
24730         * m4/jm-macros.m4: Move df-related tests here from
24731         fileutils/configure.in
24732
24733         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
24734         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
24735
24736         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
24737         s/space/ac_fsusage_space/.
24738         (jm_FILE_SYSTEM_USAGE): Take two parameters.
24739
24740         * m4/ftruncate.m4: New file (derived from part of
24741         fileutils/configure.in).
24742         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
24743         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
24744
24745         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
24746         AC_SUBST these here, rather than just in sh-util/configure.in, so
24747         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
24748         all the same.
24749         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
24750         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
24751         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
24752         (AC_SUBST(POW_LIBM)): Likewise.
24753         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
24754
24755 2000-01-23  Jim Meyering  <meyering@lucent.com>
24756
24757         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
24758         obstack.c.
24759
24760 2000-01-22  Jim Meyering  <meyering@lucent.com>
24761
24762         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
24763
24764         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
24765
24766         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
24767         configure.in
24768         (AC_CHECK_HEADERS): Likewise for sh-utils.
24769         (AC_CHECK_HEADERS): Likewise for textutils.
24770         Merge the three lists of headers.
24771
24772         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
24773         from fileutils' configure.in.
24774
24775         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
24776         code. Moved tests into their own function (_jm_DECL_HEADERS) in
24777         check-decl.m4.
24778
24779         * m4/check-decl.m4: Use #if rather than #ifdef.
24780         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
24781         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
24782         (_jm_DECL_HEADERS): Define new function.
24783         (jm_CHECK_DECLARATIONS): Require it.
24784
24785 2000-01-22  Jim Meyering  <meyering@lucent.com>
24786
24787         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
24788         [! HAVE_DECL_STRTOULL]: Declare strtoull.
24789         Required for some AIX systems.  Reported by Christian Krackowizer.
24790         [TESTING] (main): New function.
24791
24792         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
24793         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
24794         letters.
24795
24796         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
24797         iswprint.
24798
24799         * lib/strverscmp.c (ISDIGIT): Define.
24800         (strverscmp): Use ISDIGIT, not isdigit.
24801
24802 2000-01-19  Jim Meyering  <meyering@lucent.com>
24803
24804         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
24805         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
24806         defines `struct timespec' in <sys/time.h>
24807
24808         * m4/c-bs-a.m4: Remove uses of changequote altogether.
24809         Thanks to Akim for explaining.
24810
24811 2000-01-17  Paul Eggert  <eggert@twinsun.com>
24812
24813         * lib/nanosleep.c (nanosleep):
24814         Don't use SA_INTERRUPT to decide whether to call sigaction, as
24815         POSIX.1 doesn't require SA_INTERRUPT and some systems
24816         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
24817         it's been part of POSIX.1 since day 1 (in 1988).
24818
24819 2000-01-17  Jim Meyering  <meyering@lucent.com>
24820
24821         * lib/interlock: Remove unused file.  Reported by François Pinard.
24822
24823 2000-01-16  Paul Eggert  <eggert@twinsun.com>
24824
24825         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
24826         alert, backslash, formfeed, and vertical tab unnecessarily in
24827         shell quoting style.
24828
24829 2000-01-16  Jim Meyering  <meyering@lucent.com>
24830
24831         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
24832         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
24833         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
24834         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
24835
24836 2000-01-16  Jim Meyering  <meyering@lucent.com>
24837
24838         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
24839         because the latter didn't work.
24840
24841 2000-01-15  Jim Meyering  <meyering@lucent.com>
24842
24843         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
24844         (AC_REPLACE_FUNCS): Add memcpy and memset.
24845         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
24846         Add strpbrk.
24847         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
24848
24849 2000-01-12  Jim Meyering  <meyering@lucent.com>
24850
24851         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
24852         (jm_PREREQ): Use it.
24853         (jm_PREREQ_READUTMP): New macro.
24854         (jm_PREREQ): Use it.
24855
24856 2000-01-11  Paul Eggert  <eggert@twinsun.com>
24857
24858         Quote multibyte characters correctly.
24859         * m4/c-bs-a.m4: New file.
24860         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
24861         (jm_PREREQ): Use it.
24862
24863 2000-01-11  Paul Eggert  <eggert@twinsun.com>
24864
24865         * m4/uintmax_t.m4: Port to autoconf 2.13.
24866
24867 2000-01-08  Jim Meyering  <meyering@ascend.com>
24868
24869         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
24870         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
24871
24872 2000-01-04  Jim Meyering  <meyering@ascend.com>
24873
24874         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
24875         jm_STRUCT_DIRENT_D_TYPE.
24876         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
24877         jm_STRUCT_DIRENT_D_INO.
24878         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
24879         jm_STRUCT_UTIMBUF.
24880         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
24881         renamings.
24882         * m4/utime.m4: Likewise.
24883
24884         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
24885         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
24886
24887 2000-01-03  Paul Eggert  <eggert@twinsun.com>
24888
24889         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
24890         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
24891
24892 2000-01-02  Jim Meyering  <meyering@ascend.com>
24893
24894         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
24895         remember if this is necessary.
24896
24897 1999-12-26  Jim Meyering  <meyering@ascend.com>
24898
24899         * m4/jm-macros.m4: Use it here.
24900         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
24901
24902 1999-12-23  Jim Meyering  <meyering@ascend.com>
24903
24904         * m4/jm-macros.m4: Check for clock_gettime (moved from
24905         fileutils/configure.in)
24906         Check for gettimeofday.
24907
24908 1999-12-20  Jim Meyering  <meyering@ascend.com>
24909
24910         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
24911         autoconf-2.14a-1999-12-20.
24912
24913 1999-12-19  Jim Meyering  <meyering@ascend.com>
24914
24915         * m4/lstat-slash.m4: New file.
24916         * m4/jm-macros.m4: Use the new macro:
24917         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24918
24919 1999-12-07  Jim Meyering  <meyering@ascend.com>
24920
24921         * m4/perl.m4: Require that File::Compare be available, too.
24922         Too many systems seem to lack it.
24923
24924         * m4/strftime.m4: Add checks for most of the cpp macros tested in
24925         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
24926
24927 1999-11-18  Paul Eggert  <eggert@twinsun.com>
24928
24929         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
24930         problem with the QNX 4.25 shell, which doesn't propagate exit
24931         status of failed commands inside shell assignments.
24932
24933 1999-11-17  Jim Meyering  <meyering@ascend.com>
24934
24935         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
24936
24937 1999-11-07  Jim Meyering  <meyering@ascend.com>
24938
24939         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
24940
24941 1999-11-06  Jim Meyering  <meyering@ascend.com>
24942
24943         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
24944         * m4/jm-macros.m4 (jm_MACROS): Use it here.
24945
24946 1999-11-05  Jim Meyering  <meyering@ascend.com>
24947
24948         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
24949         configure.in of textutils, fileutils, and sh-utils into this one
24950         (shared between those packages) file.
24951         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
24952         AC_STRUCT_ST_BLKSIZE.
24953
24954 1999-11-03  Jim Meyering  <meyering@ascend.com>
24955
24956         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
24957         of AC_CHECK_TYPE checks includes unistd.h.
24958         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
24959         Suggestion from Akim Demaille.
24960
24961 1999-10-30  Jim Meyering  <meyering@ascend.com>
24962
24963         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
24964         m4-quoted string.
24965         * m4/ls-mntd-fs.m4: Likewise.
24966         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
24967         * m4/jm-winsz1.m4: Likewise.
24968
24969         * m4/const.m4: Remove file, since the fix made it into the experimental
24970         version of autoconf.
24971         * m4/mktime.m4: Likewise.
24972
24973         * m4/check-type.m4: Remove file, now that the latest version of
24974         AC_CHECK_TYPE takes a third arg to specify additional #includes.
24975
24976         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
24977         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
24978         AC_CHECK_TYPE.
24979
24980 1999-10-04  Jim Meyering  <meyering@ascend.com>
24981
24982         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
24983
24984 1999-09-22  Paul Eggert  <eggert@twinsun.com>
24985
24986         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
24987         2.95.1 bug with HP-UX 10.20.
24988
24989 1999-09-17  Jim Meyering  <meyering@ascend.com>
24990
24991         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
24992         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
24993         due to missing strdup (against sh-utils-2.0).
24994
24995 1999-08-29  Jim Meyering  <meyering@ascend.com>
24996
24997         * m4/jm-macros.m4: Require jm_BISON.
24998         * m4/bison.m4: New file.
24999
25000 1999-08-17  Paul Eggert  <eggert@twinsun.com>
25001
25002         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
25003         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
25004
25005 1999-08-05  Jim Meyering  <meyering@ascend.com>
25006
25007         * m4/getline.m4: Rename test file from conftestdata to conftest.data
25008         to avoid conflicts with `conftest' on 8+3 filesystems.
25009         Suggestion from Eli Zaretskii.
25010
25011 1999-08-04  Jim Meyering  <meyering@ascend.com>
25012
25013         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
25014         fileutils and sh-utils (textutils's getline test was inadequate).
25015         (AM_FUNC_GETLINE): Run this test.
25016         (AC_CHECK_FUNCS): Check for getdelim.
25017         Reported by Bob Proulx.
25018
25019 1999-08-02  Jim Meyering  <meyering@ascend.com>
25020
25021         * m4/jm-macros.m4: Add a comment.
25022
25023 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25024
25025         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
25026         <inttypes.h> defines strtoumax as a macro (and not as a
25027         function).
25028
25029 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25030
25031         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
25032         that we can shift, multiply and divide unsigned long long
25033         values; Ultrix cc can't do it.
25034
25035 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25036
25037         * m4/mktime.m4: New file, which is a preview of what should appear
25038         in the next public autoconf release.
25039
25040 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25041
25042         * m4/lfs.m4: Remove this file.
25043         * m4/largefile.m4: New file.  It contains the old contents of
25044         lfs.m4, except that all names with prefix AC_LFS have been
25045         changed to use the prefix AC_SYS_LARGEFILE instead, to be
25046         compatible with future autoconf versions.  Also, some minor m4
25047         quoting problems have been fixed.
25048
25049 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25050
25051         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
25052         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
25053         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
25054         and simplify the shell code.
25055
25056 1999-08-01  Jim Meyering  <meyering@ascend.com>
25057
25058         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
25059         m4.
25060
25061 1999-07-20  Jim Meyering  <meyering@ascend.com>
25062
25063         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
25064
25065 1999-07-15  Jim Meyering  <meyering@ascend.com>
25066
25067         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
25068
25069 1999-05-22  Jim Meyering  <meyering@ascend.com>
25070
25071         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
25072
25073 1999-05-20  Jim Meyering  <meyering@ascend.com>
25074
25075         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
25076         Add a colon after each `then' in case $4 is empty.
25077
25078 1999-05-16  Jim Meyering  <meyering@ascend.com>
25079
25080         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
25081
25082 1999-05-10  Jim Meyering  <meyering@ascend.com>
25083
25084         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
25085
25086         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
25087         AC_FUNC_MKTIME.
25088
25089 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
25090
25091         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
25092
25093 1999-05-04  Paul Eggert  <eggert@twinsun.com>
25094
25095         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
25096         not CPPFLAGS, so that linking works correctly in IRIX.
25097
25098 1999-04-30  Paul Eggert  <eggert@twinsun.com>
25099
25100         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
25101
25102 1999-04-20  Paul Eggert  <eggert@twinsun.com>
25103
25104         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
25105         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
25106         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
25107         jm_AC_TYPE_UNSIGNED_LONG_LONG.
25108         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
25109
25110         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
25111
25112 1999-04-20  Jim Meyering  <meyering@ascend.com>
25113
25114         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
25115         AC_REPLACE xstroull if necessary.  From Paul Eggert.
25116         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
25117
25118 1999-04-18  Jim Meyering  <meyering@ascend.com>
25119
25120         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
25121         * m4/jm-macros.m4: Use it.
25122
25123 1999-04-06  Jim Meyering  <meyering@ascend.com>
25124
25125         * m4/strftime.m4: Remove test for %f.
25126
25127 1999-03-29  Jim Meyering  <meyering@ascend.com>
25128
25129         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
25130         superset of the AC_TYPE_* checks in the textutils, fileutils,
25131         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
25132         AC_TYPE_PID_T.
25133
25134 1999-03-28  Jim Meyering  <meyering@ascend.com>
25135
25136         * m4/jm-macros.m4: Define GNU_PACKAGE here.
25137         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
25138         replaced e.g., in the *.sh files of the sh-utils.
25139
25140 1999-03-20  Jim Meyering  <meyering@ascend.com>
25141
25142         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
25143         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
25144         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
25145
25146 1999-03-19  Jim Meyering  <meyering@ascend.com>
25147
25148         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
25149
25150 1999-03-12  Jim Meyering  <meyering@ascend.com>
25151
25152         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
25153
25154 1999-03-07  Jim Meyering  <meyering@ascend.com>
25155
25156         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
25157         declared.
25158
25159 1999-02-17  Jim Meyering  <meyering@ascend.com>
25160
25161         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
25162         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
25163
25164 1999-02-07  Jim Meyering  <meyering@ascend.com>
25165
25166         * m4/group-member.m4: New file -- extracted from sh-utils'
25167         configure.in.
25168
25169         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
25170         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
25171
25172 1999-02-06  Jim Meyering  <meyering@ascend.com>
25173
25174         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
25175         * m4/fnmatch.m4: Likewise.
25176         * m4/getgroups.m4: Likewise.
25177         * m4/lstat.m4: Likewise.
25178         * m4/malloc.m4: Likewise.
25179         * m4/putenv.m4: Likewise.
25180         * m4/realloc.m4: Likewise.
25181         * m4/regex.m4: Likewise.
25182         * m4/stat.m4: Likewise.
25183         * m4/strftime.m4: Likewise.
25184         Suggestion from Alain Magloire.
25185
25186         * m4/chown.m4: Use `.$ac_objext', not `.o'.
25187         * m4/fnmatch.m4: Likewise.
25188         * m4/getgroups.m4: Likewise.
25189         * m4/getline.m4: Likewise.
25190         * m4/lstat.m4: Likewise.
25191         * m4/malloc.m4: Likewise.
25192         * m4/memcmp.m4: Likewise.
25193         * m4/putenv.m4: Likewise.
25194         * m4/realloc.m4: Likewise.
25195         * m4/regex.m4: Likewise.
25196         * m4/stat.m4: Likewise.
25197         * m4/strftime.m4: Likewise.
25198         Suggestion from Alain Magloire.
25199
25200         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
25201         an argument.
25202
25203         * m4/regex.m4: Add a run-time Test for proper operation of
25204         re_compile_pattern.
25205
25206 1999-01-31  Jim Meyering  <meyering@ascend.com>
25207
25208         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
25209
25210 1999-01-30  Jim Meyering  <meyering@ascend.com>
25211
25212         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
25213
25214         * m4/jm-mktime.m4: Make this a wrapper around the official
25215         AM_FUNC_MKTIME rather than my private copy, now that the official one
25216         is up to date.
25217         * m4/mktime.m4: Remove file.
25218
25219         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
25220         * m4/uptime.m4: Likewise.
25221         * m4/uintmax_t.m4: Likewise.
25222
25223 1999-01-28  Jim Meyering  <meyering@ascend.com>
25224
25225         * m4/jm-macros.m4: Use jm_AFS.
25226         * m4/afs.m4: New file (from fileutils' configure.in).
25227
25228         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
25229         * m4/chown.m4: Likewise.
25230         * m4/d-ino.m4: Likewise.
25231         * m4/d-type.m4: Likewise.
25232         * m4/fnmatch.m4: Likewise.
25233         * m4/getgroups.m4: Likewise.
25234         * m4/gettext.m4: Likewise.
25235         * m4/jm-mktime.m4: Likewise.
25236         * m4/jm-winsz2.m4: Likewise.
25237         * m4/lcmessage.m4: Likewise.
25238         * m4/ls-mntd-fs.m4: Likewise.
25239         * m4/malloc.m4: Likewise.
25240         * m4/memcmp.m4: Likewise.
25241         * m4/putenv.m4: Likewise.
25242         * m4/realloc.m4: Likewise.
25243         * m4/st_mtim.m4: Likewise.
25244         * m4/strftime.m4: Likewise.
25245
25246 1999-01-16  Jim Meyering  <meyering@ascend.com>
25247
25248         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
25249         (ARGMATCH_DIE_DECL): Define.
25250
25251 1999-01-12  Jim Meyering  <meyering@ascend.com>
25252
25253         * m4/Makefile.am.in: Rewrite to avoid using fmt.
25254         Reported by Lars Hecking.
25255
25256 1999-01-10  Jim Meyering  <meyering@ascend.com>
25257
25258         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
25259         gross kludge.
25260         * m4/inttypes_h.m4: Likewise.
25261         * m4/lstat.m4: Likewise.
25262         * m4/malloc.m4: Likewise.
25263         * m4/readdir.m4: Likewise.
25264         * m4/realloc.m4: Likewise.
25265         * m4/st_dm_mode.m4: Likewise.
25266         * m4/stat.m4: Likewise.
25267         * m4/utimbuf.m4: Likewise.
25268         * m4/utimes.m4: Likewise.
25269
25270         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
25271         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
25272         comments in config.h.in are meaningful.
25273
25274         * m4/jm-macros.m4: Require autoconf-2.13 here.
25275
25276         * m4/regex.m4: By default, don't use the included regex.c on systems
25277         with glibc 2.  Suggestion from Uli Drepper.
25278
25279 1999-01-02  Jim Meyering  <meyering@ascend.com>
25280
25281         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
25282
25283 1998-12-18  Jim Meyering  <meyering@ascend.com>
25284
25285         * m4/Makefile.am.in (Makefile.am): Simplify rule.
25286         Based on a suggestion from Lars Hecking.
25287
25288 1998-11-16  Paul Eggert  <eggert@twinsun.com>
25289
25290         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
25291
25292 1998-11-16  Jim Meyering  <meyering@ascend.com>
25293
25294         * m4/lfs.m4: Double-quote the `uname...` expression.
25295
25296 1998-11-14  Jim Meyering  <meyering@ascend.com>
25297
25298         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
25299         * m4/stat.m4: Likewise.
25300
25301 1998-11-03  Jim Meyering  <meyering@ascend.com>
25302
25303         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
25304         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
25305
25306 1998-10-18  Jim Meyering  <meyering@ascend.com>
25307
25308         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
25309
25310 1998-10-17  Jim Meyering  <meyering@ascend.com>
25311
25312         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
25313         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
25314         calls for those previously hard-coded headers.  Instead, take a new
25315         parameter.
25316         (jm_CHECK_DECLARATIONS): Reflect interface change.
25317         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
25318         (jm_CHECK_DECL_LOCALTIME_R): New macro.
25319
25320         * m4/mktime.m4: Test for spring-forward gap before long-running test.
25321
25322 1998-10-14  Jim Meyering  <meyering@ascend.com>
25323
25324         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
25325         instead of "TZ=America/Vancouver".  From Paul Eggert.
25326
25327 1998-10-11  Jim Meyering  <meyering@ascend.com>
25328
25329         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
25330         This adds a test for a recently added compatibility fix for mktime.c.
25331         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
25332
25333 1998-09-27  Jim Meyering  <meyering@ascend.com>
25334
25335         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
25336
25337         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
25338         ../configure.in, including a change from Gordon Matzigkeit to allow
25339         cross-compiling for the Hurd.
25340
25341         * m4/glibc.m4: New file/macro to test for the GNU C Library
25342         versions 1 and 2.  From Gordon Matzigkeit.
25343         Indent.
25344
25345 1998-09-21  Jim Meyering  <meyering@ascend.com>
25346
25347         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
25348
25349 1998-08-18  Paul Eggert  <eggert@twinsun.com>
25350
25351         Port nanosecond-resolution times to UnixWare 2.1.2 and
25352         pedantic Solaris 2.6.
25353
25354         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
25355         AC_STRUCT_ST_MTIM.
25356         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
25357         Generate name of ns member, instead of just 1 or undef.
25358         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
25359
25360 1998-08-15  Jim Meyering  <meyering@ascend.com>
25361
25362         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
25363         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
25364         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
25365         instead of jm_TYPE_SSIZE_T.
25366
25367 1998-08-12  Jim Meyering  <meyering@ascend.com>
25368
25369         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
25370
25371 1998-08-02  Jim Meyering  <meyering@ascend.com>
25372
25373         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
25374         in acconfig.h manually.
25375
25376 1998-07-31  Paul Eggert  <eggert@twinsun.com>
25377
25378         * m4/st_mtim.m4: New file.
25379
25380 1998-07-28  Jim Meyering  <meyering@ascend.com>
25381
25382         * m4/utimes.m4: Undef stat.
25383
25384 1998-07-25  Jim Meyering  <meyering@ascend.com>
25385
25386         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
25387         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
25388
25389 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
25390
25391         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
25392         uid and gid actually remain unchanged.
25393
25394 1998-07-07  Jim Meyering  <meyering@ascend.com>
25395
25396         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
25397
25398 1998-07-04  Jim Meyering  <meyering@ascend.com>
25399
25400         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
25401         to prove that this macro can be used in packages without regex.c.
25402
25403 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
25404
25405         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
25406         is to be used.
25407
25408 1998-07-03  Jim Meyering  <meyering@ascend.com>
25409
25410         * m4/gettext.m4: Add -lintl if it's found to be necessary.
25411
25412         * m4/gettext.m4: New file -- from gettext-0.10.35.
25413         * m4/lcmessage.m4: Likewise.
25414         * m4/progtest.m4: Likewise.
25415
25416         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
25417         * m4/jm-macros.m4: Require the new macro.
25418
25419 1998-06-29  Jim Meyering  <meyering@ascend.com>
25420
25421         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
25422         for the definition of NGROUPS (used in a system header included
25423         by sys/mount.h).
25424
25425 1998-06-28  Jim Meyering  <meyering@ascend.com>
25426
25427         * m4/ls-mntd-fs.m4: New file.
25428         * m4/fstypename.m4: New file.
25429
25430         * m4/jm-macros.m4: Require the new macro.
25431         * m4/jm-glibc-io.m4: New file.
25432
25433 1998-05-19  Jim Meyering  <meyering@ascend.com>
25434
25435         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
25436         * m4/lchown.m4: New file.
25437
25438         * m4/Makefile.am.in: New file.
25439         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
25440
25441 1998-05-14  Jim Meyering  <meyering@ascend.com>
25442
25443         * m4/Makefile.am (EXTRA_DIST): Add them.
25444         * m4/jm-macros.m4: New file.
25445         * m4/utimbuf.m4: New file.
25446
25447 1998-05-12  Jim Meyering  <meyering@ascend.com>
25448
25449         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
25450
25451 1998-05-11  Jim Meyering  <meyering@ascend.com>
25452
25453         * m4/isc-posix.m4: New file.
25454
25455 1998-05-10  Jim Meyering  <meyering@ascend.com>
25456
25457         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
25458
25459 1998-05-09  Jim Meyering  <meyering@ascend.com>
25460
25461         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
25462         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
25463         with automake.
25464
25465         * m4/ssize_t.m4: New file.
25466         * m4/mktime.m4: Remove file -- the new automake has this now.
25467
25468 1998-04-26  Jim Meyering  <meyering@ascend.com>
25469
25470         * m4/assert.m4: New file.
25471         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
25472
25473 1998-04-05  Jim Meyering  <meyering@ascend.com>
25474
25475         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
25476         (jm_PREREQ): Use it here.
25477
25478 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
25479
25480         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
25481         in acconfig.h.
25482
25483 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
25484
25485         * m4/prereq.m4: New file.
25486         * m4/error.m4: New file.
25487         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
25488
25489 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
25490
25491         * m4/getline.m4: Don't set am_cv_func_working_getline before the
25492         cache-check for the same variable -- that defeated the purpose of
25493         the test; the test program was never run.  This was a problem only
25494         on systems with losing getline functions -- HP-UX 10.20 is one.
25495         Reported by Bjorn Helgaas.
25496
25497 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
25498
25499         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
25500
25501 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
25502
25503         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
25504
25505         * m4/const.m4: New file.  Use an initializer in this declaration
25506         typedef int charset[2]; const charset x;
25507         Reported by Bob Glickstein.
25508
25509 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
25510
25511         * m4/chown.m4: Fix reversed types on -1 args to chown.
25512         From Kaveh Ghazi.
25513
25514 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
25515
25516         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
25517         Add lseek and memchr.
25518
25519         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
25520         T.E.Dickey <dickey@clark.net> said that some older preprocessors
25521         have a 20-character limit on names.
25522
25523 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
25524
25525         * m4/inttypes_h.m4: New file.
25526         * m4/uintmax_t.m4: New file.
25527         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
25528
25529 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
25530   Free Software Foundation, Inc.
25531 Copying and distribution of this file, with or without modification,
25532 are permitted provided the copyright notice and this notice are preserved.